How can free + used space tbs size, can someone explain

Hi Gurus
Can someone explain this, How can free + used space in a tablespace can be greater than size of a tablespace. What am I missing here . Thanks a lot .
I am on 10.2.0.1, HP-UX
14:38:52 SQL> select owner,sum(bytes), sum(BYTES) /1024/1024 "MB" from dba_segments where tablespace
name='USERDB1ADATA' group by owner;
OWNER SUM(BYTES) MB
USERDB1A 839680000 800.78125
1 row selected.
14:40:42 SQL> select bytes, BYTES /1024/1024 "MB" from dba_data_files where tablespace_name='USERDB1
A_DATA';
BYTES MB
3758096384 3584
1 row selected.
14:40:42 SQL> select sum(bytes) , sum(BYTES) /1024/1024 "MB"from dba_free_space where tablespace_nam
e='USERDB1A_DATA';
SUM(BYTES) MB
3067412480 2925.3125
1 row selected.
14:40:43 SQL> select 839680000 + 3067412480 "used + free space" from dual;
used + free space
3907092480
1 row selected.
New DBA

Good point, Howard, about the recycle bin. So I cleaned up, recreated the table, filled it, dropped it but did not purge it, and ...
SQL> create table test.x tablespace test as select * from dba_objects where 1=2;
Table created.
SQL> insert into test.x select * from dba_objects;
12617 rows created.
SQL> commit;
Commit complete.
SQL> drop table test.x;
Table dropped.
SQL> with
  2  dbf_size as (select sum(bytes) size_
  3                 from dba_data_files where tablespace_name='TEST'),
  4  dbf_free as (select sum(bytes) free_
  5                 from dba_free_space where tablespace_name='TEST'),
  6  dbf_used as (select sum(bytes) used_
  7                 from dba_segments where tablespace_name='TEST')
  8  select size_, free_, used_, (size_ - free_ - used_) left_
  9         from dbf_size, dbf_free, dbf_used
10  /
     SIZE_      FREE_      USED_      LEFT_
   5242880    5177344    2162688   -2097152
SQL>and then I played around with my SQL and came up with
WITH
dbf_size AS (SELECT SUM(bytes) size_
               FROM dba_data_files
              WHERE tablespace_name='TEST'),
dbf_free AS (SELECT SUM(bytes) free_
               FROM dba_free_space
              WHERE tablespace_name='TEST'),
dbf_used AS (SELECT SUM(bytes) used_
               FROM dba_segments
              WHERE tablespace_name='TEST'),
dbf_fbin AS (SELECT SUM(bytes) fbin_
               FROM dba_segments
              INNER JOIN
                    dba_recyclebin
                 ON (tablespace_name=ts_name
                     AND segment_name=object_name)
              WHERE tablespace_name='TEST')
SELECT      size_, -- tablespace size
     free_, -- free space reported
     used_, -- segment space used
     fbin_, -- segment space in recycle bin
     (size_ - free_ - used_ + fbin_) left_ -- 64K overhead per data file
  FROM      dbf_size, dbf_free, dbf_used, dbf_fbin
/which does
SQL> WITH
  2  dbf_size AS (SELECT SUM(bytes) size_
  3                 FROM dba_data_files
  4                WHERE tablespace_name='TEST'),
  5  dbf_free AS (SELECT SUM(bytes) free_
  6                 FROM dba_free_space
  7                WHERE tablespace_name='TEST'),
  8  dbf_used AS (SELECT SUM(bytes) used_
  9                 FROM dba_segments
10                WHERE tablespace_name='TEST'),
11  dbf_fbin AS (SELECT SUM(bytes) fbin_
12                 FROM dba_segments
13                INNER JOIN
14                      dba_recyclebin
15                   ON (tablespace_name=ts_name
16                       AND segment_name=object_name)
17                WHERE tablespace_name='TEST')
18  SELECT     size_,
19     free_,
20     used_,
21     fbin_,
22     (size_ - free_ - used_ + fbin_) left_
23    FROM     dbf_size, dbf_free, dbf_used, dbf_fbin
24  /
     SIZE_      FREE_      USED_      FBIN_      LEFT_
   5242880    5177344    2162688    2162688      65536
