rman duplicate target database RMAN-03002 RMAN-03015 RMAN-06136
透過RMAN的duplicate命令將目標資料庫在另一主機上覆制一個副本資料庫時報以下錯誤資訊:
RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of Duplicate Db command at 03/24/2015 18:28:32 RMAN-03015: error occurred in stored script Memory Script RMAN-06136: ORACLE error from auxiliary database: ORA-01013: user requested
目標資料庫與複製的副本資料庫在不同主機上,但有相同的目錄結構,複製命令如下:
[oracle@oracle11g admin]$ rman target sys/zzh_2046@test auxiliary sys/oracle@dup catalog rman/rman@jy Recovery Manager: Release 10.2.0.5.0 - Production on Tue Mar 24 17:26:51 2015 Copyright (c) 1982, 2007, Oracle. All rights reserved. connected to target database: TEST (DBID=2168949517) connected to recovery catalog database connected to auxiliary database: DUP (not mounted) RMAN> duplicate target database to dup nofilenamecheck; Starting Duplicate Db at 2015-03-24 17:27:06 allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: sid=35 devtype=DISK contents of Memory Script: { set until scn 1009334; set newname for datafile 1 to "/u01/app/oracle/oradata/test/system01.dbf"; set newname for datafile 2 to "/u01/app/oracle/oradata/test/undotbs01.dbf"; set newname for datafile 3 to "/u01/app/oracle/oradata/test/sysaux01.dbf"; set newname for datafile 4 to "/u01/app/oracle/oradata/test/users01.dbf"; set newname for datafile 5 to "/u01/app/oracle/oradata/test/example01.dbf"; set newname for datafile 6 to "/u01/app/oracle/oradata/test/tspitr01.dbf"; restore check readonly clone database ; } executing Memory Script executing command: SET until clause executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME Starting restore at 2015-03-24 17:27:07 using channel ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: starting datafile backupset restore channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set restoring datafile 00001 to /u01/app/oracle/oradata/test/system01.dbf restoring datafile 00002 to /u01/app/oracle/oradata/test/undotbs01.dbf restoring datafile 00003 to /u01/app/oracle/oradata/test/sysaux01.dbf restoring datafile 00004 to /u01/app/oracle/oradata/test/users01.dbf restoring datafile 00005 to /u01/app/oracle/oradata/test/example01.dbf restoring datafile 00006 to /u01/app/oracle/oradata/test/tspitr01.dbf channel ORA_AUX_DISK_1: reading from backup piece /u02/ora_test875200761_721 channel ORA_AUX_DISK_1: restored backup piece 1 piece handle=/u02/ora_test875200761_721 tag=TAG20150324T151920 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:05 Finished restore at 2015-03-24 17:28:12 sql statement: CREATE CONTROLFILE REUSE SET DATABASE "DUP" RESETLOGS ARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292 LOGFILE GROUP 1 ( '/u01/app/oracle/oradata/test/redo01.log' ) SIZE 50 M REUSE, GROUP 2 ( '/u01/app/oracle/oradata/test/redo02.log' ) SIZE 50 M REUSE, GROUP 3 ( '/u01/app/oracle/oradata/test/redo03.log' ) SIZE 50 M REUSE DATAFILE '/u01/app/oracle/oradata/test/system01.dbf' CHARACTER SET ZHS16GBK contents of Memory Script: { switch clone datafile all; } executing Memory Script datafile 2 switched to datafile copy input datafile copy recid=1 stamp=875208502 filename=/u01/app/oracle/oradata/test/undotbs01.dbf datafile 3 switched to datafile copy input datafile copy recid=2 stamp=875208502 filename=/u01/app/oracle/oradata/test/sysaux01.dbf datafile 4 switched to datafile copy input datafile copy recid=3 stamp=875208502 filename=/u01/app/oracle/oradata/test/users01.dbf datafile 5 switched to datafile copy input datafile copy recid=4 stamp=875208502 filename=/u01/app/oracle/oradata/test/example01.dbf datafile 6 switched to datafile copy input datafile copy recid=5 stamp=875208502 filename=/u01/app/oracle/oradata/test/tspitr01.dbf contents of Memory Script: { set until scn 1009334; recover clone database delete archivelog ; } executing Memory Script executing command: SET until clause Starting recover at 2015-03-24 17:28:14 using channel ORA_AUX_DISK_1 starting media recovery channel ORA_AUX_DISK_1: starting archive log restore to default destination channel ORA_AUX_DISK_1: restoring archive log archive log thread=1 sequence=64 channel ORA_AUX_DISK_1: reading from backup piece /u02/ora_test875200848_731 channel ORA_AUX_DISK_1: restored backup piece 1 piece handle=/u02/ora_test875200848_731 tag=TAG20150324T152048 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01 archive log filename=/u01/app/oracle/product/10.2.0/db/dbs/arch1_64_870806981.dbf thread=1 sequence=64 channel clone_default: deleting archive log(s) archive log filename=/u01/app/oracle/product/10.2.0/db/dbs/arch1_64_870806981.dbf recid=1 stamp=875208502 media recovery complete, elapsed time: 00:00:01 Finished recover at 2015-03-24 17:28:17 contents of Memory Script: { shutdown clone; startup clone nomount ; } executing Memory Script RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of Duplicate Db command at 03/24/2015 18:28:32 RMAN-03015: error occurred in stored script Memory Script RMAN-06136: ORACLE error from auxiliary database: ORA-01013: user requested cancel of current operation
這裡出錯是因為啟動輔助例項後沒有斷開連線
[oracle@jingyong1 dbs]$ export ORACLE_SID=dup [oracle@jingyong1 dbs]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Tue Mar 24 16:19:29 2015 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to an idle instance. SQL> startup nomount ORACLE instance started. Total System Global Area 167772160 bytes Fixed Size 1272624 bytes Variable Size 58721488 bytes Database Buffers 104857600 bytes Redo Buffers 2920448 bytes
斷開連線
SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
重新執行復制命令:
[oracle@oracle11g admin]$ rman target sys/zzh_2046@test auxiliary sys/oracle@dup catalog rman/rman@jy Recovery Manager: Release 10.2.0.5.0 - Production on Tue Mar 24 18:58:33 2015 Copyright (c) 1982, 2007, Oracle. All rights reserved. connected to target database: TEST (DBID=2168949517) connected to recovery catalog database connected to auxiliary database: DUP (not mounted) RMAN> duplicate target database to dup nofilenamecheck; Starting Duplicate Db at 2015-03-24 18:58:47 allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: sid=36 devtype=DISK contents of Memory Script: { set until scn 1009334; set newname for datafile 1 to "/u01/app/oracle/oradata/test/system01.dbf"; set newname for datafile 2 to "/u01/app/oracle/oradata/test/undotbs01.dbf"; set newname for datafile 3 to "/u01/app/oracle/oradata/test/sysaux01.dbf"; set newname for datafile 4 to "/u01/app/oracle/oradata/test/users01.dbf"; set newname for datafile 5 to "/u01/app/oracle/oradata/test/example01.dbf"; set newname for datafile 6 to "/u01/app/oracle/oradata/test/tspitr01.dbf"; restore check readonly clone database ; } executing Memory Script executing command: SET until clause executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME Starting restore at 2015-03-24 18:58:47 using channel ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: starting datafile backupset restore channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set restoring datafile 00001 to /u01/app/oracle/oradata/test/system01.dbf restoring datafile 00002 to /u01/app/oracle/oradata/test/undotbs01.dbf restoring datafile 00003 to /u01/app/oracle/oradata/test/sysaux01.dbf restoring datafile 00004 to /u01/app/oracle/oradata/test/users01.dbf restoring datafile 00005 to /u01/app/oracle/oradata/test/example01.dbf restoring datafile 00006 to /u01/app/oracle/oradata/test/tspitr01.dbf channel ORA_AUX_DISK_1: reading from backup piece /u02/ora_test875200761_721 channel ORA_AUX_DISK_1: restored backup piece 1 piece handle=/u02/ora_test875200761_721 tag=TAG20150324T151920 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:05 Finished restore at 2015-03-24 18:59:53 sql statement: CREATE CONTROLFILE REUSE SET DATABASE "DUP" RESETLOGS ARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292 LOGFILE GROUP 1 ( '/u01/app/oracle/oradata/test/redo01.log' ) SIZE 50 M REUSE, GROUP 2 ( '/u01/app/oracle/oradata/test/redo02.log' ) SIZE 50 M REUSE, GROUP 3 ( '/u01/app/oracle/oradata/test/redo03.log' ) SIZE 50 M REUSE DATAFILE '/u01/app/oracle/oradata/test/system01.dbf' CHARACTER SET ZHS16GBK contents of Memory Script: { switch clone datafile all; } executing Memory Script datafile 2 switched to datafile copy input datafile copy recid=1 stamp=875214004 filename=/u01/app/oracle/oradata/test/undotbs01.dbf datafile 3 switched to datafile copy input datafile copy recid=2 stamp=875214004 filename=/u01/app/oracle/oradata/test/sysaux01.dbf datafile 4 switched to datafile copy input datafile copy recid=3 stamp=875214004 filename=/u01/app/oracle/oradata/test/users01.dbf datafile 5 switched to datafile copy input datafile copy recid=4 stamp=875214004 filename=/u01/app/oracle/oradata/test/example01.dbf datafile 6 switched to datafile copy input datafile copy recid=5 stamp=875214004 filename=/u01/app/oracle/oradata/test/tspitr01.dbf contents of Memory Script: { set until scn 1009334; recover clone database delete archivelog ; } executing Memory Script executing command: SET until clause Starting recover at 2015-03-24 18:59:56 using channel ORA_AUX_DISK_1 starting media recovery channel ORA_AUX_DISK_1: starting archive log restore to default destination channel ORA_AUX_DISK_1: restoring archive log archive log thread=1 sequence=64 channel ORA_AUX_DISK_1: reading from backup piece /u02/ora_test875200848_731 channel ORA_AUX_DISK_1: restored backup piece 1 piece handle=/u02/ora_test875200848_731 tag=TAG20150324T152048 channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01 archive log filename=/u01/app/oracle/product/10.2.0/db/dbs/arch1_64_870806981.dbf thread=1 sequence=64 channel clone_default: deleting archive log(s) archive log filename=/u01/app/oracle/product/10.2.0/db/dbs/arch1_64_870806981.dbf recid=1 stamp=875214007 media recovery complete, elapsed time: 00:00:01 Finished recover at 2015-03-24 19:00:00 contents of Memory Script: { shutdown clone; startup clone nomount ; } executing Memory Script database dismounted Oracle instance shut down connected to auxiliary database (not started) Oracle instance started Total System Global Area 167772160 bytes Fixed Size 1272624 bytes Variable Size 58721488 bytes Database Buffers 104857600 bytes Redo Buffers 2920448 bytes sql statement: CREATE CONTROLFILE REUSE SET DATABASE "DUP" RESETLOGS ARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292 LOGFILE GROUP 1 ( '/u01/app/oracle/oradata/test/redo01.log' ) SIZE 50 M REUSE, GROUP 2 ( '/u01/app/oracle/oradata/test/redo02.log' ) SIZE 50 M REUSE, GROUP 3 ( '/u01/app/oracle/oradata/test/redo03.log' ) SIZE 50 M REUSE DATAFILE '/u01/app/oracle/oradata/test/system01.dbf' CHARACTER SET ZHS16GBK contents of Memory Script: { set newname for tempfile 1 to "/u01/app/oracle/oradata/test/temp01.dbf"; switch clone tempfile all; catalog clone datafilecopy "/u01/app/oracle/oradata/test/undotbs01.dbf"; catalog clone datafilecopy "/u01/app/oracle/oradata/test/sysaux01.dbf"; catalog clone datafilecopy "/u01/app/oracle/oradata/test/users01.dbf"; catalog clone datafilecopy "/u01/app/oracle/oradata/test/example01.dbf"; catalog clone datafilecopy "/u01/app/oracle/oradata/test/tspitr01.dbf"; switch clone datafile all; } executing Memory Script executing command: SET NEWNAME renamed temporary file 1 to /u01/app/oracle/oradata/test/temp01.dbf in control file cataloged datafile copy datafile copy filename=/u01/app/oracle/oradata/test/undotbs01.dbf recid=1 stamp=875214019 cataloged datafile copy datafile copy filename=/u01/app/oracle/oradata/test/sysaux01.dbf recid=2 stamp=875214019 cataloged datafile copy datafile copy filename=/u01/app/oracle/oradata/test/users01.dbf recid=3 stamp=875214019 cataloged datafile copy datafile copy filename=/u01/app/oracle/oradata/test/example01.dbf recid=4 stamp=875214019 cataloged datafile copy datafile copy filename=/u01/app/oracle/oradata/test/tspitr01.dbf recid=5 stamp=875214019 datafile 2 switched to datafile copy input datafile copy recid=1 stamp=875214019 filename=/u01/app/oracle/oradata/test/undotbs01.dbf datafile 3 switched to datafile copy input datafile copy recid=2 stamp=875214019 filename=/u01/app/oracle/oradata/test/sysaux01.dbf datafile 4 switched to datafile copy input datafile copy recid=3 stamp=875214019 filename=/u01/app/oracle/oradata/test/users01.dbf datafile 5 switched to datafile copy input datafile copy recid=4 stamp=875214019 filename=/u01/app/oracle/oradata/test/example01.dbf datafile 6 switched to datafile copy input datafile copy recid=5 stamp=875214019 filename=/u01/app/oracle/oradata/test/tspitr01.dbf contents of Memory Script: { Alter clone database open resetlogs; } executing Memory Script database opened Finished Duplicate Db at 2015-03-24 19:00:36
執行成功
總結:出現這個錯誤的原因是因為,啟動輔助例項的會話沒有斷開連線,RMAN在執行duplicate
命令時不能有任何其它會話連線到輔助例項,否則就是會執行失敗。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26015009/viewspace-1472428/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 11g rman新特性 duplicate target database for standby from active databaseDatabase
- RMAN duplicate databaseDatabase
- 通過rman duplicate database!Database
- RMAN duplicate database到新主機Database
- oracle 10g rman duplicate target database for standby會自動新增臨時檔案Oracle 10gDatabase
- 使用oracle 11g rman新特性 duplicate target database for standby from active database 建立物理dataguard並開啟RealOracleDatabase
- Oracle 11g Rman Active database duplicateOracleDatabase
- Duplicate Database from ASM to Non- ASM Database Using RMANDatabaseASM
- Oracle11g RMAN Duplicate from Active DatabaseOracleDatabase
- Duplicating Database using RMAN duplicate commandDatabase
- oracle實驗記錄Rman duplicate database(1)OracleDatabase
- oracle實驗記錄Rman duplicate database 2OracleDatabase
- Rman duplicate fail with RMAN-06136, ORA-01503, ORA-12720 (文件 ID 1335479.1)AI
- 沒有連線target database的情況下執行RMAN duplicate可能引發的問題Database
- 【RMAN】RMAN-20001: target database not found in recoveryDatabase
- 【RMAN】RMAN-05001: auxiliary filename conflicts with the target databaseUXDatabase
- RMAN-05541: no archived logs found in target databaseHiveDatabase
- RMAN duplicate from active database 複製資料庫Database資料庫
- RMAN 'Duplicate Database' Feature in 11G [ID 452868.1]Database
- Oracle 11G RAC複製備庫RMAN-03002 RMAN-05501 RMAN-03015 RMAN-03009 RMAN-10038Oracle
- 使用Duplicate target database命令恢復線上oracle datagard備庫DatabaseOracle
- duplicate databaseDatabase
- Performing duplicate database with ASM/OMF/RMAN (Doc ID 340848.1)ORMDatabaseASM
- RMAN Duplicate Database From RAC ASM To RAC ASM [ID 461479.1]DatabaseASM
- To use Rman to duplicate database be careful of db_file_name_convertDatabase
- RMAN-20005: target database name is ambiguousDatabase
- RMAN DUPLICATE Without Connecting To Target DB For Both Disk & Tape_1375864.1
- Creating a Physical Standby using RMAN DUPLICATE FROM ACTIVE DATABASEDatabase
- “rman target /” 和 “rman nocatalog target /” 區別
- RMAN-20001: target database not found in recovery catalogDatabase
- RMAN-05517: temporary file conflicts with file used by target database(zt)Database
- Creation Of Rman Duplicate Without Target And Recovery Catalog Connec-1113713.1
- RMAN 11GR2 : DUPLICATE Without Target And Recovery Catalog Connection_874352.1
- 使用RMAN DUPLICATE...FROM ACTIVE DATABASE命令來建立DataGuard物理備庫Database
- 11g RMAN新特性active database duplicate 資料庫異構Database資料庫
- "rman target /” 和"rman nocatalog target /”區別實踐
- DUPLICATE DATABASE 注意事項Database
- RMAN duplicate On Windows7Windows