Bo's Oracle Station

查看: 1942|回复: 0

课程第37/38次(2017-09-23星期六上下午)

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2017-9-23 11:13:45 | 显示全部楼层 |阅读模式
1Z0-053第6/7/20章
1Z0-052
19章(上完12章),1Z0-05321章(上完12章)和1Z0-063多租户部分共9章(上完0章)
总共上完全部49章中的24


attach]670[/attach]

Screenshot.png

rman target sys/oracle_4U@orcl auxiliary sys/oracle_4U@clonedb cmdfile=clonedb.rcv
  1. run {
  2. allocate  auxiliary channel c1 device type disk;
  3. allocate  auxiliary channel c2 device type disk;
  4. allocate  auxiliary channel c3 device type disk;
  5. allocate  auxiliary channel c4 device type disk;
  6. allocate  auxiliary channel c5 device type disk;
  7. allocate  auxiliary channel c6 device type disk;
  8. allocate  auxiliary channel c7 device type disk;
  9. allocate  auxiliary channel c8 device type disk;
  10. allocate channel c9 device type disk;
  11. allocate channel c10 device type disk;
  12. allocate channel c11 device type disk;
  13. allocate channel c12 device type disk;
  14. allocate channel c13 device type disk;
  15. allocate channel c14 device type disk;
  16. allocate channel c15 device type disk;
  17. allocate channel c16 device type disk;
  18. duplicate target database to clonedb
  19. from active database
  20. nofilenamecheck
  21. spfile
  22. set
  23. control_files='+DATA','+FRA'
  24. set
  25. db_file_name_convert='+DATA/orcl/','+DATA/clonedb'
  26. set
  27. log_file_name_convert='+DATA/orcl','+DATA/clonedb','+FRA/orcl','+FRA/clonedb'
  28. set
  29. audit_file_dest='/u01/app/oracle/admin/clonedb/adump';
  30. }
复制代码
所有三台机器都要配置相同的tns串,本例子中的@orcl、 @clonedb

Screenshot.png


BACKUP LOCATION的源头库备份部分:
  1. run {
  2. allocate channel  c1 device type disk format '/home/oracle/backup/%U';
  3. allocate channel  c2 device type disk format '/home/oracle/backup/%U';
  4. allocate channel  c3 device type disk format '/home/oracle/backup/%U';
  5. allocate channel  c4 device type disk format '/home/oracle/backup/%U';
  6. allocate channel  c5 device type disk format '/home/oracle/backup/%U';
  7. allocate channel  c6 device type disk format '/home/oracle/backup/%U';
  8. allocate channel  c7 device type disk format '/home/oracle/backup/%U';
  9. allocate channel  c8 device type disk format '/home/oracle/backup/%U';
  10. backup database plus archivelog force;
  11. backup spfile;
  12. backup current controlfile;
  13. }
复制代码
rman auxiliary sys/oracle_4U@mydb cmdfile=mydb.rcv
  1. run{
  2. allocate  auxiliary channel c1 device type disk;
  3. allocate  auxiliary channel c2 device type disk;
  4. allocate  auxiliary channel c3 device type disk;
  5. allocate  auxiliary channel c4 device type disk;
  6. allocate  auxiliary channel c5 device type disk;
  7. allocate  auxiliary channel c6 device type disk;
  8. allocate  auxiliary channel c7 device type disk;
  9. allocate  auxiliary channel c8 device type disk;
  10. duplicate target database to mydb
  11. backup location '/home/oracle/backup'
  12. nofilenamecheck
  13. spfile
  14. set
  15. control_files='/u01/app/oracle/oradata/mydb/control01.ctl','/u01/app/oracle/oradata/mydb/control02.ctl','/u01/app/oracle/oradata/mydb/control03.ctl'
  16. set
  17. 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'
  18. set
  19. 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'
  20. set
  21. audit_file_dest='/u01/app/oracle/admin/mydb/adump'
  22. set
  23. db_create_file_dest=''
  24. set
  25. db_recovery_file_dest='/u01/app/oracle/flash_recovery_area';

  26. }
复制代码
等价语法:
  1. run {
  2. allocate  auxiliary channel c1 device type disk;
  3. allocate  auxiliary channel c2 device type disk;
  4. allocate  auxiliary channel c3 device type disk;
  5. allocate  auxiliary channel c4 device type disk;
  6. allocate  auxiliary channel c5 device type disk;
  7. allocate  auxiliary channel c6 device type disk;
  8. allocate  auxiliary channel c7 device type disk;
  9. allocate  auxiliary channel c8 device type disk;
  10. duplicate database to mydb2
  11. backup location '/home/oracle/backup'
  12. nofilenamecheck  
  13. db_file_name_convert '+DATA/orcl/datafile','/u01/app/oracle/oradata/mydb2'
  14. logfile
  15. group 1 ('/u01/app/oracle/oradata/mydb2/redo01.log') size 50M,
  16. group 2 ('/u01/app/oracle/oradata/mydb2/redo02.log') size 50M,
  17. group 3 ('/u01/app/oracle/oradata/mydb2/redo03.log') size 50M;
  18. spfile
  19. 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'
  20. set
  21. control_files='/u01/app/oracle/oradata/mydb2/control01.ctl','/u01/app/oracle/oradata/mydb2/control02.ctl','/u01/app/oracle/oradata/mydb2/control03.ctl';
  22. }
复制代码



Screenshot-1.png

oracleasm4redhat69x8664.zip

112.21 KB, 下载次数: 632

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-3-28 21:06 , Processed in 0.040833 second(s), 27 queries .

快速回复 返回顶部 返回列表