Oracle

来源:互联网 发布:绿岸网络要倒闭了么 编辑:程序博客网 时间:2024/05/29 14:05

Data Guard Procedure:

failover -> reinstate -> switchover (-> flashback)
1. (test01, scott) -> b.sql -> commit
2. (test01, sys)   -> alter system switch logfile;
3. (test02, sys)   -> select sequence#,first_time,next_time from v$archived_log order by sequence#;
4. (test01, sys)   -> alter system switch logfile;
5. (test02, sys)   -> select sequence#,applied from v$archived_log order by sequence#;
6. (test01, root)  -> shutdown -h now (abc 24 rows)
7. (EM, icises)    -> failover (20090223092500)
8. (test02, scott) -> b.sql (abc 54 rows)
9. (test02, sys)   -> alter system switch logfile;
10.(test01)        -> boot
11.(test01)       -> system collapse: -> fsck -A -y : -> mount /dev/sda3 /u01
12.(EM, icises)    -> reinstate icisep
13.(test02, scott) -> insert into abc values('aaa');commit;
14.(test02, scott) -> @b.sql (abc 440 rows)
15.(test02, sys)   -> alter system switch logfile;
16.(EM, icises)    -> switchover (20090223111000)
17.(test01, scott) -> abc 440 rows
18.(test02, sys)   -> shutdown immediate
19.(test01, sys)   -> shutdown immediate
           -> sqlplus /nolog                   
           -> startup mount
                   -> flashback database to timestamp to_timestamp('20090223092000','YYYYMMDDHH24MISS');
           -> alter database open resetlogs;
           -> alter database create standby controlfile as '/tmp/primary.ctl' reuse;
20.(test02, sys)   -> copy control file
           -> startup mount
                  -> flashback database to timestamp to_timestamp('20090223092000','YYYYMMDDHH24MISS');
           -> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
21.(test01, sys)   -> alter system switch logfile;

原创粉丝点击