|
1Z0-053第6/7/20章
1Z0-052共19章(上完12章),1Z0-053共21章(上完12章)和1Z0-063多租户部分共9章(上完0章)
总共上完全部49章中的24章
attach]670[/attach]
rman target sys/oracle_4U@orcl auxiliary sys/oracle_4U@clonedb cmdfile=clonedb.rcv
- run {
- allocate auxiliary channel c1 device type disk;
- allocate auxiliary channel c2 device type disk;
- allocate auxiliary channel c3 device type disk;
- allocate auxiliary channel c4 device type disk;
- allocate auxiliary channel c5 device type disk;
- allocate auxiliary channel c6 device type disk;
- allocate auxiliary channel c7 device type disk;
- allocate auxiliary channel c8 device type disk;
- allocate channel c9 device type disk;
- allocate channel c10 device type disk;
- allocate channel c11 device type disk;
- allocate channel c12 device type disk;
- allocate channel c13 device type disk;
- allocate channel c14 device type disk;
- allocate channel c15 device type disk;
- allocate channel c16 device type disk;
- duplicate target database to clonedb
- from active database
- nofilenamecheck
- spfile
- set
- control_files='+DATA','+FRA'
- set
- db_file_name_convert='+DATA/orcl/','+DATA/clonedb'
- set
- log_file_name_convert='+DATA/orcl','+DATA/clonedb','+FRA/orcl','+FRA/clonedb'
- set
- audit_file_dest='/u01/app/oracle/admin/clonedb/adump';
- }
复制代码 所有三台机器都要配置相同的tns串,本例子中的@orcl、 @clonedb
BACKUP LOCATION的源头库备份部分:
- run {
- allocate channel c1 device type disk format '/home/oracle/backup/%U';
- allocate channel c2 device type disk format '/home/oracle/backup/%U';
- allocate channel c3 device type disk format '/home/oracle/backup/%U';
- allocate channel c4 device type disk format '/home/oracle/backup/%U';
- allocate channel c5 device type disk format '/home/oracle/backup/%U';
- allocate channel c6 device type disk format '/home/oracle/backup/%U';
- allocate channel c7 device type disk format '/home/oracle/backup/%U';
- allocate channel c8 device type disk format '/home/oracle/backup/%U';
- backup database plus archivelog force;
- backup spfile;
- backup current controlfile;
- }
复制代码 rman auxiliary sys/oracle_4U@mydb cmdfile=mydb.rcv- run{
- allocate auxiliary channel c1 device type disk;
- allocate auxiliary channel c2 device type disk;
- allocate auxiliary channel c3 device type disk;
- allocate auxiliary channel c4 device type disk;
- allocate auxiliary channel c5 device type disk;
- allocate auxiliary channel c6 device type disk;
- allocate auxiliary channel c7 device type disk;
- allocate auxiliary channel c8 device type disk;
- duplicate target database to mydb
- backup location '/home/oracle/backup'
- nofilenamecheck
- spfile
- set
- control_files='/u01/app/oracle/oradata/mydb/control01.ctl','/u01/app/oracle/oradata/mydb/control02.ctl','/u01/app/oracle/oradata/mydb/control03.ctl'
- set
- db_file_name_convert='+DATA/orcl/datafile/example.259.955312731','/u01/app/oracle/oradata/mydb/example01.dbf','+DATA/orcl/datafile/users.262.955312733','/u01/app/oracle/oradata/mydb/users01.dbf','+DATA/orcl/datafile/undotbs1.258.955312731','/u01/app/oracle/oradata/mydb/undotbs01.dbf','+DATA/orcl/datafile/sysaux.261.955312733','/u01/app/oracle/oradata/mydb/sysaux01.dbf','+DATA/orcl/datafile/system.265.955312733','/u01/app/oracle/oradata/mydb/system01.dbf'
- set
- log_file_name_convert='+DATA/orcl/onlinelog/group_1.257.955313155','/u01/app/oracle/oradata/mydb/redo01a.log','+FRA/orcl/onlinelog/group_1.258.955313155','/u01/app/oracle/oradata/mydb/redo01b.log','+DATA/orcl/onlinelog/group_3.260.955313157','/u01/app/oracle/oradata/mydb/redo03a.log','+FRA/orcl/onlinelog/group_3.256.955313157','/u01/app/oracle/oradata/mydb/redo03b.log','+DATA/orcl/onlinelog/group_2.256.955313155','/u01/app/oracle/oradata/mydb/redo02a.log','+FRA/orcl/onlinelog/group_2.257.955313157','/u01/app/oracle/oradata/mydb/redo02b.log'
- set
- audit_file_dest='/u01/app/oracle/admin/mydb/adump'
- set
- db_create_file_dest=''
- set
- db_recovery_file_dest='/u01/app/oracle/flash_recovery_area';
- }
复制代码 等价语法:
- run {
- allocate auxiliary channel c1 device type disk;
- allocate auxiliary channel c2 device type disk;
- allocate auxiliary channel c3 device type disk;
- allocate auxiliary channel c4 device type disk;
- allocate auxiliary channel c5 device type disk;
- allocate auxiliary channel c6 device type disk;
- allocate auxiliary channel c7 device type disk;
- allocate auxiliary channel c8 device type disk;
- duplicate database to mydb2
- backup location '/home/oracle/backup'
- nofilenamecheck
- db_file_name_convert '+DATA/orcl/datafile','/u01/app/oracle/oradata/mydb2'
- logfile
- group 1 ('/u01/app/oracle/oradata/mydb2/redo01.log') size 50M,
- group 2 ('/u01/app/oracle/oradata/mydb2/redo02.log') size 50M,
- group 3 ('/u01/app/oracle/oradata/mydb2/redo03.log') size 50M;
- spfile
- parameter_value_convert '+DATA','/u01/app/oracle/oradata/mydb2','+FRA','/u01/app/oracle/flash_recovery_area','/u01/app/oracle/admin/orcl/adump','/u01/app/oracle/admin/mydb2/adump'
- set
- control_files='/u01/app/oracle/oradata/mydb2/control01.ctl','/u01/app/oracle/oradata/mydb2/control02.ctl','/u01/app/oracle/oradata/mydb2/control03.ctl';
- }
复制代码
|
|