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

Similar Messages

  • How to find out the size of files transferred over the SQL * Net?

    I am trying to test the Advanced Compress (AC) for 11g Data Guard. When the AC is turned on, the archived log files are supposed to be compressed on the primary database server and sent over SQL*Net, then decompressed on the standby db server. We will see the file sizes are the same on both primary and standby servers. I want to verify that the AC works by monitoring how much data are sent over SQL*Net. Per Oracle, AC uses 35% less of the bandwith. That means the size of the files transferred should be at least 65% of the original size.
    Is there a way to find out the size through Oracle utilities? If not, how to find out by OS utilities? OS is Solaris 5.10.
    Thanks.

    I'm not sure this can be done via SQL*Net, but a network packet sniffer between the two servers should be able to help - you might want to contact your network team.
    HTH
    Srini

  • 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 the scructure of OID database

    Hello,
    I installed the OID on our server, but now I have to have access to the databse. There is no problem, but there are no primary or foreign keys in a database, so I can not find out the relations between the tables in OID-databse.
    How can I find it out?
    It is very important.
    Thanks and regards
    Heinrich

    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 find out the size of a file?

    Hi,
    I would like to determine the size of a file from my code. How is that possible? I do not find any appropriate method in the java.io.File class.
    Any help would be very appreciated!

    java.io.File.length()
    Returns the size of the file as a long. The number corresponds to the number of bytes in the file.

  • How to find out the size of the info cube.

    Hai,
          Could any one guide me to find the size of an infocube.
    Bye.

    Hi,
    check trasaction DB02 where u can find the cube size..
    check this..
    Re: Infocube size?
    Regards-
    MM
    Dont forget to assign points
    Message was edited by: vishnuC

  • How to find out the Size of a TV Season before purchasing from itunes

    I am wanting to purchase the Downton Abbey Season on itunes, but my ipad says there is not enough space, is there away I can view the size of the download before I purchase it?
    Thank you

    There's no official way of doing it, unlike with Movies where the download size is under the title. However a rough guide seems to be allow around up to 34MB per min for HD and maybe up to 15MB per min for SD. So, using Downton Abbey Season 1, this would mean the total download would be about 12.9GB in HD and about 5.3GB in SD. Season 2 will be a bigger download still since each episode is longer plus there's an extra episode. Season 2 would probably be around 15.4GB in HD and 6.3GB in SD.
    Hope this helps a little.

  • How to find out the size of a node before it is shown?

    Hi,
    I am trying to anchor two nodes (say A & B) to the top of an anchor pane such that B is laid out below A. To accomplish this, I need to provide an anchor offset for the control B, which has to be height of the node A. However, as the containing Stage has not been shown yet, the A's node getWidth() method returns 0 (zero). Since, node A's size is computed based on its contents, I can't hardcode its size. So, I am at a loss how to provide the height of the node A in a dynamic manner.
    Please feel free to ask me to clarify the question if I didn't make myself clear enough.
    Thanks.

    If one of the existing layouts doesn't work for you, then you can create your own. A little bit harder to do, but this would be your best bet since there is no trickery involved. Basically, all you have to do is override the layoutChildren() and the computePrefXXX (and, perhaps computeMinXXX) methods from Parent.
    Here is any overly simplified example that lays out three circles like a traffic light:
        @Override
        public void start(final Stage stage) {
            Parent parent = new Parent() {
                    getChildren().addAll(
                        CircleBuilder.create().fill(Color.RED).radius(20).build(),
                        CircleBuilder.create().fill(Color.YELLOW).radius(20).build(),
                        CircleBuilder.create().fill(Color.GREEN).radius(20).build()
                @Override protected void layoutChildren() {
                    double dx = 0;
                    double dy = 0;
                    for(int n=0, nMax=getChildren().size(); n<nMax; n++) {
                        Node child = getChildren().get(n);                   
                        double prefHeight = child.prefHeight(-1);
                        dy = prefHeight * n + prefHeight / 2;
                        child.setLayoutY(dy);
                        dx = child.prefWidth(-1) / 2;
                        child.setLayoutX(dx);
                @Override
                protected double computePrefHeight(double width) {
                    double prefHeight = 0;
                    for(Node child : getChildren()) {
                        prefHeight += child.prefHeight(width);
                    return prefHeight;
                @Override
                protected double computePrefWidth(double height) {
                    return getChildren().get(0).prefWidth(height);
            Scene scene = new Scene(parent);
            stage.setScene(scene);
            stage.show();
        }

  • How to find out the transaction size

    Hai
    Is it possible ,how to find out the size of transaction ?
    Any one idea about this should be appreciated
    Regards
    mohan

    Hai
    Is it possible ,how to find out the size of transaction ?
    Any one idea about this should be appreciated
    Regards
    mohan create a small rollback segment to start with, with small initial and next extent sizes and maxextents unlimited.
    assign this rollback segment to the test session and run the particular transaction.
    query the view v$rollstat to see how much the rollback segment has extended.
    this is roughly your transaction size. this may not accurate but its give you
    a general idea of how much data is generated.

  • How do i find out the size of a webpage?

    how do i find out the file size of a webpage im viewing in my
    browser? and how do i find out the size of a webpage of my
    own?

    Hello,
    Try this site out.
    Just enter your URL.
    http://www.websiteoptimization.com/services/analyze/
    Take care,
    Tim
    "name294" <[email protected]> wrote in
    message
    news:gpiuqv$9on$[email protected]..
    > how do i find out the file size of a webpage im viewing
    in my browser? and
    > how do i find out the size of a webpage of my own?

  • 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 image size?

    How to find out the image size values(Width and height) in illustrator CS3 using any script. I tried but i got only the document height and width. I need to find out the image BoundingBox value of width and height. Kindly advice me.

    Try this.
    tell application "Adobe Illustrator"
    set heightImage to get height of raster item 1 of current layer of current document
    set widthImage to get width of raster item 1 of current layer of current document
    display dialog (heightImage & " X " & widthImage) as string
    end tell
    JaiMS

  • 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

  • Oracle Lite 10.3.0: how to find out the consumed size of a BLOB column

    Hi,
    we are developing an app that utilizes an Oracle Lite database and so far I have just been unable to find a reasonable way to determine the size of stored binary data.
    All the "usual" ways we aware of from "main" Oracle just don't seem to work with OLIte (ie SELECT dbms_lob.getlength(file_data) from APPS.CSL_LOBS) so how does one find out the size of blob objects?
    Thanks in advance

    Assuming BLOBs are not stored in-line:
    SQL> desc pm.print_media
    Name                                      Null?    Type
    PRODUCT_ID                                NOT NULL NUMBER(6)
    AD_ID                                     NOT NULL NUMBER(6)
    AD_COMPOSITE                                       BLOB
    AD_SOURCETEXT                                      CLOB
    AD_FINALTEXT                                       CLOB
    AD_FLTEXTN                                         NCLOB
    AD_TEXTDOCS_NTAB                                   PM.TEXTDOC_TAB
    AD_PHOTO                                           BLOB
    AD_GRAPHIC                                         BINARY FILE LOB
    AD_HEADER                                          PM.ADHEADER_TYP
    SQL> select  segment_name,
      2          index_name
      3    from  dba_lobs
      4    where owner = 'PM'
      5    and table_name = 'PRINT_MEDIA'
      6    and column_name = 'AD_COMPOSITE'
      7  /
    SEGMENT_NAME                   INDEX_NAME
    SYS_LOB0000051988C00003$$      SYS_IL0000051988C00003$$
    SQL> select  sum(bytes)
      2    from  dba_segments
      3    where owner = 'PM'
      4      and segment_name in (
      5                           'SYS_LOB0000051988C00003$$',
      6                           'SYS_IL0000051988C00003$$'
      7                          )
      8  /
    SUM(BYTES)
        262144
    SQL> SY.

  • How can i find out the size of video on my iphone 5?

    How can i find out the size of video on my iphone 5?

    As far as I've known, all iPhones (3G/3GS/4/4S/5) sold in China (probably only in China) have this low battery alert sound.
    So called "localization" or what...
    Actually many people found it annoying coz it plays even when the phone is switched to SILENT. However no solution has been found so far
    PS: reeeeeeeally hope Apple could see this thread and at least give Chinese users an option to switch it off!!
    <Edited By Host>

Maybe you are looking for

  • Multiple Users on Account

    I'm trying to see how much we would use FormsCentral for our entire company and I can't seem to find an answer on the forum for exactly what I need. We would be using FormsCentral for different departments; Graphics, Accounting, and HR. Each departme

  • Computing an expression in a string?

    I have an expression in a string, how can I compute this? I know I can put it in post fix and travers it with a Stack, but there must be an easier way in Java, e.g. How can I evaluation this string into an integer of 10? String s = "5+5"; // how can

  • Make Payment transaction tab in XD01,02,03 disable

    Hello, Want to make payment transaction tab disable in XD01,02,03 for specific users.Please gimme the solutions asap, Thanks in advance Thanks Suchi

  • Update Date Picture Taken in Photo

    Since PE 4 only updates the Date Picture taken in the catalog and not the image file itself, is anyone aware of another product that will read the PE 4 catalog and update the image files?

  • Db transactions show nothing

    Hi All, In one of our sap system when i tried performance monitoring and some database transactions after a long time now, i observed that no data is shown there. We need to apply any SQL server patch ? Thanks & Regards Subba Rao