Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Adding a DataSource with ServiceName

Markus StraussDec 27 2017 — edited Jan 3 2018

We have migrated our database to 12.2 Enterprise.

Now we no longer use SID's for the databases. Instead we have a Service_Name.

So far I red the documentation and thought the correct way to do now is using a tnsnames.ora file for defining the database connection instead of the set of jdbc_host, jdbc_port and jdbc_sid.

We added a Export for TNS_ADMIN to /home/glasfish/.bashrc for the path to  /var/opt/oracle/tnsnames.ora (OS is Red hat Linux and we use a glasfish at the moment).

I also thought the jdbc_user and jdbc_Password has to stay for the logon and we added jdbc_tns_name to the defined database inside tnsnames.ora.

The first curiose Thing is taht in some cases we need ConnectionName in the tnsnames.ora file some programms like to find ConnectionName.world (even if you use ConnectionName inside the Programm). For this reason both versions are inside the file.

Final Information, there is no Oracle Client installed on the Linux Server because we thought the TNS_ADMIN envireoment variable is enough to find the file.

Thx for your help

Markus

This post has been answered by Markus Strauss on Jan 3 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 31 2018
Added on Dec 27 2017
1 comment
333 views