AVATAR 备份软件 ORACLE 恢复流程

Posted on 2020-03-31 09:42  独孤九剑第八剑  阅读(349)  评论(0)    收藏  举报

1. 恢复控制文件
startup nomount;

run {
allocate channel ch1 device type 'sbt_tape'
PARMS="ENV=(MASTER_SERVER_IP=10.10.0.28,INSTANCE_NAME=orcl,BACKUP_CLIENT=AvatarFdServer,RESTORE_CLIENT=AvatarFdServer)";
restore controlfile from 'avatar_controlfile_54_1_852472610';
release channel ch1;
}

2. 恢复数据库文件
alter database mount;

run {
allocate channel ch1 device type 'sbt_tape'
PARMS="ENV=(MASTER_SERVER_IP=10.10.0.28,INSTANCE_NAME=orcl,BACKUP_CLIENT=AvatarFdServer,RESTORE_CLIENT=AvatarFdServer)";
restore database;
release channel ch1;
}

3.恢复归档日志
recover database using backup controlfile until cancel; 找到需恢复的归档日志序号

run {
allocate channel ch1 device type 'sbt_tape'
PARMS="ENV=(MASTER_SERVER_IP=10.10.0.28,INSTANCE_NAME=orcl,BACKUP_CLIENT=AvatarFdServer,RESTORE_CLIENT=AvatarFdServer)";
restore archivelog from logseq=64 until logseq=65 thread 1;
release channel ch1;
}

recover database using backup controlfile until cancel;
alter database open resetlogs;

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3