DB Size - available space

Hello,
I have a DB (MSSQL 2008 R2) app. 20 GB in size. It's on a remote server, so the bigger the size the slower the backups and (potential) restore.
In some tables I stored binary files. I changed this, so I deleted these files and released 12 GB of space. I expected the DB would shrink in size, but it's still 20 GB (with 12 GB of "available space").
I will do the same with some other tables, so I expect my DB to be less then 1GB in size. Growing rate app. 250 MB per year.
I saw a lot of posts saying that you should NOT shrink the DB.
Is there any other way to remove unnecessary available space, because I do not need a 20 GB DB file, where only 1 GB of data is really stored??
Thx

There's nothing wrong with shrinking a database as long as you have a valid reason for doing so and you understand the potential problems associated with doing so, so you can mitigate the problems.
There's a lot of bad advice available on the internet.  Shrinking a database isn't necessarily a bad thing although it can cause problems if done frequently.  Ideally you should size you database exactly right when you initially create the database
then never change the size.  Unfortunately none of us live in a perfect world where that's possible in every instance.
I'm pretty good about sizing hardware and databases but in spite of all of my experience I find that I occasionally have to shrink databases.  If I were to take the advice on the internet to heart I'd expect my servers to overheat and melt down due
to those actions.  In reality my failures to perfectly size my databases thus resulting in having the shrink those databases have resulted in no noticeable problems.  Go figure.
I'm no expert on the problems caused by shrinking a database but I hear it can lead to disk fragmentation.  Assuming that's correct and I have no reason not to believe that fragmentation is a possible outcome of constant database shrinking and growth,
I personally do my best to limit the number of times I shrink databases.
In your case, you are making a design change to your database which will cause the database to be much smaller and grow much slower.  However I think your rationale for shrinking your database may not be correct.  Just because a database is 20GB
doesn't mean that SQL Server is going to create a backup that's 20GB in size nor does it mean that SQL Server is going to take any longer to backup the database than it would if the database had no unused space.
My personal experience has shown that SQL Server will create a backup that's large enough to store only the data in your database.  So if you have a 20GB database and 19GB is unused, the backup file won't be much more than 1GB in size.
So the real question then becomes, do you need the space on your server which is consumed by the reserved space in your database?  If you don't need that 19GB of space for something else I'd just leave the database as is until you do.

