Problem free space in database calculation

Hi all

I'm calculating free space in the database by using query below, but I get an incorrect result.
Please advice.


Query: -.

SELECT DF.tablespace_name tsname,.
Sum (df.bytes) / 1024/1024 tbs_size_mb,.
NVL(sum(e.used_bytes)/1024/1024,0) used,
NVL(sum(f.free_bytes)/1024/1024,0) avail.
RPAD(' '||) (RPAD('X',Round(Sum(e.used_bytes)*10/Sum(DF.bytes),0), 'X'), 11,'-') used_visual,.
NVL((sum(e.used_bytes)*100)/sum(DF.bytes),0) pct_used
OF sys.dba_data_files df,.
(SELECT file_id, sum (nvl(bytes,0)) used_bytes
OF sys.dba_extents
E GROUP BY file_id),
(SELECT max (bytes) free_bytes, file_id FROM dba_free_space
GROUP BY file_id) f
WHERE e.file_id (+) = df.file_id
AND df.file_id = f.file_id (+)
GROUP BY df.tablespace_name
ORDER BY 6

/




and the output is



*************************
TABLESPACE STATUS *.
*************************

Size used for free
Tablespace name (Mo) (Mo) (Mo) used % used
-------------------- -------- -------- -------- ----------- ------
TOOLS 12 0 12 - 0
INDEX 4 824 0 50 - 0
TEMP 32 768 384 4 - 1
RBS 6 095 100 2 143 - 2
IMPORT OF 25 600 450 25 150 - 2
TEMP02 X 8 000 896 7 104 - 11
300 84 216 XXX - 28 SYSTEM
16 000 4 650 11 150 XXX - 29 NEWINDEX
100 44 56 XXXX PERFSTAT - 44
USERS 63 166 46 173 4 160 XXXXXXX - 73
-------- -------- --------
the sum of 156 865 52 781 50 045






Order of the users tablespace size is 63 GB used is 43 GB and free is 4 GB... and where is the rest of 10-12 Go went?

I use the query above on 8i


Please advice.

Kind regards
A

format free column 9999999999999
used column format 9999999999999
format column 9999999999999 total
Column file_name format a30
set line 200
Select a.file_id, a.file_name, total a.bytes, b.used, a.bytes - free b.used
(select file_id, file_name, decode(maxbytes,0,bytes,maxbytes) bytes
from dba_data_files) has,
(select file_id, sum (bytes) used from dba_extents file_id group) b
where a.file_id = b.file_id (+)
order of a.file_id;

Source:Re: size maximum for a data file

HTH
Girish Sharma

Tags: Database

