Release unused space from data file

  • Hi All

    I need some help to reclaim space held by a SQL  DATA file.  I have cleaned out some space from a SQL Server 2000 database and when I take a back up of this file it is 4.1gb, but when you look at the database properties the size is 2.6bg.

    How or what do I need to do to reduce the size of the back up file to 2.6 gb this will will help me with portability of the database to our dev environment and also will reduce the size of the backup media. etc.

    Thanks

    Dinesh

  • you can go to database properties and shrink the particular database file to the required size.It will not allow shrinking below the minimum data size.

    Hope this helps.

  • Hi,

    I'm not quite sure what's your main concern - size of the Data file, or size of the backup?

    If you suspect, that the database will grow to the previous size again in not very long time, and only the size of backup really matters, then you could leave the data file as it is and use some backup tool to make the backup smaller. We use Litespeed with our 120GB database, and full backup is only about 20GB large.

    If you really want to decrease the size of data file, then you'll have to shrink it, as Ranjith said. Downside of shrinking is, that when the database needs to grow again, it will take some time and tie up resources to reclaim the disk space for the data file. Sometimes (IMHO always, unless the disk space is limiting factor) it is better to leave the data file with plenty of free space inside, after deleting part of the data... and not shrink it.

    HTH, Vladan

  • Hi Vladan

    I was able to shrink the datafile to the minimum size, this was only a requirement so that we can port the database to our dev environment and you are correct disk space is an issue for un in that environment.

    Thanks

    Dinesh

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply