Oracle Connection error

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
rcil
Charter Member
Charter Member
Posts: 70
Joined: Sat Jun 05, 2004 1:37 am

Oracle Connection error

Post by rcil »

Hello All,

I am not able to view the data for the Oracle9i stage. The error is ORA-12154: TNS:could not resolve service name. I tried on the datastage server and got the same error

Code: Select all

$ sqlplus username/password@SID

SQL*Plus: Release 9.2.0.4.0 - Production on Wed May 4 19:22:24 2005

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

ERROR:
ORA-12154: TNS:could not resolve service name
But when I use Sqlplus and enter my user name and password it works

Code: Select all

$ sqlplus

SQL*Plus: Release 9.2.0.4.0 - Production on Wed May 4 19:21:17 2005

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Enter user-name: rcil
Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Hope I get some help in resolving the issue.

thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

When you use sqlplus you don't specify a SID so sqlplus is picking up a value from your ORACLE_SID environment variable.

What happens when you try sqlplus user/password@SID suggests that the SID you're specifying is not in tnsnames.ora on the machine from which you're trying to connect.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rcil
Charter Member
Charter Member
Posts: 70
Joined: Sat Jun 05, 2004 1:37 am

Post by rcil »

suggests that the SID you're specifying is not in tnsnames.ora on the machine from which you're trying to connect.
Ray, Thanks for the reply. Can I know where do I find the tnsnames.ora file on the unix machine (DataStage Server). The client machine does have the SID in tnsnames.ora file.

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

Post by chulett »

Basically in exactly the same place you'd find it on your client pc. :wink:

Check $ORACLE_HOME/network/admin unless it has been overridden by the use of the $TNS_ADMIN environment variable.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply