# Connect to Oracle DB using JDBC input plugin

**URL:** <https://discuss.elastic.co/t/connect-to-oracle-db-using-jdbc-input-plugin/246365>\
**Category:** Logstash\
**Created:** [August 25, 2020, 11:23pm UTC](https://discuss.elastic.co/t/connect-to-oracle-db-using-jdbc-input-plugin/246365 "2020-08-25T23:23:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![newtologstash](https://avatars.discourse-cdn.com/v4/letter/n/c4cdca/32.png) [@newtologstash](https://discuss.elastic.co/u/newtologstash)\
**Post date:** [August 25, 2020, 11:23pm UTC](https://discuss.elastic.co/t/connect-to-oracle-db-using-jdbc-input-plugin/246365/1 "2020-08-25T23:23:30Z")

</div>

Hi,

I'm able to connect to oracle database using oracle jdbc thin driver with the below config file. In the original config file we have the username/password parameters defined.

```
input {
    jdbc {
          jdbc_validate_connection => true
          jdbc_connection_string => "jdbc:oracle:thin:@<host>:<port>/<service>"
          jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
          statement_filepath => "filename"
}

```

But now we want to connect to the same oracle database in a more secure manner by using the TCPS port (using TLS).

I just tried by replacing TCP port# with TCPS port# in the connection string, but got below error:  
`Unable to connect to database. Tried 1 times {:error_message=>"Java::JavaSql::SQLRecoverableException: IO Error: Connection reset"}`

The reference logstash document for jdbc input plugin does not says anything about using certs/TLS or I may be missing something.  
Is there is any reference document to configure logstash for oracle TLS connection, or if anyone can help us on the parameters which we would have to update for TLS connections.

Thanks.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [August 25, 2020, 11:54pm UTC](https://discuss.elastic.co/t/connect-to-oracle-db-using-jdbc-input-plugin/246365/2 "2020-08-25T23:54:07Z")

</div>

> [@newtologstash](#):
>
> But now we want to connect to the same oracle database in a more secure manner by using the TCPS port (using TLS).

That is really an Oracle question rather than a logstash question. You enable tcps in the connection string. [This](https://www.oracle.com/technetwork/database/enterprise-edition/wp-oracle-jdbc-thin-ssl-130128.pdf) is old, but frequently referenced.

---

<div class="post-metadata">

**Author:** ![newtologstash](https://avatars.discourse-cdn.com/v4/letter/n/c4cdca/32.png) [@newtologstash](https://discuss.elastic.co/u/newtologstash)\
**Post date:** [August 26, 2020, 12:05am UTC](https://discuss.elastic.co/t/connect-to-oracle-db-using-jdbc-input-plugin/246365/3 "2020-08-26T00:05:13Z")

</div>

Adding few more details.

We have oracle client working on the same server, and when we try sqlplus to test the connection for the same db using TCPS, then it is working fine with some properties (as mentioned in the document shared by you) defined in oracle client sqlnet/tns file.

My doubt here is, do we need to explicitly configure any logstash property to use TCPS port when connecting to oracle database using logstash jdbc input plugin ?

---

<div class="post-metadata">

**Author:** ![newtologstash](https://avatars.discourse-cdn.com/v4/letter/n/c4cdca/32.png) [@newtologstash](https://discuss.elastic.co/u/newtologstash)\
**Post date:** [August 26, 2020, 4:41pm UTC](https://discuss.elastic.co/t/connect-to-oracle-db-using-jdbc-input-plugin/246365/4 "2020-08-26T16:41:11Z")

</div>

wondering if anyone else is connecting logstash to oracle using jdbc input plugin with SSL enabled.

---

<div class="post-metadata">

**Author:** ![erickgvsat](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@erickgvsat](https://discuss.elastic.co/u/erickgvsat)\
**Post date:** [August 28, 2020, 1:07am UTC](https://discuss.elastic.co/t/connect-to-oracle-db-using-jdbc-input-plugin/246365/5 "2020-08-28T01:07:08Z")

</div>

Has anyone figured this out, is this Oracle SSL (TCPS) feature available with JDBC input plugin?

---

<div class="post-metadata">

**Author:** ![newtologstash](https://avatars.discourse-cdn.com/v4/letter/n/c4cdca/32.png) [@newtologstash](https://discuss.elastic.co/u/newtologstash)\
**Post date:** [August 28, 2020, 7:32pm UTC](https://discuss.elastic.co/t/connect-to-oracle-db-using-jdbc-input-plugin/246365/6 "2020-08-28T19:32:43Z")

</div>

Nothing yet. we are still trying to find workaround.

---

<div class="post-metadata">

**Author:** ![newtologstash](https://avatars.discourse-cdn.com/v4/letter/n/c4cdca/32.png) [@newtologstash](https://discuss.elastic.co/u/newtologstash)\
**Post date:** [August 29, 2020, 1:16am UTC](https://discuss.elastic.co/t/connect-to-oracle-db-using-jdbc-input-plugin/246365/7 "2020-08-29T01:16:38Z")

</div>

Did anyone tried connecting to oracle database using jdbc input for TCPS.

---

<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:** [September 26, 2020, 1:16am UTC](https://discuss.elastic.co/t/connect-to-oracle-db-using-jdbc-input-plugin/246365/8 "2020-09-26T01:16:44Z")

</div>

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