Similar Messages

  • The size of your selected options exceeds the available space

    I am trying to install a brand new full version of Adobe Creative Suite 4 Web Premium.
    I am unable to proceed, as the install options window tells me "The size of your selected options exceeds the available space" with a red exclamation point.
    It says my options require 9.6GB of space.
    I am trying to install on my D Drive, which has 1.1 TB of available space. Yes, that's right, Terrabytes.
    Help!
    System: Intel Core2 Quad Q6600 @2.4 GHz, Windows Vista Ultimate 64 bit SP1, 4 GB RAM, system drive WD Raptor (75GB) and main drive (where I am trying to install CS4) is (6) 500GB seagate SATA hard drives in a 2.5TB RAID 5 array. Motherboard is a Gigabyte GA-P35-DQ6 and video is an Nvidia GEForce 8800GT (512 RAM). RAID controller is onboard the motherboard (Intel ICH8R)

    SOLVED!
    Bob and Peter, you nailed it.
    I had inadequate room on the C drive...I was down to only 5 GB of space.
    I cleaned up the desktop (The wife thinks that is a great place to store everything) and freed up my C drive so it had just over 10 GB of free space, and the red exclamation point went away. It is now happily installing onto my D drive.
    Ian, my C drive (system) is a Western Digital Raptor...10,000 RPM. They are really small (75GB) but really fast so that windows boots up really quick. It is a performance thing. My D is a RAID array for redundancy...as I cannot afford to lose my pictures, videos, and documents, etc. - and I always keep my program installs on D so as to keep the C drive speedy and un-cluttered - plus if and when windows gets corrupted (which it does once every couple of years for some reason), I can re-do it in 5 minutes with an image using Acronis True Image.
    Thanks to all of you for your ideas, and I am glad I got it solved. If any Adobe employees read this...you can at least throw in some nice paper manuals for the software. When software is $1600.00 I'm not real concerned about saving another tree - and you shouldn't be either...I'd rather have some paper manuals for reference when I buy a full retail package. So pump up the packaging please. Thanks!!!!
    Shane

  • By adding an external hd to time capsule does it increase the size of available space for time machine back-ups?

    By adding an external hd to time capsule does it increase the size of available space for time machine back-ups?

    No, each drive is treated separately. Sorry!!

  • External hard drive has no available space even though i have deleted nearly everything on there

    I have an external hard drive for backups and it has no available space even though i have deleted nearly everything on there. Where is the space?

    Drive Preparation
    1. Open Disk Utility in your Utilities folder.
    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 Partition button and wait until the process has completed.

  • Find available space in buffer cache

    Hi.
    I want to find available space from buffer cache. First thought was to make it 8i-9i comp, by not using v$bh to calculate sum of memory and available space.
    I have the following pl/sql block to calculate the values:
    declare
    num_free_blck integer;
    num_all_blck integer;
    num_used_blck integer;
    overal_cache number := 0;
    used_cache number := 0;
    free_cache number := 0;
    blck_size integer;
    pct_free number := 0;
    begin
    select count(1) into num_free_blck from v$bh where status='free';
    select count(1) into num_all_blck from v$bh;
    select count(1) into num_used_blck from v$bh where status <> 'free';
    select value into blck_size from v$parameter where name ='db_block_size';
    used_cache := (blck_size * num_used_blck)/(1024*1024);
    free_cache := (blck_size * num_free_blck)/(1024*1024);
    overal_cache := (blck_size * num_all_blck)/(1024*1024);
    pct_free := ((free_cache/overal_cache)*100);
    dbms_output.put_line('There are '||num_free_blck||' free blocks in buffer cache');
    dbms_output.put_line('There are '||num_used_blck||' used block in buffer cache');
    dbms_output.put_line('There are totally '||num_all_blck||' blocks in buffer cache');
    dbms_output.put_line('Overall cache size is '||to_char(overal_cache,'999.9')|| 'mb');
    dbms_output.put_line('Used cache is '||to_char(used_cache,'999.9')||' mb');
    dbms_output.put_line('Free cache is '||to_char(free_cache,'999.9')||' mb');
    dbms_output.put_line('Percent free db_cache is '||to_char(pct_free,'99.9')||' %');
    end;
    The result of the execution is:
    SQL> @c:\temp\bh
    There are 3819 free blocks in buffer cache
    There are 4189 used block in buffer cache
    There are totally 8008 blocks in buffer cache
    Overall cache size is 62.6mb
    Used cache is 32.7 mb
    Free cache is 29.8 mb
    Percent free db_cache is 47.7 %
    PL/SQL-prosedyren ble fullført.
    SQL>
    This is not correct according to the actuall size of the buffer cache:
    SQL> select name,value from v$parameter where name='db_cache_size';
    NAME
    VALUE
    db_cache_size
    67108864
    SQL>
    Anyone that have an idea bout this?
    Thanks
    Kjell Ove

    Mark D Powell wrote:
    select decode(state,0,'Free',
    1,'Read and Modified',
    2,'Read and Not Modified',
    3,'Currently being Modified',
    'Other'
    ) buffer_state,
    count(*)  buffer_count
    from    sys.xx_bh
    group by decode(state,0,'Free',
    1,'Read and Modified',
    2,'Read and Not Modified',
    3,'Currently being Modified',
    'Other'
    Provided the OP figures out that xx_bh is probably a view defined by sys on top of x$bh this will get him the number of free buffers - which may be what he wants - but apart from that your query is at least 10 years short of complete, and the decode() of state 3 is definitley wrong.
    The decode of x$bh.state for 10g is:
         decode(state,
              0,'free',
              1,'xcur',
              2,'scur',
              3,'cr',
              4,'read',
              5,'mrec',
              6,'irec',
              7,'write',
              8,'pi',
              9,'memory',
              10,'mwrite',
              11,'donated'
         ), and for 11g it is:
         decode(state,
               0, 'free',
               1, 'xcur',
               2, 'scur',
               3, 'cr',
               4, 'read',
               5, 'mrec',
               6, 'irec',
               7, 'write',
               8, 'pi',
               9, 'memory',
              10, 'mwrite',
              11, 'donated',
              12, 'protected', 
              13, 'securefile',
              14, 'siop',
              15, 'recckpt',
              16, 'flashfree', 
              17, 'flashcur',
              18, 'flashna'
         ), (At least, that was the last time I looked - they may have changed again in 10.2.0.5 and 11.2.0.2)
    Regards
    Jonathan Lewis

  • Other using all available space after update to iOS 8.3

    Before updating I had at least 10GB of free space, but ever since I updated to iOS 8.3, I am repeatedly receiving the Storage Almost Full error.  The last couple days I have deleted 2 or 3 GB of data and apps to free up space, but the error returns the next day and I have no space available even though I haven't added anything that would take up that much space.  Looking at apps under Manage Storage, there is nothing taking up the space that was previously unused.  When I plugged my phone into iTunes, is says that Other now takes up more than half the available storage on my phone, and I have the 64GB model. 
    Other had previously taken up quite a bit of space, and I know that this is mostly documents and data from my applications and messages, but there's no way it should have jumped so dramatically in size.  It seems to be just growing to take up whatever available space there is on my phone.

    Berbyq wrote:
      Unless I can't see the forest for the trees, other than downloading and installing a 3rd party keyboard, I don't have access to the default emoji.
    When you do "add new keyboard", do you really not see one called Emoji anywhere on the list?
    If not, try resetting your device

  • DiskWatcher Available space message in LMS 4.2.2

    In Soft Apliance 4.2.2 I keep up getting diskWatcher Available space message:
    It is fresh installation:
    [LMS-500/root-ade ~]# df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/mapper/smosvg-usrvol
                           18G  874M   16G   6% /usr
    /dev/mapper/smosvg-optvol
                          105G  5.2G   95G   6% /opt
    /dev/mapper/smosvg-varvol
                           53G  511M   50G   2% /var
    /dev/sda3             965M   18M  898M   2% /storedconfig
    /dev/mapper/smosvg-tmpvol
                          8.7G  151M  8.1G   2% /tmp
    Config:

    Hi ,
    you can follow the below steps:
    1.     Shutdown the VM
    2.     Right click the VM and select Edit Settings
    3.     Select the hard disk you would like to extend
    4.     On the right side, make the provisioned size as large as you need it
    5.     Click OK
    6.     Power on the VM
    7.     Connect to the command line of the Linux VM via the console or putty
    session
    8.     Log in as root
    9.     The fdisk command provides disk partitioning functions and using it
    with the -l switch lists information about your disk partitions.  At the
    command prompt type fdisk -l
    10.     The response should say something like Disk /dev/sda : xxGB. (See
    Figure A)
    11.     At the command prompt type fdisk /dev/sda. (if dev/sda is what was
    returned after step 10 as shown in Figure A)
    12.     Type p to print the partition table and press Enter (also shown in
    Figure A)
    13.     Type n to add a new partition
    14.     Type p again to make it a primary partition
    15.     Now you'll be prompted to pick the first cylinder which will most
    likely come at the end of your last partition (ex: /dev/sda3 ends at 2610).
    So I chose 2611 for my first cylinder, which is also listed as the default.
    16.     If you want it to take up the rest of the space available (as
    allocated in step 4), just choose the default value for the last cylinder.
    17.     Type w to save these changes
    18.     Restart the VM
    19.     Log back in as root
    20.     At the command prompt type fdisk -l. You'll notice another partition
    is present.  In Figure B it is listed as sda4.
    21.     You need to initialize this new partition as a physical volume so
    you can manipulate it later using the Logical Volume Manager (LVM).
    22.     Now you'll add the physical volume to the existing volume group
    using the vgextend command. First type df -h to find the name of the volume
    group.  In Figure C, the name of the volume group is vg_root. Now type
    vgextend [volume group] /dev/sdaX. (ex: vgextend vg_root /dev/sda4)
    23.     To find the amount of free space available on the physical volume
    type vgdisplay [volume group] | grep "Free"
    24.     Extend the logical volume by the amount of free space shown in the
    previous step by typing lvextend  -L+[freespace]G /dev/volgroup/volume. (ex:
    lvextend -L+20G /dev/vg_root/lv_root)
    25.     You can finally expand the ext3 file system in the logical volume
    using the command resize2fs /dev/volgroup/volume (ex: resize2fs
    /dev/vg_root/lv_root).
    26.     You can now run the df command to verify that you have more space-df
    -h
    Thanks-
    Afroz
    [Do rate the useful post]
    ****Ratings Encourages Contributors ****

  • The content download cannot be performed because there is not enough available space in cache or the disk is full.

    I deploy all office package via Application deployment. But many system getting failed due to error "The content download
    cannot be performed because there is not enough available space in cache or the disk is full.".
    I delete the cache old file/folder. Now the cache disk space is available. But still this systems showing same error. And it is not retry also. need help for retry application download if failed due to cache disk.

    You should review what your default client cache size is being set to (default 5GB) and then look at the size of the office content you are trying to deliver.
    If the content of the office application exceeds your maximum client cache size setting then the download and subsequent installation will fail.
    Note that normally the download of applications should overwrite old content in the cache unless you have set them to be persistent, the exception to this is the above case.
    To resolve this you will need to increase the client cache size. There are a few ways to achieve this, you can do this either from the Config Manager console via right click tools or via a script that you can run against your clients. Others might like to
    comment on how best to achieve this (if this is indeed your problem).
    Cheers
    Damon

  • Hard drive available space shown incorrectly in finder

    Hi,
    I noticed that my Finder status bar shows incorrect amount of available space. Actually the amount of available space is larger that the actual disk size. The same problem is experienced if I click "Get Info" on my Macintosh HD. It also shows drive capacity as 249.82GB and Available as 252.7GB.
    All the other tools, for example Disk Utility and About this Mac/Storage show the correct information, which is that I have 115.46GB of free space on my Macintosh HD.
    Any idea what could cause this? Or has anyone else experienced similar problems?
    Oh, and I have Filevault 2 turned on.
    //ilari

    Maybe I should be a bit more specific:
    Currently the Get Info for Macintosh HD shows the following:
    Capacity: 249.82 GB
    Available: 282.69 GB
    Used: -- bytes (-- KB on disk)
    While for example df -k shows the following (which is accurate):
    $ df -k
    Filesystem                        1024-blocks      Used Available Capacity  Mounted on
    /dev/disk1                          243966468 152025216  91685252    63%    /
    devfs                                     181       181         0   100%    /dev
    map -hosts                                  0         0         0   100%    /net
    map auto_home                               0         0         0   100%    /home
    localhost:/ezioMnNoyRVU8Vj-YxC4cJ   243966468 243966468         0   100%    /Volumes/MobileBackups
    No matter which way you look at it, the Finder currently calculates the available (free) space incorrectly.
    //ilari

  • Available space not right after trashing

    After trashing large files, the available space in the status bar remains the same
    The only way I found was to go thru a restart
    kind of annoying
    Any other solution ?

    For information about the Other category in the Storage display, see this support article.
    Empty the Trash if you haven't already done so. If you use iPhoto, empty its internal Trash first:
    iPhoto ▹ Empty Trash
    Do the same in other applications, such as Aperture, that have an internal Trash feature. Then reboot. That will temporarily free up some space.
    According to Apple documentation, you need at least 9 GB of available space on the startup volume (as shown in the Finder Info window) for normal operation. You also need enough space left over to allow for growth of the data. There is little or no performance advantage to having more available space than the minimum Apple recommends. Available storage space that you'll never use is wasted space.
    When Time Machine backs up a portable Mac, some of the free space will be used to make local snapshots, which are backup copies of recently deleted files. The space occupied by local snapshots is reported as available by the Finder, and should be considered as such. In the Storage display of System Information, local snapshots are shown asBackups. The snapshots are automatically deleted when they expire or when free space falls below a certain level. You ordinarily don't need to, and should not, delete local snapshots yourself. If you followed bad advice to disable local snapshots by running a shell command, you may have ended up with a lot of data in the Other category. Reboot and it should go away.
    See this support article for some simple ways to free up storage space.
    You can more effectively use a tool such as OmniDiskSweeper (ODS) to explore the volume and find out what's taking up the space. You can also delete files with it, but don't do that unless you're sure that you know what you're deleting and that all data is safely backed up. That means you have multiple backups, not just one.
    Deleting files inside an iPhoto or Aperture library will corrupt the library. Any changes to a photo library must be made from within the application that created it. The same goes for Mail files.
    Proceed further only if the problem isn't solved by the above steps.
    ODS can't see the whole filesystem when you run it just by double-clicking; it only sees files that you have permission to read. To see everything, you have to run it as root.
    Back up all data now.
    If you have more than one user account, make sure you're logged in as an administrator. The administrator account is the one that was created automatically when you first set up the computer.
    Install ODS in the Applications folder as usual. Quit it if it's running.
    Triple-click anywhere in the line of text below on this page to select it, then copy the selected text to the Clipboard by pressing the key combination command-C:
    sudo /Applications/OmniDiskSweeper.app/Contents/MacOS/OmniDiskSweeper
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning to be careful. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The application window will open, eventually showing all files in all folders, sorted by size with the largest at the top. It may take a few minutes for ODS to finish scanning.
    I don't recommend that you make a habit of doing this. Don't delete anything while running ODS as root. If something needs to be deleted, make sure you know what it is and how it got there, and then delete it by other, safer, means. When in doubt, leave it alone or ask for guidance.
    When you're done with ODS, quit it and also quit Terminal.

  • Blu-Ray Fit Contents to available space

    I made my first blu-ray disc in PreEl, and I tried to add as many raw video clips exported from my Canon Vixia HF200 as would fit on the disc.  On the Share->Blu-Ray settings, it said the space required was 22.89 GB, and I then checked the "Fit Contents to available space" box, which changed the Space Required to 23.30 GB.  The disc came out ok, but I discovered there was about 7GB left unused, and it is visually obvious the burner didn't use the last 1/2 inch or so of space on the bottom of the disc.
    Is there a better way to try to utilize all the available disc space?  In this case, my goal is to archive as many original video files as possible onto a disc.  However, I have tried to group them together and add menu markers to them, so I don't end up with 200+ chapters on the disc.
    I plan to actually edit and create videos more in the future, but for now I'm thinking in terms of getting many hours ofHD video off my hard drive and making multiple backup copies to blu-ray discs.

    Neale,
    Unless things have changed, and this could be by version, or a difference between BD and DVD-Video, PrE uses a 2-Pass VBR Transcoding scheme. What this means is that PrE measures what it thinks the size will be, then runs the first pass. This pass basically samples the motion in the Timeline, and stores data to be used in the next pass. Then, on the second pass, that info is used to assign a higher Bit-Rate to areas of high motion, and lower Bit-Rate to areas of less motion. It is not until PrE is completely done with the second pass, that it knows for sure, how large the file will be, as the Bit-Rates will be altered, as needed throughout the process.
    The multi-pass Transcoding is how Hollywood crams so much high-quality material onto a DVD, or BD. There Transcoding software will do maybe 9-Passes, or even more, and then the operator can tweak things as required. This results in a variable Bit-Rate that is the ultimate for every segment of the Timeline - not 1 MB/s more than is needed, and very high motion at the best possible Bit-Rate to keep that smooth. Never too much, and never too little. Sort of a Goldie Locks situation, and run by highly-trained professionals, who do nothing else all day long, using software that costs more than a Mercedes E-Class.
    As for the BD-Data, one is not Transcoding to produce that. If there is any Transcoding, it would first be done by the user, and then the resultant files would just be Copied over to the BD-Data disc. As you say, one would calculate the number of files, times their size, and subtract that from the capacity, adding more, or subtracting some, to fill the BD-Data.
    Hunt

  • Why does HD available space decrease and increase?

    Hi all. I've noticed that in Leopard available hard drive space can suddenly diminish (when you haven't added much to it) then after you've shut down and started up again the available space is suddenly increased. Didn't used to do that in Tiger. I've seen it on a friends' MacBook as well so it must be a Leopard thing. Anyone know why?

    it does depend on the total amount of RAM and on how much RAM applications that are running need. look at the Activity monitor->system memory tab. do you see many pageouts? if you do, system writes to the swap file a lot. you can also check the size of the swap file directly. enter commandshiftg in finder and enter /var/vm in the resulting popup. this will take you to /var/vm which contains the swap file. check how big it is.

  • Question: Inconsistency in Icloud between total and available spaces.

    Dear all,
    First of all, thank you for read this topic and please kindly give me information or advise if you can.
    Right now, my Iphone 4s was reset accidentally and all data were gone without any backup in Itune but I thought I have backup some in Icloud. After it was reset, I tried to restore with Icloud but nothing was found. Then, I came back to check space in Icloud (setting > Icloud > storage & Backup) and found that total space is 5.0 GB but available space is 355 MB, meaning that space around 4 GB are used for backing up something. So, this point is so strange. Icloud said nothing was backed up but my Icloud space has been used for 4GB.
    Could anyone advise for data backing up and answer this problem for me?
    Also, please kindly let me know how can I get storage 4GB back.
    Thank youso much in advance,
    Yong

    For a hard drive try Newegg.com http://www.newegg.com/Store/SubCategory.aspx?SubCategory=380&name=Laptop-Hard-Dr ives&Order=PRICE
    Or OWC  http://eshop.macsales.com/shop/hard-drives/2.5-Notebook/
    Here's instructions on replacing the hard drive http://creativemac.digitalmedianet.com/articles/viewarticle.jsp?id=45088
    Here's a cheap SATA external hard drive case on eBay http://cgi.ebay.com/USB-2-5-SATA-HDD-HARD-DRIVE-EXTERNAL-ENCLOSURE-CASE-BOX-/120 636286623?pt=PCC_Drives_Storage_Internal&hash=item1c167ba69f

  • I have deleted all photos, messages and apps but I still have no available space on my phone even though the applications don't add up to 12 GB.. Please help!!!

    I have deleted all photos, messages and apps but I still have no available space on my phone even though the applications don't add up to 12 GB.. Please help!!!

    You have data corruption.  restore your phone and set it up as a new device.  Not from backup

  • Report for available space

    Hello all:
    any standard report that show capacity , used  and available space?
    THx in advance.
    Edited by: Manthana99 on May 31, 2011 11:26 AM

    Hi Manthan,
    You can view REISROOC report for the same.
    Regards
    Rohit

Maybe you are looking for