Adding or Dropping Redo and StandBy Redo files in Dataguard Standby Environment
On Standby Server
Redo Log File
1.0.
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
1.1.
Show parameter STANDBY_FILE_MANAGEMENT
ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT = MANUAL;
1.2.
set line 400 pages 150
col GROUP# for 99
col THREAD# for 99
col STATUS for a9
col MEMBERS for 999999
col member for a64
select l.GROUP#,l.THREAD#,l.STATUS,l.MEMBERS,f.member from v$log l inner join v$logfile f on (l.GROUP#=f.GROUP#);
1.3.
ALTER DATABASE ADD LOGFILE '/u01/app/oracle/oradata/cbsdgdb1/redo01.log' SIZE 1024M;
ALTER DATABASE ADD LOGFILE '/u01/app/oracle/oradata/cbsdgdb1/redo02.log' SIZE 1024M;
ALTER DATABASE ADD LOGFILE '/u01/app/oracle/oradata/cbsdgdb1/redo03.log' SIZE 1024M;
1.4.
alter system switch logfile;
1.5.
ALTER DATABASE DROP LOGFILE '/u01/app/oracle/oradata/oradbcdb/redo01.log';
ALTER DATABASE DROP LOGFILE '/u01/app/oracle/oradata/oradbcdb/redo02.log';
ALTER DATABASE DROP LOGFILE '/u01/app/oracle/oradata/oradbcdb/redo03.log';
standby redo log file
2.0.
set line 400 pages 150
col GROUP# for 99
col THREAD# for 99
col STATUS for a12
col MEMBERS for 999999
col member for a64
select l.GROUP#,l.THREAD#,l.STATUS,f.member from v$STANDBY_LOG l inner join v$logfile f on (l.GROUP#=f.GROUP#);
2.1.
alter database add standby logfile '/u01/app/oracle/oradata/cbsdgdb1/standbyredo01.log' size 1024m;
alter database add standby logfile '/u01/app/oracle/oradata/cbsdgdb1/standbyredo02.log' size 1024m;
alter database add standby logfile '/u01/app/oracle/oradata/cbsdgdb1/standbyredo03.log' size 1024m;
alter database add standby logfile '/u01/app/oracle/oradata/cbsdgdb1/standbyredo04.log' size 1024m;
alter database add standby logfile '/u01/app/oracle/oradata/cbsdgdb1/standbyredo05.log' size 1024m;
2.2.
ALTER DATABASE DROP STANDBY LOGFILE '/u01/app/oracle/oradata/cbsdgdb2/standby1.log';
ALTER DATABASE DROP STANDBY LOGFILE '/u01/app/oracle/oradata/cbsdgdb2/standby2.log';
ALTER DATABASE DROP STANDBY LOGFILE '/u01/app/oracle/oradata/cbsdgdb2/standby3.log';
ALTER DATABASE DROP STANDBY LOGFILE '/u01/app/oracle/oradata/cbsdgdb2/standby4.log';
ALTER DATABASE DROP STANDBY LOGFILE '/u01/app/oracle/oradata/cbsdgdb2/standby5.log';
2.3.
alter database drop standby logfile group 5;
alter database clear logfile group 5;
2.4.
ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=AUTO;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
Comments
Post a Comment