DATAGUARD,switchover and failover

Swithover important

Primary –> standby

select open_mode,database_role,switchover_status from v$database;

alter database commit to switchover to physical standby with session shutdown;

shutdown immediate;

startup mount;

alter database recover managed standby database using current logfile disconnect from session;

select process,status from v$managed_standby;

 

standby –> primary

select open_mode,database_role,switchover_status from v$database;

alter database commit to switchover to primary with session shutdown;

alter database open;

select open_mode,database_role,switchover_status from v$database;

 

failover important

primary down

…………………..

Standby –> primary

alter database recover managed standby database cancel;

alter database recover managed standby database finish force;

select open_mode,log_mode,database_role ,switchover_status from v$database;

alter database commit to switchover to primary;

shutdown immediate;

startup;

select open_mode,log_mode,database_role ,switchover_status from v$database;

select to_char(standby_became_primary_scn) from v$database;

primary up , flashback –> standby

select open_mode,log_mode,database_role ,switchover_status from v$database;

shutdown immediate;

startup mount;

flashback database to scn xxxx;

alter database convert to physical standby;

shutdown immediate;

startup;

select open_mode,log_mode,database_role ,switchover_status from v$database;

alter database recover managed standby database using current logfile disconnect from session;

select process,status from v$managed_standby;

select open_mode,log_mode,database_role ,switchover_status from v$database;

Leave a Reply