I use oracle 11g active dataguard with phisical standby and dgmgrl (maximum performance mode).
for training purposes I would like to simulate archive log gap on standby db.
I tried this:
alter system set log_archive_dest_2='' scope=both;
alter system set log_archive_dest_state_2='defer' scope=both;
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
now I do a few log switches on primary - a few archive logs come up (sequence 58,59), I remove them manually, it looks now like this:
-rw-r----- 1 oracle oinstall 18703360 14. Jan 16:19 o1_mf_1_57_8h88jtm8_.arc
-rw-r----- 1 oracle oinstall 99328 14. Jan 16:28 o1_mf_1_60_8h8911n9_.arc
-rw-r----- 1 oracle oinstall 19968 14. Jan 16:29 o1_mf_1_61_8h8929bt_.arc
startup open read only
alter database recover managed standby database using current logfile nodelay disconnect;
so on primary archlogs 58,59 are not there but on standby they appear after startup:
-rw-r----- 1 oracle oinstall 18703360 14. Jan 16:19 o1_mf_1_57_8h88jtn6_.arc
-rw-r----- 1 oracle oinstall 146432 14. Jan 16:48 o1_mf_1_58_8h8b77vg_.arc
-rw-r----- 1 oracle oinstall 259072 14. Jan 16:48 o1_mf_1_59_8h8b72vd_.arc
-rw-r----- 1 oracle oinstall 99328 14. Jan 16:48 o1_mf_1_60_8h8b6y03_.arc
-rw-r----- 1 oracle oinstall 19968 14. Jan 16:48 o1_mf_1_61_8h8b6xxw_.arc
It looks like redo log shipment is independent from archivelogs on primary db!?
what additional steps are required to simulate a gap?
thanks in advance!
Defer the remote archive destination on primary
SQL> alter system set log_archive_dest_state_2=defer;
Then perform several log switches on the primary.
Shutdown the listener on the standby
Change the password on the Primary
Change the tnsnames on the primary for the standby
Unplug the network cable on the standby
Edited by: mseberg on Jan 14, 2013 11:57 AM
Ok, when I break down the network connection, of course the new archivelogs are not on the standby site. however after establishing the connection they are on the standby site even when I deleted them on primary.
It looks like dataguard is too intelligent to be fooled.
I thought it were possible to disturb it somehow that archivelogs are copied to the standby site, so the query
select * from v$archive_gap
would output some rows even after reestablishing the connection.
Have never trusted v$archive_gap
Try this :
Another thought is to DEFER and then move the archive on the primary and see it that creates a gap.