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, the database on the machine where the backup was made must be 30G.
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? Someone suggested looking at the size of the backup file and adding 10%. This seems to work okay for me.
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 (and why is it incorrect?)