Page 1 of 1

Oracle Connection error

Posted: Wed May 04, 2005 5:29 pm
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

Posted: Wed May 04, 2005 9:25 pm
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.

Posted: Wed May 04, 2005 9:41 pm
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

Posted: Wed May 04, 2005 11:18 pm
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.