How to reclaim the space after delete

Hi All,
Today we deleted large number of rows from one table, but we didn't get free space after that. So for testing purpose, I have created one test tablespace with 5mb size .Created a table and inserted n number of rows in that table and made the tablespace full.I checked in dba_segments(5mb) and dba_free_space tables.It shows perfectly.After that I deleted all the records and try to create a simple table,but it returns (ORA-01658: unable to create INITIAL extent for segment).I read some time back in tom's forum that delete willn't reclaim the space ,instead it will go to freelist of table..Is there any way to reclaim the space?(after delete)
and also I used to see the tablesize by using dba_segments table.but now it shows 5mb of size for the empty table.Is there any query to get the exact table size?Please help me to understand the concept.
Thanks,Jvel

880401 wrote:
Hi All,
Today we deleted large number of rows from one table, but we didn't get free space after that. So for testing purpose, I have created one test tablespace with 5mb size .Created a table and inserted n number of rows in that table and made the tablespace full.I checked in dba_segments(5mb) and dba_free_space tables.It shows perfectly.After that I deleted all the records and try to create a simple table,but it returns (ORA-01658: unable to create INITIAL extent for segment).I read some time back in tom's forum that delete willn't reclaim the space ,instead it will go to freelist of table..Is there any way to reclaim the space?(after delete)
and also I used to see the tablesize by using dba_segments table.but now it shows 5mb of size for the empty table.Is there any query to get the exact table size?Please help me to understand the concept.
Thanks,JvelDELETE simply deletes the specified rows. The blocks/extetents that were allocated to hold those rows remain allocated. The theory is that if the table once needed sufficient blocks/extents to hold 'x' rows, it may need so again at some time in the future. Allocating and de-allocating extents is a pretty expensive operation, so oracle is not going to waste time and resources constantly doing that just because you delete rows, which is a perfectly normal DML operation. Unless you don't expect that table to grow again, I'd not waste my time trying to reclaim the space.

