duplicate命令中有pfile、logfile、*_file_name_convert、nofilenamecheck的案例
總結
1、pfile選項說明使用的rman命令執行的那端的一個檔案
如果rman在源端開啟,則pfile放在源端上,如果ramn在目標端開啟,則pfile放在目標端上
2、logfile表示在duplicate命令中生成目標端的檔案,和rman命令在哪端執行無關
logfile的生成的檔案在目標端,logfile選項時必須指定size
3、一般操作時,除非自己清楚源端和目標端的datafile、online redo log檔案不在同一個共享的目錄中,否則不要加上nofilenamecheck
4、如果pfile或spifle中指定了*_file_name_convert引數,但是duplicate命令中重新指定了db_file_name_convert、logfile選擇,則會覆蓋掉pfile或spifle中指定了*_file_name_convert引數的設定,見如下logfile、*_file_name_convert、nofilenamecheck選項中5、6的實驗
pfile選項
前提條件
源端端目標端在不同機器,不共享/u01/app/oracle/oradata/prod1路徑,各自都有自己的/u01/app/oracle/oradata/prod1目錄
源端的logfile位於路徑/u01/app/oracle/oradata/prod1,目標端的pfile或spfile沒有指定任何db_file_name_convert和log_file_name_convert引數
源端檔案/home/oracle/initprod1std.ora(SGA=800M,process=200)
目標端pfile檔案/home/oracle/initprod1std.ora(SGA=700M,process=190)
目標端pfile檔案$ORACLE_HOME/dbs/initprod1std.ora(SGA=600M,process=180)
目標端spfile檔案$ORACLE_HOME/dbs/spfileprod1std.ora(SGA=600M,process=180)
1、rman在源端伺服器上執行,目標端沒有/home/oracle/initprod1std.ora,目標端沒有spfile,目標端使用$ORACLE_HOME/dbs/initprod1std.ora
run {
duplicate target database to prod1std from active database
pfile=/home/oracle/initprod1std.ora
LOGFILE
'/u02/log01.dbf' size 1024M,
'/u02/log02.dbf' size 1024M,
'/u02/log03.dbf' size 1024M
NOFILENAMECHECK;
}
目標端的結果
SGA=800M
process=200
db_data_files.file_name和源端一樣
v$logfile.member路徑為/u02
說明使用了源端的檔案/home/oracle/initprod1std.ora,並且在目標端生成了rman命令中的logfile
2、rman在源端伺服器上執行,目標端沒有/home/oracle/initprod1std.ora,目標端有$ORACLE_HOME/dbs/initprod1std.ora,目標端使用spfile啟動$ORACLE_HOME/dbs/spfileprod1std.ora
run {
duplicate target database to prod1std from active database
pfile=/home/oracle/initprod1std.ora
LOGFILE
'/u02/log01.dbf' size 1024M,
'/u02/log02.dbf' size 1024M,
'/u02/log03.dbf' size 1024M
NOFILENAMECHECK;
}
報錯RMAN-05597: Database started with server parameter file and PFILE clause used in command
3、rman在源端伺服器上執行,源端伺服器上沒有/home/oracle/initprod1std.ora,目標端沒有/home/oracle/initprod1std.ora,目標端沒有spfile,目標端使用$ORACLE_HOME/dbs/initprod1std.ora
run {
duplicate target database to prod1std from active database
pfile=/home/oracle/initprod1std.ora
LOGFILE
'/u02/log01.dbf' size 1024M,
'/u02/log02.dbf' size 1024M,
'/u02/log03.dbf' size 1024M
NOFILENAMECHECK;
}
報錯RMAN-04017: startup error description: LRM-00109: could not open parameter file '/home/oracle/initprod1std.ora'
4、rman在源端伺服器上執行,源端伺服器上沒有/home/oracle/initprod1std.ora,目標端有/home/oracle/initprod1std.ora,目標端沒有spfile,目標端使用$ORACLE_HOME/dbs/initprod1std.ora
run {
duplicate target database to prod1std from active database
pfile=/home/oracle/initprod1std.ora
LOGFILE
'/u02/log01.dbf' size 1024M,
'/u02/log02.dbf' size 1024M,
'/u02/log03.dbf' size 1024M
NOFILENAMECHECK;
}
報錯RMAN-04017: startup error description: LRM-00109: could not open parameter file '/home/oracle/initprod1std.ora'
3、4說明使用的是源端的檔案/home/oracle/initprod1std.ora
logfile、*_file_name_convert、nofilenamecheck選項
源端端目標端在不同機器,不共享/u01/app/oracle/oradata/prod1路徑,各自都有自己的/u01/app/oracle/oradata/prod1目錄
1、源端的logfile位於路徑/u01/app/oracle/oradata/prod1,目標端的使用spfile啟動,spfile沒有指定任何db_file_name_convert、log_file_name_convert引數
run {duplicate target database to prod1std from active database;}
報錯
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/prod1/example01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/prod1/users01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/prod1/undotbs01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/prod1/sysaux01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/prod1/system01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/prod1/redo03.log conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/prod1/redo02.log conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/prod1/redo01.log conflicts with a file used by the target database
2、源端的logfile位於路徑/u01/app/oracle/oradata/prod1,目標端的使用spfile啟動,spfile沒有指定任何db_file_name_convert、log_file_name_convert引數
run {duplicate target database to prod1std from active database nofilenamecheck;}
目標端的結果
db_data_files.file_name和源端一樣
v$logfile.member和源端一樣
3、源端的logfile位於路徑/u01/app/oracle/oradata/prod1,目標端的使用spfile啟動,spfile沒有指定任何db_file_name_convert、log_file_name_convert引數
run {duplicate target database to prod1std from active database db_file_name_convert=('/u01/app/oracle/oradata/prod1','/u01/app/oracle/oradata/prod1std');}
報錯
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/prod1/redo03.log conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/prod1/redo02.log conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/prod1/redo01.log conflicts with a file used by the target database
4、源端的logfile位於路徑/u01/app/oracle/oradata/prod1,目標端的使用spfile啟動,spfile沒有指定任何db_file_name_convert、log_file_name_convert引數
run {duplicate target database to prod1std from active database
db_file_name_convert=('/u01/app/oracle/oradata/prod1','/u01/app/oracle/oradata/prod1std')
logfile
'/u01/app/oracle/oradata/prod1std/redo01.log' size 50M,
'/u01/app/oracle/oradata/prod1std/redo02.log' size 50M,
'/u01/app/oracle/oradata/prod1std/redo03.log' size 50M;
}
目標端結果
db_data_files.file_name在/u01/app/oracle/oradata/prod1std目錄下
v$logfile.member在/u01/app/oracle/oradata/prod1std路徑下
5、源端的dbfile,logfile都位於路徑/u01/app/oracle/oradata/prod1,目標端的使用spfile啟動,spfile指定
db_file_name_convert='/u01/app/oracle/oradata/prod1/', '/u01/app/oracle/oradata/prod1std/'
log_file_name_convert='/u01/app/oracle/oradata/prod1/', '/u01/app/oracle/oradata/prod1std/'
run {duplicate target database to prod1std from active database;
}
目標端結果
db_data_files.file_name在/u01/app/oracle/oradata/prod1std目錄下
v$logfile.member在/u01/app/oracle/oradata/prod1std路徑下
6、源端的dbfile,logfile都位於路徑/u01/app/oracle/oradata/prod1,目標端的使用spfile啟動,spfile指定
db_file_name_convert='/u01/app/oracle/oradata/prod1/', '/u01/app/oracle/oradata/prod1std/'
log_file_name_convert='/u01/app/oracle/oradata/prod1/', '/u01/app/oracle/oradata/prod1std/'
run {duplicate target database to prod1std from active database
db_file_name_convert=('/u01/app/oracle/oradata/prod1','/u01/app/oracle/oradata/data2')
logfile
'/u01/app/oracle/oradata/data2/redo01.log' size 50M,
'/u01/app/oracle/oradata/data2/redo02.log' size 50M,
'/u01/app/oracle/oradata/data2/redo03.log' size 50M;
}
目標端結果
db_data_files.file_name在/u01/app/oracle/oradata/data2目錄下
v$logfile.member在/u01/app/oracle/oradata/data2路徑下
logfile選項時不加size時報錯
run {duplicate target database to prod1std from active database
db_file_name_convert=('/u01/app/oracle/oradata/prod1','/u01/app/oracle/oradata/prod1std')
logfile
'/u01/app/oracle/oradata/prod1std/redo01.log',
'/u01/app/oracle/oradata/prod1std/redo02.log',
'/u01/app/oracle/oradata/prod1std/redo03.log';}
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "comma": expecting one of: "size"
RMAN-01007: at line 1 column 208 file: standard input
1、pfile選項說明使用的rman命令執行的那端的一個檔案
如果rman在源端開啟,則pfile放在源端上,如果ramn在目標端開啟,則pfile放在目標端上
2、logfile表示在duplicate命令中生成目標端的檔案,和rman命令在哪端執行無關
logfile的生成的檔案在目標端,logfile選項時必須指定size
3、一般操作時,除非自己清楚源端和目標端的datafile、online redo log檔案不在同一個共享的目錄中,否則不要加上nofilenamecheck
4、如果pfile或spifle中指定了*_file_name_convert引數,但是duplicate命令中重新指定了db_file_name_convert、logfile選擇,則會覆蓋掉pfile或spifle中指定了*_file_name_convert引數的設定,見如下logfile、*_file_name_convert、nofilenamecheck選項中5、6的實驗
pfile選項
前提條件
源端端目標端在不同機器,不共享/u01/app/oracle/oradata/prod1路徑,各自都有自己的/u01/app/oracle/oradata/prod1目錄
源端的logfile位於路徑/u01/app/oracle/oradata/prod1,目標端的pfile或spfile沒有指定任何db_file_name_convert和log_file_name_convert引數
源端檔案/home/oracle/initprod1std.ora(SGA=800M,process=200)
目標端pfile檔案/home/oracle/initprod1std.ora(SGA=700M,process=190)
目標端pfile檔案$ORACLE_HOME/dbs/initprod1std.ora(SGA=600M,process=180)
目標端spfile檔案$ORACLE_HOME/dbs/spfileprod1std.ora(SGA=600M,process=180)
1、rman在源端伺服器上執行,目標端沒有/home/oracle/initprod1std.ora,目標端沒有spfile,目標端使用$ORACLE_HOME/dbs/initprod1std.ora
run {
duplicate target database to prod1std from active database
pfile=/home/oracle/initprod1std.ora
LOGFILE
'/u02/log01.dbf' size 1024M,
'/u02/log02.dbf' size 1024M,
'/u02/log03.dbf' size 1024M
NOFILENAMECHECK;
}
目標端的結果
SGA=800M
process=200
db_data_files.file_name和源端一樣
v$logfile.member路徑為/u02
說明使用了源端的檔案/home/oracle/initprod1std.ora,並且在目標端生成了rman命令中的logfile
2、rman在源端伺服器上執行,目標端沒有/home/oracle/initprod1std.ora,目標端有$ORACLE_HOME/dbs/initprod1std.ora,目標端使用spfile啟動$ORACLE_HOME/dbs/spfileprod1std.ora
run {
duplicate target database to prod1std from active database
pfile=/home/oracle/initprod1std.ora
LOGFILE
'/u02/log01.dbf' size 1024M,
'/u02/log02.dbf' size 1024M,
'/u02/log03.dbf' size 1024M
NOFILENAMECHECK;
}
報錯RMAN-05597: Database started with server parameter file and PFILE clause used in command
3、rman在源端伺服器上執行,源端伺服器上沒有/home/oracle/initprod1std.ora,目標端沒有/home/oracle/initprod1std.ora,目標端沒有spfile,目標端使用$ORACLE_HOME/dbs/initprod1std.ora
run {
duplicate target database to prod1std from active database
pfile=/home/oracle/initprod1std.ora
LOGFILE
'/u02/log01.dbf' size 1024M,
'/u02/log02.dbf' size 1024M,
'/u02/log03.dbf' size 1024M
NOFILENAMECHECK;
}
報錯RMAN-04017: startup error description: LRM-00109: could not open parameter file '/home/oracle/initprod1std.ora'
4、rman在源端伺服器上執行,源端伺服器上沒有/home/oracle/initprod1std.ora,目標端有/home/oracle/initprod1std.ora,目標端沒有spfile,目標端使用$ORACLE_HOME/dbs/initprod1std.ora
run {
duplicate target database to prod1std from active database
pfile=/home/oracle/initprod1std.ora
LOGFILE
'/u02/log01.dbf' size 1024M,
'/u02/log02.dbf' size 1024M,
'/u02/log03.dbf' size 1024M
NOFILENAMECHECK;
}
報錯RMAN-04017: startup error description: LRM-00109: could not open parameter file '/home/oracle/initprod1std.ora'
3、4說明使用的是源端的檔案/home/oracle/initprod1std.ora
logfile、*_file_name_convert、nofilenamecheck選項
源端端目標端在不同機器,不共享/u01/app/oracle/oradata/prod1路徑,各自都有自己的/u01/app/oracle/oradata/prod1目錄
1、源端的logfile位於路徑/u01/app/oracle/oradata/prod1,目標端的使用spfile啟動,spfile沒有指定任何db_file_name_convert、log_file_name_convert引數
run {duplicate target database to prod1std from active database;}
報錯
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/prod1/example01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/prod1/users01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/prod1/undotbs01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/prod1/sysaux01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/prod1/system01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/prod1/redo03.log conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/prod1/redo02.log conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/prod1/redo01.log conflicts with a file used by the target database
2、源端的logfile位於路徑/u01/app/oracle/oradata/prod1,目標端的使用spfile啟動,spfile沒有指定任何db_file_name_convert、log_file_name_convert引數
run {duplicate target database to prod1std from active database nofilenamecheck;}
目標端的結果
db_data_files.file_name和源端一樣
v$logfile.member和源端一樣
3、源端的logfile位於路徑/u01/app/oracle/oradata/prod1,目標端的使用spfile啟動,spfile沒有指定任何db_file_name_convert、log_file_name_convert引數
run {duplicate target database to prod1std from active database db_file_name_convert=('/u01/app/oracle/oradata/prod1','/u01/app/oracle/oradata/prod1std');}
報錯
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/prod1/redo03.log conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/prod1/redo02.log conflicts with a file used by the target database
RMAN-05001: auxiliary file name /u01/app/oracle/oradata/prod1/redo01.log conflicts with a file used by the target database
4、源端的logfile位於路徑/u01/app/oracle/oradata/prod1,目標端的使用spfile啟動,spfile沒有指定任何db_file_name_convert、log_file_name_convert引數
run {duplicate target database to prod1std from active database
db_file_name_convert=('/u01/app/oracle/oradata/prod1','/u01/app/oracle/oradata/prod1std')
logfile
'/u01/app/oracle/oradata/prod1std/redo01.log' size 50M,
'/u01/app/oracle/oradata/prod1std/redo02.log' size 50M,
'/u01/app/oracle/oradata/prod1std/redo03.log' size 50M;
}
目標端結果
db_data_files.file_name在/u01/app/oracle/oradata/prod1std目錄下
v$logfile.member在/u01/app/oracle/oradata/prod1std路徑下
5、源端的dbfile,logfile都位於路徑/u01/app/oracle/oradata/prod1,目標端的使用spfile啟動,spfile指定
db_file_name_convert='/u01/app/oracle/oradata/prod1/', '/u01/app/oracle/oradata/prod1std/'
log_file_name_convert='/u01/app/oracle/oradata/prod1/', '/u01/app/oracle/oradata/prod1std/'
run {duplicate target database to prod1std from active database;
}
目標端結果
db_data_files.file_name在/u01/app/oracle/oradata/prod1std目錄下
v$logfile.member在/u01/app/oracle/oradata/prod1std路徑下
6、源端的dbfile,logfile都位於路徑/u01/app/oracle/oradata/prod1,目標端的使用spfile啟動,spfile指定
db_file_name_convert='/u01/app/oracle/oradata/prod1/', '/u01/app/oracle/oradata/prod1std/'
log_file_name_convert='/u01/app/oracle/oradata/prod1/', '/u01/app/oracle/oradata/prod1std/'
run {duplicate target database to prod1std from active database
db_file_name_convert=('/u01/app/oracle/oradata/prod1','/u01/app/oracle/oradata/data2')
logfile
'/u01/app/oracle/oradata/data2/redo01.log' size 50M,
'/u01/app/oracle/oradata/data2/redo02.log' size 50M,
'/u01/app/oracle/oradata/data2/redo03.log' size 50M;
}
目標端結果
db_data_files.file_name在/u01/app/oracle/oradata/data2目錄下
v$logfile.member在/u01/app/oracle/oradata/data2路徑下
logfile選項時不加size時報錯
run {duplicate target database to prod1std from active database
db_file_name_convert=('/u01/app/oracle/oradata/prod1','/u01/app/oracle/oradata/prod1std')
logfile
'/u01/app/oracle/oradata/prod1std/redo01.log',
'/u01/app/oracle/oradata/prod1std/redo02.log',
'/u01/app/oracle/oradata/prod1std/redo03.log';}
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "comma": expecting one of: "size"
RMAN-01007: at line 1 column 208 file: standard input
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30126024/viewspace-2151075/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 1Z0 053 Q289(Duplicate&NOFILENAMECHECK)Oracle
- 關於pfile,spfile的一些命令
- Create spfile from pfile命令要注意
- 使用rman的命令duplicate複製資料庫資料庫
- Oracle的spfile和pfileOracle
- Oracle Spfile and pfileOracle
- Oracle中的spfile和 pfileOracle
- Oracle中的pfile和spfileOracle
- Linux系統中有趣的命令(可以玩小遊戲)Linux遊戲
- 有關重做日誌的狀態及switch logfile時的不正常案例分析
- solaris系統中有關 TCP/IP配置的檔案與命令TCP
- 探索Oracle pfile和spfile的祕密Oracle
- redo logfile的維護操作
- 資料庫中的logfile資料庫
- Linux 的 fmt 命令用法與案例Linux
- 常用的壓縮和解壓命令案例
- oracle spfile和pfile小結Oracle
- Oracle Concepts - pfile and spfileOracle
- docker筆記16-Dockerfile案例-ONBUILD命令案例Docker筆記UI
- ALTER DATABASE CLEAR UNARCHIVED LOGFILE的使用DatabaseHive
- 配置oracle 9i physical standby database時,duplicate命令的執行記錄OracleDatabase
- 【DG】備庫RMAN還原方式搭建DG(不使用duplicate命令)
- 使用Duplicate target database命令恢復線上oracle datagard備庫DatabaseOracle
- 使用duplicate命令做dataguard時遇到 ORA-12523
- orcle pfile和spfile的區別和聯絡
- windows下oradim的pfile引數選項Windows
- ASM例項使用CREATE PFILE FROM MEMORY的bugASM
- duplicate databaseDatabase
- Oracle Logfile的常見不同狀態Oracle
- oracle引數檔案pfile,spfileOracle
- 使用RMAN DUPLICATE...FROM ACTIVE DATABASE命令來建立DataGuard物理備庫Database
- oracle之 如何 dump logfileOracle
- oracle logfile 擴充套件Oracle套件
- linux find 命令和 while 命令聯合使用案例LinuxWhile
- maven配置eclipse案例及命令MavenEclipse
- Duplicate的一點總結
- 修改pfile引數檔案過程的異常
- 事務中有webservice的控制Web