Finding the size of db and size of used space

Greetings all good people.
Can you please help me find out about 2 database information?
One, I want to find out the size of a database =size of physical files.
and the size of data which is the size occupied in physical files.
We are about to start a new project and there is a table on the database but it is empty.
We want to be exporting data into this table but we want to make sure that there is enough space on the db before we start populating the table with data.
I believe the code below just gives me the size of the database.
select (bytes/1024/1024) as total_gigs from dba_segments where owner='BELL' and segment_name='$TABLE_NAME
But I want to know the total size of the database and how much size has been used already, much the same as you would want to know the size capacity of a hard drive and how much of the size has been used.
Sorry if my request is confusing.
Thanks a lot in advance

db size can be found out
select sum(bytes)/1024/1024/1024 from dba_data_files ;
and size of data is -- in the datafiles
select sum(bytes)/1024/1024/1024 from dba_segemnts ;
You can find out by below query .. the tablespace sizes -- would be DBSIZE
used space -- would be the actual occupied space.
select t.tablespace, t.totalspace as " Totalspace(MB)",
round((t.totalspace-nvl(fs.freespace,0)),2) as "Used Space(MB)",
nvl(fs.freespace,0) as "Freespace(MB)"
from
(select round(sum(d.bytes)/(1024*1024)) as totalspace,d.tablespace_name tablespace
from dba_data_files d
group by d.tablespace_name) t, (select round(sum(f.bytes)/(1024*1024)) as freespace,f.tablespace_name tablespace
from dba_free_space f
group by f.tablespace_name) fs
where t.tablespace=fs.tablespace (+)
order by t.tablespace

