Difference between pages "Check Undo Tablespace Usage" and "Check Temp Tablespace Usage"

From NazimWIKI
(Difference between pages)
Jump to navigation Jump to search
(Created page with "<blockquote><pre> SELECT sum(blocks) , sum(bytes)/1024/1024 FROM dba_undo_extents; </pre></blockquote>")
 
(Created page with "<blockquote><pre> SELECT distinct s.username , s.sid , s.serial# , s.osuser , u.tablespace , u.contents , u.segtype , u.extents , u.blo...")
 
Line 1: Line 1:
 
<blockquote><pre>
 
<blockquote><pre>
SELECT sum(blocks)
+
SELECT distinct s.username
     , sum(bytes)/1024/1024
+
    , s.sid
   FROM dba_undo_extents;
+
    , s.serial#
 +
    , s.osuser
 +
    , u.tablespace
 +
    , u.contents
 +
    , u.segtype
 +
    , u.extents
 +
     , u.blocks
 +
   FROM v$session s
 +
    , v$sort_usage u
 +
WHERE s.saddr=u.session_addr
 +
order by s.username, s.osuser;
 
</pre></blockquote>
 
</pre></blockquote>

Latest revision as of 22:52, 8 November 2019

SELECT distinct s.username
     , s.sid
     , s.serial#
     , s.osuser
     , u.tablespace
     , u.contents
     , u.segtype
     , u.extents
     , u.blocks
  FROM v$session s
     , v$sort_usage u
 WHERE s.saddr=u.session_addr
order by s.username, s.osuser;