VERIFICATION COMMANDS FOR STANDBY
SQL> select name from v$database ;
Commands Line Interface :
select name from v$database ;
GEMS
Switchover status and databsae role
select switchover_status , database_role from v$database ;
To check the status of archive destination
select status from v$archive_dest_status ;
To check the errors in transmitting the archive from local( to other
col DEST_NAME for a20
col error for a20
select dest_id,dest_name , status , error from v$archive_dest ;
To check the archive sequence and applied to standby "
Select distinct(sequence#),applied from v$archived_log order by 1 ;
alter database recover managed standby database cancel ;
shut immediate;
--FOR KEEPING THE DATABASE IN STANDBY MODE ;
alter database mount standby database ;
( manual recovery )
recover standby database ;
( auto recovery )
alter database recover managed standby database disconnect from session ;
--HOW TO SHUTDOWN STANDBY DATABASE
alter database recover managed standby database cancel ;
shut immediate;
HOW TO START THE STANDY DATABASE
startup nomount
alter database mount standby database ; ( manual mode )
recover standby database ;
====================OR==================
startup nomount
alter database mount standby database ; ( manual mode )
( auto recovery )
alter database recover managed standby database disconnect from session ;
SWITCHOVER COMMANDS
step 0 : Issue the command
Primary site
alter system switch logfile ;
step 1:
select switchover_status from v$database ;
ON PRODUCTION( PRIMARY) EXECUTE THE BELOW SQL:
alter database commit to switchover to physical standby with session shutdown nowait ;
ON STANDBY EXECUTE BELOW SQL :
alter database recover managed standby database cancel ;
recover standby database ;
alter database commit to switchover to primary ;
SHUTDOWN BOTH THE DATABASES ( I.E PRMARY AND STANDBY ALSO )
NOTE: STOP THE LISTNER ON OLD PRIMARY AND START THE LISTNER ONLY
ON STANDBY(NEW PRIMARY)
statup the new standby in nomount state
startup the new primary database wiht startup command
FAILOVER COMMANDS
ON STANDBY EXECUTE BELOW SQL :
alter database recover managed standby database cancel ;
recover standby database ;
alter database activate standby database;
shut immediate
startup
NOTE: IT RESETS THE ARCH LOG FILES.
ADD TEMP FILES AS PER PRIMARY.
COMMAND TO CREATE STANDBY CONROL FILE FROM PRIMARY DATABASE.
alter database create standby controlfile as '[Link]';