
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2019 02:46 PM
Receiving the following error when attempting to import data from jdbc oracle data source:
MID Server reported error: java.sql.SQLException: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:458)
oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)
oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
java.sql.DriverManager.getConnection(DriverManager.java:664)
java.sql.DriverManager.getConnection(DriverManager.java:208)
com.service_now.mid.connections.jdbc.JDBCConnection.establishConnection(JDBCConnection.java:102)
com.service_now.mid.connections.jdbc.JDBCConnection.connect(JDBCConnection.java:74)
com.service_now.mid.connections.jdbc.JDBCConnectionFactory.create(JDBCConnectionFactory.java:65)
com.service_now.mid.connections.ConnectionCachePool.getAvailableConnection(ConnectionCachePool.java:82)
com.service_now.mid.connections.ConnectionCache.get(ConnectionCache.java:94)
com.service_now.mid.probe.JDBCProbe.getJDBCConnection(JDBCProbe.java:769)
com.service_now.mid.probe.JDBCProbe.probe(JDBCProbe.java:117)
com.service_now.mid.probe.AProbe.process(AProbe.java:96)
com.service_now.mid.queue_worker.AWorker.runWorker(AWorker.java:125)
com.service_now.mid.queue_worker.AWorkerThread.run(AWorkerThread.java:20)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
Solved! Go to Solution.
- Labels:
-
Discovery
-
Orchestration (ITOM)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2019 04:52 PM
That looks OK. The trick is if ahdev is the SID or a service name. If it is the service name, then you need
jdbc:oracle:thin:@//<servername.mycompany.com>:1521:/ahdev

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2019 04:24 PM
This error is basically saying your connection string is somehow wrong. Are you sure you have the right server name and instance name? The listener name/SID needs to exactly match then name given in the listener definition on the DB server. You need to be specific with aliases and the difference between the Oracle SID and the listener name. Are you sure you are using the correct connection string?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2019 04:37 PM
I will double check with the DBA's but I entered in the info they gave me. And the server name they gave me is active.
When you say be specific with the aliases and the difference between the Oracle SID and the listener name, does that mean on the database those need to be the same, or when I am asking the DBA for the SID whom is not familiar with ServiceNow to ask for the listener or even the service name?
the connection string I let auto populate to the following:
jdbc:oracle:thin:@<servername.mycompany.com>:1521:ahdev
(minus the <> brackets and of course my companys server fqdn)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2019 04:52 PM
That looks OK. The trick is if ahdev is the SID or a service name. If it is the service name, then you need
jdbc:oracle:thin:@//<servername.mycompany.com>:1521:/ahdev

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2019 05:07 AM
I have tried that and a different error occurs shown below, I have reached out to the dba team to triple check the info they provided.
MID Server reported error: java.sql.SQLException: java.sql.SQLException: Invalid Oracle URL specified
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:441)
java.sql.DriverManager.getConnection(DriverManager.java:664)
java.sql.DriverManager.getConnection(DriverManager.java:208)
com.service_now.mid.connections.jdbc.JDBCConnection.establishConnection(JDBCConnection.java:102)
com.service_now.mid.connections.jdbc.JDBCConnection.connect(JDBCConnection.java:74)
com.service_now.mid.connections.jdbc.JDBCConnectionFactory.create(JDBCConnectionFactory.java:65)
com.service_now.mid.connections.ConnectionCachePool.getAvailableConnection(ConnectionCachePool.java:82)
com.service_now.mid.connections.ConnectionCache.get(ConnectionCache.java:94)
com.service_now.mid.probe.JDBCProbe.getJDBCConnection(JDBCProbe.java:769)
com.service_now.mid.probe.JDBCProbe.probe(JDBCProbe.java:117)
com.service_now.mid.probe.AProbe.process(AProbe.java:96)
com.service_now.mid.queue_worker.AWorker.runWorker(AWorker.java:125)
com.service_now.mid.queue_worker.AWorkerThread.run(AWorkerThread.java:20)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
at com.service_now.mid.probe.JDBCProbe.getJDBCConnection(JDBCProbe.java:773)
at com.service_now.mid.probe.JDBCProbe.probe(JDBCProbe.java:117)
at com.service_now.mid.probe.AProbe.process(AProbe.java:96)
at com.service_now.mid.queue_worker.AWorker.runWorker(AWorker.java:125)
at com.service_now.mid.queue_worker.AWorkerThread.run(AWorkerThread.java:20)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)