|
- select s.TERMINAL from v_$session s
- where s.CLIENT_INFO like '%XXXX%';
-
- select s.sid , s.CLIENT_INFO from v_$session s
- where s.PROGRAM like '%rman%' and s.TERMINAL='pts/2';
-
- select * from v$session_longops
- where sid in (68,71)
- and sofar <> totalwork;
复制代码
- RMAN> run {
- 2> set command id to 'XXXX';
- 3> allocate channel c1 device type sbt ;
- 4> allocate channel c2 device type sbt;
- 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> }
- executing command: SET COMMAND ID
- released channel: ORA_SBT_TAPE_1
- released channel: ORA_SBT_TAPE_2
- allocated channel: c1
- channel c1: SID=71 device type=SBT_TAPE
- channel c1: Oracle Secure Backup
- allocated channel: c2
- channel c2: SID=68 device type=SBT_TAPE
- channel c2: Oracle Secure Backup
- Starting backup at 13-OCT-17
- channel c2: starting incremental level 0 datafile backup set
- channel c2: specifying datafile(s) in backup set
- input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.265.957299129
- input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.257.957299129
- input datafile file number=00005 name=+DATA/orcl/datafile/example.256.957299129
- input datafile file number=00004 name=+DATA/orcl/datafile/users.258.957299129
- input datafile file number=00006 name=+DATA/orcl/datafile/tbsocp05_test2.268.957300945
- input datafile file number=00007 name=+DATA/orcl/datafile/tbsocp05_test3.270.957300951
- channel c2: starting piece 1 at 13-OCT-17
- channel c1: starting incremental level 0 datafile backup set
- channel c1: specifying datafile(s) in backup set
- input datafile file number=00001 name=+DATA/orcl/datafile/system.259.957299129
- channel c1: starting piece 1 at 13-OCT-17
复制代码- select * from v$hm_check;
- select * from v$hm_check_param;
- begin
- dbms_hm.run_check(check_name=>'Data Block Integrity Check',
- run_name => 'MYCHECK1',
- input_params => 'BLC_DF_NUM=5;BLC_BL_NUM=175');
- end;
-
- select * from v$hm_run;
-
- select dbms_hm.get_run_report(run_name => 'MYCHECK1') from dual;
-
复制代码- RMAN> backup check logical validate datafile 1 section size 100M ;
复制代码- select * from v$diag_info;
- select * from dba_directories;
- declare
- v_1 boolean;
- begin
- v_1 := dbms_sqldiag.export_sql_testcase_dir_by_inc(
- incident_id => 39803,
- directory => 'DIR1');
- if v_1 = true
- then
- dbms_output.put_line('OK');
- end if;
- end;
-
- grant all on directory dir1 to scott;
-
复制代码- select object_id from dba_objects
- where object_name='DEPARTMENTS'
- and owner='HR';
-
- select * from tab$ where obj#=73928;
-
- update tab$ set cols=1001 where obj#=73928;
-
- --40990
- select * from dba_sql_plan_baselines;
- ---
- select sql_hash_value , sql_id from v_$session s
- where s.TERMINAL='pts/2';
-
- select s.SQL_FULLTEXT, s.SQL_ID,s.HASH_VALUE,s.OLD_HASH_VALUE
- from v_$sql s where sql_id='807ffkm1bmprg';
-
- select s.SQL_FULLTEXT, s.SQL_ID,s.HASH_VALUE,s.OLD_HASH_VALUE
- from v_$sqlarea s where sql_id='807ffkm1bmprg';
-
- select *
- from v_$sql_plan sp
- where sp.SQL_ID='807ffkm1bmprg';
-
复制代码
|
|