# Fetch data from oracle database using logstash

**URL:** <https://discuss.elastic.co/t/fetch-data-from-oracle-database-using-logstash/103134>\
**Category:** Logstash\
**Created:** [October 8, 2017, 2:26am UTC](https://discuss.elastic.co/t/fetch-data-from-oracle-database-using-logstash/103134 "2017-10-08T02:26:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sumit\_Gupta1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sumit_gupta1/32/22861_2.png) [@Sumit\_Gupta1](https://discuss.elastic.co/u/Sumit_Gupta1)\
**Post date:** [October 8, 2017, 2:26am UTC](https://discuss.elastic.co/t/fetch-data-from-oracle-database-using-logstash/103134/1 "2017-10-08T02:26:21Z")

</div>

I'm using following config file:

input {  
jdbc {  
jdbc\_validate\_connection =\> true  
jdbc\_driver\_library =\> "/app/logstash-5.6.2/lib/ojdbc7.jar"  
jdbc\_driver\_class =\> "Java::oracle.jdbc.driver.OracleDriver"  
jdbc\_connection\_string =\> "jdbc:oracle:thin:@localhost:1521/apextest"  
jdbc\_user =\> "**"  
jdbc\_password =\> "**"  
statement =\> "SELECT sysdate from dual"  
}  
}  
output {  
stdout { codec =\> rubydebug }  
}

I ran this file, Getting following error:

[2017-10-07T21:42:29,342][ERROR][logstash.inputs.jdbc] Unable to connect to database. Tried 1 times {:error\_message=\>"Java::JavaSql::SQLRecoverableException: Listener refused the connection with the following error:\nORA-12514, TNS:listener does not currently know of service requested in connect descriptor\n "}  
[2017-10-07T21:42:29,343][WARN][logstash.inputs.jdbc] Exception when executing JDBC query {:exception=\>#\<Sequel::DatabaseConnectionError: Java::JavaSql::SQLRecoverableException: Listener refused the connection with the following error:  
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor

> }  
> [2017-10-07T21:42:29,344][WARN][logstash.inputs.jdbc] Attempt reconnection.

Could you please tell me what is issue?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 8, 2017, 9:05am UTC](https://discuss.elastic.co/t/fetch-data-from-oracle-database-using-logstash/103134/2 "2017-10-08T09:05:47Z")

</div>

This is more of an Oracle question. Logstash is just the messenger here. Have you looked at a description of the ORC-12514 error message, e.g. the one at [https://docs.oracle.com/cd/B19306\_01/server.102/b14219/net12500.htm](https://docs.oracle.com/cd/B19306_01/server.102/b14219/net12500.htm)?

---

<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:** [November 5, 2017, 9:06am UTC](https://discuss.elastic.co/t/fetch-data-from-oracle-database-using-logstash/103134/3 "2017-11-05T09:06:01Z")

</div>

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