SQL Id | SQL Text |
0cjngzmtm4yv1 | select reason_id, object_id, subobject_id, internal_instance_number, time_suggested, context, reason_argument_1, reason_argument_2, reason_argument_3, reason_argument_4, reason_argument_5, action_argument_1, action_argument_2, action_argument_3, action_argument_4, action_argument_5, sequence_id, metric_value, instance_name from wri$_alert_outstanding where internal_instance_number > -2 |
0shksdzxpp4bh | select snap_interval, retention, most_recent_snap_time, most_recent_snap_id, status_flag, most_recent_purge_time, most_recent_split_id, most_recent_split_time, mrct_snap_time_num, mrct_purge_time_num, snapint_num, retention_num, swrf_version, registration_status, mrct_baseline_id, topnsql, mrct_bltmpl_id from wrm$_wr_control where dbid = :dbid |
19rkm1wsf9axx | insert into WRI$_ALERT_HISTORY (sequence_id, reason_id, owner, object_name, subobject_name, reason_argument_1, reason_argument_2, reason_argument_3, reason_argument_4, reason_argument_5, time_suggested, creation_time, action_argument_1, action_argument_2, action_argument_3, action_argument_4, action_argument_5, message_level, hosting_client_id, process_id, host_id, host_nw_addr, instance_name, instance_number, user_id, execution_context_id, error_instance_id, resolution, metric_value) values (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, :14, :15, :16, :17, :18, :19, :20, :21, :22, :23, :24, :25, :26, :27, :28, :29) |
1cq3qr774cu45 |
insert into WRH$_IOSTAT_FILETYPE (snap_id, dbid, instance_number, filetype_id, small_read_megabytes, small_write_megabytes, large_read_megabytes, large_write_megabytes, small_read_reqs, small_write_reqs, small_sync_read_reqs, large_read_reqs, large_write_reqs, small_read_servicetime, small_write_servicetime, small_sync_read_latency, large_read_servicetime, large_write_servicetime, retries_on_error) (select :snap_id, :dbid, :instance_number, filetype_id, sum(small_read_megabytes) small_read_megabytes, sum(small_write_megabytes) small_write_megabytes, sum(large_read_megabytes) large_read_megabytes, sum(large_write_megabytes) large_write_megabytes, sum(small_read_reqs) small_read_reqs, sum(small_write_reqs) small_write_reqs, sum(small_sync_read_reqs) small_sync_read_reqs, sum(large_read_reqs) large_read_reqs, sum(large_write_reqs) large_write_reqs, sum(small_read_servicetime) small_read_servicetime, sum(small_write_servicetime) small_write_servicetime, sum
(small_sync_read_latency) small_sync_read_latency, sum(large_read_servicetime) large_read_servicetime, sum(large_write_servicetime) large_write_servicetime, sum(retries_on_error) retries_on_error from v$iostat_file group by filetype_id) |
2a99kfa1dykuy | update wrh$_seg_stat_obj sso set (index_type, base_obj#, base_object_name, base_object_owner) = (select decode(ind.type#, 1, 'NORMAL'|| decode(bitand(ind.property, 4), 0, '', 4, '/REV'), 2, 'BITMAP', 3, 'CLUSTER', 4, 'IOT - TOP', 5, 'IOT - NESTED', 6, 'SECONDARY', 7, 'ANSI', 8, 'LOB', 9, 'DOMAIN') as index_type, base_obj.obj# as base_obj#, base_obj.name as base_object_name, base_owner.name as base_object_owner from sys.ind$ ind, sys.user$ base_owner, sys.obj$ base_obj where ind.obj# = sso.obj# and ind.dataobj# = sso.dataobj# and ind.bo# = base_obj.obj# and base_obj.owner# = base_owner.user#) where sso.dbid = :dbid and (ts#, obj#, dataobj#) in (select tsn_kewrseg, objn_kewrseg, objd_kewrseg from x$kewrtsegstat ss1 where objtype_kewrseg = 1) and sso.snap_id = :lah_snap_id and sso.object_type = 'INDEX' |
2zd224kurqsr9 | SELECT XMLTYPE(I.DATA) AS DATA, D.DIRECTIVE_NAME FROM DBA_ADVISOR_DIR_TASK_INST I, DBA_ADVISOR_DIR_DEFINITIONS D WHERE I.TASK_ID = :B1 AND I.DIRECTIVE_ID = D.ID AND D.ADVISOR_NAME = 'ADDM' |
317v5hnvvd49h |
UPDATE wrh$_seg_stat_obj ob SET (snap_id, owner, object_name, subobject_name, tablespace_name, object_type, index_type, base_obj#, base_object_name, base_object_owner) = (SELECT so.snap_id + 1, so.oj.owner_name, so.oj.object_name, so.oj.subobject_name, so.oj.tablespace_name, so.oj.object_type, index_type, coalesce(io.base_obj#, so.base_obj#), coalesce(io.base_object_name, so.base_object_name), coalesce(io.base_object_owner, so.base_object_owner) FROM (SELECT dbid, ts#, obj#, dataobj#, object_type, base_obj#, base_object_name, base_object_owner, snap_id, dbms_swrf_internal.awr_get_object_info( ts#, obj#, dataobj#, AWR_OBJECT_INFO_TYPE(owner, object_name, subobject_name, tablespace_name, object_type)) oj FROM wrh$_seg_stat_obj) so LEFT OUTER JOIN (SELECT decode(ind.type#, 1, 'NORMAL'|| decode(bitand(ind.property, 4), 0, '', 4, '/REV'), 2, 'BITMAP', 3, 'CLUSTER', 4, 'IOT - TOP', 5, 'IOT - NESTED', 6, 'SECONDARY', 7, 'ANSI', 8, 'LO
B', 9, 'DOMAIN') as index_type, base_obj.obj# as base_obj#, base_obj.name as base_object_name, base_owner.name as base_object_owner, ind.bo# as ind_base_obj#, ind.obj# as ind_obj#, ind.dataobj# as ind_dataobj# FROM ((sys.ind$ ind JOIN sys.obj$ base_obj ON (ind.bo# = base_obj.obj#)) JOIN sys.user$ base_owner ON (base_obj.owner# = base_owner.user#))) io ON (so.oj.object_type = 'INDEX' AND so.obj# = io.ind_obj# AND so.dataobj# = io.ind_dataobj#) WHERE ob.dbid = so.dbid AND ob.ts# = so.ts# AND ob.obj# = so.obj# AND ob.dataobj# = so.dataobj#) WHERE dbid = :dbid AND object_name NOT LIKE '%MISSING%' AND object_name NOT LIKE '%TRANSIENT%' AND (object_name, NVL(subobject_name, '!')) NOT IN (SELECT name, nvl(subname, '!') FROM obj$ WHERE ob.obj# = obj$.obj#) AND (ts#, obj#, dataobj#) in (SELECT tsn_kewrseg, objn_kewrseg, objd_kewrseg FROM x$kewrtsegstat) |
350f5yrnnmshs | lock table sys.mon_mods$ in exclusive mode nowait |
3c1kubcdjnppq | update sys.col_usage$ set equality_preds = equality_preds + decode(bitand(:flag, 1), 0, 0, 1), equijoin_preds = equijoin_preds + decode(bitand(:flag, 2), 0, 0, 1), nonequijoin_preds = nonequijoin_preds + decode(bitand(:flag, 4), 0, 0, 1), range_preds = range_preds + decode(bitand(:flag, 8), 0, 0, 1), like_preds = like_preds + decode(bitand(:flag, 16), 0, 0, 1), null_preds = null_preds + decode(bitand(:flag, 32), 0, 0, 1), timestamp = :time where obj# = :objn and intcol# = :coln |
3qsmy8ybvwt3n | insert into WRI$_ALERT_OUTSTANDING (reason_id, object_id, subobject_id, internal_instance_number, owner, object_name, subobject_name, sequence_id, reason_argument_1, reason_argument_2, reason_argument_3, reason_argument_4, reason_argument_5, time_suggested, creation_time, action_argument_1, action_argument_2, action_argument_3, action_argument_4, action_argument_5, message_level, hosting_client_id, process_id, host_id, host_nw_addr, instance_name, instance_number, user_id, execution_context_id, error_instance_id, context, metric_value) values (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, :14, :15, :16, :17, :18, :19, :20, :21, :22, :23, :24, :25, :26, :27, :28, :29, :30, :31, :32) |
3rrrnq9axk0dz | select count(*) from SYS.AQ$_SYS$SERVICE_METRICS_TAB_S where name = :1 |
3s58mgk0uy2ws | insert into wrm$_snapshot_details (snap_id, dbid, instance_number, table_id, begin_time, end_time) values (:snap_id, :dbid, :instance_number, :bind1, :bind2, :bind3) |
42cfrr6x5t75c | SELECT MAX(DB_NAME), MAX(VERSION) FROM WRM$_DATABASE_INSTANCE WHERE DBID = :B1 AND STARTUP_TIME = (SELECT MAX(STARTUP_TIME) FROM WRM$_DATABASE_INSTANCE WHERE DBID = :B1 AND STARTUP_TIME <= :B2 ) |
4dy1xm4nxc0gf | insert into wrh$_system_event (snap_id, dbid, instance_number, event_id, total_waits, total_timeouts, time_waited_micro, total_waits_fg, total_timeouts_fg, time_waited_micro_fg) select :snap_id, :dbid, :instance_number, event_id, total_waits, total_timeouts, time_waited_micro, total_waits_fg, total_timeouts_fg, time_waited_micro_fg from v$system_event order by event_id |
4tg8mr2bvy6gr | select smontabv.cnt, smontab.time_mp, smontab.scn, smontab.num_mappings, smontab.tim_scn_map from smon_scn_time smontab, (select max(scn) scnmax, count(*)+sum(NVL2(TIM_SCN_MAP, NUM_MAPPINGS, 0)) cnt from smon_scn_time) smontabv where smontab.scn = smontabv.scnmax |
586b2udq6dbng | insert into wrh$_sysstat (snap_id, dbid, instance_number, stat_id, value) select :snap_id, :dbid, :instance_number, stat_id, value from v$sysstat order by stat_id |
5ax5xu96u2ztd | insert into WRH$_EVENT_HISTOGRAM (snap_id, dbid, instance_number, event_id, wait_time_milli, wait_count) select :snap_id, :dbid, :instance_number, d.ksledhash, s.kslsesmaxdur, s.kslsesval from x$kslseshist s, x$ksled d where s.kslsesenum = d.indx and s.kslsesval > 0 order by d.ksledhash, s.kslsesmaxdur |
5dfmd823r8dsp | insert into wrh$_memory_resize_ops (snap_id, dbid, instance_number, component, oper_type, start_time, end_time, target_size, oper_mode, parameter, initial_size, final_size, status) select snap_id, dbid, instance_num, component, oper_type, start_time, max(end_time), target_size, max(oper_mode), max(parameter), max(initial_size), max(final_size), max(status) from (select :snap_id snap_id, :dbid dbid, :instance_number instance_num, component, oper_type, start_time, end_time, target_size, oper_mode, parameter, initial_size, final_size, status from v$memory_resize_ops where :begin_interval_time <= end_time and end_time < :end_interval_time) group by snap_id, dbid, instance_num, component, oper_type, start_time, target_size |
5ms6rbzdnq16t | select job, nvl2(last_date, 1, 0) from sys.job$ where (((:1 <= next_date) and (next_date <= :2)) or ((last_date is null) and (next_date < :3))) and (field1 = :4 or (field1 = 0 and 'Y' = :5)) and (this_date is null) and ((dbms_logstdby.db_is_logstdby = 0 and job < 1000000000) or (dbms_logstdby.db_is_logstdby = 1 and job >= 1000000000)) order by next_date, job |
5s34t44u10q4g | SELECT a.name task_name, nvl(e.status, a.status) status#, a.last_exec_name as last_execution, e.exec_type_id as execution_type# FROM wri$_adv_tasks a, wri$_adv_executions e WHERE a.id = e.task_id(+) and a.advisor_id = e.advisor_id(+) and a.last_exec_name = e.name(+) and a.id = :1 |
66gs90fyynks7 |
insert into wrh$_instance_recovery (snap_id, dbid, instance_number, recovery_estimated_ios, actual_redo_blks, target_redo_blks, log_file_size_redo_blks, log_chkpt_timeout_redo_blks, log_chkpt_interval_redo_blks, fast_start_io_target_redo_blks, target_mttr, estimated_mttr, ckpt_block_writes, optimal_logfile_size, estd_cluster_available_time, writes_mttr, writes_logfile_size, writes_log_checkpoint_settings, writes_other_settings, writes_autotune, writes_full_thread_ckpt) select :snap_id, :dbid, :instance_number, recovery_estimated_ios, actual_redo_blks, target_redo_blks, log_file_size_redo_blks, log_chkpt_timeout_redo_blks, log_chkpt_interval_redo_blks, fast_start_io_target_redo_blks, target_mttr, estimated_mttr, ckpt_block_writes, optimal_logfile_size, estd_cluster_available_time, writes_mttr, writes_logfile_size, writes_log_checkpoint_settings, writes_other_settings, writes_autotune, writes_full_thread_ckpt from v$instance_recovery
|
69k5bhm12sz98 |
SELECT dbin.instance_number, dbin.db_name, dbin.instance_name, dbin.host_name, dbin.version, CASE WHEN s1.startup_time = s2.startup_time THEN 0 ELSE 1 END as bounce, CAST(s1.end_interval_time AS DATE) as begin_time, CAST(s2.end_interval_time AS DATE) as end_time, ROUND((cast( (case when s2.end_interval_time > s1.end_interval_time then s2.end_interval_time else s1.end_interval_time end) as date) - cast(s1.end_interval_time as date)) * 86400) as int_secs, CASE WHEN (s1.status <> 0 OR s2.status <> 0) THEN 1 ELSE 0 END as err_detect, round( greatest( (extract(day from s2.flush_elapsed) * 86400) + (extract(hour from s2.flush_elapsed) * 3600) + (extract(minute from s2.flush_elapsed) * 60) + extract(second from s2.flush_elapsed), (extract(day from s1.flush_elapsed) * 86400) + (extract(hour from s1.flush_elapsed) * 3600) + (extract(minute from s1.flush_elapsed) * 60) + extract(second from s1.flush_elapsed), 0 )) as max_flush_secs FROM WRM$_SNAPSHOT s1 , WRM$_DATABASE
_INSTANCE dbin , WRM$_SNAPSHOT s2 WHERE s1.dbid = :dbid AND s2.dbid = :dbid AND s1.instance_number = s2.instance_number AND dbin.instance_number = s1.instance_number AND s1.snap_id = :bid AND s2.snap_id = :eid AND dbin.dbid = s1.dbid AND dbin.startup_time = s1.startup_time and dbin.instance_number = :inst |
6ajkhukk78nsr | begin prvt_hdm.auto_execute( :dbid, :inst_num , :end_snap_id ); end; |
6mvfay19q3v4n | SELECT COUNT(CLIENT_INFO) FROM GV$SESSION WHERE USERNAME=:B2 AND CLIENT_INFO = :B1 GROUP BY CLIENT_INFO |
6wm3n4d7bnddg |
SELECT source, (case when time_secs < 1 then 1 else time_secs end) as time_secs, operation FROM ( SELECT 1 as source, trunc((sysdate - cast(ll.log_date as date)) * 86400) as time_secs, decode(ll.operation, 'OPEN', 0 , 1 ) as operation, ll.log_id as log_id FROM DBA_SCHEDULER_WINDOW_LOG ll , ( SELECT max(l.log_id) as max_log_id FROM DBA_SCHEDULER_WINDOW_LOG l , DBA_SCHEDULER_WINGROUP_MEMBERS m WHERE l.window_name = m.window_name AND m.window_group_name = 'MAINTENANCE_WINDOW_GROUP' AND l.operation in ('OPEN', 'CLOSE') AND CAST(l.log_date AS DATE) < ( SELECT cast(min(end_interval_time) as date) as btime FROM WRM$_SNAPSHOT bsi WHERE bsi.dbid = :dbid AND bsi.instance_number = :inst AND bsi.snap_id = :bid ) ) max_log WHERE ll.log_id = max_log.max_log_id UNION ALL SELECT 2 as source, trunc((sysdate - cast(l.log_date as date)) * 86400) as time_secs, decode(l.operation, 'OPEN', 0 , 1 ) as operation, l.log_id as log_id FROM DBA_SCHEDULER_WINDOW_LOG l , DBA_SCHEDULER_WINGR
OUP_MEMBERS m WHERE l.window_name = m.window_name AND m.window_group_name = 'MAINTENANCE_WINDOW_GROUP' AND l.operation in ('OPEN', 'CLOSE') AND CAST(l.log_date AS DATE) <= ( SELECT cast(max(end_interval_time) as date) as etime FROM WRM$_SNAPSHOT esi WHERE esi.dbid = :dbid AND esi.instance_number = :inst AND esi.snap_id = :eid ) AND CAST(l.log_date AS DATE) >= ( SELECT cast(min(end_interval_time) as date) as btime FROM WRM$_SNAPSHOT bsi WHERE bsi.dbid = :dbid AND bsi.instance_number = :inst AND bsi.snap_id = :bid ) UNION ALL SELECT 0 as source, trunc((sysdate - et.etime) * 86400) as time_secs, 3 as operation, 0 as log_id FROM ( SELECT cast(max(end_interval_time) as date) as etime FROM WRM$_SNAPSHOT esi WHERE esi.dbid = :dbid AND esi.instance_number = :inst AND esi.snap_id = :eid ) et UNION ALL SELECT 0 as source, trunc((sysdate - bt.btime) * 86400) as time_secs, 2 as operation, 0 as log_id FROM ( SELECT cast(min(end_interval_time) as date) as btime FROM WRM$_SNAPSHOT bsi WH
ERE bsi.dbid = :dbid AND bsi.instance_number = :inst AND bsi.snap_id = :bid ) bt ) WHERE time_secs >= 0 ORDER BY source ASC, time_secs DESC, log_id ASC |
6xvp6nxs4a9n4 | select nvl(sum(space), 0) from recyclebin$ where ts# = :1 |
7g732rx16j8jc | insert into WRH$_SERVICE_STAT (snap_id, dbid, instance_number, service_name_hash, stat_id, value) select :snap_id, :dbid, :instance_number, stat.service_name_hash, stat.stat_id, stat.value from v$active_services asvc, v$service_stats stat where asvc.name_hash = stat.service_name_hash |
7gzxf61vj6wq4 | SELECT ID FROM SYS.WRI$_ADV_TASKS A WHERE A.NAME = :B3 AND BITAND(A.PROPERTY, :B2 ) = :B2 AND A.OWNER# = :B1 |
7qjhf5dzmazsr | SELECT snap_id , OBJ#, DATAOBJ# FROM (SELECT /*+ ordered use_nl(t2) index(t2) */ t2.snap_id , t1.OBJN_KEWRSEG OBJ#, t1.OBJD_KEWRSEG DATAOBJ# FROM X$KEWRTSEGSTAT t1, WRH$_SEG_STAT_OBJ t2 WHERE t2.dbid(+) = :dbid AND t2.OBJ#(+) = t1.OBJN_KEWRSEG AND t2.DATAOBJ#(+) = t1.OBJD_KEWRSEG) WHERE nvl(snap_id, 0) < :snap_id |
7tdugauk22j8t |
insert into WRH$_IOSTAT_DETAIL (snap_id, dbid, instance_number, function_id, filetype_id, small_read_megabytes, small_write_megabytes, large_read_megabytes, large_write_megabytes, small_read_reqs, small_write_reqs, large_read_reqs, large_write_reqs, number_of_waits, wait_time) (select :snap_id, :dbid, :instance_number, function_id, filetype_id, nvl(sum(small_read_megabytes), 0) small_read_megabytes, nvl(sum(small_write_megabytes), 0) small_write_megabytes, nvl(sum(large_read_megabytes), 0) large_read_megabytes, nvl(sum(large_write_megabytes), 0) large_write_megabytes, nvl(sum(small_read_reqs), 0) small_read_reqs, nvl(sum(small_write_reqs), 0) small_write_reqs, nvl(sum(large_read_reqs), 0) large_read_reqs, nvl(sum(large_write_reqs), 0) large_write_reqs, nvl(sum(number_of_waits), 0) number_of_waits, nvl(sum(wait_time), 0) wait_time from v$iostat_function_detail group by function_id, filetype_id having sum(small_read_megabytes + small_write_megabytes
+ large_read_megabytes + large_write_megabytes + small_read_reqs + small_write_reqs + large_read_reqs + large_write_reqs) > 0 ) |
7uhu8c5c39y9w | SELECT NVL(E.STATUS, A.STATUS) STATUS#, A.PROPERTY FROM WRI$_ADV_TASKS A, WRI$_ADV_EXECUTIONS E WHERE A.ID = E.TASK_ID(+) AND A.ADVISOR_ID = E.ADVISOR_ID(+) AND A.LAST_EXEC_NAME = E.NAME(+) AND A.ID = :B1 |
7ydcybv1szhrj |
INSERT /*+ LEADING(@"SEL$F5BB74E1" "H"@"SEL$2" "A"@"SEL$1") USE_NL(@"SEL$F5BB74E1" "A"@"SEL$1") */ INTO WRH$_ACTIVE_SESSION_HISTORY ( snap_id, dbid, instance_number, sample_id, sample_time , session_id, session_serial#, session_type , flags , user_id , sql_id, sql_child_number, sql_opcode, force_matching_signature , top_level_sql_id, top_level_sql_opcode , sql_plan_hash_value, sql_plan_line_id , sql_plan_operation#, sql_plan_options# , sql_exec_id, sql_exec_start , plsql_entry_object_id, plsql_entry_subprogram_id , plsql_object_id, plsql_subprogram_id , qc_instance_id, qc_session_id, qc_session_serial#, px_flags , event_id, seq#, p1, p2, p3 , wait_time, time_waited , blocking_session, blocking_session_serial#, blocking_inst_id , current_obj#, current_file#, current_block#, current_row# , top_level_call#, consumer_group_id, xid, remote_instance#, time_model ,
service_hash, program, module, action, client_id, machine, port, ecid , dbreplay_file_id, dbreplay_call_counter , tm_delta_time, tm_delta_cpu_time, tm_delta_db_time, delta_time, delta_read_io_requests, delta_write_io_requests, delta_read_io_bytes, delta_write_io_bytes, delta_interconnect_io_bytes, pga_allocated, temp_space_allocated ) (SELECT /*+ PARAM('_module_action_old_length', 0) */:snap_id, :dbid, :instance_number, a.sample_id, a.sample_time , a.session_id, a.session_serial#, a.session_type , decode(a.flags, 0, to_number(NULL), a.flags) , a.user_id , a.sql_id, a.sql_child_number, a.sql_opcode, a.force_matching_signature , a.top_level_sql_id, a.top_level_sql_opcode , a.sql_plan_hash_value, a.sql_plan_line_id , a.sql_plan_operation#, a.sql_plan_options# , a.sql_exec_id, a.sql_exec_start , a.plsql_entry_object_id, a.plsql_entry_subprogram_id , a.plsql_object_id, a.plsql_subprogram_id , a.qc_instance_id, a.qc_session_id, a.qc_session_
serial#, a.px_flags , a.event_id, a.seq#, a.p1, a.p2, a.p3 , a.wait_time, a.time_waited , a.blocking_session, a.blocking_session_serial#, a.blocking_inst_id , a.current_obj#, a.current_file#, a.current_block#, a.current_row# , a.top_level_call#, a.consumer_group_id, a.xid, a.remote_instance# , a.time_model , a.service_hash , substrb(a.program, 1, 64) , a.module, a.action, a.client_id, a.machine, a.port, a.ecid , a.dbreplay_file_id, a.dbreplay_call_counter , decode(a.tm_delta_time, 0, to_number(null), a.tm_delta_time), decode(a.tm_delta_time, 0, to_number(null), a.tm_delta_cpu_time), decode(a.tm_delta_time, 0, to_number(null), a.tm_delta_db_time), decode(a.delta_time, 0, to_number(null), a.delta_time), decode(a.delta_time, 0, to_number(null), decode(a.delta_read_io_requests, 0, to_number(null), a.delta_read_io_requests)), decode(a.delta_time, 0, to_number(null), decode(a.delta_write_io_requests, 0, to_number(null), a.delta_wr
ite_io_requests)), decode(a.delta_time, 0, to_number(null), decode(a.delta_read_io_bytes, 0, to_number(null), a.delta_read_io_bytes)), decode(a.delta_time, 0, to_number(null), decode(a.delta_write_io_bytes, 0, to_number(null), a.delta_write_io_bytes)), decode(a.delta_time, 0, to_number(null), decode(a.delta_interconnect_io_bytes, 0, to_number(null), a.delta_interconnect_io_bytes)), decode(a.pga_allocated, 0, to_number(null), a.pga_allocated), decode(a.pga_allocated, 0, to_number(null), decode(a.temp_space_allocated, 0, to_number(null), a.temp_space_allocated)) FROM x$ash a, (SELECT h.sample_addr, h.sample_id FROM x$kewash h WHERE ( (h.sample_id >= :begin_flushing) and (h.sample_id < :latest_sample_id) ) and (h.is_awr_sample = 'Y') ) shdr WHERE shdr.sample_addr = a.sample_addr and shdr.sample_id = a.sample_id and a.need_awr_sample = 'Y') |
84k66tf2s7y1c | insert into wrh$_bg_event_summary (snap_id, dbid, instance_number, event_id, total_waits, total_timeouts, time_waited_micro) select :snap_id, :dbid, :instance_number, event_id, total_waits - total_waits_fg, total_timeouts - total_timeouts_fg, time_waited_micro - time_waited_micro_fg from v$system_event where (total_waits - total_waits_fg) > 0 order by event_id |
84qubbrsr0kfn | insert into wrh$_latch (snap_id, dbid, instance_number, latch_hash, level#, gets, misses, sleeps, immediate_gets, immediate_misses, spin_gets, sleep1, sleep2, sleep3, sleep4, wait_time) select :snap_id, :dbid, :instance_number, hash, level#, gets, misses, sleeps, immediate_gets, immediate_misses, spin_gets, sleep1, sleep2, sleep3, sleep4, wait_time from v$latch order by hash |
89sdz401dc5uf | select program_oid, schedule_expr, schedule_id, queue_owner, queue_name, queue_agent, event_rule, mxdur_msgid, last_enabled_time, class_oid, next_run_date, last_start_date, last_end_date, retry_count, run_count, failure_count, running_instance, running_slave, flags, job_status, creator, client_id, guid, char_env, start_date, end_date, instance_id, fw_name, fw_oid, destination, credential_name, credential_owner, credential_oid, dest_oid, job_dest_id, run_invoker, program_action, schedule_limit, priority, job_weight, number_of_args, max_runs, max_failures, max_run_duration, comments, user_callback, user_callback_ctx, nls_env, source, env, database_role, owner_udn, dist_flags from sys.scheduler$_job where obj# = :1 |
9dhn1b8d88dpf |
select OBJOID, CLSOID, RUNTIME, PRI, JOBTYPE, SCHLIM, WT, INST, RUNNOW, ENQ_SCHLIM from ( select a.obj# OBJOID, a.class_oid CLSOID, decode(bitand(a.flags, 16384), 0, a.next_run_date, a.last_enabled_time) RUNTIME, (2*a.priority + decode(bitand(a.job_status, 4), 0, 0, decode(a.running_instance, :1, -1, 1))) PRI, 1 JOBTYPE, decode(a.schedule_limit, NULL, decode(bitand(a.flags, 4194304), 4194304, p.schedule_limit, NULL), a.schedule_limit) SCHLIM, a.job_weight WT, decode(a.running_instance, NULL, 0, a.running_instance) INST, decode(bitand(a.flags, 16384), 0, 0, 1) RUNNOW, decode(bitand(a.job_status, 8388608), 0, 0, 1) ENQ_SCHLIM from sys.scheduler$_job a, sys.scheduler$_program p, v$database v, v$instance i where a.program_oid = p.obj#(+) and bitand(a.job_status, 515) = 1 and bitand(a.flags, 1048576) = 0 and ((bitand(a.flags, 134217728 + 268435456) = 0) or (bitand(a.job_status, 1024) <> 0)) and bitand(a.flags, 4096) = 0 and (a.nex
t_run_date <= :2 or bitand(a.flags, 16384) <> 0) and a.instance_id is null and (a.class_oid is null or (a.class_oid is not null and a.class_oid in (select b.obj# from sys.scheduler$_class b where b.affinity is null))) and (a.database_role = v.database_role or (a.database_role is null and v.database_role = 'PRIMARY')) and ( i.logins = 'ALLOWED' or bitand(a.flags, 17179869184) <> 0 ) union all select l.obj#, l.class_oid, decode(bitand(l.flags, 16384), 0, l.next_run_date, l.last_enabled_time), (2*decode(bitand(l.flags, 8589934592), 0, q.priority, pj.priority) + decode(bitand(l.job_status, 4), 0, 0, decode(l.running_instance, :3, -1, 1))), 1, decode(bitand(l.flags, 8589934592), 0, q.schedule_limit, decode(pj.schedule_limit, NULL, q.schedule_limit, pj.schedule_limit)), decode(bitand(l.flags, 8589934592), 0, q.job_weight, pj.job_weight), decode(l.running_instance, NULL, 0, l.running_instance), decode(bitand(l.flags, 16384), 0, 0, 1),
decode(bitand(l.job_status, 8388608), 0, 0, 1) from sys.scheduler$_lightweight_job l, sys.scheduler$_program q, (select sl.obj# obj#, decode(bitand(sl.flags, 8589934592), 0, sl.program_oid, spj.program_oid) program_oid, decode(bitand(sl.flags, 8589934592), 0, NULL, spj.priority) priority, decode(bitand(sl.flags, 8589934592), 0, NULL, spj.job_weight) job_weight, decode(bitand(sl.flags, 8589934592), 0, NULL, spj.schedule_limit) schedule_limit from sys.scheduler$_lightweight_job sl, scheduler$_job spj where sl.program_oid = spj.obj#(+)) pj , v$instance i where pj.obj# = l.obj# and pj.program_oid = q.obj#(+) and (:4 = 0 or l.running_instance = :5) and bitand(l.job_status, 515) = 1 and ((bitand(l.flags, 134217728 + 268435456) = 0) or (bitand(l.job_status, 1024) <> 0)) and bitand(l.flags, 4096) = 0 and (l.next_run_date <= :6 or bitand(l.flags, 16384) <> 0) and l.instance_id is null and (l.class_oid is null or (l.class_oid is not null and l.cla
ss_oid in (select w.obj# from sys.scheduler$_class w where w.affinity is null))) and ( i.logins = 'ALLOWED' or bitand(l.flags, 17179869184) <> 0 ) union all select c.obj#, 0, c.next_start_date, 0, 2, c.duration, 1, 0, 0, 0 from sys.scheduler$_window c , v$instance i where bitand(c.flags, 1) <> 0 and bitand(c.flags, 2) = 0 and bitand(c.flags, 64) = 0 and c.next_start_date <= :7 and i.logins = 'ALLOWED' union all select d.obj#, 0, d.next_start_date + d.duration, 0, 4, numtodsinterval(0, 'minute'), 1, 0, 0, 0 from sys.scheduler$_window d , v$instance i where bitand(d.flags, 1) <> 0 and bitand(d.flags, 2) = 0 and bitand(d.flags, 64) = 0 and d.next_start_date <= :8 and i.logins = 'ALLOWED' union all select f.obj#, 0, e.attr_tstamp, 0, decode(bitand(e.flags, 131072), 0, 2, 3), e.attr_intv, 1, 0, 0, 0 from sys.scheduler$_global_attribute e, sys.obj$ f, sys.obj$ g, v$instance i where e.obj# = g.obj# and g.owner# = 0 and g.name
= 'CURRENT_OPEN_WINDOW' and e.value = f.name and f.type# = 69 and e.attr_tstamp is not null and e.attr_intv is not null and i.logins = 'ALLOWED' union all select i.obj#, 0, h.attr_tstamp + h.attr_intv, 0, decode(bitand(h.flags, 131072), 0, 4, 5), numtodsinterval(0, 'minute'), 1, 0, 0, 0 from sys.scheduler$_global_attribute h, sys.obj$ i, sys.obj$ j, v$instance ik where h.obj# = j.obj# and j.owner# = 0 and j.name = 'CURRENT_OPEN_WINDOW' and h.value = i.name and i.type# = 69 and h.attr_tstamp is not null and h.attr_intv is not null and ik.logins = 'ALLOWED') order by RUNTIME, JOBTYPE, CLSOID, PRI, WT DESC, OBJOID |
9n8xc314xdm0t |
insert into wrh$_shared_server_summary (snap_id, dbid, instance_number, num_samples, sample_time, sampled_total_conn, sampled_active_conn, sampled_total_srv, sampled_active_srv, sampled_total_disp, sampled_active_disp, srv_busy, srv_idle, srv_in_net, srv_out_net, srv_messages, srv_bytes, cq_wait, cq_totalq, dq_totalq) select :snap_id, :dbid, :instance_number, a.kmmsasnum, a.kmmsastime, a.kmmsastvc, a.kmmsasavc, a.kmmsastsrv, a.kmmsasasrv, a.kmmsastdisp, a.kmmsasadisp, s.busy, s.idle, s.in_net, s.out_net, s.messages, s.bytes, cq.wait, cq.totalq, dq.totalq from x$kmmsas a, (select sum(wait) as wait, sum(totalq) as totalq from v$queue where type = 'COMMON') cq, (select sum(busy) as busy, sum(idle) as idle, sum(in_net) as in_net, sum(out_net) as out_net, sum(messages) as messages, sum(bytes) as bytes from (select sum(busy) as busy, sum(idle) as idle, sum(in_net) as in_net, sum(out_net) as out_net, sum(messages) as messages, sum(bytes) as b
ytes from v$shared_server union select kmmhstsbsy, kmmhstsidl, kmmhstsneti, kmmhstsneto, kmmhstsnmg, kmmhstsnmb from x$kmmhst)) s, (select sum(totalq) as totalq from (select sum(totalq) as totalq from v$queue where type = 'DISPATCHER' union select kmmhstdqtnc from x$kmmhst)) dq |
a1xgxtssv5rrp | select sum(used_blocks), ts.ts# from GV$SORT_SEGMENT gv, ts$ ts where gv.tablespace_name = ts.name and ts.bitmapped <> 0 group by ts.ts# |
aktbxfjwnzgmu | update WRM$_DATABASE_INSTANCE set last_ash_sample_id = :last_ash_sample_id where instance_number = :instance_number and dbid = :dbid and startup_time = (select max(startup_time) from WRM$_DATABASE_INSTANCE where instance_number = :instance_number2 and dbid = :dbid2 ) |
axfcq597829h6 | select tablespace_id, rfno, allocated_space, file_size, file_maxsize, changescn_base, changescn_wrap, flag, inst_id from sys.ts$, GV$FILESPACE_USAGE where ts# = tablespace_id and online$ != 3 and (changescn_wrap > PITRSCNWRP or (changescn_wrap = PITRSCNWRP and changescn_base >= PITRSCNBAS)) and inst_id != :inst and (changescn_wrap > :w or (changescn_wrap = :w and changescn_base >= :b)) |
b2gnxm5z6r51n | lock table sys.col_usage$ in exclusive mode nowait |
bn4b3vjw2mj3u |
SELECT OBJOID, CLSOID, DECODE(BITAND(FLAGS, 16384), 0, RUNTIME, LETIME), (2*PRI + DECODE(BITAND(STATUS, 4), 0, 0, decode(INST, :1, -1, 1))), JOBTYPE, SCHLIM, WT, INST, RUNNOW, ENQ_SCHLIM, INST_ID FROM ( select a.obj# OBJOID, a.class_oid CLSOID, a.next_run_date RUNTIME, a.last_enabled_time LETIME, a.flags FLAGS, a.job_status STATUS, 1 JOBTYPE, a.priority PRI, decode(a.schedule_limit, NULL, decode(bitand(a.flags, 4194304), 4194304, b.schedule_limit, NULL), a.schedule_limit) SCHLIM, a.job_weight WT, decode(a.running_instance, NULL, 0, a.running_instance) INST, decode(bitand(a.flags, 16384), 0, 0, 1) RUNNOW, decode(bitand(a.job_status, 8388608), 0, 0, 1) ENQ_SCHLIM, a.instance_id INST_ID from sys.scheduler$_job a, sys.scheduler$_program b, v$database v , v$instance i where a.program_oid = b.obj#(+) and (a.database_role = v.database_role or (a.database_role is null and v.database_role = 'PRIMARY')) and ( i.logins = 'ALLOWED' or bitand(a
.flags, 17179869184) <> 0 ) union all select c.obj#, c.class_oid, c.next_run_date, c.last_enabled_time, c.flags, c.job_status, 1, decode(bitand(c.flags, 8589934592), 0, d.priority, pj.priority), decode(bitand(c.flags, 8589934592), 0, d.schedule_limit, decode(pj.schedule_limit, NULL, d.schedule_limit, pj.schedule_limit)), decode(bitand(c.flags, 8589934592), 0, d.job_weight, pj.job_weight), decode(c.running_instance, NULL, 0, c.running_instance), decode(bitand(c.flags, 16384), 0, 0, 1) RUNNOW, decode(bitand(c.job_status, 8388608), 0, 0, 1) ENQ_SCHLIM, c.instance_id INST_ID from sys.scheduler$_lightweight_job c, sys.scheduler$_program d, (select sl.obj# obj#, decode(bitand(sl.flags, 8589934592), 0, sl.program_oid, spj.program_oid) program_oid, decode(bitand(sl.flags, 8589934592), 0, NULL, spj.priority) priority, decode(bitand(sl.flags, 8589934592), 0, NULL, spj.job_weight) job_weight, decode(bitand(sl.flags, 8589934592), 0,
NULL, spj.schedule_limit) schedule_limit from sys.scheduler$_lightweight_job sl, scheduler$_job spj where sl.program_oid = spj.obj#(+)) pj, v$instance i where pj.obj# = c.obj# and pj.program_oid = d.obj#(+) and ( i.logins = 'ALLOWED' or bitand(c.flags, 17179869184) <> 0 ) and (:2 = 0 or c.running_instance = :3)) WHERE BITAND(STATUS, 515) = 1 AND BITAND(FLAGS, 1048576) = 0 AND ((BITAND(FLAGS, 134217728 + 268435456) = 0) OR (BITAND(STATUS, 1024) <> 0)) AND BITAND(FLAGS, 4096) = 0 AND (RUNTIME <= :4 OR BITAND(FLAGS, 16384) <> 0) and ((CLSOID is not null and INST_ID is null and CLSOID in (select e.obj# from sys.scheduler$_class e where bitand(e.flags, :5) <> 0 and lower(e.affinity) = lower(:6))) or (INST_ID is not null and INST_ID = :7)) ORDER BY 3, 2, 4, 7 DESC, 1 |
bsa0wjtftg3uw | select file# from file$ where ts#=:1 |
c0agatqzq2jzr | insert into "SYS"."ALERT_QT" (q_name, msgid, corrid, priority, state, delay, expiration, time_manager_info, local_order_no, chain_no, enq_time, step_no, enq_uid, enq_tid, retry_count, exception_qschema, exception_queue, recipient_key, dequeue_msgid, user_data, sender_name, sender_address, sender_protocol, user_prop, cscn, dscn) values (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, :14, 0, :15, :16, :17, :18, :19, :20, :21, :22, :23, :24, :25) |
c4nhd1ntptxq7 | select message_level, sequence_id, time_suggested from WRI$_ALERT_OUTSTANDING where reason_id = :1 and object_id = :2 and subobject_id = :3 and internal_instance_number = :4 |
c8gnrhxma4tas | SELECT owner#, property FROM sys.wri$_adv_tasks WHERE id = :1 |
cp3gpd7z878w8 | insert into wrh$_sgastat (snap_id, dbid, instance_number, pool, name, bytes) select :snap_id, :dbid, :instance_number, pool, name, bytes from (select pool, name, bytes, 100*(bytes) / (sum(bytes) over (partition by pool)) part_pct from v$sgastat) where part_pct >= 1 or pool is null or name = 'free memory' order by name, pool |
crwtm662ycm4w | select count(*) from sys.job$ where next_date < :1 and (field1 = :2 or (field1 = 0 and 'Y' = :3)) and ((dbms_logstdby.db_is_logstdby = 0 and job < 1000000000) or (dbms_logstdby.db_is_logstdby = 1 and job >= 1000000000)) |
csnp95dz2r8ss | select file#, block# from recyclebin$ where ts# = :1 and file# != 0 and block# != 0 and space = 0 |
dma0vxbwh325p | update smon_scn_time set time_mp=:1, time_dp=:2, scn=:3, scn_wrp=:4, scn_bas=:5, num_mappings=:6, tim_scn_map=:7 where scn = (select min(scn) from smon_scn_time) |
dqbhc9r7gz0a5 | SELECT DECODE(COUNT(CLIENT_INFO), 0, 'down', 'up') FROM GV$SESSION WHERE CLIENT_INFO = :B1 |
f0s0bk5k713yb | insert into wrh$_parameter (snap_id, dbid, instance_number, parameter_hash, value, isdefault, ismodified) select :snap_id, :dbid, :instance_number, i.ksppihash hash, substr(sv.ksppstvl, 1, 512), sv.ksppstdf, decode(bitand(sv.ksppstvf, 7), 1, 'MODIFIED', 'FALSE') from x$ksppi i, x$ksppsv sv where i.indx = sv.indx and (((i.ksppinm not like '#_%' escape '#') or (sv.ksppstdf = 'FALSE') or (bitand(sv.ksppstvf, 5) > 0)) or (i.ksppinm like '#_#_%' escape '#')) order by hash |
fnk7155mk2jq6 | insert into wrh$_sysmetric_history (snap_id, dbid, instance_number, begin_time, end_time, intsize, group_id, metric_id, value) select :snap_id, :dbid, :instance_number, begtime, endtime, intsize_csec, groupid, metricid, value from x$kewmdrmv order by groupid, metricid, begtime |
fsbqktj5vw6n9 |
select next_run_date, obj#, run_job, sch_job from (select decode(bitand(a.flags, 16384), 0, a.next_run_date, a.last_enabled_time) next_run_date, a.obj# obj#, decode(bitand(a.flags, 16384), 0, 0, 1) run_job, a.sch_job sch_job from (select p.obj# obj#, p.flags flags, p.next_run_date next_run_date, p.job_status job_status, p.class_oid class_oid, p.last_enabled_time last_enabled_time, p.instance_id instance_id, 1 sch_job from sys.scheduler$_job p where bitand(p.job_status, 3) = 1 and ((bitand(p.flags, 134217728 + 268435456) = 0) or (bitand(p.job_status, 1024) <> 0)) and bitand(p.flags, 4096) = 0 and p.instance_id is NULL and (p.class_oid is null or (p.class_oid is not null and p.class_oid in (select b.obj# from sys.scheduler$_class b where b.affinity is null))) UNION ALL select q.obj#, q.flags, q.next_run_date, q.job_status, q.class_oid, q.last_enabled_time, q.instance_id, 1 from sys.scheduler$_lightweight_job q where bitand(q.job_status, 3) = 1 and (
(bitand(q.flags, 134217728 + 268435456) = 0) or (bitand(q.job_status, 1024) <> 0)) and bitand(q.flags, 4096) = 0 and q.instance_id is NULL and (q.class_oid is null or (q.class_oid is not null and q.class_oid in (select c.obj# from sys.scheduler$_class c where c.affinity is null))) UNION ALL select j.job, 0, from_tz(cast(j.next_date as timestamp), to_char(systimestamp, 'TZH:TZM')), 1, NULL, from_tz(cast(j.next_date as timestamp), to_char(systimestamp, 'TZH:TZM')), NULL, 0 from sys.job$ j where (j.field1 is null or j.field1 = 0) and j.this_date is null) a order by 1) where rownum = 1 |
g00cj285jmgsw | update sys.mon_mods$ set inserts = inserts + :ins, updates = updates + :upd, deletes = deletes + :del, flags = (decode(bitand(flags, :flag), :flag, flags, flags + :flag)), drop_segments = drop_segments + :dropseg, timestamp = :time where obj# = :objn |
g4vrdfn14tp29 | SELECT PROPERTY FROM SYS.WRI$_ADV_TASKS WHERE ID = :B1 |
gdn3ysuyssf82 | SELECT advisor_id FROM sys.wri$_adv_tasks WHERE ID = :1 |