-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Script queries x$ktuxe view to check for dead transactions and repeatedly runs the query every 2 mins
- Loading branch information
Showing
1 changed file
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
PROMPT | ||
PROMPT | ||
PROMPT~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
PROMPT------ /) (\ | ||
PROMPT------ .-._((,~~.))_.-, | ||
PROMPT------ `-. @@ ,-' | ||
PROMPT------ / ,o--o. \ | ||
PROMPT------ ( ( .__. ) ) | ||
PROMPT------ ) `----' ( | ||
PROMPT------ / \ | ||
PROMPT------ / \ | ||
PROMPT------ / \ | ||
PROMPT------ "The Silly Cow" | ||
PROMPT----- Script: smon_rollback_monitoring.sql | ||
PROMPT----- Author: Prashant 'The FatDBA' | ||
PROMPT----- Version: V1.5 (Date: 04-02-2010) | ||
PROMPT----- | ||
PROMPT----- | ||
PROMPT----- | ||
|
||
spool SMON_RollBack_Progress.lst | ||
Prompt | ||
Prompt Script will run for 10 minutes and checks rollback status from x$ktuxe every 2 mins | ||
Prompt ----------------------------------------------------------------------------------- | ||
Prompt | ||
set lines 120 | ||
col useg format a30 | ||
alter session set nls_date_format='dd-mon-yyyy hh24:mi:ss'; | ||
|
||
select sysdate,b.name useg, b.inst# instid, b.status$ status, a.ktuxeusn | ||
xid_usn, a.ktuxeslt xid_slot, a.ktuxesqn xid_seq, a.ktuxesiz undoblocks | ||
from x$ktuxe a, undo$ b | ||
where a.ktuxesta = 'ACTIVE' and a.ktuxecfl like '%DEAD%' | ||
and a.ktuxeusn = b.us#; | ||
|
||
Prompt | ||
Prompt ------------------------------------------------------------------------------------ | ||
|
||
Prompt sleeping for 2 mins .... | ||
exec dbms_lock.sleep(120); | ||
|
||
select sysdate,b.name useg, b.inst# instid, b.status$ status, a.ktuxeusn | ||
xid_usn, a.ktuxeslt xid_slot, a.ktuxesqn xid_seq, a.ktuxesiz undoblocks | ||
from x$ktuxe a, undo$ b | ||
where a.ktuxesta = 'ACTIVE' and a.ktuxecfl like '%DEAD%' | ||
and a.ktuxeusn = b.us#; | ||
|
||
Prompt | ||
Prompt ------------------------------------------------------------------------------------ | ||
|
||
Prompt sleeping for 2 mins .... | ||
exec dbms_lock.sleep(120); | ||
|
||
select sysdate,b.name useg, b.inst# instid, b.status$ status, a.ktuxeusn | ||
xid_usn, a.ktuxeslt xid_slot, a.ktuxesqn xid_seq, a.ktuxesiz undoblocks | ||
from x$ktuxe a, undo$ b | ||
where a.ktuxesta = 'ACTIVE' and a.ktuxecfl like '%DEAD%' | ||
and a.ktuxeusn = b.us#; | ||
|
||
Prompt | ||
Prompt ------------------------------------------------------------------------------------ | ||
|
||
Prompt sleeping for 2 mins .... | ||
exec dbms_lock.sleep(120); | ||
|
||
select sysdate,b.name useg, b.inst# instid, b.status$ status, a.ktuxeusn | ||
xid_usn, a.ktuxeslt xid_slot, a.ktuxesqn xid_seq, a.ktuxesiz undoblocks | ||
from x$ktuxe a, undo$ b | ||
where a.ktuxesta = 'ACTIVE' and a.ktuxecfl like '%DEAD%' | ||
and a.ktuxeusn = b.us#; | ||
|
||
Prompt | ||
Prompt ------------------------------------------------------------------------------------ | ||
|
||
|
||
Prompt sleeping for 2 mins .... | ||
exec dbms_lock.sleep(120); | ||
|
||
select sysdate,b.name useg, b.inst# instid, b.status$ status, a.ktuxeusn | ||
xid_usn, a.ktuxeslt xid_slot, a.ktuxesqn xid_seq, a.ktuxesiz undoblocks | ||
from x$ktuxe a, undo$ b | ||
where a.ktuxesta = 'ACTIVE' and a.ktuxecfl like '%DEAD%' | ||
and a.ktuxeusn = b.us#; | ||
|
||
Prompt ** END OF SCRIPT ** | ||
spool off |