nbu oracle rac 恢复到单机环境

发布于 2022-09-30 11:47:24 字数 57 浏览 12 评论 0

各位好,请问nbu oracle rac 备份成功后怎样恢复到单机环境,要怎样做?我恢复时老是一个数据文件不成功。

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

池木 2022-10-07 11:47:24

本帖最后由 zhangmq 于 2011-04-13 17:13 编辑

回复 1# zhangmq

恢复脚本:

[oracle@rheloracle ~]$ rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Tue Apr 12 01:35:20 2011

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

connected to target database: RACDB (DBID=744895673, not open)

RMAN> run {
2> allocate channel ch1 device type 'SBT_TAPE' PARMS='ENV=(NB_ORA_CLIENT=node1),SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so';
3> set newname for datafile 1 to '/u01/oracle/oradata/orcl/system.dbf';
4> set newname for datafile 2 to '/u01/oracle/oradata/orcl/undotbs1.dbf';
5> set newname for datafile 3 to '/u01/oracle/oradata/orcl/sysaux.dbf';
6> set newname for datafile 4 to '/u01/oracle/oradata/orcl/undotbs2.dbf';
7> set newname for datafile 5 to '/u01/oracle/oradata/orcl/users.dbf';
8> SQL "ALTER DATABASE RENAME FILE ''+RAC_DISK/racdb/onlinelog/group_1.257.747278919'' TO ''/u01/oracle/oradata/orcl/redo01.log''";
9> SQL "ALTER DATABASE RENAME FILE ''+RAC_DISK/racdb/onlinelog/group_2.258.747278921'' TO ''/u01/oracle/oradata/orcl/redo02.log''";
10> SQL "ALTER DATABASE RENAME FILE ''+RAC_DISK/racdb/onlinelog/group_3.265.747284047'' TO ''/u01/oracle/oradata/orcl/redo03.log''";
11> SQL "ALTER DATABASE RENAME FILE ''+RAC_DISK/racdb/onlinelog/group_4.266.747284049'' TO ''/u01/oracle/oradata/orcl/redo04.log''";
12> RESTORE database;
13> switch datafile all;
14> recover database;
15> RELEASE CHANNEL c1;
16> }

忆沫 2022-10-07 11:47:24

本帖最后由 zhangmq 于 2011-04-11 18:11 编辑

回复 2# zhangmq

    输出报错:using target database control file instead of recovery catalog
allocated channel: ch1
channel ch1: sid=156 devtype=SBT_TAPE
channel ch1: Veritas NetBackup for Oracle - Release 6.5 (2007072323)

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

sql statement: ALTER DATABASE RENAME FILE ''+RAC_DISK/racdb/onlinelog/group_1.257.747278919'' TO ''/u01/oracle/oradata/orcl/redo01.log''

sql statement: ALTER DATABASE RENAME FILE ''+RAC_DISK/racdb/onlinelog/group_2.258.747278921'' TO ''/u01/oracle/oradata/orcl/redo02.log''

sql statement: ALTER DATABASE RENAME FILE ''+RAC_DISK/racdb/onlinelog/group_3.265.747284047'' TO ''/u01/oracle/oradata/orcl/redo03.log''

sql statement: ALTER DATABASE RENAME FILE ''+RAC_DISK/racdb/onlinelog/group_4.266.747284049'' TO ''/u01/oracle/oradata/orcl/redo04.log''

Starting restore at 12-APR-11

channel ch1: starting datafile backupset restore
channel ch1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/oracle/oradata/orcl/system.dbf
restoring datafile 00004 to /u01/oracle/oradata/orcl/undotbs2.dbf
channel ch1: reading from backup piece bk_41_1_747970869
channel ch1: restored backup piece 1
piece handle=bk_41_1_747970869 tag=HOT_DB_BK_LEVEL0
channel ch1: restore complete, elapsed time: 00:01:05
channel ch1: starting datafile backupset restore
channel ch1: specifying datafile(s) to restore from backup set
restoring datafile 00002 to /u01/oracle/oradata/orcl/undotbs1.dbf
restoring datafile 00003 to /u01/oracle/oradata/orcl/sysaux.dbf
restoring datafile 00005 to /u01/oracle/oradata/orcl/users.dbf
channel ch1: reading from backup piece bk_42_1_747970870
channel ch1: restored backup piece 1
piece handle=bk_42_1_747970870 tag=HOT_DB_BK_LEVEL0
channel ch1: restore complete, elapsed time: 00:01:05
Finished restore at 12-APR-11

Starting recover at 12-APR-11

starting media recovery
media recovery failed
released channel: ch1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 04/12/2011 01:38:33
ORA-00283: recovery session canceled due to errors
RMAN-11003: failure during parse/execution of SQL statement: alter database recover if needed
start until cancel using backup controlfile
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 1: '/u01/oracle/oradata/orcl/sysaux.261.747278963'
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '/u01/oracle/oradata/orcl/sysaux.261.747278963'

RMAN> alter database open resetlogs;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 04/12/2011 01:39:53
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file

ORA-01110: data file 1: '/u01/oracle/oradata/orcl/sysaux.261.747278963'

執念 2022-10-07 11:47:24

RAC的和单机的不同,所以要先改pfile,再生成新的spfile。

贩梦商人 2022-10-07 11:47:24

RAC的和单机的不同,所以要先改pfile,再生成新的spfile。
无牙 发表于 2011-04-13 03:51

    多谢,按这个思路后来重新恢复可以啦。

少钕鈤記 2022-10-07 11:47:24

RAC恢复到单机时,你先吧recover database去掉。

然后吧pfile改完后再recover。
无牙 发表于 2011-04-11 23:47

     试试看。

狼性发作 2022-10-07 11:47:24

你归档有问题吧

べ映画 2022-10-07 11:47:24

你归档有问题吧
alongx 发表于 2011-04-11 18:44

    你是说单机数据库的归档还是rac的归档,rac归档在asm中,两节点认到的一样,备份时没报错。

忆伤 2022-10-07 11:47:24

RAC恢复到单机时,你先吧recover database去掉。

然后吧pfile改完后再recover。

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文