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'
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