Similar Questions

  • Problem free space / with oracle-xe - 11.2.0 - 1.0.x86_64

    Hello

    I try to install Oracle xe - 11 g on Red Hat 5.6, but I have the following problem:

    [root@localhost] RPM - ivhf oracle-xe - 11.2.0 - 1.0.x86_64.rpm

    Preparing... ########################################### [100%]

    installation package oracle-xe - 11.2.0 - 1.0.x86_64 needs of 180 MB on the / file system
    However, I have enough free space /, df shows command:
    1 K-blocks used available use % mounted on file system

    / dev/sda2 3960348 3326380 429544 89%.
    / dev/sda3 30368632 4066116 24734976 15% / Home
    / dev/sda1 46633 11310 32915 26% / Boot
    tmpfs 2198372 0 2198372 0% / dev/shm
    how to fix it?


    Thanks to advantage

    Published by: 905637 on 03-ene-2012 04:43
    How should I do?

    Add space.

    Looks like you have at least a total of 4G for / with about 420 MB of free space. It is nowhere near enough space, out-of-the-box only datafiles take about 1 G.

    Try bumping sda2 until another 4G, or add (at least) 4 G partition and mount it to the/usr/lib/oracle

    By the Linux installation guide... 'Space '. 1.5 GB minimum"http://docs.oracle.com/cd/E17781_01/install.112/e18802/toc.htm#BABHICJH

    Published by: clcarter on January 3, 2012 11:40
    Add URL doc install

  • free space in database

    Hello
    I deleted the unnecessary data in the table, but after removal also not able to leave space is there an option I think there shrink for this option no solution without error for this

    and analyse the option of free table space table

    Thank you

    Hello

    As previously posted, it depends on your Version. Otherwise, you will find enclosed a few way to reclaim the space lost (in 11.2):

    http://docs.Oracle.com/CD/E11882_01/server.112/e25494/schema003.htm

    Hope this helps.
    Best regards
    Jean Valentine

  • Installation problem: (there is not enough free space to store the temporary files of Windows installation)

    I install Windows 7 Ultimate update on Vista Ultimate. Compatibility check says I can go for it.

    I have 348 GB of free space and 2.4 GB of Ram. I run Disk Cleanup and is are free programs on hard drive. When I run the installer, it gives me this message

    There is not enough free space to store the temporary files of Windows installation.

    I'd appreciate any help to overcome this problem.

    Tried the fix you suggested. He changed nothing

    You may be able to mark the partition on which is installed the operating system as being active.

    1. Open Control Panel by clicking the Start button, and then click Control Panel.
    2. Click system and Maintenance.
    3. Click on Administrative Tools.
    4. Double-click computer management. If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.
    5. In the navigation pane, click the disks as storage management.
    6. Select the volume that contains the existing installation of Windows Vista. In general, it is the C drive.
    7. Right-click on the volume and select Mark Partition as Active.
    8. Click Yes to confirm the action.

    Could also contribute to:

    If you have several hard drives remove all except the one that you install Windows 7, and then replace it after Windows 7 is installed.

    Disable startup programs:
    (A) click Start, type MSCONFIG in the search box and press ENTER.
    OK the authorization of user account control and password if necessary
    If you are using XP: click Start, run, and type: MSCONFIG and click OK.
    (B) on the general tab, click Selective startup.
    (C) just below the selective startup, clear the checkbox "Load Startup items".
    (D) click the Services tab, check "Hide all Microsoft Services", and then click Disable all.
    (E) click OK, and then restart the computer.
    (F) try the upgrade again.

    (NOTE: If the upgrade fails and you continue to use your rear security software, then also go back into MSCONFIG and under the general Tower XP/Vista tab, click "Normal startup", and then click OK to exit.)

    Also:

    You need more than half of your drive is empty instead upgrade. If your reader is 1.0 TB (1, 000 GB), you need 500 GB + to be free.

    If you cannot free enough space, you need to move data to external storage.

    Free space - increase the hard disk space

    The following procedure cleans the files associated with your user account. You can also use Disk Cleanup to clean all the files on your computer.

    1. click the button start, in the search box, type disk cleanup, then click Disk Cleanup.
    2. in the drives list, click the drive you want to clean, and then click OK.
    3. on the Disk Cleanup tab, select the types of files to delete.
    Note: To delete all Points except the most recent system restore - click on "Clean up System Files" and you will get another tab called more than Options. Now click More Options, and then click 'Clean up' under ' System Restore and shadow copies "and then confirm the deletion.
    4. click OK at the bottom of the window cleaning disc and in the message that appears, click on delete files.

    Reduce the amount of space allocated to system restore.

    1. start--> panel--> system and safety--> system
    2. then click on the "System Protection" link located at the top left.
    3. in "System Properties" window, click on the "System Protection" tab
    4 locate the 'Settings of Protection' box and select / click on the drive letter (usually c :))
    5. now, click the "Configure" button to change the settings to restore "disk space".
    6. move the cursor to reduce the amount of space system Protection can use (min. 2 GB).
    7. click "Apply" and then the "OK" button after setting the disk space.

    Questions about installing Windows 7?
    FAQ - Frequently Asked Questions from Installation Windows 7 & responses

  • Disco of VmWare Converter problema su spazio - ERROR: failed to create a snapshot of a volume of the source. Possible causes include not seen all NTFS volumes on Windows XP or Windows 2003 source systems with no is not enough free space on the disk.

    Buongiorno,

    Devo connvertire con vmware converter one Nt Server con AC 450MO di spazio libero su disco C: ntfs file system e

    Ricevo this error:

    ERROR: Impossible to take snapshots of a volume of the source. Possible causes include not seen all NTFS volumes on Windows XP or Windows 2003 source systems with no is not enough free space on the disk.

    He problema e che no ho the possibility di līberō altro spazio.

    Some suggestions?

    Grazie in pre-empted.

    Anni fa it era questa versione di VMware Converter: https://dl.dropboxusercontent.com/u/2197180/coldclone.3.03.iso che permetteva the clonazione a freddo. :-)

  • Installation of the Photoshot 13 elements. error message: "this is a problem when extracting the files. Check the amount of space available on your computer and the rights to write to the destination folder. I have 1.38 TB of free space and total control

    I try to install photoshop elements 13, that I bought and downloaded from Amazon. When I try to install it I get the following error message: "this is a problem when extracting the files. Check the amount of space available on your computer and the rights to write to the destination folder. I administrar 1.38 TB of free space and total control.

    Charles please do not remove the installation files in the Program Files directory.  I recommend to extract the installation to your downloads folder or your desktop files.  Once installation files are extracted, you can then run the installation program to install Photoshop elements 13.

  • Calculation of the free space in a data file

    Hello

    I use Oracle database 11g (11.1.0.6). I need to calculate available disk space that exist in a special database for inserting new records. I look in the table dba_data_files for this information. I use the sub query to get the value of maxsize allocated in GB this until datafile that it can grow.

    Select maxbytes/1024/1024/1024 of dba_data_files where nom_tablespace = 'XXXX '.

    How to get the disk space available for the insertion of new records in a particular data file or a bunch of data files in a tablespace?


    Kind regards

    007

    007 wrote:
    Hi Helios - Gunes EROL,

    The Select sum (bytes) / 1024/1024/1024 "GB" of dba_data_files where nom_tablespace = 'xx' query tells you the sum of all files of size data in a tablespace. But I need the free space available in these data files. How to get it?

    Kind regards

    007

    Use

    select sum(bytes/1024/1024/1024) GB from dba_free_space where tablespace_name='tablespace name'
    

    Know schemae storage space

    select default_tablespace from dba_users where username='schema name';
    

    Know the perticular table tablespace

    select TABLESPACE_NAME from dba_tables where table_name='table name';
    

    Utimetly you will be insert in tablespace, little matter how many data file you have and how many girl and how many of them have the space available.
    So just to worry when the table space is saturated.

  • Script of free space for the physics of the standby database

    I need to determine how much free space I have in my physical storage spaces of the standby database. Is there a query for this? Remember that dba_ views are not available in a mounted single standby database so I'm pretty well limited to using the views v$. Thank you

    Why do you think you have to check the free space into a storage ensures physical ?
    You cannot create all segments anyway.

    Kind regards
    Uwe Hesse

    http://uhesse.WordPress.com

  • Is there a problem if I extend my drive c with any free space?

    I have a 750 GB HDD partitioned into 5 seats, namely

    c:---75 GB
    F:---200 GB
    G:---150 GB
    H:---150 GB
    I:---103 GB
    but since I have only 10 GB of free space left in my c: drive I want to extend my c drive but I don't have a copy of my windows, so I want to increase my c drive without format my drive c. any body can help?

    The essential point is that the only way to extend a drive is that it cannot be that in free space is contiguous to the partition that currently hold the drive C. open disk management and in the lower pane confirm what partition is now to the right of the C partition. This is the one, in that you have to remove or change in order to provide a space for drive C to expand.

    Although the disk manager has the ability to shrink a partition it will reduce only the right side at the end of the score but you need initially left space to the partition. If you can, as suggested by the most simple is to back up the content, delete the partition, extend the C drive, the quantity required and if any space flying over creating a new partition to restore the data.

    You can also download MiniTool Partition Wizard , that allows you to define which end of a partition to shrink. However, the partitions on an active system manipulation it has its risks and it is strongly recommended that you perform a backup anyway before you start.

    An option may be to move some of the files currently on the C drive on another drive. Although you can not move the whole user profile easily many key issues that often take up excessive space can be moved, particularly music, photos and Documents folders can be moved using a utility provided in Windows.

  • How much free space will be left after you import?

    Hallo. I need to replace all the patterns on the integration server using those on the production server. I want to know how much free space is left on/off data to the integration server after this kind of refreshment. The two databases are Oracle 9 so I'll use exp/IMP. Here's how I do it. Could check you if I think that good? It is 72 GB of free space on/data on the target server.

    Size used Avail capacity mounted file system
    / dev/vgsmxdata/lvsmxcopy G 194,74 122,56 72,18 G G 63% / data

    Overall size of the exported schemas of the SOURCE_DB is 150 GB. The same patterns on TARGET_DB takes 90 GB. If the difference is 60GB. Free space in the data files in TARGET_DB is 30 GB. This means that in the first place, the free space in the data files is filled and after that datafiles extend? This would mean that a database would extend up to 150 GB and data/free space would be 40 GB after updating. Am I wrong?

    SELECT ' TOTAL :'|| SUM (ALLOCATED_MB),
    ' USE :'|| SUM (USED_MB) USED,
    "FREE :'||". SUM (FREE_SPACE_MB)
    FROM (SELECT SUBSTR (df.NAME, 1, 40) file_name, df.bytes / 1024 / 1024 allocated_mb,)
    ((df.bytes/1024/1024)-NVL (SUM (dfs.bytes) / 1024 / 1024, 0)) used_mb,)
    NVL (SUM (dfs.bytes) / 1024 / 1024, 0) free_space_mb
    V $ datafile df, dfs dba_free_space
    WHERE df.file # = dfs.file_id (+)
    GROUP OF dfs.file_id, df.NAME, df.file #, df.bytes
    ORDER BY file_name);

    SOURCE_DB@Server1
    TOTAL (MB): 170860.984375
    USED (MB): 152777.859375
    FREE (MB): 18083.125

    TARGET_DB@Server2
    TOTAL (MB): 121634,984375
    USED (MB): 92853,109375
    FREE (MB): 28 781 875

    Published by: Przemek P on October 9, 2012 10:48

    There are a few potential pitfalls. First of all, when you import, the definition of the INITIAL segment may be too big, using more place you expect. This can be things like adding many lines, remove them and do not reset the high watermark before an insertion above the upper limit, or sometimes old problems that nobody noticed have stayed or reproduced. Second, if you have tables that have been updated, by using the pctfree in most blocks, then pctfree is honored to import, leaving more room never-to-be-used in blocks.

    From my experience, those who do rarely estimate more than 10% to the title, but sometimes previous misadventures are not completely fixed, wasting a lot of space or using excessive space. I spend usually less computing time and time of observation. But then again, I know what to expect of my App YMMV.

  • Free space affect performance?

    I noticed on databases (work and test) I have the same indexes built on the tables, I'd like to, but the duration of the stored procedure for the race is very different: the test is very very slow to run. Because by querying the USER_FREE_SPACE table, I see that the test of free space is very low, is - this may be a possible explanation for my problem? For example on some queries of the stored procedure plan will contact told me that some indices are not used on db test even though their own statistics and index are the same db work.
    Thank you!

    Mark1970 wrote:
    I noticed on databases (work and test) I have the same indexes built on the tables, I'd like to, but the duration of the stored procedure for the race is very different: the test is very very slow to run. Because by querying the USER_FREE_SPACE table, I see that the test of free space is very low, is - this may be a possible explanation for my problem?

    Free space can make a difference. But generally not for selects them.

    For example on some queries of the stored procedure plan will contact told me that some indices are not used on db test even though their own statistics and index are the same db work.

    Now, IT will make a difference. If the index is not used, but should be used, then the query will be slow. My hypothesis is that the TABLE or COLUMN statistics are not up do date. The index statistics itself will not make much difference. but the selectivity of column statistics will decide whether or not the index is used by the CBO.

  • No free space after deleting files - trouble with optimized storage?

    Hi, I have macos Sierra and I deleted many files to my main drive and also to my external hard drive (both to the Mac OS Extended format) in preparation for the boot camp. I also emptied the Recycle Bin, although there is much less space on the two disks that it should be and the majority of the space is obviously indicated under "purgeable". I thought it would not be a problem, because I assumed that the space would be released, if I move all of the files there and if I need for the new Windows partition. However, this assumption was false. I can't simply use storage that I released. I can't move there all the files and I can't create the partition from free space. What can I do with it? It's pretty frustrating... Thanks for the help!

    You must use the Bootcamp Assistant to create the Bootcamp partition.

    Please provide details on the total space and free space on your internal drive. Post screenshots of what you see in system-> storage information. In addition, select the drive in Finder-I press control and post a screenshot of the window read the information.

  • Free space of hard drive in the MacBook air changes seemingly at random

    In recent days, my hard drive went a few GB of free space, zero KB. I check with clean my mac and see, first that my free space of RAM with the passage of time is reduced up to 10 mg and space free hard drive then start reduced up to zero KB and after 20 sec RAM & hard return to normal space (increased).

    What is the problem?

    You seem to be two distinct topics: storage and RAM. It is normal that all RAM to use. Please read the section of memory to use the activity monitor to your Mac - Apple Support.

    Never use a 'cleansing' of utilities for any purpose. Uninstall "CleanMyMac.

  • Disk space is full with 143 GB free space

    Hello

    I found a strange math calculations to Apple here. My disk space is filled with 143 GB free space.

    Here's the new math = 507 GB Apps + 119 movies GB 50 GB + 38 GB Audio 143 GB of space free Photos Plus 500 GB

    I use MacBook Pro (retina, 15 inch, mid-2014) with Mac OS X 10.11.4 running

    Thank you

    Kiran

    Hi Kirin, for more information on the other category in the view of storage , see this support article.

    There seems to be a bug in the about this Mac Look storage tab > system report > storage. It's probably different.

    Omni DiskSweeper can show you the exact size and location of all your files. It will be the inventory of your disc from files that occupy more space. It can also give you a fairer read disk space than the Finder or storage tab of the about this Mac. If you want you can even delete files from OmniDisk Sweeper. But beware, some items may be important for your system.

    For more information about the category others in storage to display, see this support article.

  • I have an Air of MacBk 2010 & I get the mssg "system is out of memory of the application", so it is impossible to open the Mail, Safari, etc.. But sometimes I can't. I deleted photos or videos for free space; no luck. What should do?

    I get the message "your system has wearied of the memory of the Application." So I can not open Mail, Safari, or any application.  However, I can periodically, the first thing in the morning, after I Shut Down & power up, not after a reboot.  I deleted a lot of photos and videos to free up space, but not luck.  IPhotos, I get the mssg. "cannot import pictures because not enough free space on the volume containing the iPhoto library."     The problem might be related to: 1 overheating, 2 PureVPN although I installed about 5 months ago and it was very good; 3. the MB Air was diverted (I'm worried that PureVPN may have something to do with it).  Or is this a sign that I need to get a new laptop?  Thanks for any help you can offer!

    release disk space and short-term memory are two different things. If your computer is running more disk space, it will have a negative effect on your system.

    Please post a report of etrecheck for further analysis.

    www.etrecheck.com

Maybe you are looking for

  • Problems with iPhoto crashing.

    When I try opening iPhoto on my Mac Pro, it remains open for a minute and then iPhoto crashes, the Mac Pro continues to work without problem. Someone at - it none of the similar questions or patches? I have included the news of the accident. Process:

  • error code 646 for KB2431831 and KB2288931 and KB2466076

    for the above error codes, I need help to install I did everything what I know and am still not able to download them. any help on this would be great

  • I need to know what service pack I used to have

    I have a computer that has used to have windows xp pro. but he told a bunch of virus, and to make a long story short, he now has ubuntu. So I have the product key, but I forgot what service pack there, and I want to use another computer that I need t

  • Virus that stops at your computer

    I think I have a virus, he got yesterday.  When I turned on my computer, everything seemed fine.  It closes without warning, tried to restart, shut down once again, restart, windows loaded, 10 seconds later stops again.  Screen says my computer was i

  • T430 with older port replicator

    Hello.  New to the forum.  About to get my first ThinkPad, a Monday T430 I come from an older office.  I'm interested in continuing to use the keyboard, mouse, speakers and monitor of this configuration (USB and VGA, nothing complicated) with a sort