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;
原文:https://www.cnblogs.com/qcding/p/12603143.html
如果您也喜欢它,动动您的小指点个赞吧