ORA-12514: TNS:listener does not currently know of service requested in connect desc

mreyes

New member
Joined
Apr 1, 2010
Messages
1
Programming Experience
5-10
Hi, I know this is a common error when you try to connect to oracle, but I was two days trying all to resolve that and does not have any solution. My application use System.Data.OracleClient to establish the connection with the database, in my development environment everything works fine. Then I migrate the database and the application to the production server, there start the problem. When the aplication try to connect to the database it's throw the following error
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor.

My connection string looks like this:
connectionString="Data Source=192.000.00.0/shrmsadp.aa.aa.aaaa;Persist Security Info=True;User ID=user;Password=user1;Unicode=True"

My tns file looks like this:
SHRMSADP =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = HostName.aa.aa.aaaa)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = shrmsadp.aa.aa.aaaa)
)
)

When I saw the listener.log it's always try to connect to Service_Name=Localhost. This is the listener.log message:

01-APR-2010 12:00:31 * (CONNECT_DATA=(SERVICE_NAME=localhost)(CID=(PROGRAM=C:\Documents and Settings\Interfaces.exe)(HOST=HostName)(USER=user))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=2424)) * establish * localhost * 12514
TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
 
connectionString="Data Source=SHRMSADP;Persist Security Info=True;User ID=user;Password=user1;Unicode=True"

make sure your tnsnames you edited is the one in use! (sometimes you can end up with several copies of tnsnames)
make sure you have a default host extension in your sqlnet.ora that matches the rest of the setup

The error message youre getting is that your database instance hasnt actually registered itself with TNS on its local machine
 

Latest posts

Back
Top