Home » Other » Client Tools » SQL*PLUS, TOAD and Command Prompt
SQL*PLUS, TOAD and Command Prompt [message #288913] Wed, 19 December 2007 00:58 Go to next message
Muddassar
Messages: 28
Registered: March 2007
Junior Member
Hi,
I am trying to connect to an Oracle instance using the 'System' user and its password.
I AM ABLE TO DO THAT when i connect through SQL*PLUS.
But when i try to connect through TOAD or the 'sqlplus' command in Windows Command Promt, i get TNS Error:
ORA-12154: TNS:could not resolve service name.
Can anyone suggest, why is this happening ?
Re: SQL*PLUS, TOAD and Command Prompt [message #288926 is a reply to message #288913] Wed, 19 December 2007 01:18 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Just make sure you have proper tns entries in your tnsnames.ora file.
Almost every oracle client will require its "own" tnsnames.ora.
May be sqlplus is using a different one or not using at all (if the instance is local).
Please search forum. Too many postings deal with this.
Re: SQL*PLUS, TOAD and Command Prompt [message #288974 is a reply to message #288926] Wed, 19 December 2007 03:22 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
In order not to maintain multiple TNSNAMES.ORA files, you might choose to create only one, but set the environment variable called TNS_ADMIN and point it to that "universal" file (actually, a directory it is stored in). For example, on MS Windows it would look like
M:\>set tns_admin
tns_admin=C:\0_Oracle_library
Re: SQL*PLUS, TOAD and Command Prompt [message #288981 is a reply to message #288974] Wed, 19 December 2007 03:37 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Or you could use "IFILE". Link

MHE
Previous Topic: how to know which system db iam accessing
Next Topic: geting error when trying to connect to oracle
Goto Forum:
  


Current Time: Fri Mar 29 09:54:48 CDT 2024