Can we use stored procedure in logstash using jdbc

Hi,

Can we use stored procedure in logstash using jdbc? As proc we are executing in oracle for update the data.

You help will be most appreciated.

Thanks & Regards,
Raj

Hi,

What DB are you using? I know that for Oracle you can call functions in SQL so you could set the following as statement: "select proc() from dual"

Best regards
Wolfram

Thank you for your response.

I am using oracle DB. I want to use stored procedure. How can we use in logstash?

You can create a logstash pipeline with an input block similar to the following:

input {
	jdbc {
		jdbc_driver_library => "/home/<user>/logstash/ojdbc6-12.1.0.2.jar"
		jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
		jdbc_connection_string => "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<host>)(PORT=6203))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=P<servicename>)))"
		jdbc_user => "${input.jdbc.jdbc_user}"
		jdbc_password => "${input.jdbc.jdbc_password}"
		jdbc_validate_connection => true
		schedule => "* * * * *"
		statement => "select proc() from dual"
	}
}

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