Difference between pages "Check Oracle Open Cursors by Session" and "Check Database Size"

From NazimWIKI
(Difference between pages)
Jump to navigation Jump to search
(Created page with "<blockquote><pre> select o.sid, o.sql_text, o.address, o.hash_value, o.user_name, s.schemaname, o.sql_id from v$open_cursor o, v$session s where o.saddr = s.saddr a...")
 
(Created page with "<blockquote><pre> SELECT sum(megabytes) FROM ( SELECT sum(bytes)/1024/1024 megabytes FROM dba_temp_files UNION SELECT sum(bytes)/1024/1024 megabytes FROM...")
 
Line 1: Line 1:
 
<blockquote><pre>
 
<blockquote><pre>
select
+
SELECT sum(megabytes)
      o.sid, o.sql_text, o.address, o.hash_value, o.user_name, s.schemaname, o.sql_id
+
  FROM ( SELECT sum(bytes)/1024/1024 megabytes FROM dba_temp_files
from  v$open_cursor o, v$session s
+
          UNION
where  o.saddr = s.saddr
+
        SELECT sum(bytes)/1024/1024 megabytes FROM dba_data_files
and    o.sid = s.sid
+
          UNION
and  ( O.SID = &SID)
+
        SELECT sum(bytes)/1024/1024 megabytes FROM v$log
 +
        );
 
</pre></blockquote>
 
</pre></blockquote>

Latest revision as of 22:55, 8 November 2019

SELECT sum(megabytes) 
  FROM ( SELECT sum(bytes)/1024/1024 megabytes FROM dba_temp_files
          UNION
         SELECT sum(bytes)/1024/1024 megabytes FROM dba_data_files
          UNION
         SELECT sum(bytes)/1024/1024 megabytes FROM v$log
        );