Size of my database ??

How can i find the complete size of my database. Do we have any query that can find the size or is there any other way to do it.

select sum(bytes)/1024/1024/1024 "Your database size in gb' from dba_data_files ;
select sum(bytes)/1024/1024/1024 " Free Space" from dba_free_space;This will result, how much space is allocated to all of the segments.
select sum(bytes)/1024/1024/1024  from dba_data_files ;
minus
select sum(bytes)/1024/1024/1024  from dba_free_space;This will reveal, what is used and allocated space to all of the tablespace sitting in datatbase.
set pagesize 100                                                                                 
set linesize 200                                                                                     
break on report                                                                                      
compute sum of free_mb on report                                                                     
compute sum of act_size on report                                                                    
compute sum of used_mb on report                                                                     
col %used format 999.99                                                                              
col %Free format 999.99                                                                              
col act_size format 99,99,999.99                                                                     
col free_mb format 99,99,999.99                                                                      
col used_mb format 99,99,999.99                                                                      
col file_name for a60                                                                                
col largest_extent_MB format 99,99,999.99                                                            
col tablespace for a25                                                                               
select SUBSTR(a.tablespace_name,1,20) "TABLESPACE",act_size,free_mb,                                 
free_mb*100/act_size "%FREE",                                                                        
act_size-free_mb used_MB,((act_size-free_mb)*100)/act_size "%USED",largest_extent_MB                 
from (SELECT TABLESPACE_NAME,SUM(BYTES)/1024/1024 FREE_MB,                                           
max(bytes)/1024/1024 largest_extent_MB                                                               
FROM DBA_FREE_SPACE group by tablespace_name) a,                                                     
(SELECT TABLESPACE_NAME,SUM(BYTES)/1024/1024 ACT_SIZE FROM                                           
DBA_DATA_FILES group by tablespace_name) b                                                           
where a.tablespace_name(+)=b.tablespace_name                                                         
order by 1hare krishna
Edited by: Alok Kumar on Aug 2, 2010 11:14 AM

