Wednesday, July 23, 2014

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

"Warning: You are no longer connected to ORACLE" while converting database using DGMGRL.

Converting the Primary database into physical standby using Data Guard Broker, the following warning messages were generated:
Unable to connect to database

ORA-12514: TNS: listener does not currently know of service requested in connect descriptor
Failed. Warning: You are no longer connected to ORACLE.
Please complete the following steps and reissue the CONVERT command:


start up and mount instance "stdb" of database "stdb


[oracle@localhost ~]$ dgmgrl

DGMGRL for Linux: Version 11.2.0.1.0 - Production

 Copyright (c) 2000, 2009, Oracle. All rights reserved.
 Welcome to DGMGRL, type "help" for information.

DGMGRL> connect sys
Password:
Connected.

DGMGRL> show configuration
Configuration - DG_orcl
  Protection Mode: MaxPerformance
  Databases:
    stdb - Primary database
   orcl - Physical standby database

Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS

Check the value of StaticConnectIdentifier property for stby database:-

DGMGRL> show database 'stdb' 'StaticConnectIdentifier';
  StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=stdb_DGMGRL)(INSTANCE_NAME=stdb)(SERVER=DEDICATED)))'

NOTE: - change service_name property with your Global database name.
           Below line is a single line.

DGMGRL> edit database 'stdb' set property ‘StaticConnectIdentifier'='(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=stdb)(INSTANCE_NAME=stdb)(SERVER=DEDICATED)))';
Property "StaticConnectIdentifier" updated

Show the current value for StaticConnectIdentifier property:-

DGMGRL> show database 'stdb' 'StaticConnectIdentifier';
  StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=stdb)(INSTANCE_NAME=stdb)(SERVER=DEDICATED)))'

DGMGRL> show configuration

Configuration - DG_orcl
  Protection Mode: MaxPerformance
  Databases:
    stdb - Primary database
    orcl - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS

Now starts conversion:-

DGMGRL> switchover to orcl;

Performing switchover NOW, please wait...
New primary database "orcl" is opening...
Operation requires shutdown of instance "stdb" on database "stdb"
Shutting down instance "stdb"...
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance "stdb" on database "stdb"
Starting instance "stdb"...
ORACLE instance started.
Database mounted.
Switchover succeeded, new primary is "orcl"


DGMGRL> show configuration

  Configuration - DG_orcl
  Protection Mode: MaxPerformance
  Databases:
    orcl - Primary database
    stdb - Physical standby database

Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS

NOTE: - before switchover to standby database check that sequence numbers are same both the side.

DGMGRL> switchover to stdb

Performing switchover NOW, please wait...
New primary database "stdb" is opening...
Operation requires shutdown of instance "orcl" on database "orcl"
Shutting down instance "orcl"...
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance "orcl" on database "orcl"
Starting instance "orcl"...
ORACLE instance started.
Database mounted.
Switchover succeeded, new primary is "stdb"
DGMGRL>



My problem resolved with this post. try it and  give your suggestion for this if you feel that i need to add something else in this which i missed.....

All the best...:)

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete