To use Rman to duplicate database be careful of db_file_name_convert
Actually, it's very easy for every dba to use rman to duplicate database.However,because of its simple, so we are likely to make mistakes. The following is typical errors,Let me share with you,Happy every day:
When i input rman command which is duplicate target database to newdb_name,
record log :
恢復管理器: Release 10.2.0.1.0 - Production on 星期二 7月 21 17:09:47 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
連線到目標資料庫: DG2 (DBID=1468921071)
已連線到輔助資料庫: AUXDB (未裝載)
RMAN>
RMAN-03036: 除錯的設定為級別 =9, 型別 =ALL
RMAN>
RMAN-03090: 啟動 Duplicate Db 於 21-7月 -09
RMAN-06009: 使用目標資料庫控制檔案替代恢復目錄
RMAN-08030: 分配的通道: ORA_AUX_DISK_1
RMAN-08500: 通道 ORA_AUX_DISK_1: sid=158 devtype=DISK
RMAN-08030: 分配的通道: ORA_AUX_DISK_2
RMAN-08500: 通道 ORA_AUX_DISK_2: sid=159 devtype=DISK
RMAN-08161: 記憶體指令碼的內容:
{
set until scn 808318;
set newname for datafile 1 to
"D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\SYSTEM01.DBF";
set newname for datafile 2 to
"D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\UNDOTBS01.DBF";
set newname for datafile 3 to
"D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\SYSAUX01.DBF";
set newname for datafile 4 to
"D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\DG2\DATAFILE\USERS.258.692722797";
restore
check readonly
clone database
;
}
RMAN-08162: 正在執行記憶體指令碼
RMAN-03023: 正在執行命令: SET until clause
RMAN-03023: 正在執行命令: SET NEWNAME
RMAN-03023: 正在執行命令: SET NEWNAME
RMAN-03023: 正在執行命令: SET NEWNAME
RMAN-03023: 正在執行命令: SET NEWNAME
RMAN-03090: 啟動 restore 於 21-7月 -09
RMAN-12016: 使用通道 ORA_AUX_DISK_1
RMAN-12016: 使用通道 ORA_AUX_DISK_2
RMAN-06716: 正在略過資料檔案 2; 已恢復到檔案 D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\UNDOTBS01.DBF
RMAN-06716: 正在略過資料檔案 3; 已恢復到檔案 D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\SYSAUX01.DBF
RMAN-08016: 通道 ORA_AUX_DISK_1: 正在開始恢復資料檔案備份集
RMAN-08089: 通道 ORA_AUX_DISK_1: 正在指定從備份集恢復的資料檔案
RMAN-08523: 正將資料檔案00001恢復到D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\SYSTEM01.DBF
RMAN-08523: 正將資料檔案00004恢復到D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\DG2\DATAFILE\USERS.258.692722797
RMAN-08003: 通道 ORA_AUX_DISK_1: 正在讀取備份段 D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\DG2\BACKUPSET\2009_07_21\O1_MF_NNNDF_TAG20090721T164140_56BZT52G_.BKP
RMAN-01005:
RMAN-05016: 故障轉移到上一個備份
RMAN-08019: 通道 ORA_AUX_DISK_1: 正在恢復資料檔案00001
RMAN-08507: 輸入資料檔案副本 recid=8 stamp=692813389 檔名=D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\DATA_D-DG2_I-1468921071_TS-SYSTEM_FNO-1_1LKKMVG3
RMAN-08509: 資料檔案 00001 的恢復目標: D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\SYSTEM01.DBF
RMAN-08019: 通道 ORA_AUX_DISK_2: 正在恢復資料檔案00004
RMAN-08507: 輸入資料檔案副本 recid=11 stamp=692813643 檔名=D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\DG2\DATAFILE\O1_MF_USERS_56BY6B00_.DBF
RMAN-08509: 資料檔案 00004 的恢復目標: D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\DG2\DATAFILE\USERS.258.692722797
RMAN-01005:
RMAN-08007: 通道 ORA_AUX_DISK_1: 已複製資料檔案 00001 的資料檔案副本
RMAN-08505: 輸出檔名=D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\SYSTEM01.DBF
RMAN-05016: 故障轉移到上一個備份
RMAN-08019: 通道 ORA_AUX_DISK_1: 正在恢復資料檔案00004
RMAN-08507: 輸入資料檔案副本 recid=10 stamp=692813398 檔名=D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\DATA_D-DG2_I-1468921071_TS-USERS_FNO-4_1OKKMVIL
RMAN-08509: 資料檔案 00004 的恢復目標: D:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST\DG2\DATAFILE\USERS.258.692722797
RMAN-01005:
RMAN-05016: 故障轉移到上一個備份
MAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: Duplicate Db 命令 (在 07/21/2009 17:23:53 上) 失敗
RMAN-03015: 在儲存的指令碼Memory Script中出現錯誤
RMAN-06026: 有些目標沒有找到 - 終止恢復
RMAN-06023: 沒有找到資料檔案4的副本來恢復
Errors shows: It cannot find any copy of datafile 4 from target database,but I have two copies of datafile 4.I'm confused that why rman cannot identify that copy.
I check parameters of auxiliary database:
SQL> show parameter db_file_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert string D:\oracle\product\10.2.0\orada
ta\dg2, D:\oracle\product\10.2
.0\oradata\test, +STANDBY, D:\oracle\product\10
.2.0\oradata\test
I know the reason why rman cannot identifiy.Obviously,rman cannot automatically identify ASM diskgroup catalog,so i must modify that parameter through db_file_name_convert to tell rman detail catalog of that datafile.
Modified parameteres:
SQL> show parameter db_file_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert string D:\oracle\product\10.2.0\orada
ta\dg2, D:\oracle\product\10.2
.0\oradata\test, +STANDBY/dg2/
datafile, D:\oracle\product\10
.2.0\oradata\test
To again duplicate database is ok.Good Luck!!
Never Failed To Seize Day,Go-!!!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/175005/viewspace-609861/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- rman duplicate建立異地auxiliary Database oracle_11g oracle_sid不同UXDatabaseOracle
- rman duplicate建立異地auxiliary Database oracle_11g oracle_sid相同UXDatabaseOracle
- RMAN Duplicate RAC to Single Instance
- rman duplicate操作手冊
- Oracle rman duplicate遷移測試Oracle
- Converting Oracle Database from Linux to Windows using RMANOracleDatabaseLinuxWindows
- RMAN restore validate database報ORA-19693RESTDatabase
- 2018-06-13 Use rpsblast to search Cdd databaseASTDatabase
- 使用RMAN複製資料庫 active database資料庫Database
- duplicate遇到RMAN-05535: warning: All redo log files were not defined
- HowTo Restore RMAN Disk backups of RAC Database to Single Instance On Another NoRESTDatabase
- 理解RMAN backup database plus archivelog delete all input命令DatabaseHivedelete
- 【DG】備庫RMAN還原方式搭建DG(不使用duplicate命令)
- 透過RMAN備份standby database成功恢復還原Database
- use database 切換提示You can turn off this feature to get a quicker startupDatabaseUI
- 【轉載】Kano Model — Ways to use it and NOT use it
- 【RMAN】RMAN備份至ASMASM
- nginx useNginx
- Oracle 11G RAC複製備庫RMAN-03002 RMAN-05501 RMAN-03015 RMAN-03009 RMAN-10038Oracle
- 【RMAN】RMAN的備份保留策略
- The database owner SID recorded in the master database differs from the database owner SID recorded in database 'DB_NAME'DatabaseAST
- [LeetCode] Find the Duplicate NumberLeetCode
- yum error - package is a duplicate withErrorPackage
- ORACLE rman與RMAN-00054&ORA-09945Oracle
- RMAN(轉)
- Oracle Database Cloud - Database as a Service Quick StartOracleDatabaseCloudUI
- Error querying database. XXXXXXXXXXXXX, No database selected。ErrorDatabase
- Convert a Physical Standby Database into a Snapshot Standby DatabaseDatabase
- Be better to use NPMNPM
- WireGuard Use Notes
- plsql use skillsSQL
- 【RMAN】Oracle rman 常用命令參考Oracle
- RMAN恢復之RMAN-06555處理
- [LintCode/LeetCode] Contains Duplicate IIILeetCodeAI
- [LintCode/LeetCode] Remove Duplicate LettersLeetCodeREM
- 652-Find Duplicate Subtrees
- DATAGUARD手記(DUPLICATE)(四)
- RMAN-06207和RMAN-06208的處理
- Database TimeoutDatabase