Need to find Exact Database Size in MB

Hi
I need to find the Exeact database size the actual space taken by data not the extent allocated by the table. I mean if the extent size is 64k and there is only 2k of actual data sitting there i need to get that 2k answer.
Thanks in advance.

Hi,
Consider using DBMS_SPACE.SPACE_USAGE.
There are lots of examples somewhere on AskTom website.
Regards.
PS: Bear in mind, SPACE_USAGE works with ASSM only. For MSSM you should use another procedures of DBMS_SPACE package.
http://asktom.oracle.com/pls/ask/f?p=4950:8:3624308638663951627::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:5350053031470
There you go.
Message was edited: added a note about MSSM.

Similar Messages

  • Urgent: How to find out the size in bytes of java object

    Hi Experts,
    We've a requirement that we need to find out the size of a java object at run time, is there a direct java API to get the size of a composite object in memory?
    Here is my requirement: We are adding string objects (which is an xml string of considerable size) into a List. After reaching certain size limit (lets say 5MB) of the list i need to put this data into DB as a CLOB. So every time I add a string object to the list, I need to see if the total size of the list exceeds the limit and if yes, flush the results into DB.
    I am not sure if java has a direct API for this, if not what is the beast way to do it, it s critical requirement for us.
    It would be really great if someone could help us out.
    Thank you,
    -Shibu.

    >
    We've a requirement that we need to find out the size of a java object at run time, is there a direct java API to get the size of a composite object in memory?
    Here is my requirement: We are adding string objects (which is an xml string of considerable size) into a List. After reaching certain size limit (lets say 5MB) of the list i need to put this data into DB as a CLOB. So every time I add a string object to the list, I need to see if the total size of the list exceeds the limit and if yes, flush the results into DB.
    I am not sure if java has a direct API for this, if not what is the beast way to do it, it s critical requirement for us.
    It would be really great if someone could help us out.
    >
    Could you explain your actual requirement a little more fully.
    1. Is each individual string a separate XML string? Or is it just a fragment? Why would you just concatenate them together into a CLOB? That won't produce valid XML and it won't let you easily separate the pieces again later. So provide a simple example showing some strings and how you need to manipulate them.
    2. Are you using these xml strings in Java at all? Or are you just loading them into the database?
    For example if you are just loading them into the database you don't need to create a list. Just create a CLOB in Java and append each string to the CLOB. Before you append each one you can check to see if the new string will put you over your length limit. If it will then you write the CLOB to the database, empty the CLOB and start appending again to the new clob instance.
    If you explain what you are really trying to do we might be able to suggest some better ways to do it.

  • How to find out image size (in pixels) of jpg and gif files

    this seems to work, though i doubt that it would very time:
                   Image img = Toolkit.getDefaultToolkit().getImage("car.jpg");
                   int w = img.getWidth(null);
                   int h = img.getHeight(null);
                   while(w <= 0 || h <= 0)
                      try{Thread.sleep(10);}catch(InterruptedException ix){}
                      w = img.getWidth(null);
                      h = img.getHeight(null);
                   JOptionPane.showMessageDialog
                      null,
                      filenames[i] + ": " + w + "x" + h,
                      "ImgSize",
                      JOptionPane.INFORMATION_MESSAGE
                   );please suggest a better solution.
    thanks

    >
    We've a requirement that we need to find out the size of a java object at run time, is there a direct java API to get the size of a composite object in memory?
    Here is my requirement: We are adding string objects (which is an xml string of considerable size) into a List. After reaching certain size limit (lets say 5MB) of the list i need to put this data into DB as a CLOB. So every time I add a string object to the list, I need to see if the total size of the list exceeds the limit and if yes, flush the results into DB.
    I am not sure if java has a direct API for this, if not what is the beast way to do it, it s critical requirement for us.
    It would be really great if someone could help us out.
    >
    Could you explain your actual requirement a little more fully.
    1. Is each individual string a separate XML string? Or is it just a fragment? Why would you just concatenate them together into a CLOB? That won't produce valid XML and it won't let you easily separate the pieces again later. So provide a simple example showing some strings and how you need to manipulate them.
    2. Are you using these xml strings in Java at all? Or are you just loading them into the database?
    For example if you are just loading them into the database you don't need to create a list. Just create a CLOB in Java and append each string to the CLOB. Before you append each one you can check to see if the new string will put you over your length limit. If it will then you write the CLOB to the database, empty the CLOB and start appending again to the new clob instance.
    If you explain what you are really trying to do we might be able to suggest some better ways to do it.

  • How to know the database size

    can one tell how to find the database size?

    Depends what you mean by database size and how you want the output to look?
    Are you referring to the number of rows across all tables of a schema? The number of bytes used by the rows? The number of bytes used by the tablespaces? The number of bytes used by the datafiles? etc. etc. etc. So many options.
    Be more clear in your requirements please.

  • Rebuild Database did not reduce the database size

    I just completed a rebuild database. The rebuild completed much quicker than anticipated and in the end the did not reduce in size.
    This is my first rebuild and since original installation I have deleted a number of masters. From my understanding thumbnails and previews are not deleted when the master is deleted. In order to delete the thumbnails and previews the db must be rebuilt. Is this correct?
    The db is over 31.1gb. The rebuild took approx 10 minutes and when completed the db size was still 31.1gb. There was a message during the rebuild that read "Recovering projects". I was expecting to see stats showing previews and thumbnails being generated in the activity window but don't see it. Has the db been rebuilt?
    Thanks for any assistance.

    Rebuilding the database is for disaster-recovery, not file maintenance. I certainly wouldn't do it unless something was fundamentally broken and the application didn't run.
    "rebuilding" the database seems to do the following:
    (1) remove the database file completely (not even to the trash, it destroys the database utterly)
    (2) run through the plist files and reconstruct a brand-new database from them all
    I checked this (on an empty library) using hard-links from the commandline, and step (1) above scared me sufficiently that I'd only rebuild the database as an absolute last resort.
    Now, 31GB seems a lot for a database that only took 10 minutes to rebuild - are you sure you're not telling us the size of the library (to find the database size, right-click on the library and select view-package-contents, then open the 'Aperture.aplib' folder and find the size of the 'Library.apdb' file. That's the file you're changing when you 'rebuild database'.)
    If you're telling us the size of the entire aperture library instead, then that size will be completely dominated by the master RAW files you've imported. I'd guess your library will be less than 10MB.
    My understanding is that previews are deleted (since they're stored as separate files alongside the master image, if you look in the folder hierarchy), but thumbnails aren't. The thumbnails are aggregated together into one-file-per-project (presumably for speed of access), and I'd guess the space is reclaimed for future use, but the file doesn't get any smaller. That's a classic trade-off for speed-of-access, and users like us are normally very keen on things being fast
    -=C=-

  • Finding exact matches using WITHIN clause or?

    We are storing documents in XML format in a CLOB. We need to find exact matches within an element through intermedia. Is there a way we can use the WITHIN clause or a different type of clause to get only exact matches for a phrase?
    e.g., a search on 'accord' would not bring back 'peace accord' etc.

    Hi,
    I recommend asking your question in an Excel forum:
    http://social.technet.microsoft.com/Forums/en-us/home?forum=excel&filter=alltypes&sort=lastpostdesc
    There's an Excel forum over on the MSDN side as well, but it focuses more on VBA:
    http://social.msdn.microsoft.com/Forums/en-us/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
    This is a PowerShell forum.
    Don't retire TechNet! -
    (Don't give up yet - 12,950+ strong and growing)

  • Command to check database size

    Hi Guys,
    I am a bit confuse about the command for getting the exact database size. Can anybody please tell me by which SQL statement can i get the database size?
    Thanks in advance.

    google for "sparse files"
    This tempfile is supposed to be 100MB but currently occupies only 84KB. The OS will expand it (upto 100MB, if AUTOEXTEND and MAXSIZE are not enabled, or upto MAXSIZE if AUTOEXTEND and MAXSIZE are enabled) when required.
    SQL> create temporary tablespace test_temp tempfile '/mylocation/test_temp_01.dbf' size 100M;
    Tablespace created.
    SQL> !du -sk /mylocation/test_temp_01.dbf
    84      /mylocation/test_temp_01.dbf
    SQL> !ls -l /mylocation/test_temp_01.dbf
    -rw-r-----  1 oracle dba 104873984 Nov  4 17:33 /mylocation/test_temp_01.dbf
    SQL>NOTE : If however, you use the "cp" command to copy "test_temp_01.dbf" to another file, the copied file will occupy 100MB.
    (The above listing is on Linux)
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Need query to find the minimum size of a datafile

    Hi All,
    I need to reduce the size of a datafile. Before that i need to find out  how far i can reduce the size of the datafile. Please help
    DB version:11.2.0.3
    OS:AIX 6.1

    Below SQL will ask you blocksize (I guess it is default i.e. 8192) :
    select 'alter database datafile '''||file_name||''' resize ' ||
               ceil( (nvl(hwm,1)*&&blksize)/1024/1024 ) || 'm;' cmd
    from dba_data_files a,
    ( select file_id, max(block_id+blocks-1) hwm
                 from dba_extents
                group by file_id ) b
    where a.file_id = b.file_id(+)
    and ceil( blocks*&&blksize/1024/1024) -
    ceil( (nvl(hwm,1)*&&blksize)/1024/1024 ) > 0
    It will tell you upto how much extend you can shrink your datafile.
    Regards
    Girish Sharma

  • How do I find out the size of each individual element within a photoshop file as need to replace some elements?  Thanks :)

    How do I find out the size of each individual element within a photoshop file as need to replace some elements?  Thanks

    What do you mean by "Elements"?
    Elements in a flat image or Layers?
    Could you please post a screenshot with the Layers Panel visible?

  • How to find out the database-size

    Hello,
    how can I find out the size of the database.
    I created the user as below. I defined the size of the database to 2MB. Now I want to know how much is the size of the database.
    CREATE USER oemer
    IDENTIFIED BY ...
    DEFAULT TABLESPACE system
    QUOTA 2M ON system;

    Actually, since Omer is a veteran poster to the Forms and Reports forums, I doubt that. I think he is making a much more interesting journey: from front-end to back-end.
    I'll be a bit more helpful this morning.
    Databases are ways of organising disk space to store data. Fundamentally they consist of OS files, data files. The RDBMS handles by grouping them into tablespaces. When we build tables we assign them to a tablespace.
    So, the size of the database is the sum of its datafiles. Of course, some tablespaces are used for sorting and holding undo information, so the size of the database for the purposes of persisting data is:
    SELECT count(x.tablespace_name) AS total_TS, sum(x.MB) AS total_mb, sum(x.free_mb) AS total_free_mb
    FROM   ( SELECT t.tablespace_name, sum(d.bytes)/1048576 AS mb, sum(f.bytes)/1048576 AS free_mb
             FROM   dba_free_space f, dba_data_files d, dba_tablespaces t
             WHERE  t.contents = 'PERMANENT'
             AND    d.tablespace_name = t.tablespace_name
             AND    d.file_id = f.file_id
             GROUP  BY t.tablespace_name ) x
    /The SYSTEM tablespace is special. It is used by Oracle to hold the data dictionary, the definitions of all the objects in the database. It should not be used for storing application objects (it affects the performance, apatrt from anything else). That is why we must not use it as a default tablespace.
    CREATE USER oemer
    IDENTIFIED BY ...
    DEFAULT TABLESPACE ts_users
    QUOTA 2M ON ts_users; Cheers, APC

  • 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

  • Help needed to find the schema/application data size

    Hi,
    Would i request you to help me to measure schema size/(APEX)application data size.
    I've 3 applications running on same schema and now i want to move one application to new server, new schema,
    Now i need to know how much space is required for this application to host on the new server, so i should find the application size and application data size in the current server, your hep is appreciated. thanks in advance.
    Regards

    Hi,
    Would i request you to help me to measure schema size/(APEX)application data size.
    I've 3 applications running on same schema and now i want to move one application to new server, new schema,
    Now i need to know how much space is required for this application to host on the new server, so i should find the application size and application data size in the current server, your hep is appreciated. thanks in advance.
    Regards

  • Best practice on mailbox database size & we need how many server for deployment exchange server 2013

    Dear all,
    We have  an server that runs Microsoft exchange server 2007 with the following specification:
    4 servers: Hub&CAS1 & Hub&CAS2 & Mailbox1 & Mailbox2 
    Operating System : Microsoft Windows Server 2003 R2 Enterprise x64
    6 mailbox databases
    1500 Mailboxes
    We need to upgrade our exchange server from 2007 to 2013 to fulfill the following requirment:
    I want to upgrade the exchange server 2007 to exchange server 2013 and implement the following details:
    1500 mailboxes
    10GB or 15GB mailbox quota for each user
    How many
    servers and databases  are
    required for this migration<ins cite="mailto:Mohammad%20Ashouri" datetime="2014-05-18T22:41"></ins>?
    Number of the servers:
    Number of the databases:
    Size of each database:
    Many thanks.

    You will also need to check server role requirement in exchange 2013. Please go through this link to calculate the server role requirement : http://blogs.technet.com/b/exchange/archive/2013/05/14/released-exchange-2013-server-role-requirements-calculator.aspx
    2TB is recommended maximum database size for Exchange 2013 databases.
    Here is the complete checklist to upgrade from exchange 2007 to 2013 : http://technet.microsoft.com/en-us/library/ff805032%28v=exchg.150%29.aspx
    Meanwhile, to reduce the risks and time consumed during the completion of migration process, you can have a look at this proficient application(http://www.exchangemigrationtool.com/) that would also be
    a good approach for 1500 users. It will help you to ensure the data security during the migration between exchange 2007 and 2013.

  • How do find all database slog size and mdf file size ?

    hi experts,
    could you share query to find all databases log file size and mdf file (includes ndf files ) and total db size ? in MB and GB
    I have a task to kae the dbs size  around 300 dbs
    ========               ============     =============        = ===        =====
    DB_Name    Log_file_size           mdf_file_size         Total_db_size           MB              
    GB
    =========              ===========               ============       ============     
    Thanks,
    Vijay

    Use this ViJay
    set nocount on
    Declare @Counter int
    Declare @Sql nvarchar(1000)
    Declare @DB varchar(100)
    Declare @Status varchar(25)
    Declare @CaptureDate datetime
    Set @Status = ''
    Set @Counter = 1
    Set @CaptureDate = getdate()
    Create Table #Size
    SizeId int identity,
    Name varchar(100),
    Size int,
    FileName varchar(1000),
    FileSizeMB numeric(14,4),
    UsedSpaceMB numeric(14,4),
    UnusedSpaceMB numeric(14,4)
    Create Table #DB
    Dbid int identity,
    Name varchar(100)
    Create Table #Status
    (status sql_Variant)
    Insert Into #DB
    Select Name
    From Sys.Databases
    While @Counter <=(Select Max(dbid) From #Db)
    Begin
    Set @DB =
    Select Name
    From #Db
    Where @Counter = DbId
    Set @Sql = 'SELECT DATABASEPROPERTYEX('''+@DB+''', ''Status'')'
    Insert Into #Status
    Exec (@sql)
    Set @Status = (Select convert(varchar(25),status) From #Status)
    If (@Status)= 'ONLINE'
    Begin
    Set @Sql =
    'Use ['+@DB+']
    Insert Into #Size
    Select '''+@DB+''',size, FileName ,
    convert(numeric(10,2),round(size/128.,2)),
    convert(numeric(10,2),round(fileproperty( name,''SpaceUsed'')/128.,2)),
    convert(numeric(10,2),round((size-fileproperty( name,''SpaceUsed''))/128.,2))
    From sysfiles'
    Exec (@Sql)
    End
    Else
    Begin
    Set @SQL =
    'Insert Into #Size (Name, FileName)
    select '''+@DB+''','+''''+@Status+''''
    Exec(@SQL)
    End
    Delete From #Status
    Set @Counter = @Counter +1
    Continue
    End
    Select Name, Size, FileName, FileSizeMB, UsedSpaceMB, UnUsedSpaceMB,right(rtrim(filename),3) as type, @CaptureDate as Capturedate
    From #Size
    drop table #db
    drop table #status
    drop table #size
    set nocount off
    Andre Porter

  • Query on Database Size

    Hi all,
    I have a question regarding database size of my SAP Instance. My database by the way is Oracle 10g. I used the db02old transaction code. I got the ff: data in the space statistics:
    Scale: Month                                            Database
        Date               Values             SIze/kb                      Free/kb
    01.09.2009         Total            258744,320                 27,741,824
    01.08.2009         Total            258744,320                 30,568,320
    01.07.2009         Total            258744,320                 34,444,288
    01.06.2009         Total            258744,320                 38,159,168
    01.05.2009         Total            247152,640                 29,041,344
    01.04.2009         Total            247152,640                 35,197,184
    01.03.2009         Total            235560,960                 39,262,144
    01.02.2009         Total            205455,360                 14,124,224
    01.01.2009         Total            201175,040                 14,463,168
    01.12.2008         Total            197324,800                 14,466,112
    01.11.2008         Total            193474,560                 14,282,560
    01.10.2008         Total            188907,520                 13,716,736
    Note that the size from 01.06.2009 to 01.09.2009 has not changed. Does this mean that my database hasnt grown at all?
    How can I determine the exact growth of my database? Im planning to do some projection on how long will it take before my entire disks are consumed so I need to gather some data with respect to my database growth per month.
    Thanks in advance
    Jun

    >
    Aurelio Tadlas wrote:
    > HI Anjali,
    >
    > Yes, that's precisely what happened. Now I know that the size indicated in db02old is not actually the size of the data contained in the database but rather, its the size of the tablespaces in my database.
    >
    > Thank you very much for the enlightenment.
    >
    > Best regards
    Hi,
    Sorry for "interrupt" here.
    I'd recommend you to read the Oracle Database Concept Guide or go to any initial training (like ADM505)
    There you will find out that with "database" Oracle refers to the physical files.
    You can create a DB of 1 TB and that will be the database size, regardless of the data that is "inside".
    That means that, at the end, you more or less understood.
    DB02 shows the database size, not the amount of data that is inside the database

Maybe you are looking for

  • How do I stop getting shared calendar notifications?

    If I share a calendar to someone in read-only mode, how can I prevent them from being spammed with notifications every time I add or change appointments?  Similarly, when I've subscribed to someone else's shared calendar, can I prevent myself from be

  • 3D DVD viewing on a 2D TV

    Can a 2D TV receive 3D output from a 3D DVD player and display a 3D image? Solved! Go to Solution.

  • Authentication errors ..

    Dear colleagues, I am trying to put things 100% working here with OBIEE, OBIP (Solaris)... almost getting everything working! I have some issues here that probably you can help me... 1) I am using BI SERVER authentication, with RPD security configura

  • SAPScripts - Special Characters not appearing

    Hi all, I was trying to maintain some text (in SO10) in Slovakian language, and I found that two characters were not being maintained : pod<u><b>ľ</b></u>a and d<u><b>ň</b></u>a. The output in the printout appears as : pod?a and d?a. Is there some wa

  • Sapscript(regrding cheque printing)

    I go to the se71, now there is lots of subproject:- like header, page, window, paragraph fromat , character format and all. as i need to design the layout of the cheque only. So on which option should i click for designing purpose.