比如生产库位置在
:/u01/app/oracle/oradata/emr/
恢复库的文件位置:/oradata/emr/
步骤:
1.恢复控制文件
rman target /
rman>restore controlfile from '/bak/dbbak/ctl.bak';
2.启动到mount
rman>alter database mount;
3.恢复数据文件
数据文件可以一个个去执行位置,如果文件太多,指定太麻烦,可以使用set newname for database to '/oradata/emr/%b' 方式解决
rman>
run{
allocate channel c1 device type disk;
allocate channel c2 device type disk;
allocate channel c3 device type disk;
allocate channel c4 device type disk;
set newname for database to '/oradata/emr/%b';
restore database;
switch datafile all;
switch tempfile all;
recover database;
}
4.调整联机文件
sql>
alter database rename file '
/u01/app/oracle/oradata/emr/redo01.log' to '/oradata/emr/redo01.log';
alter database rename file '
/u01/app/o
ORACLE 11G 数据库异机恢复到另外的目录
最新推荐文章于 2024-12-30 13:55:52 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)