How to add TNS_ADMIN in Project

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Amit_111
Participant
Posts: 134
Joined: Sat Mar 24, 2007 11:37 am

How to add TNS_ADMIN in Project

Post by Amit_111 »

Hi,

I need to store the tnsnames.ora file in other location and let DS use the same from there.

When my Job executes I am not able to see this parameter in the Environment Variables list in DS Director logs.

I added this $TNS_ADMIN in dsenv with the new path where I want this file to be but after i execute ./dsenv and then echo $TNS_ADMIN, it still shows the old path and also I cannot see it still in the job log in director.

My job is aborting giving the error
The connector could not establish a connection to the default Oracle server. Method: OCIServerAttach, Error code: 12,162, Error message ORA-12162: TNS:net service name is incorrectly specified.
Kindly request you to provide some pointers to add this ENv variable in the job.

Thank You !!!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Add it as a User Defined variable to the project... but adding it to dsenv should also work. Show us your syntax, you may not be exporting it.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Amit_111
Participant
Posts: 134
Joined: Sat Mar 24, 2007 11:37 am

Post by Amit_111 »

This is what is written in the dsenv file
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
I have added the TNS entry in the file tnsnames.ora at this location but somehow it is still not showing in the DS Director log and the job is aborting giving the error
Exception thrown from CC_OraConnection::verifyConnection, file CC_OraConnection.cpp, line 4398: The connector could not establish a connection to the default Oracle server. Method: OCIServerAttach, Error code: 12,162, Error message ORA-12162: TNS:net service name is incorrectly specified.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

First off, that's the default location so there's no need to have $TNS_ADMIN set. Have you verified your TNS entry is correct?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Amit_111
Participant
Posts: 134
Joined: Sat Mar 24, 2007 11:37 am

Post by Amit_111 »

Hi Craig,

Yes, thats the default path but I was more focusing on trying to bring the TNS_ADMIN env variable to be seen in DS Director logs in the Environment Lists.

Also the tns entry is proper, I will check further on it but I was concerned why that parameter is not shown in DS Environment list logs.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Again, if you want to add it to the project, create a User Defined variable with that name. You could set it to $ENV and then override it in a job, or just set your other path in the project so all jobs use it, if that's what you need.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Open the Administrator client, select your project on the Projects tab, click Properties then click Environment. You'll now be in the workspace of which Craig speaks. Open the User Defined branch and add TNS_ADMIN and any other environment variables you may required (such as ORACLE_SID).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply