I'm getting an error when trying to JDBC connect to Oracle regarding SID

msmith
Kilo Contributor

I'm getting the following error from my midserver - anyone have any idea's what might be wrong ... The Oracle DB TSA is suggesting that I have to register the SID somewhere.

Do I need to set up the "Probe" for output to get this working?   - Any direction welcome   thx MSA

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
The Connection descriptor used by the client was:
oc11d0-scan.devfg.rbc.com:1527:pl00_dev2

oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:261)
oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:441)
oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
java.sql.DriverManager.getConnection(DriverManager.java:664)
java.sql.DriverManager.getConnection(DriverManager.java:208)
com.service_now.mid.connections.jdbc.JDBCConnection.connect(JDBCConnection.java:74)
com.service_now.mid.connections.jdbc.JDBCConnectionFactory.create(JDBCConnectionFactory.java:49)
com.service_now.mid.connections.ConnectionCachePool.getAvailableConnection(ConnectionCachePool.java:79)
com.service_now.mid.connections.ConnectionCache.get(ConnectionCache.java:90)
com.service_now.mid.probe.JDBCProbe.getJDBCConnection(JDBCProbe.java:662)
com.service_now.mid.probe.JDBCProbe.probe(JDBCProbe.java:97)
com.service_now.mid.probe.AProbe.process(AProbe.java:66)
com.service_now.mid.queue_worker.AWorker.runWorker(AWorker.java:104)
com.service_now.mid.queue_worker.AManagedThread.run(AManagedThread.java:36)

com.service_now.mid.probe.JDBCProbe.getJDBCConnection(JDBCProbe.java:666)
com.service_now.mid.probe.JDBCProbe.probe(JDBCProbe.java:97)
com.service_now.mid.probe.AProbe.process(AProbe.java:66)
com.service_now.mid.queue_worker.AWorker.runWorker(AWorker.java:104)
com.service_now.mid.queue_worker.AManagedThread.run(AManagedThread.java:36)

1 ACCEPTED SOLUTION

richfred
Mega Expert

You can resolve this by overwriting the Connect URL string in the Data Source form:


1- Navigate to System Import Sets > Administration > Data Sources


2- Click on the Cog icon right below the filter on the Data Sources List


3- On the personalize List Columns Window, choose Connection URL and move it from the Available to Selected window.


4- Click OK, and now you can see the URL for each entry in the list.


5- Create a new Data Source.


6- Save the new data source record.


7- Back in the Data Source list double-click on the connection URL and replace the default URL with your RAC Database jdbc string:



jdbc:oracle:thin@//oc11d0-scan.devfg.rbc.com:1527/pl00_dev2



Every time you modify this record, it will overwrite the "Connect URL" because there is a business rule that is fired every time a change is made to it; therefore you will have to replace the URL with the RAC string every time this information is changed.  


View solution in original post

12 REPLIES 12

Artemis15
Kilo Guru

connection SID is not correct....it means that your connection string is not correct...


RKH
Tera Contributor

@Artemis15 , We are facing below error while inserting record into DB, process flow is once request is submitted we are calling JDBCProbe for processing the SQL statement and returning the result, though record is inserted into DB below result is returned as error - Please let me know if you have come across this error and any inputs to resolve this error.

 

 
Error message:
SQLState: 24000
java.sql.SQLException: ORA-01002: fetch out of sequence

at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:509)
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:461)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1104)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:550)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:268)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:655)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:229)
at oracle.jdbc.driver.T4CStatement.fetch(T4CStatement.java:1037)
at oracle.jdbc.driver.OracleStatement.fetchMoreRows(OracleStatement.java:3456)
at oracle.jdbc.driver.InsensitiveScrollableResultSet.fetchMoreRows(InsensitiveScrollableResultSet.java:742)
at oracle.jdbc.driver.InsensitiveScrollableResultSet.absoluteInternal(InsensitiveScrollableResultSet.java:698)
at oracle.jdbc.driver.InsensitiveScrollableResultSet.next(InsensitiveScrollableResultSet.java:412)
at com.service_now.monitor.jdbc.JDBCRowSet.next(JDBCRowSet.java:178)
at com.service_now.monitor.jdbc.JDBCMultiRowSet.next(JDBCMultiRowSet.java:19)
at com.service_now.mid.probe.JDBCProbe.doSelect(JDBCProbe.java:486)
at com.service_now.mid.probe.JDBCProbe.doQuery(JDBCProbe.java:341)
at com.service_now.mid.probe.JDBCProbe.probe(JDBCProbe.java:228)
at com.service_now.mid.probe.AProbe.process(AProbe.java:155)
at com.service_now.mid.queue_worker.AWorker.runWorker(AWorker.java:140)
at com.service_now.mid.queue_worker.AWorkerThread.run(AWorkerThread.java:20)
at com.service_now.mid.threadpool.ResourceUserQueue$RunnableProxy.run(ResourceUserQueue.java:643)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: Error : 1002, Position : 0, Sql =

msmith
Kilo Contributor

Thanks Akash.... but can you help me understand what part of the connection string might be wrong.



the Oracle DB team has given me this information _ I have also attached screenshot of where we have plugged details in .   Hoping this will help you help me




USER ID IN DEV: USPLSKN0


USER ID IN QA: USPLSKN0


Both passwords will be sent to you separately
via secured email.



Connection String for DEV environment:


jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS =
(PROTOCOL = TCP)(HOST = oc11d0-scan.devfg.rbc.com)(PORT = 1527))(LOAD_BALANCE =
YES)(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME =
pl00_dev2)(FAILOVER_MODE = (TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY
= 5))))




IIPM.jpg


jnguy1
ServiceNow Employee
ServiceNow Employee

See if this thread helps: Listener does not currently know of SID given i... | Oracle Community



I'm also moving this conversation into the Developer Community area since it isn't a specific issue with your developer instance so that your thread can have additional visibility.



Thanks.


Jack