近期在给某网省业务系统做OGG数据库容灾的项目中,我们使用Oracle RMAN方式对数据进行在线初始化,在执行数据恢复的过程中遇到了恢复报错的情况,并且出现ORA-600的错误。本文记录了整个数据库恢复的步骤,供大家参考,不对之处望大家提出加以改正。
以下为数据库恢复的主要步骤:
1)进入rman环境,启动数据库到nomount状态
RMAN TARGET /
RMAN> startup nomount pfile='/oracle/product/10.2/db/dbs/initmmdb.ora';
2)恢复数据库控制文件
RMAN> restore controlfile from '/sgpmdb/oradata8/dbfull_831646119_28173_1';
3)启动实例到mount状态
RMAN>alter database mount;
4)使用catalog start with命令将rman备份集注册到新的恢复目录
RMAN>catalog start with '/sgpmdb/oradata8';
5)使用set newname for datafile命令来指定新的数据文件转储位置
run(
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
allocate channel c5 type disk;
allocate channel c6 type disk;
allocate channel c7 type disk;
allocate channel c8 type disk;
set newname for datafile
set newname for datafile
set newname for datafile