duplicate克隆数据库脚本例子

 

 

建议目的端执行(源端也可以执行)

rman target sys/oracle@tnsora11g_source auxiliary sys/oracle@tnsora11g_target

 

 

run{
allocate channel prmy1 type disk;
allocate channel prmy2 type disk;
allocate channel prmy3 type disk;
allocate auxiliary channel stby1 type disk;
allocate auxiliary channel stby2 type disk;
allocate auxiliary channel stby3 type disk;
duplicate target database to ora11gcp from active database nofilenamecheck
password file
spfile
parameter_value_convert='ora11g','ora11gcp'
set db_unique_name='ora11gcp'
set instance_name='ora11gcp'
set cluster_database='false'
set control_files='/u01/app/oracle/oradata/ora11gcp/control01.ctl','/u01/app/oracle/oradata/ora11gcp/control02.ctl'
set log_file_name_convert='/u01/app/oracle/oradata/ora11g','/u01/app/oracle/oradata/ora11gcp'
set db_file_name_convert='/u01/app/oracle/oradata/ora11g','/u01/app/oracle/oradata/ora11gcp'
set log_archive_dest_1='LOCATION=/u01/archivelog'
set audit_file_dest='/u01/app/oracle/admin/ora11gcp/adump'
set diagnostic_dest='/u01/app/oracle'
set sga_target='3G'
set sga_max_size='3G'
set undo_tablespace='UNDOTBS1'
reset remote_listener
reset local_listener
reset db_create_file_dest
logfile
group 1 ('/u01/app/oracle/oradata/ora11gcp/redo01_1.f','/u01/app/oracle/oradata/ora11gcp/redo01_2.f') size 50m,
group 2 ('/u01/app/oracle/oradata/ora11gcp/redo02_1.f','/u01/app/oracle/oradata/ora11gcp/redo02_2.f') size 50m,
group 3 ('/u01/app/oracle/oradata/ora11gcp/redo03_1.f','/u01/app/oracle/oradata/ora11gcp/redo03_2.f') size 50m,
group 4 ('/u01/app/oracle/oradata/ora11gcp/redo04_1.f','/u01/app/oracle/oradata/ora11gcp/redo04_2.f') size 50m
;
release channel prmy1;
release channel prmy2;
release channel prmy3;
release channel stby1;
release channel stby2;
release channel stby3;
}

 

posted @ 2023-12-20 16:04  slnngk  阅读(29)  评论(0编辑  收藏  举报