query comparison

Vinoth Kumar Annadurai 21 Reputation points
2021-07-07T08:50:22.613+00:00

Database Mode

select name, open_mode, database_role from v$database;

version

select v$version

Blocking Session

select inst_id, sid, serial#, username, machine, osuser, program ,
service_name,blocking_Session,BLOCKING_INSTANCE,sql_id,status
from gv$session where blocking_Session is not null

Final Blocking Session in 11.2

set pages 1000
set lines 120
set heading off
column w_proc format a50 tru
column instance format a20 tru
column inst format a28 tru
column wait_event format a50 tru
column p1 format a16 tru
column p2 format a16 tru
column p3 format a15 tru
column Seconds format a50 tru
column sincelw format a50 tru
column blocker_proc format a50 tru
column fblocker_proc format a50 tru
column waiters format a50 tru
column chain_signature format a100 wra
column blocker_chain format a100 wra

SELECT *
FROM (SELECT 'Current Process: '||osid W_PROC, 'SID '||i.instance_name INSTANCE,
'INST #: '||instance INST,'Blocking Process: '||decode(blocker_osid,null,'<none>',blocker_osid)||
' from Instance '||blocker_instance BLOCKER_PROC,
'Number of waiters: '||num_waiters waiters,
'Final Blocking Process: '||decode(p.spid,null,'<none>',
p.spid)||' from Instance '||s.final_blocking_instance FBLOCKER_PROC,
'Program: '||p.program image,
'Wait Event: ' ||wait_event_text wait_event, 'P1: '||wc.p1 p1, 'P2: '||wc.p2 p2, 'P3: '||wc.p3 p3,
'Seconds in Wait: '||in_wait_secs Seconds, 'Seconds Since Last Wait: '||time_since_last_wait_secs sincelw,
'Wait Chain: '||chain_id ||': '||chain_signature chain_signature,'Blocking Wait Chain: '||decode(blocker_chain_id,null,
'<none>',blocker_chain_id) blocker_chain
FROM v$wait_chains wc,
gv$session s,
gv$session bs,
gv$instance i,
gv$process p
WHERE wc.instance = i.instance_number (+)
AND (wc.instance = s.inst_id (+) and wc.sid = s.sid (+)
and wc.sess_serial# = s.serial# (+))
AND (s.final_blocking_instance = bs.inst_id (+) and s.final_blocking_session = bs.sid (+))
AND (bs.inst_id = p.inst_id (+) and bs.paddr = p.addr (+))
AND ( num_waiters > 0
OR ( blocker_osid IS NOT NULL
AND in_wait_secs > 10 ) )
ORDER BY chain_id,
num_waiters DESC)
WHERE ROWNUM < 101;

## sql information on the sql showplan

set linesize 180
set pagesize 100
select * from table( DBMS_XPLAN.display_cursor('aaa9yd117ndgx',NULL, 'ALL'));
select * from table( DBMS_XPLAN.display_cursor('&1',&1, 'ALL'));

select * from table( DBMS_XPLAN.display_cursor('&1',null, 'ADVANCED ALLSTATS LAST'));

select * from table( DBMS_XPLAN.DISPLAY_AWR('&1',NULL,NULL, 'all allstats advanced'));
select * from table( DBMS_XPLAN.DISPLAY_AWR('&1',NULL,NULL, 'ALL'));

## table owner name how many insert n updates

select table_owner, table_name, inserts, updates, deletes, timestamp, truncated, drop_segments
from dba_tab_modifications
where table_owner = 'XXXX' and table_name = 'xxxxxx'

Community Center Not monitored
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ehren (MSFT) 1,781 Reputation points Microsoft Employee
    2021-09-22T18:45:15.723+00:00

    I'm not sure I understand the question. Can you clarify how this relates to Power Query?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.