# Logstash jdbc call store procedure oracle

**URL:** <https://discuss.elastic.co/t/logstash-jdbc-call-store-procedure-oracle/186833>\
**Category:** Logstash\
**Created:** [June 21, 2019, 8:38am UTC](https://discuss.elastic.co/t/logstash-jdbc-call-store-procedure-oracle/186833 "2019-06-21T08:38:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RPa](https://avatars.discourse-cdn.com/v4/letter/r/e8c25b/32.png) [@RPa](https://discuss.elastic.co/u/RPa)\
**Post date:** [June 21, 2019, 8:38am UTC](https://discuss.elastic.co/t/logstash-jdbc-call-store-procedure-oracle/186833/1 "2019-06-21T08:38:36Z")

</div>

Hello,  
I created some procedure in oracle database aum which return sys\_refcursor.  
create or replace procedure aum  
IS  
v\_code NUMBER;  
v\_errm VARCHAR2(200);  
rc sys\_refcursor;  
BEGIN  
open rc for select username from f=dba\_users;  
dbms\_sql.return\_result(rc);  
EXCEPTION  
WHEN OTHERS THEN  
v\_code := SQLCODE;  
v\_errm := SUBSTR(SQLERRM, 1, 200);  
DBMS\_OUTPUT.PUT\_LINE (v\_code || ' ' || v\_errm);  
END;  
/

My configuration in logstash is  
input {  
jdbc {  
jdbc\_validate\_connection =\> true  
jdbc\_driver\_library =\> "/etc/logstash/ojdbc8.jar"  
jdbc\_driver\_class =\> "Java::oracle.jdbc.driver.OracleDriver"  
jdbc\_connection\_string =\> "jdbc:oracle:thin:@//xxxxxcom:1521/xxx"  
jdbc\_user =\> "system"  
jdbc\_password =\> "xxxxx"  
statement =\> "{call system.aum}"  
schedule =\> "\*/3 \* \* \* \*"  
}  
}  
output {  
file {  
path =\> "/tmp/my\_out\_file3.txt"  
codec =\> "rubydebug"  
}  
}

Problem is, that output data from procedure doesn't inside in file. I see in log , that logstash call the procedure ok, but there is some problem with output ?  
Any idea ?  
Thanks  
Richard

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 19, 2019, 8:38am UTC](https://discuss.elastic.co/t/logstash-jdbc-call-store-procedure-oracle/186833/2 "2019-07-19T08:38:56Z")

</div>

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