Showing posts with label ORA-12514. Show all posts
Showing posts with label ORA-12514. Show all posts

Tuesday, 23 May 2017

Oracle: DGMGRL seamless switch

Ensure:
Primary and Standby databases : ALOK and BLOK

Command facing problem:
DGMGRL > switchover to 'BLOK';   #means switch roles and make BLOK as primary

Above command when executed, primary converts to standby and standby converts to primary, primary database comes up normally but standby remains down and has to be manually started. Once resolution is in place the switch is seamless. PERFCTO!!!

Responding to :
Unable to connect to database
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor


listner.ora is configured correctly:

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

ADR_BASE_LISTENER = /u01/app/oracle
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME =ALOK_DGMGRL)
      (ORACLE_HOME =/u01/app/oracle/product/11.2.0)
      (SID_NAME = ALOK)
    )
    (SID_DESC =
      (GLOBAL_DBNAME =BLOK_DGMGRL)
      (ORACLE_HOME =/u01/app/oracle/product/11.2.0)
      (SID_NAME = BLOK)
    )
   )

Ensure: In bold _DGMGRL service is up or else standby would have to be manually started. For some reason if the service is not visible, restart listner(reload doesnot help)
oracle@localhost:~$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 01-JUN-2017 10:53:51

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                01-JUN-2017 10:52:04
Uptime                    0 days 0 hr. 1 min. 46 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "ALOK" has 1 instance(s).
  Instance "ALOK", status READY, has 1 handler(s) for this service...
Service "ALOKXDB" has 1 instance(s).
  Instance "ALOK", status READY, has 1 handler(s) for this service...
Service "ALOK_DGB" has 1 instance(s).
  Instance "ALOK", status READY, has 1 handler(s) for this service...
Service "ALOK_DGMGRL" has 1 instance(s).
  Instance "ALOK", status UNKNOWN, has 1 handler(s) for this service...
Service "BLOK" has 1 instance(s).
  Instance "BLOK", status READY, has 1 handler(s) for this service...
Service "BLOK_DGB" has 1 instance(s).
  Instance "BLOK", status READY, has 1 handler(s) for this service...
Service "BLOK_DGMGRL" has 1 instance(s).
  Instance "BLOK", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully


Thursday, 4 May 2017

Oracle: Listener show service as blocked/ORA-12514

lsnrctl status:
Service "BLOK" has 1 instance(s).
  Instance "BLOK", status BLOCKED, has 1 handler(s) for this service

Solution:
Assuming your listener name is LISTENER(default), add the following entry with correct home,global_dbname,sid_name.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME =ALOK)
      (ORACLE_HOME =/u01/app/oracle/product/11.2.0)
      (SID_NAME = ALOK)
    )
    (SID_DESC =
      (GLOBAL_DBNAME =BLOK)
      (ORACLE_HOME =/u01/app/oracle/product/11.2.0)
      (SID_NAME = BLOK)
    )
   )


Post above change: restart the listener.
Service "BLOK" has 1 instance(s).
  Instance "BLOK", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

Also solution to 
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
above while creating auxiliary database via RMAN.