In this post we will perform different operations on standby like Switch over ,Fail Over ,Open standby database for reporting purpose,check standby database status.
Step-I Create standby control file.
SQL>alter database create standby controlfile as 'D:\docs\data\control.ctl';
move primary db and redo file plus standby control.clt file, password and spfile.
On standby
1. make copy of standby control file
2. modify pfile with stand by parameters from oranet2
3 startup mount database with this pfile.
create spfile from pfile
alter database open
For Real Time apply.
-------------------
sqlplus / as sysdba
SQL>Startup mount
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE disconnect;
Step-II Change the status of standby database in recover mode in background mode by the following commands.
SQL>alter database recover managed standby database disconnect;
Step-III To check the status of standby database issue the following command for applied
archived logs.
SQL>select max(sequence#) from v$archived_log where applied='YES';
SQL>select sequence#,applied from v$archived_log order by 1;
Step-IV Stop Managed recovery on standby / Open for reporting.
SQL>alter database recover managed standby database cancel;
SQL>alter database open;
===============To again start stanby process ===============
shutdown immediate;
startup mount
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE disconnect;
Step-I Create standby control file.
SQL>alter database create standby controlfile as 'D:\docs\data\control.ctl';
move primary db and redo file plus standby control.clt file, password and spfile.
On standby
1. make copy of standby control file
2. modify pfile with stand by parameters from oranet2
3 startup mount database with this pfile.
create spfile from pfile
alter database open
For Real Time apply.
-------------------
sqlplus / as sysdba
SQL>Startup mount
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE disconnect;
SQL>alter database recover managed standby database disconnect;
Step-III To check the status of standby database issue the following command for applied
archived logs.
SQL>select max(sequence#) from v$archived_log where applied='YES';
SQL>select sequence#,applied from v$archived_log order by 1;
Step-IV Stop Managed recovery on standby / Open for reporting.
SQL>alter database recover managed standby database cancel;
SQL>alter database open;
===============To again start stanby process ===============
shutdown immediate;
startup mount
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE disconnect;
No comments:
Post a Comment