Once we set it up standby database in RAC cluster its recommended to add that standby database to OCR. So server control can start database automatically when servers are restarted or crashed and keep in managed recovery Mode.
In My case SUNIL is Database name and SUNILSTBY is DB_UNIQUE_NAME for Standby Database.
-- Add Database To CLUSTER
srvctl add database -d SUNIL -n LAB2 -o /XXXXXXXXXXXXXXXXX/12.1.0.2/DB -p /XXXXXXXXXXXX/12.1.0.2/DB/dbs/spfileSUNILSTBY.ora -r physical_standby -a SUNA,SUNB -s mount
-- Add Instance
srvctl add instance -d SUNIL -i SUNILSTBY -n LAB2
-- Check Config Database
srvctl config database -d SUNIL
Database unique name: SUNILSTBY
Database name: LAB2
Oracle home: /XXXXXXXXXXX/12.1.0.2/DB
Oracle user: oracle
Spfile: /XXXXXXXXXXXXXX/dbs/spfileSUNILSTBY.ora
Password file:
Domain:
Start options: mount
Stop options: immediate
Database role: PHYSICAL_STANDBY
Management policy: AUTOMATIC
Server pools:
Disk Groups: SUNA,SUNB
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: dba
OSOPER group: dba
Database instances: SUNILSTBY
Configured nodes: LAB2
Database is administrator managed
-- Start Database
srvctl status database -d SUNIL
Instance SUNILSTBY is not running on node LAB2
srvctl start database -d SUNIL
-- Status of Database
srvctl status database -d SUNIL
Instance SUNILSTBY is running on node LAB2
In 12C Database Server Control (srvctl ) keep standby database into managed recovery mode so we don't need to put database in recovery mode manually. in previous versions server control used to keep mount mode for standby databases then manually keep it recovery mode. In 12C not required.
-- Verify Recovery is Started or not
ps -ef|grep -i mrp
oracle 15707 1 0 13:42 ? 00:00:00 ora_mrp0_SUNILSTBY
oracle 16063 5287 0 13:43 pts/0 00:00:00 grep -i mrp
(or)
SQL> select process,status,sequence# from gv$managed_standby where process='MRP0';
PROCESS STATUS SEQUENCE#
--------- ------------ ----------
MRP0 APPLYING_LOG 61
In My case SUNIL is Database name and SUNILSTBY is DB_UNIQUE_NAME for Standby Database.
-- Add Database To CLUSTER
srvctl add database -d SUNIL -n LAB2 -o /XXXXXXXXXXXXXXXXX/12.1.0.2/DB -p /XXXXXXXXXXXX/12.1.0.2/DB/dbs/spfileSUNILSTBY.ora -r physical_standby -a SUNA,SUNB -s mount
-- Add Instance
srvctl add instance -d SUNIL -i SUNILSTBY -n LAB2
-- Check Config Database
srvctl config database -d SUNIL
Database unique name: SUNILSTBY
Database name: LAB2
Oracle home: /XXXXXXXXXXX/12.1.0.2/DB
Oracle user: oracle
Spfile: /XXXXXXXXXXXXXX/dbs/spfileSUNILSTBY.ora
Password file:
Domain:
Start options: mount
Stop options: immediate
Database role: PHYSICAL_STANDBY
Management policy: AUTOMATIC
Server pools:
Disk Groups: SUNA,SUNB
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: dba
OSOPER group: dba
Database instances: SUNILSTBY
Configured nodes: LAB2
Database is administrator managed
-- Start Database
srvctl status database -d SUNIL
Instance SUNILSTBY is not running on node LAB2
srvctl start database -d SUNIL
-- Status of Database
srvctl status database -d SUNIL
Instance SUNILSTBY is running on node LAB2
In 12C Database Server Control (srvctl ) keep standby database into managed recovery mode so we don't need to put database in recovery mode manually. in previous versions server control used to keep mount mode for standby databases then manually keep it recovery mode. In 12C not required.
-- Verify Recovery is Started or not
ps -ef|grep -i mrp
oracle 15707 1 0 13:42 ? 00:00:00 ora_mrp0_SUNILSTBY
oracle 16063 5287 0 13:43 pts/0 00:00:00 grep -i mrp
(or)
SQL> select process,status,sequence# from gv$managed_standby where process='MRP0';
PROCESS STATUS SEQUENCE#
--------- ------------ ----------
MRP0 APPLYING_LOG 61
No comments:
Post a Comment