#1 2023-06-06 19:09:55

rajbhela
Member
Registered: 2023-06-06

jdbc connection string to connect to Oracle autonomous database

Are there any examples of URLs to connect to the Oracle autonomous database? Perhaps "jdbc:oracle:thin:@sliqdbt_high?TNS_ADMIN=/home/opc/.ocisliqdbt".
The above does not work - "connection test has failed"

Offline

#2 2023-06-06 22:29:17

justinf
Member
Registered: 2023-06-06

Re: jdbc connection string to connect to Oracle autonomous database

we were able to resolve this issue.  we think it had to do with the directory starting with a "."

Offline

#3 2023-06-07 08:05:44

eduardo
Administrator
Registered: 2016-11-01
Website

Re: jdbc connection string to connect to Oracle autonomous database

Hi justinf,

an example Oracle URL is this:
jdbc:oracle:thin:@my-ip:1521/localdb

I am not sure if Oracle autonomous URL's are different, but if you resolved the issue, can you pls post the URL that works in your case?

Regards,
Eduardo

Offline

#4 2023-06-07 16:49:49

justinf
Member
Registered: 2023-06-06

Re: jdbc connection string to connect to Oracle autonomous database

The Autonomous database uses an oracle wallet which is a set of files that is required for authentication.  One of those files is a tnsnames.ora file which contains the sliqdbt_high. 

To resolve our issue we had to move the wallet files to a directory that didn't start with a period and it worked: jdbc:oracle:thin:@sliqdbt_high?TNS_ADMIN=/usr/src/wallet

In order for this to work, the TNS_ADMIN variable must be set to the directory containing the wallet.  It could be set as an OS Environment variable, as a java -D parameter, or in the URL like above.

We also had to add a few more jars to the WEB-INF/lib folder

Offline

#5 2023-06-07 17:54:06

eduardo
Administrator
Registered: 2016-11-01
Website

Re: jdbc connection string to connect to Oracle autonomous database

Hi justinf,

thanks a lot for this detailed information! We will include this in the Oracle-datasource documentation.

Which jars exactly did you have to add to WEB-INF/lib ?

Pls note that it is better to create an external configuration directory. WEB-INF/lib will be overridden in the next RS version, while the external configuration directory not.
https://reportserver.net/en/guides/conf … ion-Files/
https://reportserver.net/en/guides/conf … Configdir/

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB