hello im try to execute store procedure in logstash and not work, im view de 1[Logstash cannot call SQL Stored Procedure] but not ecute my sp.
that is my code:
errorlog.conf:
input {
jdbc {
jdbc_driver_library => "/home/java/mssql-jdbc-7.0.0.jre8.jar"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_connection_string => "jdbc:sqlserver://lab-sql2.e-contact.cl;database=master;loginTimeout=30;"
jdbc_password => "test"
jdbc_user => "test"
schedule => "* * * * "
#statement => "SELECT 1 AS ID , 2 AS PEPITO"
#statement => "SELECT servername ,traking FROM DBA.dbo.errorLog"
statement_filepath => "/etc/logstash/scripts/errorLog.txt"
jdbc_paging_enabled => "true"
last_run_metadata_path => "/home/.logstash_jdbc_last_run"
}
}
that is the error
[2019-01-14T08:52:02,353][ERROR][logstash.inputs.jdbc ] Java::ComMicrosoftSqlserverJdbc::SQLServerException: Incorrect syntax near the keyword 'execute'.: SELECT TOP (1) count() AS [COUNT] FROM (execute dbo.dbaSP_readErrLog
) AS [T1]
[2019-01-14T08:52:02,398][WARN ][logstash.inputs.jdbc ] Exception when executing JDBC query {:exception=>#<Sequel::DatabaseError: Java::ComMicrosoftSqlserverJdbc::SQLServerException: Incorrect syntax near the keyword 'execute'.>}
[2019-01-14T08:52:16,820][WARN ][logstash.runner ] SIGTERM received. Shutting down.
[2019-01-14T08:52:17,751][INFO ][logstash.pipeline ] Pipeline has terminated {:pipeline_id=>"main", :thread=>"#<Thread:0x27210cf2 run>"}