Friday, January 2, 2009

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

Unable to connect to Oracle remotely,
ORA-12514 TNS: listener does not currently know of service requested in connect

Problem Description:

Problem accessing an Oracle instance remotely. Suppose we have two systems/machines, one is running Oracle 10g database server, the other has oracle 10g client software installed. The problem is accessing the instance "asdb" from the client machines using sqlplus.

We can access the instance on the server, using sqlplus. However, from client, I'm getting the following message:
======================================================
% sqlplus username/password@asdb
SQL*Plus: Release 10.1.0.3.0 - Production on Wed May 4 23:03:04 2005
Copyright (c) 1982, 2004, Oracle. All rights reserved.
ERROR:

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

Tnsping reveals that the Net8 connectivity is OK.

Now the question is how can i connect to the "asdb" instance remotely?

Solution:

1. Copy the exact entries of tnsnames.ora from server to client machine.

2. Check the host entry in tnsnames.ora and /etc/hosts file. Both should have same entries for Client machine.

3. If still problem persists, Please check carefully your service name. You can do that by login to your server using SQLPLUS using any account and execute the following command:
SQL> show parameter service_name
Copy the value and set it in SERVICE_NAME of your TNSNAMES.ORA file.

Hope this helps....

No comments: