SQL 6.5 database device size

  • Greetings!

    I have some 6.5 backups that I need to restore to one machine with lots of hard disk space and then I want to data transfer them to another machine where there is less disk space.

    Let's say the size of the .dat file I want to restore is 5G. If I create a 5G database device and database, the restore tells me that the database must be 30G to hold the 5G backup.

    So, I recreate the database and device to be 30G and then restore the backup.

    Now I want to data transfer this database to another machine where disk space is limited. I don't have 30G on this system to make the device so I want to know how big to make the database device to hold the transfer.

    If I look at the database information on the other machine (by editing it), it tells me that the database only has 2G of data space available, so I figure I need to create the new database device to be 28G (even though the backup file was only 5G).

    I don't believe that the 5G backup that I restored into the 30G database really took up 28G leaving me only 2G like SQL is telling me.

    I want to know how to tell how much space the database is really taking up so I will know how big to create the device on the target system where disk space is a premium.

    Do I just look at the 5G backup file and guess how big to create the device on the target machine?

    Is there some query I can run that will tell me how much space the database is really using since the edit database information doesn't seem to be correct?

    Thanks!

  • hi,

    in 6.5 backups couldn't be loaded into a database that was smaller than the original. Therefore if the database has been created/extended to a particular size then the secondary database needs to be created/extended in the same way. When we had to do this we created a new database that was bigger than the backup size (5GB in your case), generated a script to create all objects (tables, views, procedures etc) and then used BCP to copy data between the two This then acts to shrink the database.

    Paul

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

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