How do I setup an Oracle TNS client on my ALM Server?
Question ID: 107769
1
0

We want to setup ALM to work with a "TNS Client" using a tnsnames.ora file, how do we do that?

Marked as spam
Posted by (Questions: 91, Answers: 5)
Asked on July 25, 2017 9:56 pm
84 views
Answers (1)
0
Private answer

If using a server different than the Oracle one, you need to load an Oracle Client and setup a TNS that points to your Oracle instance.

Getting an Oracle TNS client to work on a QC server PC

1) Download the appropriate Oracle Client from Oracle (i.e. 11.2.0.1, 11.2.0.3, 12.1.0.1, 12.1.0.2, etc)
Google ''Oracle 11g client'' or ''Oracle 12c client'' to get to download page, need Oracle login (free)

2) Go to Oracle Home folder on Oracle SERVER PC, drill down further to
NETWORKADMIN folder

Copy 1 file and save (temporarily) to a place accessible from QC server:

*tnsnames.ora*

*[NOTE: your DBA may have this file ready for copying - for the purpose of setting up your TNS.]*

3) Load Oracle Client on QC Server PC (Administrator option works best)

Take note of Home folder, you will need it later.

4) Allow it to attempt to create Listener and TNS, but you will be replacing these files.

a. Try with your knowledge of the host and SID name - it might work, but remember the name you give the TNS service

5) Locate your Oracle Home folder (specified earlier on second page of Client install).
Go to <_ora home_> NETWORKADMIN folder

Copy the file that was saved earlier to the temporary place accessible by the QC server:
*tnsnames.ora*

Paste them on TOP of the existing one.

6) Edits for *tnsnames.ora*

- Change path to same file in first
line
- Confirm that you can PING the HOST
mentioned in the file - you may need
to substitute the IP address, or put
a line in your
WindowsSystem32driversetchosts
file.

*[Take Note of the Host and Service Name - this is the SID or TNS name you might need to connect to your databases]*

- Save File

7) Test with ''Net Manager'' (in Start Menu ''Oracle home/Configuration and Migration tools'' menu.

Expand tree: Local/Service Naming

Select your SID-TNS name, then click the test service button to the left.

The connection test will probably fail, click on Change Login to re-specify the Userid/pass
Try your Oracle ''qcadmin'' user (the one setup by the DBA for QC to use when creating project schemas behind the scenes) and password.

8) Test again - it should work this time.

9) Now you can use Oracle!

**The patterns for the ''connect string'' are below:**

*With TNS:*

jdbc:mercury:oracle:TNSNamesFile=<_Path and TNSNames file_> :TNSServerName= <_TNSServerName_>

jdbc:mercury:oracle:TNSNamesFile=C:Oraclenetworkadmintnsnames.ora;TNSServerName=ORA11G_PROD

*Without TNS, it would look like:*

jdbc:mercury:oracle:// : <_port_> ; sid= <_SID_>

jdbc:mercury:oracle://ORACLE11G:1521;sid=ORA11G

Marked as spam
Posted by (Questions: 4, Answers: 509)
Answered on July 25, 2017 10:25 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top