Bo's Oracle Station

查看: 2350|回复: 0

课程第60/61/62次(2017-10-13星期五,2017-10-15星期天上下午)

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2017-10-13 21:29:01 | 显示全部楼层 |阅读模式
  1. select  s.TERMINAL  from v_$session s
  2. where  s.CLIENT_INFO like '%XXXX%';

  3. select  s.sid , s.CLIENT_INFO  from v_$session  s
  4.   where s.PROGRAM  like '%rman%' and s.TERMINAL='pts/2';
  5.   
  6.   select  * from v$session_longops
  7.    where sid in (68,71)
  8.     and sofar <> totalwork;
复制代码


  1. RMAN> run {
  2. 2> set command id to 'XXXX';
  3. 3> allocate channel c1 device type sbt ;
  4. 4> allocate channel c2 device type sbt;
  5. 5> backup tag 'CCC'  duration 00:06  minimize load    incremental level 0 ( datafile 1 channel c1 ) ( datafile 2,3,4,5,6,7 channel c2 )    ;
  6. 6> }

  7. executing command: SET COMMAND ID

  8. released channel: ORA_SBT_TAPE_1
  9. released channel: ORA_SBT_TAPE_2
  10. allocated channel: c1
  11. channel c1: SID=71 device type=SBT_TAPE
  12. channel c1: Oracle Secure Backup

  13. allocated channel: c2
  14. channel c2: SID=68 device type=SBT_TAPE
  15. channel c2: Oracle Secure Backup

  16. Starting backup at 13-OCT-17
  17. channel c2: starting incremental level 0 datafile backup set
  18. channel c2: specifying datafile(s) in backup set
  19. input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.265.957299129
  20. input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.257.957299129
  21. input datafile file number=00005 name=+DATA/orcl/datafile/example.256.957299129
  22. input datafile file number=00004 name=+DATA/orcl/datafile/users.258.957299129
  23. input datafile file number=00006 name=+DATA/orcl/datafile/tbsocp05_test2.268.957300945
  24. input datafile file number=00007 name=+DATA/orcl/datafile/tbsocp05_test3.270.957300951
  25. channel c2: starting piece 1 at 13-OCT-17
  26. channel c1: starting incremental level 0 datafile backup set
  27. channel c1: specifying datafile(s) in backup set
  28. input datafile file number=00001 name=+DATA/orcl/datafile/system.259.957299129
  29. channel c1: starting piece 1 at 13-OCT-17



复制代码
  1. select  * from v$hm_check;

  2. select  * from v$hm_check_param;


  3. begin
  4.    dbms_hm.run_check(check_name=>'Data Block Integrity Check',
  5.       run_name => 'MYCHECK1',
  6.     input_params => 'BLC_DF_NUM=5;BLC_BL_NUM=175');
  7.    end;
  8.    
  9.    select  * from v$hm_run;
  10.    
  11.    select dbms_hm.get_run_report(run_name => 'MYCHECK1')  from dual;
  12.    
复制代码
  1. RMAN> backup  check logical   validate datafile 1 section size 100M ;
复制代码
  1. select  * from v$diag_info;


  2. select  * from dba_directories;

  3. declare  
  4. v_1 boolean;
  5. begin
  6.    v_1 := dbms_sqldiag.export_sql_testcase_dir_by_inc(
  7.      incident_id => 39803,
  8.      directory => 'DIR1');
  9.      if v_1 = true
  10.      then
  11.         dbms_output.put_line('OK');
  12.       end if;
  13.   end;
  14.   
  15.   grant all on directory dir1  to scott;
  16.      
复制代码
  1. select object_id from dba_objects
  2. where object_name='DEPARTMENTS'
  3. and owner='HR';

  4. select  * from tab$ where obj#=73928;

  5. update tab$ set cols=1001  where obj#=73928;

  6. --40990
  7.   select  * from dba_sql_plan_baselines;
  8. ---
  9. select  sql_hash_value , sql_id  from v_$session s
  10.   where s.TERMINAL='pts/2';

  11. select  s.SQL_FULLTEXT, s.SQL_ID,s.HASH_VALUE,s.OLD_HASH_VALUE
  12.   from v_$sql s  where sql_id='807ffkm1bmprg';
  13.   
  14. select  s.SQL_FULLTEXT, s.SQL_ID,s.HASH_VALUE,s.OLD_HASH_VALUE
  15.   from v_$sqlarea  s  where sql_id='807ffkm1bmprg';
  16.   
  17. select  *
  18. from v_$sql_plan sp   
  19. where sp.SQL_ID='807ffkm1bmprg';

复制代码



回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-11-22 00:46 , Processed in 0.041714 second(s), 24 queries .

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