设为首页 加入收藏

TOP

linux下只有rman备份集的异机不同目录恢复(二)
2014-11-24 03:31:04 来源: 作者: 【 】 浏览:6
Tags:linux 只有 rman 备份 不同 目录 恢复
Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to an idle instance. SQL> startup nomount; ORA-01078: failure in processing system parameters LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/db_1/dbs/initbre1.ora' SQL> startup nomount; ORA-01078: failure in processing system parameters LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/db_1/dbs/initbre1.ora' SQL> startup nomount; ORA-09925: Unable to create audit trail file Linux-x86_64 Error: 2: No such file or directory Additional information: 9925 有很多相关目录没有创建,可以使用strings spfilebre1.ora来查看一下spfile里面的内容,建好相关的目录,并且赋予权限。。这些都搞好后nomount打开数据库不再报错。

3.恢复控制文件

登陆到rman,控制文件还原的时候将还原到参数文件指定的位置,所以参数文件指定的控制文件目录必须存在,否则报错,例如下面一开始我没有创建就报错,后来创建完成就不报错了,如果你想还原到其他地方,可以修改参数文件指定到相应地址。

RMAN> restore controlfile from '/home/oracle/04pggb87_1_1.bak';

Starting restore at 21-AUG-2014 10:26:14
using channel ORA_DISK_1

channel ORA_DISK_1: restoring control file
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 08/21/2014 10:26:15
ORA-19870: error while restoring backup piece /home/oracle/04pggb87_1_1.bak
ORA-19504: failed to create file "/u01/app/oracle/oradata/bre1/control01.ctl"
ORA-27040: file create error, unable to create file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 1

RMAN> restore controlfile from '/home/oracle/04pggb87_1_1.bak';

Starting restore at 21-AUG-2014 10:26:50
using channel ORA_DISK_1

channel ORA_DISK_1: restoring control file
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 08/21/2014 10:26:51
ORA-19504: failed to create file "/u01/app/oracle/fast_recovery_area/bre1/control02.ctl"
ORA-27040: file create error, unable to create file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 1
ORA-19600: input file is control file  (/u01/app/oracle/oradata/bre1/control01.ctl)
ORA-19601: output file is control file  (/u01/app/oracle/fast_recovery_area/bre1/control02.ctl)

RMAN> restore controlfile from '/home/oracle/04pggb87_1_1.bak';

Starting restore at 21-AUG-2014 10:27:24
using channel ORA_DISK_1

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/app/oracle/oradata/bre1/control01.ctl
output file name=/u01/app/oracle/fast_recovery_area/bre1/control02.ctl
Finished restore at 21-AUG-2014 10:27:25

4.mount数据库,注册备份集

重启数据库,直接就可以启动到mount

SQL> startup mount;
ORACLE instance started.

Total System Global Area  835104768 bytes
Fixed Size		    2257840 bytes
Variable Size		  503319632 bytes
Database Buffers	  322961408 bytes
Redo Buffers		    6565888 bytes
Database mounted.
SQL> 
如果此时备份集所在文件目录改变,需要手工catalog注册备份集,这里我们将拷过来的备份文件复制到/home/oracle/backup下,演示一下手工catalog备份集
[oracle@bre2 ~]$ ls
首页 上一页 1 2 3 4 5 下一页 尾页 2/5/5
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇大连理工大学软件学院――数据库.. 下一篇实现一个键值对存储:目录

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·数据库:推荐几款 Re (2025-12-25 12:17:11)
·如何最简单、通俗地 (2025-12-25 12:17:09)
·什么是Redis?为什么 (2025-12-25 12:17:06)
·对于一个想入坑Linux (2025-12-25 11:49:07)
·Linux 怎么读? (2025-12-25 11:49:04)