SQL> alter tablespace test add datafile 'C:\ORACLE\ORADATA\XE\TEST2.DBF' size 5m;
Tablespace altered.
SQL> WITH
  2  dbf_size AS (SELECT SUM(bytes) size_
  3                 FROM dba_data_files
  4                WHERE tablespace_name='TEST'),
  5  dbf_free AS (SELECT SUM(bytes) free_
  6                 FROM dba_free_space
  7                WHERE tablespace_name='TEST'),
  8  dbf_used AS (SELECT SUM(bytes) used_
  9                 FROM dba_segments
10                WHERE tablespace_name='TEST'),
11  dbf_fbin AS (SELECT SUM(bytes) fbin_
12                 FROM dba_segments
13                INNER JOIN
14                      dba_recyclebin
15                   ON (tablespace_name=ts_name
16                       AND segment_name=object_name)
17                WHERE tablespace_name='TEST')
18  SELECT     size_, -- tablespace size
19     free_, -- free space reported
20     used_, -- segment space used
21     fbin_, -- segment space used in recycle bin
22     (size_ - free_ - used_ + fbin_) left_
23    FROM     dbf_size, dbf_free, dbf_used, dbf_fbin
24  /
     SIZE_      FREE_      USED_      FBIN_      LEFT_
  10485760   10354688    2162688    2162688     131072Message was edited by:
Hans Forbrich
Cleaned up the script and tested with second data file added to verify LMT overhead.

