Facing issue in Stored Procedure Call in Logstash

I am Facing Error in Stored Procedure Call in Logstash JDBC Plugin..

This is my JDBC Input Plugin

input {
jdbc {
jdbc_driver_library => "D:\Elastic\elasticsearch-6.0.0\lib\sqljdbc42.jar"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_connection_string => "jdbc:sqlserver://192.168.0.168;databaseName=Fobesoft_05Dec2017;"
jdbc_user => "sa"
jdbc_password => "RCK$1234"
statement_filepath => "D:\query.txt"

}
}

output {

stdout { codec => rubydebug }
}

this is StoredProcedure File

EXEC FOBE_REPORTPAGE_YEAR '562','2017'
CREATE PROC Fobe_reportpage_year (@RESTID INT,
@YEAR INT)
AS
BEGIN
DECLARE @PERIOD AS INT; ..............................

\logstash-6.0.1\bin>[2017-12-28T12:18:00,416][ERROR][logstash.inputs.jdbc ] Java::ComMicrosoftSqlserverJdbc::SQLServerException: Incorrect syntax near the keyword 'CREATE'.: SELECT TOP (1) count(*) AS [COUNT] FROM ( FOBE_REPORTPAGE_YEAR '562','2017'

can anyone pls help me...where i did my mistake..

I'm confused. It looks like you're creating a stored procedure. Why would you want to do that with Logstash?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.