To know free space in database files

Hi all,
how to know free space and used space in individual database files by sql quer or command not from oracle enterprise manager.please can any body tell me query.quick response will higly appreciated.thanks a lot in advance.

Hi;
column file_name format a42
column tablespace_name format a15
column status format a3 trunc
column t format 999,999.000 heading "Total MB"
column a format a4 heading "Aext"
column p format 990.00 heading "% Free"
SELECT df.file_name,
df.tablespace_name,
df. status,
(df.bytes/1024000) t,
(fs.s/df.bytes*100) p,
decode (ae.y,1,'YES','NO') a
FROM dba_data_files df,
(SELECT file_id,SUM(bytes) s
FROM dba_free_space
GROUP BY file_id) fs,
(SELECT file#, 1 y
FROM sys.filext$
GROUP BY file#) ae
WHERE df.file_id = fs.file_id
AND ae.file#(+) = df.file_id
ORDER BY df.tablespace_name, df.file_id;
column file_name clear
column tablespace_name clear
column status clear
column t clear
column a clear
column p clear
ttitle off
Sample Output:
FILE_NAME TABLESPACE_NAME STA Total MB % Free Aext
/usr/ORACLE/u02/data/example01.dbf EXAMPLE AVA 153.600 49.13 YES
Edited by: emre baransel on Sep 30, 2009 10:11 AM

Similar Messages

  • Increase free space in data files

    Hello All,
    We are running netweaver 04s on sql server. In our EPR landscape, we are having message no free space in file in db02 transaction. It reports error when we execute DB02 and does not allows or shows us the DBCC check options. Strangely, this message appears even if the auto grow option in data files is on.
    Could you please let me know what would be the impact if I increase the datafiles initial size?
    Thanks,
    Gaurav

    Hello Jeff,
    Thanks for the response!
    The odd thing out is that, we do have autogrowth on, and I am sure the data file size is getting increased on all the datafiles, otherwise the database would have struck up but the information that we get on DB02 transaction is wrong or the correct information is not bieng reflected.
    Also, I am not able to run the DBCC checks via dbacockpit!
    Please share your thoughts!
    Thanks,
    Gaurav

  • Disk Utility - Erase Free Space - Creating Temporary File Freezes

    BDAqua:  I tried responding to your reply to my original posting but I get an error message that I was not authorized to reply.  I logged out.  I can't find the original posting in my Activity so I approached from the link in my e-mail saying you had replied.  Now it says the area is restricted.  What's up with that?
    Rod
    Here's the original post:
    I used "Erase Free Space" with Disk Utility after trashing several files I no longer wanted on the hard drive or recovered.  I used  "Zero Out Deleted Files" option.  It took over 12 hours before an error message appeared "Your start up disk is almost full.  You need to make more space available on your start up disk by deleting files."   I thought that was what I was doing.  Disk Utility continued but got stuck on "Creating Temporary File."  I force quit Disk Utility after several more hours.  I had to manually shut down the computer because the restart command wouldn't work.  It rebooted and appears to be OK.   Evidently, this temporary file consumes significant amounts of disk space. This is an older iMac with 10.4.11 (18 GHz PowerPC G5) - I know, pretty old but I still have OS 9 on it and several files I need to extract before I trash it.
    1.  Should I do nothing?  The iMac seems to be working fine.
    2.  How do I know if this Temporary File exists and consuming space?  Spotlight doesn't find it.  Where is it?
    3.  Is my start up disk in fact almost full?  How would I know that?

    Here's what I tried to say in my response that I wasn't authorize to make:
    I can't seem to reply to your response BD . . . says I'm not authorize . . . so I'll try to reply to my original post.
    Thanks BD for your reply.  Here's the info on the drive:  1.3 TB capacity with 1,017 GB available.  Eventually I will recycle the computer at Best Buy who guarantees the hard drive will be erased.  I just want to get all my files off first.  I'll just do another Erase Free Space and see, as you suggest, if there are any files to be zeroed out.  Maybe there aren't any.  I've extracted most of what I want but am debating how to move the entire iPhoto library to an external drive so I can access it from my Mavericks machine.  Can I just drag and drop the iPhoto Library, or do I need to export it somehow?

  • Disk Utility - Erase Free Space - Creating Temporary File Freeze

    I used "Erase Free Space" with Disk Utility after trashing several files I no longer wanted on the hard drive or recovered.  I used  "Zero Out Deleted Files" option.  It took over 12 hours before an error message appeared "Your start up disk is almost full.  You need to make more space available on your start up disk by deleting files."   I thought that was what I was doing.  Disk Utility continued but got stuck on "Creating Temporary File."  I force quit Disk Utility after several more hours.  I had to manually shut down the computer because the restart command wouldn't work.  It rebooted and appears to be OK.   Evidently, this temporary file consumes significant amounts of disk space. This is an older iMac with 10.4.11 (18 GHz PowerPC G5) - I know, pretty old but I still have OS 9 on it and several files I need to extract before I trash it.
    1.  Should I do nothing?  The iMac seems to be working fine.
    2.  How do I know if this Temporary File exists and consuming space?  Spotlight doesn't find it.  Where is it?
    3.  Is my start up disk in fact almost full?  How would I know that?
    Thanks!

    Then I would not do any secure erasing. It's exceptionally time consuming and unnecessary. Before you take it in for recycling boot it from your OS X installer DVD. Do this:
    Drive Partition and Format
    1. Boot from your OS X Installer Disc. After the installer loads select your language and click on the Continue button.  When the menu bar appears select Disk Utility from the Utilities menu.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Click on the Options button, set the partition scheme to GUID then click on the OK button. Set the format type to Mac OS Extended (Journaled.) Click on the Apply button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Security button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.
    A one-pass Zero Data option is all that is required to prevent access to your erased files.

  • Claiming of free space in data files

    I have a problem for claiming the free space in few data files .There is the data in the files at fragmented places i.e. the free space is below the high water mark.DB is production db and Export/Import is not possible due to time consideration. How to get back that space. Please reply soon.....

    Dolly, the term HWM in Oracle is normally only used to describe the last used block in a table allocation. There is no way to reclaim unused blocks below the HWM in a table without reorganizing the table though Oracle will resuse the space for new rows if the pct_used threshold allows (or ASSM) allows it do so.
    You can sometimes release free (unused) blocks above the HWM of a table using the alter table shrink option.
    You can perform a similar function on extendable datafiles between the last allocated object extent and the end of file.
    As Justin said, you need to explain your situation better.
    -- Mark D Powell --

  • D3lphin / konqueror - too much free space between single files

    Hi there,
    I'm using Kdemod 3.5.9. The problem I experience is, that both d3lphin and konqueror create "gaps" between files. Its hard to explain, so I post a picture.
    The picture shows my wallpaper collection - but the problem is not bound to images. It does also occur with dirs, videos, sound-files...
    By changing the font and grid-size I was able to change the general free space between files, but the "extra space" between some files remains.
    Any Idea?
    Greetings, yodo
    Last edited by yodo (2008-05-15 19:06:25)

    @funkyou At first thanks for your work because after recognizing that you have things as at example kdmtheme included i give kdemod a try and it works nice. Instead of your theme looks very cool i stay as before with qtcurve ... i hope this is not a problem for you. [If you want you can do a +1kdemod/-1kde in your survey ]
    funkyou wrote:It works fine for me, but i belive that this has something to do with DPI settings in Xorg...
    I have exact the same settings as you with the only exception that Sub-Pixel-Hinting is on but i have the same effect as yodo. I fear that if dpi (or/and fonts) could be a problem in this case than the content of "/etc/fonts/conf.avail" could be important too. But i don't realy think that this is the problem because the icons on the desktop don't have this problem.
    My workaround is stepping to the Tree View (i hope this is the correct translation of "Mehrspaltige Ansicht") and i forgot it because i like this more and more.
    @yodo Very nice wallpapers and thanks for animating me to search InterfaceLIFT.

  • Removing free space in DMG file

    I have a 7GB .dmg file that I'm trying to burn to a DL DVD. When mounted (and in Disk Utility), the file shows as having 1.2GB of free space. If I try to burn it in Toast 10 or Disk Utility, I get an error saying that my blank DL DVD can't fit the 8.2GB file, even though it only contains 7GB of actual files. How can I "delete" the free space in this .dmg file so that it will fit on a dual-layer DVD?

    Peter Petracca wrote:
    I have a 7GB .dmg file that I'm trying to burn to a DL DVD. When mounted (and in Disk Utility), the file shows as having 1.2GB of free space. If I try to burn it in Toast 10 or Disk Utility, I get an error saying that my blank DL DVD can't fit the 8.2GB file, even though it only contains 7GB of actual files. How can I "delete" the free space in this .dmg file so that it will fit on a dual-layer DVD?
    What's interesting is that a blank DL DVD has a capacity of 8.5 GB.

  • After 10.9.4 upgrade, can't recover free space after deleting files

    After upgrading to 10.9.4, I decided to backup about 250 Go of films on an external drive, and then I deleted the originals ones on my MacBook Pro. The files disappear, but the free space stayed the same: more than 250 Go of free space couldn't be recovered !!
    I generally use the program "Cocktail" to maintain the mac; but in that case, no solution.
    I decided to look for the films on the disk, on temp folders and with Spotlight. And I found them ! In the folder: Volumes/HardiskName/.cleverfiles/hlink.ref/
    I deleted them directly in the trash and ... I recovered my 250 Go of free space.

    That folder is created by the third-party application "Disk Drill." If you don't like what it does, remove it according to the developer's instructions. "Cocktail" is worthless and should be removed in any case.

  • Why can't the Utility function's 'Erase free space' create temporary file

    I've been using erase free space without problem for some time.. Then today when I tried to use it, got an error message to say that erase free space won't work because it can't create a temporary file. I have a 320 GB MBP with 88 GB of free space.
    I'd love you forever if you can help me get round this issue

    Here's what I tried to say in my response that I wasn't authorize to make:
    I can't seem to reply to your response BD . . . says I'm not authorize . . . so I'll try to reply to my original post.
    Thanks BD for your reply.  Here's the info on the drive:  1.3 TB capacity with 1,017 GB available.  Eventually I will recycle the computer at Best Buy who guarantees the hard drive will be erased.  I just want to get all my files off first.  I'll just do another Erase Free Space and see, as you suggest, if there are any files to be zeroed out.  Maybe there aren't any.  I've extracted most of what I want but am debating how to move the entire iPhoto library to an external drive so I can access it from my Mavericks machine.  Can I just drag and drop the iPhoto Library, or do I need to export it somehow?

  • How to reduce unused/available space in database file

    our database is partitioned on monthly basis and i am seeing large amount (nearly 50-70%) of space available in the data files. These files are not expected to grow(in large amount) in future. So i want to remove the unused space. What is the reason for
    that large amount of unused space and how to eliminate it? I tried shrinking the file which decresed the unused space to decent size but that resulted in fragmentation. To avoid fragmentation I rebuilded the indexes which again brought the unused space to
    the original size.
    Is there any way to find which table (which field ) is causing this.
    thanks in advance,

    hi Kalen,
      I am using sql server 2008 . I ran the following query [borrowed from other online sources]to get used,unused space for the files.
    --================query======================
    select
    [FileSizeMB]
    =
    convert(numeric(10,2),sum(round(a.size/128.,2))),
    [UsedSpaceMB]
    =
    convert(numeric(10,2),sum(round(fileproperty(
    a.name,'SpaceUsed')/128.,2)))
    [UnusedSpaceMB]
    =
    convert(numeric(10,2),sum(round((a.size-fileproperty(
    a.name,'SpaceUsed'))/128.,2)))
    [Type]
    =
    case
    when a.groupid
    is
    null
    then
    when a.groupid
    = 0
    then
    'Log'
    else
    'Data'
    end,
    [DBFileName]
    =
    isnull(a.name,'***
    Total for all files ***')
    from
    sysfiles a
    group
    by
    groupid,a.name
    with
    rollup having
    a.groupid
    is
    null
    or
    a.name
    is
    not
    null
    order
    by
    case
    when a.groupid
    is
    null
    then 99
    when a.groupid
    = 0
    then 0
    else 1
    end,
    a
    .groupid,
    case
    when a.name
    is
    null
    then 99
    else 0
    end,
    a
    .name
    --===========end of the query======================
    When I ran the query sugested by you, i observed that there is no much difference[less than 10] between row_reserved and row_used value and all the reamining columns are 0.
    Any suggestion is appreciated
    thanks,
    mp

  • Need program to safely scrub free space and deleted files and parts of file

    In PC world they have CCleaner and R-Wipe & Clean and a half-dozen other well-regarded programs that clean up the junk off your drive, sanitizing it while not touching the data still in use. Are there such programs with good reputations in the Mac world? What be they?

    Thanks, I have used that. I'm not so sure it is as thorough as the programs I mentioned for the PC, which take out fragments of sectors, various histories, cookies, bits of remaindered programs, etc. And they are much quicker, seems to me, than the Erase Free Space in Disk Utilities to boot (even the straight write zeros is slow in DU).
    So I was looking for some free or commercial products that offered a range of methods and good speed, as well as a broad range of "intelligent" pruning.

  • Wondering how to know free space before burning CD

    So far I've found it tedious trying to determine how much space is free when creating a playlist to burn to CD (regardless of the type of CD). While I understand that iTunes needs to examine the blank CD to determine the amount of storage, I wish it would indicate what % is used and the amount of KB would be free.

    Yes, I guess I should have said I was burning audio CD's so the info at the bottom of iTunes doesn't help me as much as I'd like. It would be better it iTunes displayed minutes (or at least make this configurable). Also, this display does not change if one unchecks one or more of the songs even though this does change what songs are burned to the CD. This really needs more refinement.
    While I'm on the checkboxes, is there a way to quickly find unchecked songs and toggle the checkbox?

  • Compressing/Releasing Free space in database.

    Hi,
    I need to copy the database version 8.1.7.4 on solaris 9 to other box running solaris 10 for upgrading to 10gR2. The size of datafiles (all datafiles has data) is about 600 GB where as the database size is about 270 GB. The traget box has storage capacity is only 450 GB. What all the options and best practices available to implement this plan. Down time is also an issue. Both servers are also not at same geo location.
    Please provide me your expert opinion.
    Thanks
    Naveed

    Where does or really how was the 270GB size calculated? The new server having on 450GB may be an issue depending on how this size was calculated, the amount of undo, temp, and sysaux (overhead) necessary to support the application and a few other factors such as how is the database backup being handled and how static is the application data.
    One thing that can help reduce the amount of data to be exported and re-imported is to run any needed purge processes prior to the unload.
    Table and index compression might be options however each feature has its downside/limitations.
    If ASSM is not in use now and you are not planning on using it in the new database then check the pctused value on your tables and if set near the default of only 40% alter the value prior to the export to use a larger value. I recommend you use at least 60% and I like to use 95 - pctfree as my pctused default. ASSM will handle this for you but the feature will probably not be as aggressive in reusing table blocks as you could be via manual managment. However, remember you can only set ASSM on at tablespace creation.
    HTH -- Mark D Powell --

  • Disk not showing free space after deleting files?

    Hi there. I'm running Mountain Lion 10.8.2. I deleted about 20GB worth of data from my hard drive but when I go into activity monitor and click on disk usage it doesn't show an extra 20GB of space. I did this 2 days ago. Is there something wrong with my hard drive? There is nothing in the trash and I have restarted my laptop twice now. Also, I use Daisy Disk to show my usage and it says the same thing as activity monitor. Thanks in advance!

    “You may notice a difference in available space statistics between Disk Utility, Finder, and Get Info inspectors. This is expected and can be safely ignored. The Finder displays the available space on the disk without accounting for the local snapshots, because local snapshots will surrender their disk space if needed."
    About Time Machine's "local snapshots" on portable Macs

  • Deleting Files in MacBookPro - Yosemite sending "FREE SPACE" to "Other"

    I have the weirdest problem.
    I'm running a Macbook Pro Late 2013 with OS X Yosemite 10.10.1.
    The MAC came with a 500GB SSD Drive.
    I have about 60GB of free space on my Mac. I need to restore a large file that is about 60GB.
    So I thought to myself, "I'll just delete files I don't need".
    I went ahead and deleted a parallels VM that was about 60GB in size. But I was shocked when I checked "About this Mac": no free space had been added!
    I went ahead and did all the usual stuff. Empty trash, restart the MAC, repair permissions using "Disk Utility", restart the mac again, - but no matter what I did, I could not get the 60GB of free space from the file I had just deleted.
    I downloaded OmniDisk Sweeper and Disk Doctor, but none of these applications where able to either get my 60GB back, or at least point me to where the 60GB has gone.
    So I decided to disable my time machine. This usually gets rid of the backup cache. "About this Mac" showed that I would get about 50GB free space by doing this. After doing this, I was shocked to see that my free space had only changed negligibly - from 60GB to 64GB. Deleting 50GB of backups only added 4GB to my free space.
    However during all of this, I noticed my "Other" data in "About this Mac" had grown considerably from about 90GB to about 206GB. It seems to me that all that space I have free'd up has somehow gone into the "Other" category instead of going to the "Free Space" category.
    Please note my trash can is completely empty, and I have repaired permissions using Disk Utility at least twice with no effect.
    I need to get my free space back so I can restore my virtual machine and get back to work.
    Please help!!!

    How much space does it say is available when you click on the HDD icon on your desktop COMMAND + I?
    Hoe does this compare with OmniDiskSweeper?
    You might have to reindex Spotlight  if you are seeing inconsistent amounts.
    Ciao.

Maybe you are looking for

  • ISE 1.2 Standalone Mode

    Hi Experts, Good day! I just want to clarify if I can provide posture assessment in ISE 1.2 even if it is in standalone mode because some said I can but based on my understandings of ISE since 1.1.4, I need to convert it first to an IPN mode for it t

  • Arabic language disappeared Nokia C7-00

    after i updated my phone Nokia C7-00 to belle the arabic language disappeared i cant write it any more and i cant find it on the device

  • Adobe Form - Object property for FormCalc/Javascript

    Hi All I'm learning to use Adobe Form - FormCalc/Javascript - In some of the examples that I have seen fofar the codes (FormCalc/Javascript) used a qualified name of an object property for setting value i.e. In FormCalc: DateTimeField1.rawValue = num

  • ITunes won't launch after upgrade - says files are missing

    I had trouble upgrading to version 6 but disabled my anti virus software (McAfee) and the upgrade seemed to run OK. After restarting my computer iTunes won't run as it says files are missing and I need to install them. It was all working fine before.

  • Printer prints wirelessly fine but it won't copy

    Just bought hp photosmart plus Series B210. It prints wirelessly fine but it won't copy. Press black copy or color copy on printer screen "and says Starting Copy..."  but gets stuck there and does not copy. Have to pull out plug and plug in to reset