Can't use InitializationString with oracle jdb driver
In
confluence/database/src/main/java/com/keysight/database/helpers/DatabaseQueryHelper.java
It seems to me you're not building the correct URL for the oracle driver when a Connection String Suffix value is used. In fact, everytime I try do add a value to that field in the connection profile configuration, I end up with the error
Error creating connection: 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
or
Error creating connection: java.sql.SQLRecoverableException: IO Error: NL Exception was generated TNS-04605: Invalid syntax error: Unexpected char or LITERAL "(" before or at ( alter session set current_schema =
Depending on wetter I use or not "(" in the string value, .e.g:
InitializationString=(alter session set NLS_SORT=french)
Comments (6)
-
-
it’s possible the connection string is no longer valid. The Oracle database I was connecting to when I wrote this has been converted to postgresql, so I’ll have to see if I can find another oracle database to connect to and try to reproduce the problem.
-
- changed status to open
-
-
assigned issue to
-
assigned issue to
-
I’m able to connect with this, “jdbc:oracle:thin:@10.17.23.6:1521/FREE?defaultRowPrefetch=10000”, so I think the syntax is OK.
-
- changed status to resolved
- Log in to comment
I can’t find the use of “?” in a JDBC connection string for the Oracle driver. Could this be the reason?