Oracle数据库表空间级的异地不完全恢复(二)

2014-11-24 19:00:58 · 作者: · 浏览: 66
将这个目录下的归档档的备份档案写入了 catalog 。
run
{
allocate channel ch01 type disk;
allocate channel ch02 type disk;
set until time "to_date('2012-02-23 10:00:00','yyyy-mm-dd hh24:mi:ss')";
recover database;
release channel ch01;
release channel ch02;
}
或则
SQL> select to_char(checkpoint_time,'yyyy-mm-dd hh24:mi:ss') from v$datafile;



S QL> select file#,checkpoint_change# from v$datafile order by checkpoint_change#;



FILE# CHECKPOINT_CHANGE#
---------- ------------------
14 2793109724
20 2793109725
6 2793232002
19 2793232002
18 2793258889
26 2793258889
9 2793281171
30 2793281171
1 2793283158
16 2793301522
29 2793301522
2 2793304369
10 2793304369
4 2793333238
3 2793333238



15 rows selected.



run
{
allocate channel ch01 type disk;
allocate channel ch02 type disk;
set until scn 2793333238;
recover database ;
release channel ch01;
release channel ch02;
}



如果 recover 资料库缺少档,可以到主库去查是哪个档,然后拷贝过来再 recover 一次。
RMAN> list backupset of archivelog logseq 7438 thread 4;



RMAN> crosscheck backupset;
delete expired backupset;



7 、 alter database open resetlogs;