JDBC Connection to Oracle DB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2018 05:35 PM
Hi friends,
We are trying to connect to Oracle DB to get table information to populate our CMDB with the applications and responsibilities.
In our DEV instance worked fine.
We moved to TEST instance and getting the error below, our DBA's are telling that this might be on ServiceNow side, but not sure yet.
The Query field is selected to bring all rows in the table.
_____
MID Server reported error: java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193)
at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:873)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1167)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1289)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1491)
at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:406)
at com.service_now.monitor.jdbc.JDBCRowSet.query(JDBCRowSet.java:64)
at com.service_now.mid.probe.JDBCProbe.doSelect(JDBCProbe.java:312)
at com.service_now.mid.probe.JDBCProbe.doQuery(JDBCProbe.java:198)
at com.service_now.mid.probe.JDBCProbe.probe(JDBCProbe.java:123)
at com.service_now.mid.probe.AProbe.process(AProbe.java:84)
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)
_______
Any information would be much appreciated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2018 12:47 AM
Hi Luizlucena,
Have you made any further progress in regards to this issue, did it turn out to be an issue on the Database side?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2018 10:26 AM
Thanks for the follow up, Joel.
Unfortunately not yet.
By the way, we had an answer this morning from our DB admins:
"Glad it’s working in GBQC. The code deployed there is the same as in GBUAT and we’re only deploying view code. That tells me the issue isn’t with Oracle. Seems like a syntax error with the calling application."
Have no idea where to check the query ootb.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2021 05:29 AM
Hi Luiz,
I'm facing the same issue. Have you found what was causing the error?
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2020 11:55 PM
Hi Luiz,
'ORA-00933: SQL command not properly ended' from the experience, the most often cause is a semicolon at the end of the SQL. Try to check there is no semicolon at the end of your query. Of course, it can be caused by anything else within the SQL.
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2021 09:55 AM
Hi Jan,
Hope you had already find the solution.
Basically, if you have multiple instances you need to make sure your ServiceNow instances are connecting to the proper Oracle instances.
Our issue was that in our ServiceNow instance, the Oracle instance was xxxxxxxqc.
Our ServiceNow TEST instance was supposed to connect to our UAT Oracle instance.
Make sure you're using the correct credentials allowed to connect to your Oracle instance.