Similar Messages

  • How do I save info from my iPhone to iCloud so I can free up space so I can update to IOS 8

    I cannot update to IOS8 as I do not have enough memory on my iPhone.  I thought everything goes to iCloud but I am unclear about this and I do not want to delete APPS or pictures from my iPhone.  I do not want to lose anything yet.  What must I do to recovery more memory so I can update.  This is also happening with my iPad mini. 
    Thanks!

    Connect to iTunes to do the update - you won't need nearly as much free space in that case.

  • Ikeep getting a message that my start up disc is full and i don't know how to free up space..  also when i o to download some files i am told there is no space left to download     i bought this macbook pro used an receiver no discs..  what can i do??   t

    ikeep getting a message that my start up disc is full and i don't know how to free up space..  also when i o to download some files i am told there is no space left to download     i bought this macbook pro used an receiver no discs..  what can i do??  

    You need to purchase an external drive and start moving some files to it or you can try trashing some files that you no longer need.
    Download OmniDiskSweeper and see where your larger files are... you can move them to an external drive or trash them: it's up to you.
    I would also begin, since it's obviously don't have backups, a backup scheme or two. See Most commonly used backup methods.
    Good luck,
    Clinton

  • How do I use time capsule as a storage device so I can free up space on my hard drive

    How do I use time capsule as a storage device so I can free up space on my hard drive?

    Click here and follow the instructions.
    (62135)

  • How do i access my icloud account? so i can free up space

    How can i get into my icloud account,to free up space so i can download IOS7?

    If you are having issues using OTA (over the air) to update...
    Do the Update using iTunes on your Computer.
    See the Using iTunes Section Here...
    How to update your iPhone, iPad, or iPod touch
    Make sure you have the Current Version of iTunes Installed on your computer
    iTunes free download from www.itunes.com/download
    mykids38 wrote:
    How can i get into my icloud account,to free up space so i can download IOS7?
    If you need to Delete Content from your iDevice...
    Goto... Settings > General > Usage > Storage = Then Delete Content...
    See Here  >   http://osxdaily.com/2013/07/24/remove-data-storage-iphone-ipad/

  • I recently upgraded to an iPhone 5 and I have this synced with my previous iCloud account. My problem is my old iPhone 4 is taking up 2.5 GB of space in the cloud. Is there a way to delete this iphone from the icloud so I can free up space?

    I recently upgraded to an iPhone 5 and I have this synced with my previous iCloud account. My problem is my old iPhone 4 is taking up 2.5 GB of space in the cloud. Is there a way to delete this iphone from the icloud so I can free up space as it is not needed anymore?

    Welcome to the Apple Community.
    Assuming you have finished with your old backup.....
    You can see what your iCloud storage is used for and delete any unwanted content at settings > iCloud > backup & storage > manage......

  • Does this also serve as an external hard-drive so I can free up space on my macs by transferring songs/pictures?

    Does this also serve as an external hard-drive so I can free up space on my macs by transferring songs/pictures?

    https://discussions.apple.com/message/15470135#15470135

  • How to free up space on hardrive please help!!

    hey everyone im new to mac and i wanted to know if there is anyway i could clean up my haddrive or delete un-needed files. such as cache and what not so please help me i just wanna freee up some space
    Thanks!

    Hello.
    Cache files, in general, are better left alone unless there is a problem with the running of your iBook. Sometimes a troubleshooting measure might involve a system cache cleaning but best left alone, especially by a self confessed newbie
    Caches which can be safely deleted are your browser caches. but these rarely take up much space, their default cache sizes are usually in the region of 10-50 MB. Clearing your browsers' History can free up space too. Safari's cache can be emptied by selecting 'Safari' in your menu bar, then selecting 'Empty Cache', & History by selecting 'Clear History' from the History menu. These just get filled up again as you browse, though.
    There are, however, other, more permanent, things that you can do to free up disk space.
    For example, on my iBook, I have removed GarageBand from Applications and its Loops from HD/Library/Application Support. As my iBook only has a combo drive and I'm not into video editing anyway I have trashed iDVD & iMovie. (Not DVD player). I have also trashed preloaded games and World Book, and its associated files.
    Language support files can be removed using Monolingual. Do not remove any English language files, though.
    OS X comes with a vast library of printer drivers, the large proportion of which will never be used by the average user.
    Printer drivers are in the HD/Library/Printers folder. You can safely delete any named drivers that you don't have a printer for. For example, if you have a Canon, you can remove Epson, Lexmark, Hewlett Packard & Brother drivers. Epson alone takes up in excess of 1gb. You can even remove specific drivers from within the manufacturer's folder. For example, if you have an Epson C86 you can safely trash any other specific drivers in the Epson folder like C46, C66 etc. If, at a later date, you buy a printer whose driver you removed they can be added from your install disk, the disk that comes with the printer or downloaded.
    A word of warning: More cautious heads than mine advise against messing in the HD/Library, but if you stick to the examples above, i.e. GarageBand loops, World Book and printer drivers you will be OK.
    Check, too, in your music folder. It is possible that you have, say, 'xyz song' in the first level of your Music folder and the same song in Music/iTunes/iTunes Library. If you are sure that you do have 'xyz song' in iTunes, it is safe to delete from 'Music'. The same principle can apply to your Pictures folder and iPhoto Library, but staying with iTunes for a moment, with iTunes open select Edit in the menu bar, then 'Show duplicate songs'. You can trash duplicates if you are sure that they are true duplicates, i.e. exact name, artist and file size.
    Some excellent advice has been posted by ~JB~, with corresponding words of caution.
    Dr Smoke has some advice here too.
    Last but by no means least, when you have finished dumping your unwanted stuff in the trash, don't forget to empty it. You haven't regained the space until you do
    Enjoy your new Mac, have fun and if in doubt about deleting anything, ask. There are no stupid questions, everyone here was a newbie once…
    Adrian

  • I have in stalled Chicalogic and now I can't use anymore Mozilla what can I do to solve this problem?

    I have in stalled Chicalogic and now I can't use anymore Mozilla what can I do to solve this problem?

    According to several websites I've read, Chicalogic looks sketchy at best, illegitimate and spyware at best.
    [http://forums.malwarebytes.org/index.php?showtopic=78653&st=0&p=403467&#entry403467 http://forums.malwarebytes.org/index.php?showtopic=78653&st=0&p=403467&#entry403467]
    Registry cleaners have very little good use, and usually end up damaging more computers than they fix. I'd recommend uninstalling the software.
    That being said, Try to start Firefox in [[Safe mode|Safe mode]]. This mode disables all extensions, user customizations, hardware acceleration, etc. temporarily for diagnostic and troubleshooting. If Firefox works find in Safe Mode, then this is likely an add-on issue. Restart Firefox in normal mode, then type "About:addons" (without the quotes) in the address bar. Disable your extensions one by one, restarting Firefox between each one, until you find the trouble maker. Once you do, you can disable that add-on and report the issue to that add-on's developer.
    A few other basic trouble shooting things you can try is this:
    Run all Windows Updates, install all needed service packs, etc.
    Update your graphics driver (Firefox uses your graphics card for some rendering, and an out of date graphics card driver can cause problems. [https://support.mozilla.org/en-US/kb/how-do-i-upgrade-my-graphics-drivers https://support.mozilla.org/en-US/kb/how-do-i-upgrade-my-graphics-drivers].
    Update all your plugins (Flash, Java, etc.): [http://www.mozilla.org/plugincheck/ http://www.mozilla.org/plugincheck/].
    Download and Install MalwareBytes Anti-Malware, run a full Scan. [http://www.malwarebytes.org/ http://www.malwarebytes.org/]. This helps check that there are no viruses on your computer causing issues. you can uninstall this program after you clean off any infections.

  • Since downloading Maverick I have a long hang time, computer crashes, can't use word and I can't access finder, why?

    Since downloading Maverick I have a long hang time, computer crashes, can't use word and I can't access finder, why? Also, iTunes is horrible. While I'm listening to my music iTunes will just stop playing the song for at least 5 minutes and I can't force quit why does it do that? This is the first time I have ever felt like my iMac is just as bad as a PC and I wonder if Steve Jobs would have let the program be relase to the public with all the problems involved. No wonder Maverick was free. IT ***** BIG TIME!

    Hello, vanvu. 
    Thank you for visiting Apple Support Communities. 
    Since you are experiencing this issue with both a wired and wireless connection only on your home network and not at other locations, this issue would related to your router.  I would first recommend power cycling the router and testing the connection again.  If the issue persists, try updating your routers settings per the article below. 
    iOS and OS X: Recommended settings for Wi-Fi routers and access points
    http://support.apple.com/kb/ht4199
    Cheers,
    Jason H. 

  • Can you use iCloud if you can't upgrade to Mountain Lion?

    Can you use iCloud if you can't upgrade to Mountain Lion? I have a MacBook running Snow Leopard but is not compatible with Mountain Lion.

    The requirements for Lion are
    Mac computer with an Intel Core 2 Duo, Core i3, Core i5, Core i7, or Xeon processor
    2GB of memory
    OS X v10.6.6 or later (v10.6.8 recommended)
    7GB of available space
    If your Mac complies with that you can buy it by ringing the Online Store at the number given at bottom left of this page.
    If it doesn' and you are stuck with 10.6.8 this page explains the situation with Snow Leopard and an existing iCloud account (you can't open one on Snow Leopard):
    iCloud and Snow Leopard

  • I have ipod shuffle, i have a password i can't remember it so i can't use my ipod what can i do ?

    I have ipod shuffle, i have a password i can't remember it so i can't use my ipod what can i do ?

    What is the password to?  Your iTunes account?  I wasn't aware of any setting on the Shuffle regarding a password or passcode...
    B-rock

  • HT201412 I try to update IOS 6 to my ipad 2 and after half of the procedure stopped ... then I try to reconnected to the itunes and say "iTunes has detected an iPad in recovery mode. You must restore this iPad before it can be used with iTunes". Can every

    I try to update IOS 6 to my ipad 2/ wf/3g  and after about half of the procedure stopped ... then I try to reconnected to the itunes and say "iTunes has detected an iPad in recovery mode. You must restore this iPad before it can be used with iTunes". Can everyone help please. In the screen of iPad appears the itunes Logo and the cable of connectios. Can't do nothing!!!

    Click restore in itunes.

  • Can i use my ipnone to facetime someone with an ipad

    can i use my iphone to facetime someone with an ipad only

    Yep. iPad 2 or later, & they need the FaceTime app activated. You use their email address designated for FaceTime.

  • Using OS 10.7.5. Can I use App store? Can't find an app on my air book

    Using OS 10.7.5. Can I use App store? Can't find an app on my air book.
    Want to download Pages, but can't seem to find if this is possible. iWork 9 from USB download from 10.6 doesn't seem to work - willing to buy new version online, but can't find the compatibility.
    Help!!
    Thanks
    rho12

    Only requires 10.7.4 or later.

Maybe you are looking for

  • Bitrate Balancing for DVD

    Hey guys, I'm trying to fit multiple sermons (about 30 minutes each) on a DVD. I've seen many churches do this, and I feel like the quality is leaps and bounds a head of what I'm producing. I'm currently capturing using a Blackmagic DeckLink (SD-SDI)

  • Ajax support in jDeveloper 10.1.3.1 : Please reply

    Hi Everyone, I am supposed to use ADF faces and jDev for my upcoming project as we believe that ADF faces has lot of built in tags to support ajax behavior. But I found that most of the AJAX support is component based (for eg. change the values in on

  • Global Parameters in SEM

    I see where the User's optional parameters, like group, unit, version, fiscperiod, and fiscyear can be accessed in Table UCMP020. Where can the hard configured values, ie currency, cons chart of acct, dimension, and fiscal year variant be seen? Are t

  • UIX has problem with the limit on the length of url in Internet Explorer

    I have a UIX page with 4 tabs. The number of textbox and dropdown list is large in each tab. When I do a form submit, all the properties' name (textbox and dropdown list) and it's value are submitted automatically by UIX as part of the url string. Th

  • Organizer will not open after downloading Adobe Photoshop Elements and Premier Elements

    I first downloaded Premier and Photoshop from Dell Digital Download with a new computer.  It appeared to be installed, and the opening screen appeared, but when I click on the Organizer side of either software, it will do nothing.  Doesn't open.  No