Status Check:
select FORCE_LOGGING, DATABASE_ROLE, PROTECTION_LEVEL, PROTECTION_MODE, OPEN_MODE, LOG_MODE from v$database;
archive log list;
select max(sequence#) from v$archived_log where applied='YES';
select process,status,sequence# from v$managed_standby;
Open Standby Database (read only):
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
alter database open read only;
alter database recover managed standby database disconnect from session;
Restart Standby Database:
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
shutdown immediate;
startup nomount;
alter database mount standby database;
alter database recover managed standby database disconnect from session;
SwitchOver Process:
On Primary:
SELECT SWITCHOVER_STATUS FROM V$DATABASE;
ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN;
SHUTDOWN IMMEDIATE;
STARTUP nomount;
alter database mount standby database;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT from session;
On Standby:
SELECT SWITCHOVER_STATUS FROM V$DATABASE;
ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN;
SHUTDOWN IMMEDIATE;
STARTUP;
select name, open_mode from v$database;
archive log list;
FailOver Process:
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH SKIP STANDBY LOGFILE;
SELECT SWITCHOVER_STATUS FROM V$DATABASE;
ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN;
SHUTDOWN IMMEDIATE;
STARTUP;
select name, open_mode from v$database;
Force FailOver Process:
SELECT name,value FROM v$parameter WHERE name='parallel_server';
NAME VALUE
-------------------- --------------------
parallel_server FALSE
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
SHUTDOWN IMMEDIATE;
STARTUP NOMOUNT;
alter database mount standby database;
ALTER DATABASE ACTIVATE STANDBY DATABASE;
alter database mount;
alter database open;
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment