Home » RDBMS Server » Backup & Recovery » DATABASE
DATABASE [message #242257] Fri, 01 June 2007 06:21 Go to next message
ankur_22
Messages: 1
Registered: June 2007
Junior Member
how to determine the size of ur database
Re: DATABASE [message #242261 is a reply to message #242257] Fri, 01 June 2007 06:55 Go to previous messageGo to next message
user82
Messages: 49
Registered: June 2006
Location: Romania
Member
try this
SQL> select sum(bytes)/1024/1024 as Mb from dba_data_files;

        MB
----------
      2691

Re: DATABASE [message #242274 is a reply to message #242257] Fri, 01 June 2007 08:05 Go to previous message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
SQL> Col type_ heading "File type"
SQL> Col kb format 99G999G999G990 heading "Size (Kb)"
SQL> Break on report
SQL> Compute sum label "Total" of kb on report
SQL> Prompt

SQL> Select 'Datafiles' type_, round(sum(bytes/1024)) kb from dba_data_files
  2  union all
  3  Select 'Tempfiles' type_, round(sum(bytes/1024)) kb from dba_temp_files
  4  union all
  5  Select 'Redologs' type_, round(sum(bytes*members)/1024) kb from v$log
  6  /
File type       Size (Kb)
--------- ---------------
Datafiles       1,986,560
Tempfiles         276,480
Redologs           81,920
          ---------------
Total           2,344,960

Regards
Michel
Previous Topic: Recover redo log files with rman
Next Topic: User-managed backups of a 10g DB using ASM
Goto Forum:
  


Current Time: Mon Dec 23 19:11:13 CST 2024