Recover Free Space

  • Hi

    I've a sql server 2000 database of 20gb size. I have rebuilt indexes using DBCC command for all the tables in database. Now, system shows 12 GB of occupied space and 8 gb of free space. When I take backup I get backup file of 12 or 13Gb. how to recover the free space. Because the physical database file (not transaction log) is occupied 20gb on hard disk.

    please help me

  • Are you going to be adding any more data to this database? If not, then you could shrink it and then rebuild indexes. If you are going to be adding data, then there is no reason to 'recover' space as SQL Server will use the space available in the file.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Thanks for your reply,

    Yes, data will be added over the period of time. But it's occupying the space now, it self. That's why I would like to shrink the database.

  • Hi,

    I totally agree with the previous post, providing the disk where the database MDF resides isn't a host for multiple MDFs/other files and by shrinking this particular database as much as possible you are reducing the probability of other files increasing in size slightly which in turn consumes all available disk space, then leave the file size as it is.

    New data will eventually consume the free space, and you may even notice a slight performance improvement during the loading of data as SQL Server doesn't have to increase the size of the data file when it hits it's limit.

    Regards,

    Chris

    www.sqlAssociates.co.uk

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

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