Home » Other » Client Tools » Can connect using SQL developer but not SQL Plus! (Oracle 11g)
Can connect using SQL developer but not SQL Plus! [message #402546] Mon, 11 May 2009 07:50 Go to next message
ayaz_ncr
Messages: 8
Registered: May 2009
Junior Member
Hi,

I am getting this error when connecting to Oracle through SQL Plus (and Crystal Reports as well):

ORA-12154: TNS:could not resolve the connect identifier specified


Now this seems a familiar message and from forums the solution should be to have proper entry in tnsnames.ora and Sqlnet.ora file. I checked and found that the tns entry is perfect.

Sqlnet.ora:

SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)


tnsnames.ora:


UAT1= 
(DESCRIPTION=
(ADDRESS= (PROTOCOL=tcp) (HOST= xx.xx.xx.xx) (PORT=1523))
(CONNECT_DATA= (service_name=UAT1))
)


DEV1 =
(DESCRIPTION=
(ADDRESS_LIST =
		(ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 1523))
		)
	(CONNECT_DATA =(SID = DEV1)
	))


To my surprise, I found that I was able to connect easily through SQL Developer tool.

I have another tns entry for a different database in the tnsnames.ora file (DEV1) and I am able to connect to this database from SQL Developer as well as from SQL Plus.

Please let me know why I am getting the message when connecting (UAT1 database) using SQL Plus (and Crystal Reports). I need to Create a Crystal report connecting to the database.

Thanks in advance,
Ayaz
Re: Can connect using SQL developer but not SQL Plus! [message #402567 is a reply to message #402546] Mon, 11 May 2009 09:18 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
Step 1: Check if the tnsnames.ora file really is the one you are using. Chances are (99% of the time in my case) that you have multiple tnsnames.ora files.
To make sure you are looking at the correct one: screw up a working connection and see if you still can connect using sqlplus.
Re: Can connect using SQL developer but not SQL Plus! [message #411326 is a reply to message #402546] Fri, 03 July 2009 02:23 Go to previous message
pujaverma
Messages: 4
Registered: July 2009
Junior Member
ya you can connect from it .
:):)Smile
------
fusion
-------
Previous Topic: start oracle in browser
Next Topic: Can I download SQL+ from Oracle website?
Goto Forum:
  


Current Time: Thu Mar 28 10:39:29 CDT 2024