Similar Messages

  • Generate a report from the grid to get all the 10g instance name and size

    Hi Guru
    Greetings foe the day
    can you help me to Generate a report from the grid to get all the 10g instance name and size.
    If its passible you would help me a ton
    Thank you

    If you can see in you query, you asking to view dba_segments for one instance and the other query is over the MGMT$DB_TABLESPACES view but NOT "WHERE" clouse is using, and if ypu have more once instance then than view sum all the tablespaces sizes.
    How many instanced are registed in your grid control?
    http://www.jpuga.cl
    Regards
    user625256 wrote:
    Hi
    can any one help on this
    The o/p
    SQL> select sum(bytes)/1024/1024/1024 from dba_Segments;
    SUM(BYTES)/1024/1024/1024
    3549.80879
    when i query from the above mgmt its returns 1,507,473.149 GB
    select target_name DB_NAME,host_name Host,sum(trunc(tablespace_used_size/1024/1024/1024,2)) size_GB
    from MGMT$DB_TABLESPACES group by host_name,target_name order by target_name
    it gives the size as 1,507,473.149 GB
    Thank you in advance

  • I downloaded IOS6 and all my apps, including the App Store icon, disappeared. If I go to the Passport icon, there is an App Store button, but I have to search through all the apps to find the one I want  and then click on "Open" to use it.  Help!

    I downloaded IOS6 and all of my app icons, including the App Store icon disappeared. Now to use an icon, I have to go to Passport and click on the App Store button at the bottom and search through all of the apps to find the one I want and then click on Open. There doesn't seem to be a way to delete the app and start over.

    Hey PlayerPS,
    Thanks for the question, and welcome to Apple Support Communities.
    It sounds like the application you are looking for is indeed still on your iPhone. You can confirm this by searching in the Spotlight Search for this application. It may have accidentally been moved to a folder, or an additional Home screen:
    iOS: Understanding Spotlight Search
    http://support.apple.com/kb/HT3636
    via http://manuals.info.apple.com/en_US/iphone_user_guide.pdf
    Thanks,
    Matt M.

  • Is there a way to find the list of PCs and iDevices connected to my Itunes Match?

    Is there a way to find the list of PCs and iDevices connected to my Itunes Match?

    Is there a way to find the list of PCs and iDevices connected to my Itunes Match?

  • VB Script to find the last modified file and time in a directory

    Hi,
    I am new to VB script i need a script to find the latest modifed file and last modifed time in a directory(Contains  folders and sub folders inside it). it has to go through all the folders and get the latest file and last modifed time.

    Thanks it worked for me Get-ChildItem C:\Users\sujith.reddy.komma\Desktop\Suj1\* -recurse |?{-not $_.PsIsContainer} |Sort LastWriteTime -desc | select -first 1 now in my script i have hard coded the directory i need to run this script in different
    servers from one location i will put all the different paths in one text file and ineed to pass them to this script can you help me with this?
    Essentially you are incrementally asking us to write each line for you.  I recommend freeing yourself of this misery and leraning PowerShell.  THe answers to all of your questions are learned in the first few hours of study.
    Start here:
    http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx
    ¯\_(ツ)_/¯

  • How to find the Last modified date and time of a package

    Hi,
    We need a clarification on how to find the Last modified date and time of a package in Oracle. We used the example below to explain our scenario,
    Lets consider the following example
    Let A, B be two packages.
    Package A calls the package B. So A is dependent on B.
    When A is compiled the TIMESTAMP,LAST_DDL_TIME in USER_OBJECTS gets updated.
    Now there a modification in package B so it is compiled. There is no modification in package A.
    Now when the package A is executed the TIMESTAMP,LAST_DDL_TIME in USER_OBJECTS gets updated but we did not make any change in Package A. Now we need to find last modified date and time of the package A . So we can not rely on the TIMESTAMP,LAST_DDL_TIME in USER_OBJECTS . Can u please tell us any other solution to get last modified date and time of the package A .
    Regards,
    Vijayanand.C

    Here is an example:
    SQL> SELECT OBJECT_NAME,CREATED,LAST_DDL_TIME,TIMESTAMP,STATUS FROM USER_OBJECTS
    2 WHERE OBJECT_NAME = ANY('A','B');
    OBJECT_NAM CREATED LAST_DDL_TIME TIMESTAMP STATUS
    A 20-MAY-2004 10:57:32 20-MAY-2004 10:57:32 2004-05-20:10:57:32 VALID
    B 20-MAY-2004 10:58:22 20-MAY-2004 10:59:04 2004-05-20:10:59:04 VALID
    SQL> CREATE OR REPLACE PROCEDURE A AS
    2 BEGIN
    3 NULL;
    4 NULL;
    5 END;
    6 /
    Procedure created.
    SQL> SELECT OBJECT_NAME,CREATED,LAST_DDL_TIME,TIMESTAMP,STATUS FROM USER_OBJECTS
    2 WHERE OBJECT_NAME = ANY('A','B');
    OBJECT_NAM CREATED LAST_DDL_TIME TIMESTAMP STATUS
    A 20-MAY-2004 10:57:32 20-MAY-2004 11:01:28 2004-05-20:11:01:28 VALID
    B 20-MAY-2004 10:58:22 20-MAY-2004 10:59:04 2004-05-20:10:59:04 INVALID
    SQL> EXEC B
    PL/SQL procedure successfully completed.
    SQL> SELECT OBJECT_NAME,CREATED,LAST_DDL_TIME,TIMESTAMP,STATUS FROM USER_OBJECTS
    2 WHERE OBJECT_NAME = ANY('A','B');
    OBJECT_NAM CREATED LAST_DDL_TIME TIMESTAMP STATUS
    A 20-MAY-2004 10:57:32 20-MAY-2004 11:01:28 2004-05-20:11:01:28 VALID
    B 20-MAY-2004 10:58:22 20-MAY-2004 11:01:53 2004-05-20:11:01:53 VALID
    Note that the date under the column 'created' only changes when you really create or replace the procedure.
    Hence you can use the column 'created' of 'user_objects'.

  • How do I find the report server name, and then run paper report from forms?

    How do I find the report server name, and then run paper report from forms?
    I am having a problem running report 9i from forms 9i (see below thread). How do I find out the name of the report server? I checked my C:\ids\reports\conf directory but don't see anything that gives me the name of the reports server. I also don't have a iashome directory.
    Also, I just want to run the paper report (not the web version).
    Thanks.

    Hi,
    please read teh Forms / Reports integration paper in teh Collateral section for Oracle9i Forms at otn.oracle.com/products/forms
    In summary, you have to create an external Reports Service that you can then give a name.
    Frank

  • How to find the system default scripts and prompts in UCCX 8.0

    Hello everyone,
    I have a bit of experience in UCCX 6.0 and just began to use UCCX 8.0. There's a question that where can I find the system default scripts and prompts in 8.0? In 6.0, I can find them in installing directory, but 8.0 is linux based so I can not do that in same way.
    Thanks.

    You can Login to CLI with either root access or remote user access and get default scripts by going to
    CD /opt/cisco/uccx/Scripts/system/default
    At this point you have to connect to ftp server and move these default script to yoru FTP server.
    I hope this helps

  • Query to find the list of workbooks and worksheets assiciated to those book

    Hi Gurus,
    Could you help me with the tables / Query to fetch the list of workbooks and associated worksheets names as welll.
    Thanks in advance!!
    Rgds,
    Santosh

    Hi Santosh
    The whole point of the STATS table is to allow you to query performance, who did what and when. The database itself does not keep such statistics so if you disable Discoverer's method of capturing these you have no way of knowing who did what and when.
    Without this it is impossible to say. I would strongly recommend you enable the capturing of statistics.
    The reason you cannot directly query a WORKBOOK to determine what WORKSHEETS are associated with it is because that information is stored as binary information and not in SQL format.
    Discoverer 10g has the capability of providing detailed information on the EUL. This feature is not offered "out of the box" but can be easily enabled.
    The EUL Administrator can enable the feature by completing the following steps (see also MOS Note 556932.1):
    1. Log on to SQL*Plus as the Discoverer Administrator on the machine where Discoverer Administration Edition is installed.
    2. Execute the EUL5.SQL script found in the *$ORACLE_HOME\discoverer\util* directory. (This script will create the necessary database objects.)
    NOTE: If you are using an Oracle Applications mode EUL, you must also run the eul5_apps.sql file in the $ORACLE_HOME\discoverer\util directory.   This script must be run as the EUL owner, and not the Oracle Applications SYSADMIN user.
    4. Exit SQL*Plus and log on to the Discoverer Administration Edition product (as the EUL Administrator).
    5. From the menu bar, select File | Import.
    6. Import the EUL5.EEX file from the ORACLE_HOME\discoverer directory. Once the EUL import is complete, a new business area will be created and visible called The Discoverer V5 EUL. This is the business area that provides the details on the EUL.
    EUL Management Workbooks for Discoverer Administrators
    The EUL5.EEX file also imports four pre-built Discoverer workbooks. These workbooks are automatically saved to the database during the EEX import and can be executed in Discoverer Plus, Viewer or Desktop:
    EUL Workbook Management - shows which workbooks are shared with which users. Examine worksheets to find the folders, items, joins and conditions they depend upon.
    EUL Access - This Workbook indicates if a current EUL exists in this users schema. It also displays the EUL's in other user schemas that this user can access.
    EUL Query Statistics - Find out which workbooks and worksheets are being used by whom. Examine users ad-hoc queries.
    Lineage - Hyper Drill from Discoverer to find a folder or Items Lineage in Oracle Warehouse Builder. To enable the Hyper drill, you will first need to run the Lineage.sql script.
    The Discoverer Administrator can use the pre-built workbooks or build their own EUL management workbooks by using the Discoverer V5 EUL business area.
    Best wishes
    Michael

  • Where i can find the value categry code and element in cjvc

    hi gurus
    where i can find the value categry code and element in cjvc .in which table these fields are stored.could anyone tell me relation.
    Thanks & Regards
    Sandya

    not answer

  • How can I find the specific channel name and modify channel name in automatically in VBS?

    How can I find the specific channel name and modify channel name in automatically in VBS? (DIAdem 9.1)
    I would like to change channel name = "speed01" ... "speed10"  to  channel name = "velocity01"..."velocity10.
    martino

    Hello Martino,
    this script will help:
    Option Explicit
    Dim i
    Dim n
    For i=1 To 10
    If i < 10 then
    n = CNo("speed0" & i)
    Else
    n = CNo("speed" & i)
    End If
    If n > 0 Then
    If i < 10 then
    ChnName(n) = "velocitiy0" & i
    Else
    ChnName(n) = "velocitiy" & i
    End If
    End If
    Next
    Matthias
    Matthias Alleweldt
    Project Engineer / Projektingenieur
    Twigeater?  

  • Reinstalling AE and PP due to an error with dynamic link. Where do i find the program install? And tips on how to reinstall without messing things up? last question is, does my recent files and saves work after the reinstall?

    I have allready bought the programs, but need to reinstall AE and PP due to an error with dynamic link.
    Where do i find the program install?
    And tips on how to reinstall without messing things up?
    last question is, does my recent files and saves work after the reinstall?
    Thank you

    karianne wrote:
    I have allready bought the programs, but need to reinstall AE and PP due to an error with dynamic link.
    Where do i find the program install?
    Which versions? Which operating system?
    Try Download and Installation Help

  • Where can I find the CRIO-9102 Calibration and ADC to Voltage Conversion VIs ?

    I am working through the "Developing High Speed Continuous Buffered Data Acquistion Applications with CompactRIO" tutorial located at http://zone.ni.com/devzone/cda/tut/p/is/3268  I am using a CRIO-9201 analog input module instead of the cRIO-9215 shown in the tutorial.
    I would greatly appreciate help with the following:
    Where can I find the cRIO-9102 calibration and ADC to Voltage conversion VIs?
    Thanks

    Thank you for correcting the link to the tutorial. For the sake of clarification here are my questions. I am fairly new to LabVIEW and very new to the cRIO platform:
    1. Are the calibration VIs for specific modules available as part of LabVIEW or do I have to create my own using the property nodes for the module.
    As I worked through the tutorial I modified the calibration VI for the cRIO-9215 as necessary so that it would work with the cRIO-9201 module that I am using.
    2. I am assuming that the "Convert to Voltage (cRIO-9125).vi" shown in the tutorial will work correctly with the cRIO-9201 since I am passing cRIO-9201 calibration data to it.  Is this correct?
    Thanks
    Thanks

  • I have an iphone 5 which was bought in the UAE, I cannot find the FACETIME button/option, and cannot fine also on the contacts details, please help! thanks!

    I have an iphone 5 which was bought in the UAE, I cannot find the FACETIME button/option, and cannot find also on the contacts details, please help! thanks!

    The UAE and several other mostly Middle Eastern Countries ban FaceTime. Because of this all devices manufactured for sale in those countries does not have FaceTime and FaceTime cannot be installed on those devices.

  • How can if find the most repeated character and number ???

    Hi,
    I have a question. For instance, if we have a text file which contains:
    aaabbbhhhhhhtttttsjs12366
    How can i find the most repeated character and number. I have to add this code to the following program:
    I will aprreciate if you can help.
    Regards,
    Serkan
    import java.io.*;
    public class LineLen {
         public static void main(String args[]) throws Throwable {
              final String filename = "deneme1.txt";
              BufferedReader infile = new BufferedReader(new InputStreamReader(new FileInputStream(filename)));
              String line = infile.readLine();
              int linenum = 0;
              while (line != null) {
                   int len = line.length();
                   linenum++;
                   System.out.print(linenum + "\t");
                   for (int i = 0; i<len; i++)
                   System.out.print("*");
                   System.out.println("");
                   line = infile.readLine();
    }

    For a small alphabet like English, array migt be used:
    //in a for loop
    ++array[s.charAt(i)];For a big alphabet like chinese, HashMap might be barely used:
    map.put(s.charAt(i), increment(map.get(s.charAt(i))));
    // increment is a user defined method, possibly for an Integer object,
    // that returns a new Integer object

  • I own CS 5Premium. Reading the FAQs, it seems I am eligible to upgrade to CS 6 but I can't find the upgrade to purchase and download. I can't upgrade to CC because $49 per month is too much for me -- I don't use this product for work. The $29 offer seems

    I own CS 5 Design Premium. Reading the FAQs, it seems I am eligible to upgrade to CS 6 but I can't find the upgrade to purchase and download. I can't upgrade to CC because $49 per month is too much for me -- I don't use this product for work. The $29 offer seems reasonable but $49 is way too much. I don't need the majority of the programs included in CC, but subscribing to just three of them will cost way more. Really not sure what to do here :-(

    Thanks Ned. I did find this page, however it isn't an upgrade. I have been purchasing Adobe products for years so that I could just pay the upgrade price for current products. With the current system, I would be paying much more than I would for an upgrade. For example, I have been using my version of CS for at least three years. The upgrade cost me $750 so that comes out to around $21 per month. I guess I have no options as far as upgrading except for paying for the overpriced CC. Oh well, time to start looking for alternatives. It was just so convenient to have the same programs at home that I use at work.

Maybe you are looking for

  • Xorg-server 1.6.3.901-1 and nouveau on 7600 Go = crash

    Hi ! I updated this morning and now that xorg-server and libdrm (maybe the culprit ?) are up to date X won't start with nouveau It works if I go back to nvidia. What should I do ? Who should I contact ? Thanks Bye !

  • How do I set CFBundleVersion in AIR

    Hello, I am making an AIR app for my client. When my client upload the iTunes Connect to submit their app again( because it have some error at the first time), they received an error. It said ERROR ITMS-9000: "Redundant Binary Upload. There already e

  • Constant ringing after accepting or rejecting a ca...

    I use skype on my pc and xbox daily, but the xbox constant ringing is too much of an issue and makes me think twice before ringing someone on xbox. I haven't read in updates about it being an issue nor being fixed, is ti that rare of a problem or is

  • Error during upgradation

    Hi,   During upgradation I got error at SACT_700 with following log Activate lock object "E_BAMMAPNG" 4EEDI751 Base table "BAMMAPFCGR" of the lock object is not active 4 EDI813 Lock object "E_BAMMAPNG" not activated 4 EDI806XActivate lock object "E_B

  • I can't get my phone to ring. When a call comes in the phone vibrates. I have checked my settings

    I can't get my phone to ring. When a call comes in the phone vibrates. I have checked my [email protected]