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
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