get disk space back AND shrink database

  • I have a database that was poorly administered. It is 1.6 gig database, but 2.8gig of space was allocated for it (device then the database). It will only allow me to get back 101meg (space not allocated to the database, but the device has it).

    How can I get the database back to 1.6-1.8? When I do a restore, I have to create a 2.8 gig datafile/database to do it.

    This is a 6.5 database, shortly to be moved to SQL 2000.

    thanks,

    Joseph Devereaux

  • I don't know of a way to do this in 6.5, 7 was the first version to allow you to shrink files back down. If you are moving to 2000 you will gain a whole new world of clean up possibilities. What time frame and how are you planning the upgrade? I will look though for anything to shrink 6.5 down.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • As I recall it's a lot of work. You need to BCP it all out, generate scripts for everything, then drop db and device, then put it all back together. Unless you HAVE to have that 1g of disk space I'd worry about it after the upgrade. Expanding devices isn't too bad in 6.5 but you don't want a lot of them, setting the initial device size to a good size isn't a bad idea.

    You might want to check the script library, we might have something that would do this for you.

    Andy

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

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