A common error we face while doing switchover operation using DGMGRL.

DGMGRL> switchover to std_testdb;
Performing switchover NOW, please wait...
Operation requires a connection to instance "testdb" on database "std_testdb"
Connecting to instance "testdb"...
Connected.
New primary database "std_testdb" is opening...
Operation requires startup of instance "testdb" on database "testdb"
Starting instance "testdb"...
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 to finish switchover:
	start up instance "testdb" of database "testdb"

We can see in above code switchover operation is not completed it needs manual startup of new DR database.

To overcome this check your static connect identifier for DR and production database.

DGMGRL>  show database std_testdb staticconnectidentifier;
  StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=STD_TESTDB_DGMGRL)(INSTANCE_NAME=testdb)(SERVER=DEDICATED)))'
DGMGRL> show database testdb staticconnectidentifier;
  StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test1)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=testdb_DGMGRL)(INSTANCE_NAME=testdb)(SERVER=DEDICATED)))'

Change according to your database and server details.

DGMGRL> edit database testdb set property staticconnectidentifier='(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=testdb)(INSTANCE_NAME=testdb)(SERVER=DEDICATED)))';
Property "staticconnectidentifier" updated
DGMGRL> edit database std_testdb set property staticconnectidentifier='(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.10)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=testdb)(INSTANCE_NAME=testdb)(SERVER=DEDICATED)))';
Property "staticconnectidentifier" updated
DGMGRL> show databaSE TESTDB STATICCONNECTIDENT

Now check switch over.

DGMGRL> SWITCHOVER TO STD_TESTDB;
Performing switchover NOW, please wait...
Operation requires a connection to instance "testdb" on database "std_testdb"
Connecting to instance "testdb"...
Connected.
New primary database "std_testdb" is opening...
Operation requires startup of instance "testdb" on database "testdb"
Starting instance "testdb"...
ORACLE instance started.
Database mounted.
Database opened.
Switchover succeeded, new primary is "std_testdb"

Stay tuned for More articles on Oracle DataGuard

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Telegram Channel: https://t.me/helporacle

Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/

Joel Perez’s LinkedIn: Joel Perez’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

About The Author

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.