Similar Messages

  • How to find out the size of a database?

    I'm not an oracle dba but a report developer. I'd like to find out the size of my database.
    Is this possible using simple query?

    An oracle database consists of data files, redo log files, control files, temporary files. Whenever you say the size of the database this actually means the summation of these files.
    select a.data_size+b.temp_size+c.redo_size+d.controlfile_size "total_size in MB"
    from
    ( select sum(bytes)/1024/1024 data_size from dba_data_files ) a,
    ( select nvl(sum(bytes),0)/1024/1024 temp_size from dba_temp_files ) b,
    ( select sum(bytes)/1024/1024 redo_size from sys.v_$log ) c,
    ( select sum(BLOCK_SIZE*FILE_SIZE_BLKS)/1024/1024 controlfile_size from v$controlfile) d;
    here
    a is megabytes allocated to ALL datafiles
    b is megabytes allocated to ALL TEMP files
    c is megabytes allocated to ALL redo-logs
    d is megabytes allocated to ALL control files
    Nimish Garg
    Software Developer
    *(Oracle & ASP.NET)*
    Indiamart Intermesh Limited, Noida
    To Get Free Oracle & ASP.NET Code Snippets
    Follow: http://nimishgarg.blogspot.com

  • How to extend the size of c3k database in Sybase(Adaptive Server Enterprice 15.5)?

    Hi All,
    I am trying to extend the size of c3k database in my system.
    I tried like the above screen short but it could not work because the increament button is disable.
    how can i increase the size?
    can any one help at this?

    Hi,
    From Central go to devices, find the C3000Device, right click and add space on it and then retry what you just posted.
    Regards,
    Kimon

  • Size of Logical Database!

    How can I calculate the size of Logical Database!

    As a rule of thumb take the size of the primary database. Unlike a physical standby a logical standby is not a physical copy of the primary database, so you may need to add more space. That depends on the applications you plan to run.
    Werner

  • Find the size of the database

    Hi gurus,
    Can some one suggest me in finding the size of complete database and the free space left in the database .
    as i am doing the refresh just need to gather the statistics .
    thanks

    790072 wrote:
    Hi gurus,
    Can some one suggest me in finding the size of complete database and the free space left in the database .
    as i am doing the refresh just need to gather the statistics .
    thanks
    1  select round(sum(df.bytes/(1024*1024))+sum(tf.bytes/(1024*1024))) TOTAL,
      2  round(sum(fs.bytes/(1024*1024))) FREE
      3* from dba_data_files df, dba_temp_files tf, dba_free_space fs
    SQL> /
         TOTAL      FREE
       6839688     56127

  • Size of the database

    HI All,
    I have a 10GB database, when I backup the database using RMAN. What will be the size of the database approx.
    Thanks

    Dj3 wrote:
    HI All,
    I have a 10GB database, when I backup the database using RMAN. What will be the size of the database approx.
    ThanksThe size of the database will be exactly what it was before the backup.
    Oh, you meant what will be the size of the backup?
    It depends.
    Are you taking image copies or backup sets?
    With or without compression?
    A 10g database really isn't very big to start with. Why don't you just run a backup and see for yourself?
    If you are trying to determine how much space you need to hold your backups, don't forget that it's more than "just a backup". You've got the db files, the control files, the archivelogs .... and multiple generations to allow PITR throughout your specified recovery window.

  • How to reduce size of a database

    Hi,
    i have inserted too much data in my database 9i Lite, i drop a lot of them but the size of my .odb do not change. How i can do to re-estimate the size of my .odb (it reaches 5 Mo that is too much for a pocket PC)
    thanx for any answers
    Arnaud.

    user4865031 wrote:
    Hi,
    I would like to know what are the possibilities for reducing the size of a database storage.
    I have thought about compressing big indexes and tables.
    Have you others ideas ?
    thxIt depends. Have you evaluated what takes up the space? Do you have data that can be archived? Do you have high water marks that will never be reached? Do you have sparse data that could have free space removed, just leaving expansion space in new or updateable blocks? Do you have unused indices or tables? What type of systems do you have, OLTP, DW, DSS? Is your data normal? Is your app software enterprise? Are your datatypes correct? Is your storage cheap?
    So many possibilities!

  • Is filestream filegroup size considers in database size?

    while calculating database size will it necessary to consider filestream filegroup size??
    sp_spaceused stored procedure returns size of database but it consider only data and log files. 
    my question is : can we consider filestream filegroup size while calculating database size or is there any other way which already consider filestream filegroup size??

    Hi priyanka,
    Since you can get the size of
    filestream files via  the T-SQL statement and the sys.database_files, I will mark their post as answer for your question.
     That way, other community members could benefit from this sharing. Thanks for your understanding.
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • How to estimate the size of the database object, before creating it?

    A typical question arise in mind.
    As DBA's, we all known to determine the objects size from the database.
    But before creating an object(s) in database or in a schema, we'll do an analysis on object(s) size in relation with data growth. i.e. the size we are estimating for the object(s) we are about to create.
    for example,
    Create table Test1 (Id Number, Name Varchar2(25), Gender Char(2), DOB Date, Salary Number(7));
    A table is created.
    Now what is the maximum size of a record for this table. i.e. maximum row length for one record. And How we are estimating this.
    Please help me on this...

    To estimate a table size before you create it you can do the following.  For each variable character column try to figure out the average size of the data.  Say on average the name will be 20 out of the allowed 25 characters.  Add 7 for each date column.  For numbers
    p = number of digits in value
    s = 0 for positive number and 1 for a negative number
    round((( length((p) + s) / 2)) + 1
    Now add one byte for the null indicator for each colmn plus 3 bytes for the row header.  This is your row length.
    Multiply by the expected number of rows to get a rough size which you need to adjust for the pctfree factor that will be used in each block and block overhead.  With an 8K Oracle block size if you the default pctfree of 10 then you lose 892 bytes of storage.  So 8192 - 819 - 108 estimated overhead = 7265 usable.  Now divide 7265 by the average row length to get an estimate of the number of rows that will fit in this space and reduce the number of usable bytes by 2 bytes for each row.  This is your new usable space.
    So number of rows X estimate row length divided by usable block space in blocks.  Convert to Megabytes or Gigabytes as desired.
    HTH -- Mark D Powell --
    ed add "number of usable"

  • How to reduce the size of a database ?

    Hi,
    I would like to know what are the possibilities for reducing the size of a database storage.
    I have thought about compressing big indexes and tables.
    Have you others ideas ?
    thx

    user4865031 wrote:
    Hi,
    I would like to know what are the possibilities for reducing the size of a database storage.
    I have thought about compressing big indexes and tables.
    Have you others ideas ?
    thxIt depends. Have you evaluated what takes up the space? Do you have data that can be archived? Do you have high water marks that will never be reached? Do you have sparse data that could have free space removed, just leaving expansion space in new or updateable blocks? Do you have unused indices or tables? What type of systems do you have, OLTP, DW, DSS? Is your data normal? Is your app software enterprise? Are your datatypes correct? Is your storage cheap?
    So many possibilities!

  • How to find the size of a database?

    I'm not an oracle dba but a report developer. I'd like to find out the size of my database.
    Is this possible using simple query?

    francislazaro wrote:
    I'm not an oracle dba but a report developer. I'd like to find out the size of my database.
    Is this possible using simple query?There are many threads related to the same topic,
    http://forums.oracle.com/forums/search.jspa?threadID=&q=How+to+find+the+size+of+a+database&objID=f61&dateRange=all&userID=&numResults=15&rankBy=10001
    HTH
    Aman....

  • How to find the total size of the database before the Restore.

    Hi Guys,
    I'll do a Restore, but I do not know the environment and need to know what the total size of the database to create a storage area.
    Is there any way to find out the total size of the database(including all datafiles and temp) using only the RMAN catalog before running the Restore.
    I'm using Tivoli TSM with ASM.
    Levi Pereira

    Hi tychos,
    break on report
    compute sum of TOTAL_DB on Report
    select 'DataFiles' NAME, SUM(ROUND(bytes/1024/1024/1024)) TOTAL_DB from rc_datafile
    where db_name = 'ORCL'
    UNION ALL
    select 'TempFiles' NAME, SUM(ROUND(bytes/1024/1024/1024)) TOTAL_DB from rc_tempfile
    where db_name = 'ORCL'This query returned I had 372 Gbytes of data.
    At the end of the Restore Database got the size of 408 Gbytes.
    The total size of all Redo was 3Gbytes that was not being counted anyway there was a difference of 33Gbytes.
    I need to understand the reason for the difference in sizes.
    It makes no sense to me RMAN catalog does not inform the total size of the database (Datafiles, tempfiles, Redo and controlfile) before the Restore since it's information is already somewhere.
    Thanks for your help.
    Levi

  • How to know the Size of the Database?

    Hi All,
    Is there a Transaction which will give me the size of the Database. The Database System which we have is MS Sql Server 2000. Will the Transaction have the option where I could select the Client so that I could get the exact size of the Production Systems Database, will this also provide the size of the Data & Log file.
    Thanks,
    Kishan

    check transaction db16/db17
    here are db related tx:
    DB01  Analyze exclusive lock waits
    DB02  Analyze tables and indexes
    DB03  Parameter changes in database
    DB11  Early Watch Profile Maintenance
    DB12  Overview of Backup Logs
    DB13  Database administration calendar
    DB14  Show SAPDBA Action Logs
    DB15  Data Archiving: Database Tables
    DB16  DB System Check: Monitor
    DB17  DB System Check: Configuration
    DMIG  Start Transaction for Data Migration
    DB2   Select Database Activities
    DB20  DB Cost-Based Optimizer: Tab. Stats
    DB21  DB Cost-Based Optimizer: Config.
    DB24  Database Operations Monitor
    DB26  DB Profile:Monitor and Configuration
    DB2J  Manage JCL jobs for OS/390
    DBCO  Database Connection Maintenance
    check them may be they help you to some extent.
    regards.

  • How to control the size of the database

    Hi all
    Database size will gradually increase day by day is there any tool or possibility to control the size of the database.
    Thanks in advance
    Gowtham
    Moderator message: not directly related to ABAP development, standard "basis" functionality, please have a look in the Netweaver forums.
    Edited by: Thomas Zloch on May 23, 2011 9:16 AM

    Hi,
    You can control the database size at technical setting level based on ur requirement. Field name is Size category. 
    Thanks.

  • I want to know the size of of database

    hi, iam using HP-UX with oracle10G so that, i want to know the size of of database in my system, for that i can use the follwing queries is this is correct or not?
    1. select sum(bytes) as total_size from dba_data_files;
    ANS is:
    TOTAL_SIZE
    29718740992
    2.select sum(bytes) as free_size from dba_free_space;
    ANS is:
    FREE_SIZE
    6940393472
    3. select sum(bytes) as used_size from dba_segments;
    ANS is:
    USED_SIZE
    25215827968
    i GOT like this iam not getting is this TOTAL size is 28 GB?????????????
    4.select * from DBA_FREE_SPACE_COALESCED;
    ANS for this ????????????????
    please help me anyone......

    i want to know the size of of database in my systemDefine "size":
    - The total size of the dbf files?
    - The total data space used?
    - The total tablespace size?
    For example, this show the size of a single table, in meg:
    select
    segment_name table_name,
    sum(bytes)/(1024*1024) table_size_meg
    from
    user_extents
    where
    segment_type='TABLE'
    and
    segment_name = 'MYTAB' ;
    Mike Ault has a script collection that measures all possible ways to measure database size:
    http://www.oracle-script.com
    Hope this helps. . .
    Don Burleson
    Oracle Press author
    Author of “Oracle Tuning: The Definitive Reference”
    http://www.dba-oracle.com/bp/s_oracle_tuning_book.htm

Maybe you are looking for

  • Sharepoint throw a javascript error while adding items to sharepoint list

    sharepoint throw javascript error when adding item to list error called:  this._registeredValidators[validatorIdx].Validate is not a function any help please

  • Open PDF in Swing Application

    Hi Java GURUS Firts of all, I would like to start with my introduction. My self Prashant Kadam. Right now i am developing a small system in java for my organization. This application is realted with art. And here we are dealing with PDF files. So app

  • Could I change HDD by Hybird hard drive for HP envy

    Dear all I have  HP Envy 15-k020us 15.6-Inch Touchscreen Laptop,I would like to change my normal Hard drive HDD by Hybird hard drive is it possible, and which Hybird hard drive you advise me to buy I need 1TB.                                        

  • 2520 and Internet Explorer

    I have the Verizon 2520 and overall it's great. However one big problem I'm having is with Internet Explorer. IE often does not register touchscreen presses as clicks. For example, if I'm logged into the full desktop Gmail site it's basically impossi

  • Error: Oracle Forms Designer has stopped working

    I have read a lot of different responses regarding this and related issues but none of the answers seem to be relative to my specific problem. Here is what I have done so far: a. I just finished loading Oracle 11g 64x enterprise on my laptop running