Put your tips and tricks online - Share your knowledge! Login | Register
 
 
  Search     Advanced search
 

Home | Ask Question | Add tip | Questions | My tips | Recent tips & tricks | Suggest a category | FAQ | Forums

 
 
 
 Category : Home > Databases > Oracle > Performance Tuning     

Sessions, transactions and rollback segments query


select  sess.sid, c.segment_name, b.used_ublk, b.log_io, b.phy_io,
            case when bitand(b.flag,power(2,7)) > 0 then 'RB in Progress'
            else 'Not Rolling Back'
            end as "F Status",
        to_date(start_time,'mm/dd/yy hh24:mi:ss') start_time
from v$session sess,
        v$transaction b,
        dba_rollback_segs c,
        v$process e
where b.ses_addr=sess.saddr
        and b.xidusn=c.segment_id
        and e.ADDR=sess.PADDR
        --and sid=9999;




select  sess.sid, c.segment_name, b.used_ublk, b.log_io, b.phy_io,
            case when bitand(b.flag,power(2,7)) > 0 then 'RB in Progress'
            else 'Not Rolling Back'
            end as "F Status",
        r.rssize, r.gets, r.writes, r.waits, round(r.hwmsize/1024/1024) as "HWM size Mb",
r.SHRINKS, r.WRAPS,
        to_date(start_time,'mm/dd/yy hh24:mi:ss') start_time
from v$session sess,
        v$transaction b,
        dba_rollback_segs c,
        v$process e,
        v$rollstat r
where b.ses_addr=sess.saddr
        and b.xidusn=c.segment_id
        and e.ADDR=sess.PADDR
        and c.SEGMENT_ID = r.USN
        and sid in (1286, 227, 790);


  Options
 
   del.icio.us  |  newsvine  |  digg  |  furl  |  google  |  yahoo  |  Ma.gnolia  |  vigillar  |  reddit  |  technorati  |  icerocket  |  pubsub

       Rate this tip:    

Start discussion or add comment to this tip

  Details
Tip reference : #284
views : 422
Added on : 08/15/11
Submited by : h8dk97
 
Send a message Send a message Printer friendly output Printer friendly output
Display this member's tips Display this member's tips (203)
 
 
<< Previous Next >>
 Most viewed tips 
  Databases > Oracle > Security : How to unlock Oracle user account  
  Databases > Oracle > Performance Tuning : How to enable trace in Oracle  
  Operating Systems > Unix : How to kill Unix user session  
  Databases > Oracle : Kill user session  
   
  All categories
Databases | Programming | Hardware | Operating Systems | Networking | Internet | ERP / CRM | Games & Multimedia | Graphics & Design | Miscellaneous | Mobile Phones / Tablets | Office Software
 
 

Home |  FAQ |  Terms of Use |  Privacy Policy

© 2005 tiplib.com