İstifadə olunmuş və boş tablespace həcminə baxmaq üçün script


SELECT Total.name "Tablespace adi",
       nvl( Free_space, 0) "Bosh yer(MB)",
       nvl( total_space- Free_space , 0) "Istifade olunmushdur(MB)" ,
       total_space "Umumi olchu(MB)"
FROM
  (select tablespace_name , sum( bytes /1024 / 1024) free_space
     from sys . dba_free_space
    group by tablespace_name
  ) Free ,
  (select b .name,   sum( bytes /1024 / 1024) total_space
     from sys . v_$datafile a, sys .v_$tablespace B
    where a. ts# = b .ts#
    group by b.name
  ) Total
WHERE Free. Tablespace_name (+) = Total .name
ORDER BY Total .name;

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s