While Playing with DGMGRL ,During Switchover testing I got following Two Errors
Error Number 1:
Unable to connect to database using (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=prd1.hana.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=LAPPRIMDB_DGMGRL.hana.com)(INSTANCE_NAME=LAPPRIMDB)(SERVER=DEDICATED)))
ORA-12541: TNS:no listener
Failed.
Please complete the following steps to finish switchover:
start up and mount instance "LAPPRIMDB" of database "lapprimdb"
Error Number 2:
Starting instance "LAPDRDB"...
Unable to connect to database using (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.19)(PORT=1526))(CONNECT_DATA=(SERVICE_NAME=LAPDRDB_DGMGRL.hana.com)(INSTANCE_NAME=LAPDRDB)(SERVER=DEDICATED)))
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Failed.
Please complete the following steps to finish switchover:
start up and mount instance "LAPDRDB" of database "LAPDRDB"
After Switchover I have to start a database Manually. But this is not correct setup , something gone Wrong .
So let's see the
show database lapdrdb verbose
show database lapprimdb verbose
I checked the connection and I see the Service_name=LAPPRIMDB_DGMGRL.hana.com its used
on both side.
StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=prd1.hana.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=LAPPRIMDB_DGMGRL.hana.com)(INSTANCE_NAME=LAPPRIMDB)(SERVER=DEDICATED)))'
StaticConnectIdentifier ='(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.19)(PORT=1526))(CONNECT_DATA=(SERVICE_NAME=LAPDRDB_DGMGRL.hana.com)(INSTANCE_NAME=LAPDRDB)(SERVER=DEDICATED)))'
And my tns entry does not contain Service_name=LAPPRIMDB_DGMGRL.hana.com on prim and Standby Side.
LAPPRIMDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.18)(PORT = 1526))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = LAPPRIMDB)======> Here SID Used Not Sevice_name
)
)
LAPDRDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.19)(PORT = 1526))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = LAPDRDB)======>Here SID Used Not Sevice_name
)
)
To resolve the above error I update the StaticConnectIdentifier value.
upd()
{
dgmgrl <<eof
connect sys/abc#123@lapdrdb
edit database lapprimdb set property StaticConnectIdentifier='lapprimdb';
edit database lapdrdb set property StaticConnectIdentifier='lapdrdb';
eof
}
upd
Then I have begin one more time Switchover activity.
[oraprd@prd2 STANDBY]$ dgmgrl /
DGMGRL for Linux: Release 19.0.0.0.0 - Production on Mon May 31 16:00:27 2021
Version 19.8.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
Welcome to DGMGRL, type "help" for information.
Connected to "LAPDRDB"
Connected as SYSDG.
DGMGRL> connect sys/abc#123@lapdrdb
Connected to "LAPDRDB"
Connected as SYSDBA.
DGMGRL> show configuration;
Configuration - NewDR
Protection Mode: MaxAvailability
Members:
LAPDRDB - Primary database
lapprimdb - Physical standby database
Fast-Start Failover: Disabled
Configuration Status:
SUCCESS (status updated 59 seconds ago)
DGMGRL> switchover to 'lapprimdb';
Performing switchover NOW, please wait...
Operation requires a connection to database "lapprimdb"
Connecting ...
Connected to "LAPPRIMDB"
Connected as SYSDBA.
New primary database "lapprimdb" is opening...
Operation requires start up of instance "LAPDRDB" on database "LAPDRDB"
Starting instance "LAPDRDB"...
Connected to an idle instance.
ORACLE instance started.
Connected to "LAPDRDB"
Database mounted.
Connected to "LAPDRDB"
Switchover succeeded, new primary is "lapprimdb"
This Time I am successful to do switchover Without Error.
So Please careful while Setup the DGMGRL , Particular about the tnsentry and Listener ora configuration , Because sometime we used the Service_name or SID in Configuration.
And here in my setup I have used the SID in both tns & Listener file.
By default, the broker assumes a static service name of db_unique_name_DGMGRL.db_domain and expects the listener has been started with the following content in the listener.ora file:
LISTENER = (DESCRIPTION =
(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=host_name)
(PORT=port_num))))
SID_LIST_LISTENER=
(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=host_name)
(PORT=port_num))))
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=sid_name)
(GLOBAL_DBNAME=db_unique_name_DGMGRL.db_domain)
(ORACLE_HOME=oracle_home)
(ENVS="TNS_ADMIN=oracle_home/network/admin")))
(GLOBAL_DBNAME=db_unique_name_DGMGRL.db_domain)
(ORACLE_HOME=oracle_home)
(ENVS="TNS_ADMIN=oracle_home/network/admin")))
My Entry :-
SID_LIST_LISTENERDRDB =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = LAPDRDB.hana.com)
(ORACLE_HOME = /oracle/PRD/19)
(SID_NAME = LAPDRDB)
)
(SID_DESC =
(GLOBAL_DBNAME = LAPDRDB_DGMGRL)
(ORACLE_HOME = /oracle/PRD/19)
(SID_NAME = LAPDRDB)
)
)
LISTENERDRDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.19)(PORT = 1526))
)
No comments:
Post a Comment