DB size

Question:
how to see the size of the DB in MB?
Answer:
LOGIN SQL AS USER SYS/SYSTEM PASS AND RUN THIS SCRIPT.
SET SERVEROUTPUT ON
declare
total_size_b number;
free_size_b number;
used_size_b number;
begin
dbms_output.enable(100000);
select Sum(bytes) into total_size_b
from dba_data_files;
select Sum(bytes) into free_size_b
from dba_free_space;
select Sum(bytes) into used_size_b
from dba_segments;
dbms_output.put_line('Total: ' || TO_CHAR(Round(total_size_b/1048576, 2), '999,999.00') || ' MB');
dbms_output.put_line('Free: ' || TO_CHAR(Round(free_size_b/1048576, 2), '999,999.00') || ' MB');
dbms_output.put_line('Used: ' || TO_CHAR(Round(used_size_b/1048576, 2), '999,999.00') || ' MB');
end;
/
SET SERVEROUTPUT OFF
Answer:
DB02 gives you in kb
Answer:
Hi,
What RDBMS are you on ?
The script mentioned above is for Oracle
Regards,
_________________
MikeIP

More Articles:

need help installing BW?
Transports Development to Consolidation (QA)?
Hire date lacking when MASSN <> 01?
Cost assignments in Time Sheet (PA61)?
Jersey Payroll - ITIS?
How to print the Public Holiday table?