ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 关于对physical standby的rman备份的恢复

关于对physical standby的rman备份的恢复

原创 Linux操作系统 作者:aaqwsh 时间:2011-10-28 20:23:15 0 删除 编辑

Oracle 版本 10.2.0.5.0。

因为要重建逻辑备库,所以准备先建个物理备库。

同时已经有了一个物理备库,并有一个物理备库的全备份:



尝试了下面两种方式,都报ORA-19764,有如下疑问:

物理备库的控制文件难道不能来源于现有的物理备库,只能来源于主库?

如果我把现有的物理备库关闭后,copy该库的控制文件到新的物理备库是否可以(因为整个库是可以拷贝的)?




1  通过备库的控制文库备份来恢复控制文件,然后restore database,最后recover database,最后在recover logfile时报 ORA-19764: database id 1292667440 does not match database id 1185342296 in control file

[oracle@testdb ~]$ rman target /

Recovery Manager: Release 10.2.0.5.0 - Production on Wed Oct 19 14:28:31 2011

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

connected to target database: ORCL (not mounted)

RMAN> restore controlfile   from '/dat01/backup/rman/c-1185342296-20111019-00';

Starting restore at 19-OCT-11

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=3286 devtype=DISK

channel ORA_DISK_1: restoring control file

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

output filename=/dat01/orcl/control01.ctl

output filename=/dat01/orcl/control02.ctl

output filename=/dat01/orcl/control03.ctl

Finished restore at 19-OCT-11

RMAN> run{

allocate channel d1 type disk;

2> 3> allocate channel d2 type disk;

4> allocate channel d3 type disk;

5> allocate channel d4 type disk;

6> restore database;

7> release channel d1;

8> release channel d2;

9> release channel d3;

10> release channel d4;

11> }

RMAN> recover database;

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of recover command at 10/19/2011 20:12:07

ORA-00283: recovery session canceled due to errors

RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile '/dat01/orcl/arch/5_3369_657561562.dbf'

ORA-00283: recovery session canceled due to errors

ORA-19764: database id 1292667440 does not match database id 1185342296 in control file


2  通过备库的copy current controlfile来恢复控制文件,然后restore database,最后recover database,最后在recover logfile时报 ORA-19764: database id 1292667440 does not match database id 1185342296 in control file

--在现有的物理备库

RMAN> copy current controlfile to '/dat01/std.ctl';

--在新的物理备库

[oracle@testdb oradata]$ cp std.ctl  /dat01/orcl/control01.ctl

[oracle@testdb oradata]$ cp std.ctl  /dat01/orcl/control02.ctl

[oracle@testdb oradata]$ cp std.ctl  /dat01/orcl/control03.ctl

RMAN> run{

allocate channel d1 type disk;

2> 3> allocate channel d2 type disk;

4> allocate channel d3 type disk;

5> allocate channel d4 type disk;

6> restore database;

7> release channel d1;

8> release channel d2;

9> release channel d3;

10> release channel d4;

11> }

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of recover command at 10/20/2011 02:43:30

ORA-00283: recovery session canceled due to errors

RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile '/dat01/orcl/arch/5_3369_657561562.dbf'

ORA-00283: recovery session canceled due to errors

ORA-19764: database id 1292667440 does not match database id 1185342296 in control file

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/758322/viewspace-709873/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-11-24

  • 博文量
    132
  • 访问量
    287981