Database Administration (MOSC)

MOSC Banner

Checking of uncommitted transaction in tablespace

edited Feb 4, 2013 7:01PM in Database Administration (MOSC) 3 commentsAnswered
Hi All,
I want to alter a table space read-only. This can be done only when there is no uncommitted transaction in that table space. 
I've seen a number of queries to get it from different web pages. 
But exactly could not find the exact one that suit my requirement.
However I am using the following query at the moment to check it: 
--- 
SELECT count(*) 
FROM v$transaction t, v$rollname r, v$session s 
WHERE t.xidusn = r.usn 
AND t.ses_addr = s.saddr; 
--- 

If the above yields any value greater than zero then it shows that there is uncommitted transaction. 

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center