How to find the db size

Hi ,
Please tell me how to find the db size.
Thanks,
Kumar.

If I understand correctly, the above query will give the space allocated to the database. This isn't necessarily the same as the space used by the database. Or do I need to clean my glasses ?
I use the following to get sizes for tablespaces (may need some formatting done - works in 9i and 10g) :
SELECT
     Total.name "TABLESPACE_NAME",
     total_space "TABLESPACE_SIZE",
     nvl(Free_space, 0) Free_space,
     nvl(total_space-Free_space, 0) Used_space
FROM
     select
          tablespace_name,
          sum(bytes/1024/1024) Free_Space
     from
          sys.dba_free_space
     group by
          tablespace_name
     ) Free,
     select
          b.name,
          sum(bytes/1024/1024) TOTAL_SPACE
     from
          sys.v_$datafile a,
          sys.v_$tablespace B
     where
          a.ts# = b.ts#
     group by
          b.name
     ) Total
WHERE
     Free.Tablespace_name(+) = Total.name
ORDER BY
     Total.name
;

Similar Messages

  • How to find the Model size in Semantics

    Hi All,
    Please can you tell me how to find the model size in Semantics.
    Thanks,
    Indu

    Hi,
    Instead of looking up the ID for the Entailment in DB_VIEWS you can better use MDSYS.SEM_NETWORK_INDEX_INFO
    For example:
    select name, type, id from MDSYS.SEM_NETWORK_INDEX_INFO;
    NAME TYPE ID
    MYMODEL MODEL 60
    MYMODEL_INF ENTAILMENT 69
    *** Space about the B-tree indexes on models and entailments ***
    Indexes created in RDF_LINK$ for a specific model:
    SQL> select name, type, id, index_name from MDSYS.SEM_NETWORK_INDEX_INFO;
    NAME TYPE ID INDEX_NAME
    MYMODEL MODEL 60 RDF_LNK_PCSGM_IDX
    FAMILY100 MODEL 59 RDF_LNK_PSCGM_IDX
    FAMILY100 MODEL 59 RDF_LNK_PCSGM_IDX
    FAMILY2 MODEL 56 RDF_LNK_PCSGM_IDX
    FAMILY2 MODEL 56 RDF_LNK_PSCGM_IDX
    FAMILY MODEL 57 RDF_LNK_PCSGM_IDX
    FAMILY MODEL 57 RDF_LNK_PSCGM_IDX
    OTHERMODEL MODEL 58 RDF_LNK_PSCGM_IDX
    OTHERMODEL MODEL 58 RDF_LNK_PCSGM_IDX
    0 NETWORK 0 RDF_LNK_PCSGM_IDX
    0 NETWORK 0 RDF_LNK_PSCGM_IDX
    MYMODEL_INF ENTAILMENT 69 RDF_LNK_PCSGM_IDX
    MYMODEL_INF ENTAILMENT 69 RDF_LNK_PSCGM_IDX
    Then get the size from DBA_SEGMENTS
    select bytes/1024/1024 MB, partition_name from dba_segments where segment_name in ('RDF_LNK_PSCGM_IDX','RDF_LNK_PCSGM_IDX');
    Specifically for our model 60 and Entailment 69:
    select bytes/1024/1024 MB, partition_name from dba_segments where segment_name in ('RDF_LNK_PSCGM_IDX','RDF_LNK_PCSGM_IDX') and partition_name in ('MODEL_60','MODEL_69');
    MB PARTITION_NAME
    192 MODEL_60
    192 MODEL_60
    60.0625 MODEL_69
    62.375 MODEL_69
    You would add them all for the size of the indexes

  • How to find the client size?

    i want to know  how to find the size of the client?

    Hi Gadangi,
    Check OSS note# "118823 - CC-ADMIN: Size of a client".
    Best regards,
    Orkun Gedik

  • How to find the Schema size

    Hi,
    How to find the size of the schema in a daabase.
    Thanks,
    Mahi

    Mahi,
    One more option, though not so clean would be use Data Pump and its estimate file size option for the schema. The estimate would tell you the info about the size of the schema.
    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 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.

  • How to find the size of an arrayList through Expression Builder.

    Hai OTN,
    How to find the size of an arrayList through Expression. I have a managed bean in View Scope.I am using Jdeveloper 11.1.1.2 with ADF Faces components.
    Managed Bean :
    ArrayList<IllnessEmployeesObj> employeeGridList =
    new ArrayList<IllnessEmployeesObj>();
    JSPX :
    Value="#{viewScope.PandIVH.employeeGridList.size}"
    Error : java.lang.NumberFormatException: For input string: "size"

    Hi Dinil,
    I have provided you with a sample that would show you the how you can get the size of an arraylist
    the sample has a page untitled1 and a bean named test.
    I have run in on jdev 11.1.2 and it is ok, it will be ok on 11.1.3
    after running the sample you will see the 2.
    please remember that you must add the JSTL taglib on the viewcontroller.
    just right click on viewcontroller, go to tag lib select the jstl.
    page
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>untitled1</title>
    </head>
    <body>
    <h:form>
    <h:outputText value="#{fn:length(test.a)}"/>
    </h:form>
    </body>
    </html>
    </f:view>
    bean
    import java.util.ArrayList;
    public class Test {
    public Test() {
    a= new ArrayList();
    Object o=new Object();
    a.add(o);
    a.add(o);
    ArrayList a;
    public void setA(ArrayList a) {
    this.a = a;
    public ArrayList getA() {
    return a;
    I hope this sample came handy.
    regards,

  • How to find the XML file size in the scenarios?

    Hi All,
    Recently i have attended an interview at a MNC.
    They asked some realtime questions like
    1.how to find the XML document size in a File-File scenario?
    2.What is mass-assignment replication etc.....
    Can anybody tell me the solution for these.
    Best regards
    Hari prasad

    If the input is a flat file, there is no exact way to calculate the size of the generated XML file, since it depends on many factors (number of fields in the recordsets, size of the name of the fields, number of records, etc).
    As a rule of thumb, generally ppl use XML file size = 2 x Flat file size, in order to do sizing calculations etc. But again, that is just an estimation, not a precise calculation.
    Regards,
    Henrique.

  • 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 size of the pipe. I mean the total number of bytes/messages available in the named pipe?

    How to find the size of the pipe. I mean the total number of bytes/messages available in the named pipe?
    NAVEEN

    I'm afraid this forum for Microsoft Project Customization and Programming  is not the correct forum for your question. Please Choose correct forum in order
    to get help from experts. I think your question is more relevant to SQL server
    kirtesh

  • How do I find the total size of all my Music in iTunes 11?

    I'm looking to get a new iPod, either a nano or Touch, so I'm trying to find the total size of all of my Music. Since iTunes 11's interface is so different from previous versions, I don't see a way to view that.

    Ctrl B to show top menu
    View Show Status Bar to show the grey bar at the bottom with the info you want.
    While your there View> Show Sidebar and see if you prefer that.

  • How to find the size of a field

    Can somebody tell how to find the sie of a varchar2 field?
    Thanks.

    SQL> desc global_name
    Name Null? Type
    GLOBAL_NAME VARCHAR2(4000)
    SQL> select global_name from global_name;
    GLOBAL_NAME
    ITFD.XXXXX.CO.XX
    1* select vsize(global_name) from global_name
    SQL> /
    VSIZE(GLOBAL_NAME)
    16

  • How to find the number of records in ods?

    how to find the number of records in ods?
    Pls suggest the solution apart going to the table of ods and seeing the number of records.
    Is there any program or function module to see the number of records in ods?
    For eg: SAP_INFOCUBE_DESIGNS is a program which gives the detail (number of records) of infocube.

    Hi,
    I was looking at this and found the following tables that may be of help.
    One of these tables will include a summary of the record count of all the tables in your system based on the last time each table had it's database statistics calculated:
    DBSTATTADA
    DBSTATTDB2
    DBSTATTDB4
    DBSTATTDB6
    DBSTATTINF
    DBSTATTMSS
    DBSTATTORA
    We run on an Oracle database so the table record counts can be taken from DBSTATTORA. Type in AZ in table selection field in SE16 to restrict the output to ODS (or DSO) tables only.
    The record count is at the time indicated in the timestamp field. Obviously this is not real time but should not be too out of date - if it is you may be having performance issues and should get your DBA / Basis to run a full refresh of DB stats.
    Hope this helps, alhtough not real time the table should give you a decent indication of the size of all your ODS objects (or any other table for that matter!)

  • I cannot figure out how to change the photo size on my iPhone 5s.  I was given the choice of small, medium or large the first time I took a picture.  Now I have no idea how to change it to medium.  Can anyone help?

    I cannot figure out how to change the photo size on my iPhone 5s.  The first time I took a pic it asked if I wanted smalll,  medium or large and listed the pixels.  I chose small but am now finding that is too small.  Can anyone help me set it to medium now?  I can't find any setting for that.  I'm a newby to iPhones and have no idea what I'm doing.  Thanks for any help you can offer.

    By "sending" do you mean sending email?
    If so, what app are you using to take the photos on your iPhone 5? Or are the photos from a different source (saved to your Camera Roll from somewhere else, like a web page or Messages)?
    My guess is that Mail gives you the option to send different file sizes when it detects you are trying to Mail a really large photo file. The size of photos on the iPhone 5 is really big and some email providers may stop your mail from being delivered if attachments are too large. Thus, Mail tries to help you by offering to resize the photo.
    I suspect that if you are sending smaller files, Mail does not bother giving you options to save a smaller version. In fact, I have seen this behavior. So, if the photo is already "small enough", it gets sent as-is.
    To my  knowledge, there is no global iOS setting for this. Some apps may have different rules, of course.

  • How to find the level of each child table in a relational model?

    Earthlings,
    I need your help and I know that, 'yes, we can change'. Change this thread to a answered question.
    So: How to find the level of each child table in a relational model?
    I have a relacional database (9.2), all right?!
         O /* This is a child who makes N references to each of the follow N parent tables (here: three), and so on. */
        /↑\ Fks
       O"O O" <-- level 2 for first table (circle)
      /↑\ Fks
    "o"o"o" <-- level 1 for middle table (circle)
       ↑ Fk
      "º"Tips:
    - each circle represents a table;
    - red tables no have foreign key
    - the table in first line of tree, for example, has level 3, but when 3 becomes N? How much is N? This's the question.
    I started thinking about the following:
    First I have to know how to take the children:
    select distinct child.table_name child
      from all_cons_columns father
      join all_cons_columns child
    using (owner, position)
      join (select child.owner,
                   child.constraint_name fk,
                   child.table_name child,
                   child.r_constraint_name pk,
                   father.table_name father
              from all_constraints father, all_constraints child
             where child.r_owner = father.owner
               and child.r_constraint_name = father.constraint_name
               and father.constraint_type in ('P', 'U')
               and child.constraint_type = 'R'
               and child.owner = 'OWNER') aux
    using (owner)
    where child.constraint_name = aux.fk
       and child.table_name = aux.child
       and father.constraint_name = aux.pk
       and father.table_name = aux.father;Thinking...
    Let's Share!
    My thanks in advance,
    Philips
    Edited by: BluShadow on 01-Apr-2011 15:08
    formatted the code and the hierarchy for readbility

    Justin,
    Understood.
    Nocycle not work in 9.2 and, even that would work, would not be appropriate.
    With your help, I decided a much simpler way (but there is still a small problem, <font color=red>IN RED</font>):
    -- 1
    declare
      type udt_roles is table of varchar2(30) index by pls_integer;
      cRoles udt_roles;
    begin
      execute immediate 'create user philips
        identified by philips';
      select granted_role bulk collect
        into cRoles
        from user_role_privs
       where username = user;
      for i in cRoles.first .. cRoles.count loop
        execute immediate 'grant ' || cRoles(i) || ' to philips';
      end loop;
    end;
    -- 2
    create table philips.root1(root1_id number,
                               constraint root1_id_pk primary key(root1_id)
                               enable);
    grant all on philips.root1 to philips;
    create or replace trigger philips.tgr_root1
       before delete or insert or update on philips.root1
       begin
         null;
       end;
    create table philips.root2(root2_id number,
                               constraint root2_id_pk primary key(root2_id)
                               enable);
    grant all on philips.root2 to philips;
    create or replace trigger philips.tgr_root2
       before delete or insert or update on philips.root2
       begin
         null;
       end;
    create table philips.node1(node1_id number,
                               root1_id number,
                               node2_id number,
                               node4_id number,
                               constraint node1_id_pk primary key(node1_id)
                               enable,
                               constraint n1_r1_id_fk foreign key(root1_id)
                               references philips.root1(root1_id) enable,
                               constraint n1_n2_id_fk foreign key(node2_id)
                               references philips.node2(node2_id) enable,
                               constraint n1_n4_id_fk foreign key(node4_id)
                               references philips.node4(node4_id) enable);
    grant all on philips.node1 to philips;
    create or replace trigger philips.tgr_node1
       before delete or insert or update on philips.node1
       begin
         null;
       end;
    create table philips.node2(node2_id number,
                               root1_id number,
                               node3_id number,
                               constraint node2_id_pk primary key(node2_id)
                               enable,
                               constraint n2_r1_id_fk foreign key(root1_id)
                               references philips.root1(root1_id) enable,
                               constraint n2_n3_id_fk foreign key(node3_id)
                               references philips.node3(node3_id) enable);
    grant all on philips.node2 to philips;
    create or replace trigger philips.tgr_node2
       before delete or insert or update on philips.node2
       begin
         null;
       end;                          
    create table philips.node3(node3_id number,
                               root2_id number,
                               constraint node3_id_pk primary key(node3_id)
                               enable,
                               constraint n3_r2_id_fk foreign key(root2_id)
                               references philips.root2(root2_id) enable);
    grant all on philips.node3 to philips;
    create or replace trigger philips.tgr_node3
       before delete or insert or update on philips.node3
       begin
         null;
       end;                          
    create table philips.node4(node4_id number,
                               node2_id number,
                               constraint node4_id_pk primary key(node4_id)
                               enable,
                               constraint n4_n2_id_fk foreign key(node2_id)
                               references philips.node2(node2_id) enable);
    grant all on philips.node4 to philips;
    create or replace trigger philips.tgr_node4
       before delete or insert or update on philips.node4
       begin
         null;
       end;                          
    -- out of the relational model
    create table philips.node5(node5_id number,
                               constraint node5_id_pk primary key(node5_id)
                               enable);
    grant all on philips.node5 to philips;
    create or replace trigger philips.tgr_node5
       before delete or insert or update on philips.node5
       begin
         null;
       end;
    -- 3
    create table philips.dictionary(table_name varchar2(30));
    insert into philips.dictionary values ('ROOT1');
    insert into philips.dictionary values ('ROOT2');
    insert into philips.dictionary values ('NODE1');
    insert into philips.dictionary values ('NODE2');
    insert into philips.dictionary values ('NODE3');
    insert into philips.dictionary values ('NODE4');
    insert into philips.dictionary values ('NODE5');
    --4
    create or replace package body philips.pck_restore_philips as
      procedure sp_select_tables is
        aExportTablesPhilips     utl_file.file_type := null; -- file to write DDL of tables   
        aExportReferencesPhilips utl_file.file_type := null; -- file to write DDL of references
        aExportIndexesPhilips    utl_file.file_type := null; -- file to write DDL of indexes
        aExportGrantsPhilips     utl_file.file_type := null; -- file to write DDL of grants
        aExportTriggersPhilips   utl_file.file_type := null; -- file to write DDL of triggers
        sDirectory               varchar2(100) := '/app/oracle/admin/tace/utlfile'; -- directory \\bmduhom01or02 
        cTables                  udt_tables; -- collection to store table names for the relational depth
      begin
        -- omits all referential constraints:
        dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'REF_CONSTRAINTS', false);
        -- omits segment attributes (physical attributes, storage attributes, tablespace, logging):
        dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'SEGMENT_ATTRIBUTES', false);
        -- append a SQL terminator (; or /) to each DDL statement:
        dbms_metadata.set_transform_param(dbms_metadata.session_transform, 'SQLTERMINATOR', true);
        -- create/open files for export DDL:
        aExportTablesPhilips := utl_file.fopen(sDirectory, 'DDLTablesPhilips.pdc', 'w', 32767);
        aExportReferencesPhilips := utl_file.fopen(sDirectory, 'DDLReferencesPhilips.pdc', 'w', 32767);
        aExportIndexesPhilips := utl_file.fopen(sDirectory, 'DDLIndexesPhilips.pdc', 'w', 32767);
        aExportGrantsPhilips := utl_file.fopen(sDirectory, 'DDLGrantsPhilips.pdc', 'w', 32767);
        aExportTriggersPhilips := utl_file.fopen(sDirectory, 'DDLTriggersPhilips.pdc', 'w', 32767);
        select d.table_name bulk collect
          into cTables -- collection with the names of tables in the schema philips
          from all_tables t, philips.dictionary d
         where owner = 'PHILIPS'
           and t.table_name = d.table_name;
        -- execution
        sp_seeks_ddl(aExportTablesPhilips,
                     aExportReferencesPhilips,
                     aExportIndexesPhilips,
                     aExportGrantsPhilips,
                     aExportTriggersPhilips,
                     cTables);
        -- closes all files
        utl_file.fclose_all;
      end sp_select_tables;
      procedure sp_seeks_ddl(aExportTablesPhilips     in utl_file.file_type,
                             aExportReferencesPhilips in utl_file.file_type,
                             aExportIndexesPhilips    in utl_file.file_type,
                             aExportGrantsPhilips     in utl_file.file_type,
                             aExportTriggersPhilips   in utl_file.file_type,
                             cTables                  in out nocopy udt_tables) is
        cDDL       clob := null; -- colletion to save DDL
        plIndex    pls_integer := null;
        sTableName varchar(30) := null;
      begin
        for i in cTables.first .. cTables.count loop
          plIndex    := i;
          sTableName := cTables(plIndex);
           * Retrieves the DDL and the dependent DDL into cDDL clob       *      
          * for the selected table in the collection, and writes to file.*
          begin
            cDDL := dbms_metadata.get_ddl('TABLE', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportTablesPHILIPS, cDDL);
          exception
            when dbms_metadata.object_not_found then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('REF_CONSTRAINT', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportReferencesPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('INDEX', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportIndexesPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('OBJECT_GRANT', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportGrantsPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
          begin
            cDDL := dbms_metadata.get_dependent_ddl('TRIGGER', sTableName, 'PHILIPS');
            sp_writes_ddl(aExportTriggersPhilips, cDDL);
          exception
            when dbms_metadata.object_not_found2 then
              null;
          end;
        end loop;
      end sp_seeks_ddl;
      procedure sp_writes_ddl(aExport in utl_file.file_type,
                              cDDL    in out nocopy clob) is
        pLengthDDL  pls_integer := length(cDDL);
        plQuotient  pls_integer := null;
        plRemainder pls_integer := null;
      begin
          * Register variables to control the amount of lines needed   *
         * for each DDL and the remaining characters to the last row. *
        select trunc(pLengthDDL / 32766), mod(pLengthDDL, 32766)
          into plQuotient, plRemainder
          from dual;
          * Join DDL in the export file.                            *
         * ps. 32766 characters + 1 character for each line break. *
        -- if the size of the DDL is greater than or equal to limit the line ...
        if plQuotient >= 1 then
          -- loops for substring (lines of 32766 characters + 1 break character):
          for i in 1 .. plQuotient loop
            utl_file.put_line(aExport, substr(cDDL, 1, 32766));
            -- removes the last line, of clob, recorded in the buffer:
            cDDL := substr(cDDL, 32767, length(cDDL) - 32766);
          end loop;
        end if;
          * If any remains or the number of characters is less than the threshold (quotient = 0), *
         * no need to substring.                                                                 *
        if plRemainder > 0 then
          utl_file.put_line(aExport, cDDL);
        end if;
        -- record DDL buffered in the export file:
        utl_file.fflush(aExport);
      end sp_writes_ddl;
    begin
      -- executes main procedure:
      sp_select_tables;
    end pck_restore_philips;<font color="red">The problem is that I still have ...
    When creating the primary key index is created and this is repeated in the file indexes.
    How to avoid?</font>

Maybe you are looking for