Visit Counter

Wednesday, January 29, 2014

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


I tnsping standby database from primary,it works but when i try to connect to standby from primary as:


[oracle@rac1 bin]$ tnsping orastd

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 29-DEC-2010 21:50:08

Copyright (c) 1997, 2009, Oracle.  All rights reserved.d
Used parameter files:
/ora/oracle/ora11g/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias

Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.0.0.24)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = orastd)))
OK (0 msec)


When I connect to standby database using SQL getting the error.

SQL> connect sys/password@orastd as sysdba

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


Solution:

Looks like your standby DB instance is not register with the listener.

You have to register db using NETMGR or edit listener.ora file.









$ cat listener.ora


















 LSNRCTL>  status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.0.0.23)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                30-JAN-2014 00:57:33
Uptime                    0 days 1 hr. 46 min. 36 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /ora/oracle/ora11g/network/admin/listener.ora
Listener Log File         /ora/oracle/ora11g/base/diag/tnslsnr/rac2/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.0.0.23)(PORT=1521)))
Services Summary...
Service "orastd" has 1 instance(s).
  Instance "orastd", status UNKNOWN, has 1 handler(s) for this service...
Service "orarpri" has 1 instance(s).
  Instance "orapri", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully
LSNRCTL>             





No comments:

Post a Comment