Bo's Oracle Station

查看: 1747|回复: 0

(52-19)第31/32次:2015-12-15星期二,2015-12-17星期四

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2015-12-22 15:33:06 | 显示全部楼层 |阅读模式
本帖最后由 botang 于 2015-12-22 15:51 编辑

(52-18)上完1Z0-053第20章
(52-19)上完1Z0-053第8章


ACTIVE:本机ASM到ASM:
  1. run {
  2. duplicate target database to dbtest
  3. from active database
  4. nofilenamecheck
  5. spfile
  6. set
  7. control_files='+DATA','+FRA'
  8. set
  9. db_file_name_convert='+DATA/orcl/','+DATA/dbtest'
  10. set
  11. log_file_name_convert='+DATA/orcl','+DATA/dbtest','+FRA/orcl','+FRA/dbtest'
  12. set
  13. audit_file_dest='/u01/app/oracle/admin/dbtest/adump';
  14. }
复制代码


ACTIVE:两机ASM到文件系统:
  1. run{
  2. duplicate target database to db11g
  3. from active database
  4. nofilenamecheck
  5. spfile
  6. set
  7. control_files='/u01/app/oracle/oradata/db11g/control01.ctl','/u01/app/oracle/oradata/db11g/control02.ctl','/u01/app/oracle/oradata/db11g/control03.ctl'
  8. set
  9. db_file_name_convert='+DATA/orcl/datafile/example.265.832197353','/u01/app/oracle/oradata/db11g/example01.dbf','+DATA/orcl/datafile/users.259.832197065','/u01/app/oracle/oradata/db11g/users01.dbf','+DATA/orcl/datafile/undotbs1.258.832197065','/u01/app/oracle/oradata/db11g/undotbs01.dbf','+DATA/orcl/datafile/sysaux.257.832197065','/u01/app/oracle/oradata/db11g/sysaux01.dbf','+DATA/orcl/datafile/system.256.832197063','/u01/app/oracle/oradata/db11g/system01.dbf'
  10. set
  11. log_file_name_convert='+DATA/orcl/onlinelog/group_1.261.832197287','/u01/app/oracle/oradata/db11g/redo01a.log','+FRA/orcl/onlinelog/group_1.257.832197291','/u01/app/oracle/oradata/db11g/redo01b.log','+DATA/orcl/onlinelog/group_3.263.832197301','/u01/app/oracle/oradata/db11g/redo03a.log','+FRA/orcl/onlinelog/group_3.259.832197305','/u01/app/oracle/oradata/db11g/redo03b.log','+DATA/orcl/onlinelog/group_2.262.832197293','/u01/app/oracle/oradata/db11g/redo02a.log','+FRA/orcl/onlinelog/group_2.258.832197299','/u01/app/oracle/oradata/db11g/redo02b.log';
  12. set
  13. audit_file_dest='/u01/app/oracle/admin/db11g/adump'
  14. set
  15. db_create_file_dest=''
  16. set
  17. db_recovery_file_dest='/u01/app/oracle/flash_recovery_area';
  18. }
复制代码

BACKUPLOCATION:两机ASM到文件系统:
1_spfile?set语法指定三个参数:
  1. run{
  2. duplicate target database to mydb
  3. backup location '/home/oracle/backup'
  4. nofilenamecheck
  5. spfile
  6. set
  7. control_files='/u01/app/oracle/oradata/mydb/control01.ctl','/u01/app/oracle/oradata/db11g/control02.ctl','/u01/app/oracle/oradata/db11g/control03.ctl'
  8. set
  9. db_file_name_convert='+DATA/orcl/datafile/example.258.880451611','/u01/app/oracle/oradata/db11g/example01.dbf','+DATA/orcl/datafile/users.259.880451615','/u01/app/oracle/oradata/db11g/users01.dbf','+DATA/orcl/datafile/undotbs1.256.880451607','/u01/app/oracle/oradata/db11g/undotbs01.dbf','+DATA/orcl/datafile/sysaux.257.880451605','/u01/app/oracle/oradata/db11g/sysaux01.dbf','+DATA/orcl/datafile/system.265.880451605','/u01/app/oracle/oradata/db11g/system01.dbf'
  10. set
  11. log_file_name_convert='+DATA/orcl/onlinelog/group_1.270.880453135','/u01/app/oracle/oradata/db11g/redo01a.log','+FRA/orcl/onlinelog/group_1.276.880453137','/u01/app/oracle/oradata/db11g/redo01b.log','+DATA/orcl/onlinelog/group_3.272.880453141','/u01/app/oracle/oradata/db11g/redo03a.log','+FRA/orcl/onlinelog/group_3.274.880453141','/u01/app/oracle/oradata/db11g/redo03b.log','+DATA/orcl/onlinelog/group_2.271.880453137','/u01/app/oracle/oradata/db11g/redo02a.log','+FRA/orcl/onlinelog/group_2.275.880453139','/u01/app/oracle/oradata/db11g/redo02b.log'
  12. set
  13. audit_file_dest='/u01/app/oracle/admin/mydb/adump'
  14. set
  15. db_create_file_dest=''
  16. set
  17. db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
  18. }
复制代码

2_parameter_value_convert语法指定三个参数:
  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. }
复制代码

备份的rman命令:
  1. --源头把备份优化关掉,或用force语法

  2. run {
  3. allocate channel  c1 device type disk format '/home/oracle/backup/%U';
  4. allocate channel  c2 device type disk format '/home/oracle/backup/%U';
  5. allocate channel  c3 device type disk format '/home/oracle/backup/%U';
  6. allocate channel  c4 device type disk format '/home/oracle/backup/%U';
  7. allocate channel  c5 device type disk format '/home/oracle/backup/%U';
  8. allocate channel  c6 device type disk format '/home/oracle/backup/%U';
  9. allocate channel  c7 device type disk format '/home/oracle/backup/%U';
  10. allocate channel  c8 device type disk format '/home/oracle/backup/%U';
  11. backup database plus archivelog force;
  12. backup spfile;
  13. backup current controlfile;
  14. }
复制代码

1Z0-053第8章:
  1. select  * from
  2. V$BACKUP_SYNC_IO;


  3. select  * from
  4. V$BACKUP_ASYNC_IO;


  5. select  * from v$session where client_info like '%zhang3%';

  6. select  * from v$session where terminal='pts/12';


  7. SELECT s.sid, p.spid, s.client_info
  8.    FROM v$process p, v$session s
  9.   WHERE p.addr = s.paddr
  10. AND CLIENT_INFO LIKE '%botang%';

  11. select  * from v$session_longops  where sid  194;

  12. select  terminal ,  client_info, program       from v$session where program like '%rman%';

复制代码
回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-12-5 10:11 , Processed in 0.041574 second(s), 24 queries .

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