Flashcopy与数据库恢复的完美结合(16/20)
时间:2011-06-03 来源:djb1008
1.5.4.15 主机A数据库A再次进行归档日志切换,记载SEQ#和SCN
SQL> select checkpoint_change# from v$database;
992427
SQL> Select count(1) from aidu.test04;
228
SQL> Select checkpoint_change# from v$database;
992437
SQL> Alter system switch logfile;
SQL>select name,sequence#,first_change#,next_change# from v$archived_log;
/archivelog/1_39_750759569.dbf 39 989361 989650
/archivelog/1_40_750759569.dbf 40 989650 992437
/archivelog/1_41_750759569.dbf 41 992437 992727
1.5.4.16 将主机A上的archivelog复制到主机B上,设置访问权限
1.5.4.17主机B上,挂载VG,开始进行数据库恢复
1.5.4.17.1挂载VG,创建新的控制文件
#varyonvg testvg
SQL> startup mount;
SQL> alter database backup controlfile to trace;
SQL>shutdown immediate;
SQL>startup nomount;
SQL> CREATE CONTROLFILE REUSE DATABASE "TEST1" RESETLOGS ARCHIVELOG
MAXLOGFILES 30
MAXLOGMEMBERS 5
MAXDATAFILES 200
MAXINSTANCES 2
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/dev/rora_redo01' SIZE 256M,
GROUP 2 '/dev/rora_redo02' SIZE 256M,
GROUP 3 '/dev/rora_redo03' SIZE 256M
-- STANDBY LOGFILE
DATAFILE
'/dev/rora_system',
'/dev/rora_undotbs01',
'/dev/rora_sysaux',
'/dev/rora_data01',
'/dev/rora_data02',
'/dev/rora_index01',
'/dev/rora_index02'
CHARACTER SET ZHS16GBK
;
新的控制文件创建完成后,数据库将自动启动到mount状态,可以进行后面的数据库不完整恢复了。
上一篇:Flashcopy与数据库恢复的完美结合(15/20)
下一篇:Flashcopy与数据库恢复的完美结合(17/20)