STEP#1 Shutdown Primary Database for planned failover on 12c
STEP#2 On Standby Database
Stop MRP Process -
Now primary database up make primary database as standby database
STEP#2 On Standby Database
Stop MRP Process -
- ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
- ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;
- ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
- ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
- ALTER DATABASE OPEN;
Now primary database up make primary database as standby database
- Startup mount
- ALTER DATABASE CONVERT TO PHYSICAL STANDBY;
- SHUTDOWN IMMEDIATE;
- STARTUP MOUNT;
- ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
######################################################################
SQL> @d
NAME INSTANCE_NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE CURRENT_SCN FAILOVER_SCN
--------- ---------------- ------------------------------ -------------------- ---------------- ------------------ ----------------------------------------
SMRPRODB SMRPRODB SMRPRODB READ WRITE PRIMARY YES 439121110
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1.6267E+11 bytes
Fixed Size 7653480 bytes
Variable Size 2.4696E+10 bytes
Database Buffers 1.3744E+11 bytes
Redo Buffers 529215488 bytes
Database mounted.
SQL> @d
NAME INSTANCE_NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE CURRENT_SCN FAILOVER_SCN
--------- ---------------- ------------------------------ -------------------- ---------------- ------------------ ----------------------------------------
xxxPRODB xxxPRODB xxxPRODB MOUNTED PRIMARY YES 439121110
SQL> ALTER DATABASE CONVERT TO PHYSICAL STANDBY;
Database altered.
SQL> @d
NAME INSTANCE_NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE CURRENT_SCN FAILOVER_SCN
--------- ---------------- ------------------------------ -------------------- ---------------- ------------------ ----------------------------------------
SMRPRODB SMRPRODB SMRPRODB MOUNTED PHYSICAL STANDBY YES 0
SQL> SHUTDOWN IMMEDIATE;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> STARTUP MOUNT;
ORACLE instance started.
Total System Global Area 1.6267E+11 bytes
Fixed Size 7653480 bytes
Variable Size 2.4696E+10 bytes
Database Buffers 1.3744E+11 bytes
Redo Buffers 529215488 bytes
Database mounted.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
Database altered.
SQL> @d
NAME INSTANCE_NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE CURRENT_SCN FAILOVER_SCN
--------- ---------------- ------------------------------ -------------------- ---------------- ------------------ ----------------------------------------
SMRPRODB SMRPRODB SMRPRODB READ WRITE PRIMARY YES 439121110
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1.6267E+11 bytes
Fixed Size 7653480 bytes
Variable Size 2.4696E+10 bytes
Database Buffers 1.3744E+11 bytes
Redo Buffers 529215488 bytes
Database mounted.
NAME INSTANCE_NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE CURRENT_SCN FAILOVER_SCN
--------- ---------------- ------------------------------ -------------------- ---------------- ------------------ ----------------------------------------
xxxPRODB xxxPRODB xxxPRODB MOUNTED PRIMARY YES 439121110
SQL> ALTER DATABASE CONVERT TO PHYSICAL STANDBY;
Database altered.
SQL> @d
NAME INSTANCE_NAME DB_UNIQUE_NAME OPEN_MODE DATABASE_ROLE CURRENT_SCN FAILOVER_SCN
--------- ---------------- ------------------------------ -------------------- ---------------- ------------------ ----------------------------------------
SMRPRODB SMRPRODB SMRPRODB MOUNTED PHYSICAL STANDBY YES 0
SQL> SHUTDOWN IMMEDIATE;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> STARTUP MOUNT;
ORACLE instance started.
Total System Global Area 1.6267E+11 bytes
Fixed Size 7653480 bytes
Variable Size 2.4696E+10 bytes
Database Buffers 1.3744E+11 bytes
Redo Buffers 529215488 bytes
Database mounted.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
Database altered.
No comments:
Post a Comment