Similar Messages

  • How to reclaim the space used for LOBSEGMENT, which is growing fast

    Hi,
    DB version 10.2.0.2
    OS RHEL v4
    Envi RAC on ASM
    On the production, in one of the schemas (PR_AA) on the tablespace PR_AA, i have
    1) a table (Table1) which has 3 columns of CLOB datatype. Current size of this table is 65 GB.
    2) Two LOBSEGMENTS 85GB + 25GB =110GB
    3) about 10 Indexes of Table1 are of 15 to 17 GB
    Table1 is being purged on a daily basis, but still the tablespace is growing like anything ( now the over all size of the tablespace is itself 190GB).
    What i need is,
    Q1 . Ways to reclaim the purged space from the table1.
    Q2. How to shrink the table/ tablespace? Is it possible to do it online without impacting the users/business?
    Q3. How to shrink/maintain LOBSEGMENTS space, that is , how to control the size or reclaim the space from LOBSEGMENT after the daily purge on the Table1?
    Quick help is much appreciated and thank you in advance.
    Regards
    BPL666

    Check the below metalink note and you should be able to resolve all issue (Check atucal size, Calculate space used,Move LOBDATA..etc)
    Master Note - RDBMS Large Objects (LOBs) [ID 1268771.1]
    Hope this helps,
    Regards
    http://www.oracleracexpert.com
    Oracle RMAN New Features in 11g
    http://www.oracleracexpert.com/2011/12/oracle-recovery-managerrman-new.html
    RMAN Incrementally updated backups
    http://www.oracleracexpert.com/2011/12/rman-incrementally-updated-backups.html
    Edited by: Satishbabu Gunukula on Dec 22, 2011 1:11 PM

  • Reclaim disk space after delete an index

    Hi ,
    I have deleted unused indexes from a history table to reclaim the disk space was allocated for these indexes , yet the size on the disk is the same , any steps I can follow to achieve this would be greatly appreciated..
    indexes size is 70 GB
    table size is 45 GB , # of rows is above 200 Million
    Thanks in advance

    in order to reclaim space after your big delete.  Don't shrink your data files unless you have no other choice.
    The space will automatically go back to SQL server. You don't have to do anything.
    The database size will be the same plus the growth of your log file due to logging the transactions. However, internally, SQL server knows that it still has that space to play with.
    Other wise you can go for  update the statistics and rebuild indexes . but I think it would be the part of your normal weekend nightly maintenance plan
    Please click "Propose
    As Answer" if a post solves your problem, or "Vote
    As Helpful" if a post has been useful to you

  • How to reclaim hdd space after compacting VHD in hyper-v

    I have a virtual machine installed on Windows Server 2008 using Hyper-V.  The VM is using Windows 7 as its OS.  I had originally set the size of the dynamic disk to 40 GB but soon learned that wasn't large enough and expanded it to 110 GB.
    Now I an no longer running the VM and need to reclaim some of that space while keeping the VM intact.  I have run the compacting wizard, and it says the disk is now 24 GB with a maximum size of 110 GB.   Yet all of that space is still allocated
    for the VM's use.  How do I reclaim the empty space?
    I have tried to go into the VM and shrink the current volume, but it says I don't have enough space to do so.
    I appreciate any suggesions as I really need to reclaim some of that hdd space.
    Thanks!

    Hi InScribeKBriggs,
    >> I have run the compacting wizard, and it says the disk is now 24 GB with a maximum size of 110 GB.  
    Please ensure that you are using correct wizard , only "Inspect disk..." will show the information
    “the disk is now 24 GB with a maximum size of 110 GB” .
    Please use "Edit disk..." , before you do this I would suggest you to execute
    disk defrag in  windows7 VM first then shutdown it then execute "compact" in "edit disk..." wizard.
    Byt the way , it is a dynamic disk and the current size is 24GB means
    the size on physical disk is 24GB , maximum size means it can grow up to 110GB this can not be decrease .
    Also please refer to following link to compact the dynamic VHD :
    http://technet.microsoft.com/en-us/library/cc708394(v=WS.10).aspx
    Best Regards,
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Reclaiming disk space after deleting virtual hard drive

    Hello forum, I have to temporarily create a 200GB virtual disk and attach to a virtual server. The purpose of the disk is for moving some files across different servers. Once the files have been moved, I would like to delete the disk and release the space back to the datastore. Can this be done? I have a datastore with enough disk space from which the temporary disk will be created. But I would like to release the space back to that datastore once purpose is solved. Any inputs?
    Thanks in advance.

    Like already stated above, make sure select the option Remove from virtual machine and delete files from disk when removing the disk from virtual machine. Take in mind that VM must not be running from a snapshot, otherwise only the delta file will be deleted: VMware KB: Removing a harddisk from a virtual machine through the vSphere client does not release the desired space.…

  • Reclaim Disk Space After Deleting Versions.

    We've recently went through a few large Document Libraries using Power-Shell and deleted tens of thousands of versions of files we didn't need the version history for. 
    Unfortunately the DB size has not gotten any smaller. I went in to try and shrink the DB however there is very little available space to reclaim. 
    Is there something else that needs to be done after versions are deleted to fully release the drive space on our SQL box?

    Measuring the MDF/LDF isn't going to be a good calculation. For one, you have padding done by SQL Server itself, then you have index space and other metadata storage, and of course you have all of the information that is associated with the BLOB anyhow.
    But with 3 versions of the document, again only the differences are stored, so it wouldn't be 600KB * 3 in that case.
    http://blogs.technet.com/b/wbaer/archive/2012/11/12/introduction-to-shredded-storage-in-sharepoint-2013.aspx
    Also, why are you wanting to shrink the database? Shrinking destroys the indices and generally degrades performance (e.g. if you encounter another data file expansion).
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Reclaiming ipod space after deleting files

    I have just deleted a load of non-music or photo files from my 60GB Photo ipod in order to free up some space for more music but that doesn't seem to have made any difference to the available disc space. Am I missing something here? I am a bit reluctant to reset my ipod...

    Hi Harry,
    Sorry, I didn't realise this was the nano forum.
    Yes, you are in Discussions>iPod nano>Using your iPod nano.
    I would like to know how to use it as an external
    hard drive as I often want to transfer heavy files to
    other computers.
    Have a look at this link:
    Using your iPod as a hard disk
    Regards
    Colin R.
    Message was edited by: Colin Robinson
    If you go to Discussions>iPod then there are a further 6 Categories to choose from before you get to the Forums where you can post questions. Confusing, isn't it?

  • How can restore the memory after deleting parallels?

    I recently deleted my paralles program and wonder if the memory that it had been taking up has now been restored to my computer or if it is still partisioned off. I ask this because when I installed paralles, my mac asked me how much memory I wanted to give to paralles.
    Thanks for your help!

    Some ways to get space
    You can first remove seldom used apps. If you decide later you want them back you can always download them again. You can also download the Dropbox app and off load some of your little used pics and files to open up space. The app is free and you get 2 gb of free storage and if you get friends to install Dropbox they will give you 500 extra mb for each friend who installs it. Many apps will let you save direct to Dropbox.

  • Release of space after delete/truncate table

    Hello,
    How does release of space after delete/truncate table works? Is the space used before deletion released once delete is complete or not? Will I see the space occupied by deleted table as free in dba_segments or will I need to reorganize the table (drop and recreate again?). Reason why I am asking is that I can see table with 0 rows, but in dba_segment I can see it is occupying few gigabytes....
    Thank you

    Here is a little illustration for you;
    SQL> conn ogan/password
    Connected.
    SQL> create table ogan_deneme as select * from all_objects;
    Table created.
    SQL> select count(*) from ogan_deneme;
      COUNT(*)
        228470
    SQL> set line 1000
    SQL> set pagesize 1000
    SQL> select * from dba_segments where owner='OGAN';
    OWNER    SEGMENT_NAME        PARTITION_NAME           SEGMENT_TYPE       TABLESPACE_NAME                HEADER_FILE HEADER_BLOCK      BYTES     BLOCKS    EXTENTS INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE  FREELISTS FREELIST_GROUPS RELATIVE_FNO BUFFER_
    OGAN      OGAN_DENEME          TABLE              SYSTEM                                 854       319981   *30408704*       *1856*         *44*          65536                       1  2147483645                       1               1          854 DEFAULT
    SQL> truncate table ogan_deneme;
    Table truncated.
    SQL> select * from dba_segments where owner='OGAN';
    OWNER    SEGMENT_NAME        PARTITION_NAME           SEGMENT_TYPE       TABLESPACE_NAME                HEADER_FILE HEADER_BLOCK      BYTES     BLOCKS    EXTENTS INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS PCT_INCREASE  FREELISTS FREELIST_GROUPS RELATIVE_FNO BUFFER_
    OGAN      OGAN_DENEME           TABLE              SYSTEM                                 854       319981      *65536*          *4*          *1*          65536                       1  2147483645                       1               1          854 DEFAULT
    SQL>Hope it Helps,
    Ogan

  • Nas drive does not recalculating space after deleting files on Nas Drive??

    Greetings to Respected expert,
    Actually we have configure Window server 20082 Storage server.We have NAS drive configured which have 300GB quota limit. The actual data in the folder is 185 GB but it shows only 15 GB free and shows a warning .Please assist me why NAS server does not re-calculate
      the space after deleting files or does not leave space. Pardon me if I am not able to clear you my problems.this is very urgent for me.
    Thanks And Regards
    Rajnish Singh

    Hi Rajnish,
    As you mentioned "quota limit", it is set via FSRM or specific function on NAS?
    Meanwhile could you confirm the number 185GB is accurate? Sometimes a part of used space is just not calculated. You can confirm with checking the total space on NAS locally.
    If the number is correct and quota is set via FSRM, check if it is the Disk Quota which not re-calculated the released space. Try to clear the Quota setting and reconfig with 300GB limitation and see if issue still exists.
    If you have any feedback on our support, please send to [email protected]

  • Due to NAS issues, when I started a new time machine backup it did not have the old backups available. My question is do I need to delete them or will time machine automatically reclaim the space?  Only one Sparse Bundle, same name.

    Due to NAS issues, when I started a new time machine backup it did not have the old backups available. My question is do I need to delete them or will time machine automatically reclaim the space?  There is only one sparse bundle but when I enter time machine I don't see my historic backups.  I use a synology DS212 for my time machine.  Started a new backup which is 218gb but it says 618 gb is occupied  therefore it looks like 2 or 3 backups are still on the disk. Before my NAS issues the last backup was in 2014.  As you can see there is a second sparse bundle from 2012.  Not sure what that is.

    This is an old message now, but what happened to me similarly was:
    I had a major computer crash and through complicated pathways ended up reinstalling (Mavericks) as a new user (long story).
    At least I had good Time Machine backups on an NAS drive (Synology DS212j), or so I thought - when I started Time Machine up again, the old backup file was gone, replaced by a new one using my "new computer" name. The old file was gone both by directly mounting the NAS drive and by clicking "Enter Time Machine".
    It's like I had {OldShareName}.sparsebundle and then it was replaced by {NewShareName}.sparsebundle, all of the old info vanished.
    (I have spent a week finding old files elsewhere and have completed a satisfactory self-restore. It pays to "archive" [my own variation of] as well as "back-up".)
    My belief is that if this were a wired-netword-drive, e.g. plugged right into my iMac with a USB cable, then the old file would have remained.
    But this is an NAS drive, connected directly to my Airport wireless router, and I don't know the significance of the fact that it stores its Time Machine backups as "sparsebundle" files rather than simply as plain(er) files.
    As usual when things get complicated with computers (not just Apple computers) there was never a warning message. Something like "YOU'RE ABOUT TO DELETE A TIME MACHINE BACK-UP FILE!!!" would have made my life a lot simpler.
    BTW, I did try a "restore from Time Machine" option the first thing I had my "new computer" (old hardware, 2009 iMac) up and running, using Migration Assistant, and it ran for many hours and then failed in the wee hours - what that has to do with anything I'm not sure.
    I'm not sure that I have a question about this other than "why do these things happen to me?", but it's a warning. Apart from that I've been very happy with the stability and reliability (but not the cost or set-up complexity) of NAS vs. directly-cabled external drives.
    Charles

  • How to keep your email on the server after deleting from the phone?

    how to keep your email on the server after deleting from the phone?

    If this is a POP mail account:
    Settings > Mail.... > Your account > Advanced > Delete from server > Never.
    However, this will risk re-downloading as new mail
    IMAC  accounts mirror what's on the phone in the server, so deleting from the inbox on the phone will either send it to the trans folder on the server or leave it in the inbox but marked as deleted (depending on the server)
    Settings > Mail.... > your account > Advanced > Deleted Mailbox > On My iPhone Trash

  • How can I stop automatic spelling and grammar corrections?, Iwill send him another. Mail keeps removing the space after I

    , Iwill send him another. Mail keeps removing the space after I

    have opened the "Spelling and Grammar" -Ijust did it again and found 'correct spelling automatically' Ihave now turned it off. Ihope that fixes my problem. no, it has not , as you can see this email has the same problem.
    Paul Morrow

  • How will check the space taken by a single table in a tablespace ?

    How will check the space taken by a single table in a tablespace ?
    dba_segments is giving the same values even if I truncate the table?
    Pls reply

    I need to know how can we find out the size of the table in the tablespace.use user_segments (bytes) column.
    How much bytes it has taken ?value from user_segments, bytes column
    If u delete records will the space be used for another table in same tablespace?No, it keep the space in the same table for future usage.
    How can we free that space ?truncate or drop the table and reduce the size from tablespace, if you want to reclaim the space from the tablespace, OS level.
    Jaffar

  • External HD won't free-up space after deleting files

    Hello. My old Maxtor 500 Gb external hard-drive won't free-up any space after deleting many, many files. I'm using a late 2009 iMac i5 desktop with Snow Leopard. I had 6 Time Machine backups of my old MacBook Pro on the drive - each taking up roughly 70-80 Gb of space. I deleted 3 of the Time Machine backups as they were close enough in date to other backups so I wasn't going to lose any data. This should have freed up more than 200 Gb of space on the external hard drive. However, the hard drive still shows having only 10 Gb of space available. I deleted the Trash from the Dock. The Trash is empty. I unmounted the hard drive, turned it off and reconnected it. I restarted the computer. Still no change. Please help me. Thanks!

    Welcome to Apple Discussions-
    Are you using FileVault? If so, you have to log out or restart in order for the disk space to be reclaimed.

Maybe you are looking for

  • Import two XML file in MDM

    Hallo MDM Expert, I would like to import two files XML in MDM, because I carry out By Manuel import. besides, are both XML file from two different System needs to remove de-duplication of the both file and compared them. afterwards as a file to the e

  • Adobe flash player can install in mobile phone?

    where can find the adobe flash player that can install in mobile phone???

  • ICal not working with IIS?

    I'm serving an iCal file (.ics) from IIS on windows but iCal can't subscribe to it using anything other than basic authentication. If I configure IIS to use digest or integrated windows authentication iCal says "access denied." Safari is able to down

  • Blue screen with *** STOP: 0x000000A5 (0x0001000A, 0x00000000, 0x00000000, 0x00000000)

    HP Pavillion Elite m9150f PC Windows 7 When I try to start my computer, I get a screen "Windows Error Recovery" and two choices "Launch Startup Repair (recommended)" and "Start Windows Normally".  No matter which one I choose, I get a blue screen  wi

  • ZOOM IMAGES

    Where would I post this question im not sure if this is the correct place. What would i do or what program should i use to zoom in an image without opening a new window like on some pages that it enlarges the image then you click again and it goes ba