关于rman中set newname的探讨
来源:互联网 发布:网络信号大师破解版 编辑:程序博客网 时间:2024/04/28 16:24
关于rman中set newname的探讨
run {
set newname for datafile 1 to
set newname for datafile 2 to
set newname for datafile 3 to
set newname for datafile 4 to
set newname for datafile 5 to
restore database;
}
Sets the default name for all subsequent
RESTORE
or SWITCH
commands that affect the specified datafile. Ifyou do not issue this command before the datafile restoreoperation, then RMAN restores the file to its defaultlocationSWITCH
to rename the file in the control file to theNEWNAME
. If you do not runSWITCH
, then the restored file functions as a datafilecopy and is recorded as such in the repository.[oracle@single rman_bk]$ rmantarget /
Recovery Manager: Release9.2.0.4.0 - Production
Copyright (c) 1995, 2002,Oracle Corporation.
connected to target database:TEST (DBID=1935070339)
RMAN> run {
2> set newname for datafile 1 to
3> set newname for datafile 2 to
4> set newname for datafile 3 to
5> set newname for datafile 4 to
6> set newname for datafile 5 to
7> restore database;
8> }
executing command: SETNEWNAME
using target database controlfile instead of recoverycatalog
executing command: SETNEWNAME
executing command: SETNEWNAME
executing command: SETNEWNAME
executing command: SETNEWNAME
Starting restore at27-OCT-07
allocated channel:ORA_DISK_1
channel ORA_DISK_1: sid=15 devtype=DISK
RMAN-00571:===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS===============
RMAN-00571:===========================================================
RMAN-03002: failure of restore command at 10/27/2007 19:06:57
ORA-19625: error identifying file /test_ora/new/system01.dbf
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
Recovery Manager: Release 9.2.0.4.0 -Production
Copyright (c) 1995, 2002,Oracle Corporation.
connected to target database:TEST (DBID=1935070339)
RMAN> restoredatabase;
Starting restore at27-OCT-07
using target databasecontrolfile instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=13 devtype=DISK
RMAN-00571:===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS===============
RMAN-00571:===========================================================
RMAN-03002: failure of restore command at 10/27/2007 19:15:26
ORA-19563: datafile copy header validationfailed for file /test_ora/new/system01.dbf
从红色字体部分可以看出,/test_ora/new/system01.dbf被视作一个datafilecopy,rman试图将该文件restore到生产库的数据存放路径下,但没有找到该文件,于是报错。
从上述分析可以得出:
4.处理方法:
(1)检查数据文件副本状态
RMAN> crosscheck copy;
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=13 devtype=DISK
validation failed for datafile copy
datafile copy filename=/test_ora/new/system01.dbf recid=41stamp=637095874
validation failed for datafile copy
datafile copy filename=/test_ora/new/rbs01.dbf recid=38stamp=637095858
validation failed for datafile copy
datafile copy filename=/test_ora/new/users01.dbf recid=40stamp=637095868
validation failed for datafile copy
datafile copy filename=/test_ora/new/test01.dbf recid=39stamp=637095859
validation failed for datafile copy
datafile copy filename=/test_ora/new/test201.dbf recid=37stamp=637095855
(2)删除已经expired的数据文件副本信息
RMAN> delete nopromptexpired copy;
released channel:ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=13 devtype=DISK
specification does not match any archive log in the recoverycatalog
List of Datafile Copies
Key
------- ---- - --------------- ---------- -------------------
41
38
40
39
37
deleted datafile copy
datafile copy filename=/test_ora/new/system01.dbf recid=41stamp=637095874
deleted datafile copy
datafile copy filename=/test_ora/new/rbs01.dbf recid=38stamp=637095858
deleted datafile copy
datafile copy filename=/test_ora/new/users01.dbf recid=40stamp=637095868
deleted datafile copy
datafile copy filename=/test_ora/new/test01.dbf recid=39stamp=637095859
deleted datafile copy
datafile copy filename=/test_ora/new/test201.dbf recid=37stamp=637095855
Deleted 5 EXPIRED objects
(3).此时,再次进行set newname并restore。
RMAN> run {
2> set newname for datafile 1 to
3> set newname for datafile 2 to
4> set newname for datafile 3 to
5> set newname for datafile 4 to
6> set newname for datafile 5 to
7> restore database;
8> }
executing command: SETNEWNAME
executing command: SETNEWNAME
executing command: SETNEWNAME
executing command: SETNEWNAME
executing command: SETNEWNAME
Starting restore at27-OCT-07
using channel ORA_DISK_1
channel ORA_DISK_1: restoring datafile 00005
input datafilecopy recid=36 stamp=637095244filename=/oracle/rman_bk/df_5.dbf
destination for restore of datafile 00005:/test_ora/new/test201.dbf
channel ORA_DISK_1: copied datafilecopy of datafile 00005
output filename=/test_ora/new/test201.dbf recid=42stamp=637097488
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backupset
restoring datafile 00001 to /test_ora/new/system01.dbf
restoring datafile 00002 to /test_ora/new/rbs01.dbf
restoring datafile 00003 to /test_ora/new/users01.dbf
restoring datafile 00004 to /test_ora/new/test01.dbf
channel ORA_DISK_1: restored backup piece 1
piece handle=/oracle/product/9.2.0.4/dbs/03ivie8c_1_1tag=TAG20071027T172739 params=NULL
channel ORA_DISK_1: restore complete
Finished restore at 27-OCT-07
- 关于rman中set newname的探讨
- RMAN SET NEWNAME
- rman 异机恢复 & set newname 的实验
- 11g Rman新特性SET NEWNAME
- 【rman】异机恢复——目录不同--set newname datafile
- 使用set newname切换文件到其他的位置
- SET NEWNAME FOR DATABASE TO恢复数据库
- 关于oracle中rownum的使用探讨
- 关于C++中enum的探讨
- 关于C++中enum的探讨
- 关于C++中enum的探讨
- 关于C++中enum的探讨
- 关于Java中指针的探讨
- 关于项目中读取文件的探讨
- 探讨CMake中关于RPATH的使用
- 关于session的探讨
- 关于敏捷的探讨
- 关于敏捷的探讨
- linux 下user id 及 group id的分类
- 实践:zookeeper如何在客户端上动态的监听服务器的上线和离线的
- 垃圾回收(GC)的三种基本方式
- 在win7系统中安装SQL2005出现29506错误码的解决方案
- 最大子序列和问题
- 关于rman中set newname的探讨
- [Windows网络编程课设]南工程聊天室客户端源码
- matlab 线性规划函数-linprog
- 反应器(Reactor)模式
- mongodb安装与使用
- svn 常用命令 status/log/commit/up/add
- js中的==和===的区别
- 方法的重载,作用域,包装类,拆箱,装箱
- 第四周 项目2-建设“单链表” 算法库