Disk space required for SQL Server 2005 Restore
Posted on 2011-03-11
This is a very straightforward question which I cannot seem to find the answer to in this forum or SQL Server Books Online.
We are using SQL Server 2005 SP3.
I need to restore a full backup of our Production database (PD) into our Prototype database (PY). I have done this in the past and have all the scripts and processes I need. However, we are starting to get tight on disk space so I want to be certain I have enough space.
PD datafile 355 GB and PY datafile 211 GB on the same phyiscal disk which has 261 GB free
Current PD full backup file is 278 GB.
We have SQL Server backups run nightly to disk. There is massive space available on the disk that holds the log files, so no restore issues there.
So, I see the following scenarios:
A. New PY file will allocate 355 GB
B. New PY file will allocate 278 GB
C. Restore process will create a temp file and delete the existing PY file at the end of the process
D. Restore process will immediately overwrite the existing PY file during the restore
If D is true we have plenty of disk space for either A or B.
If C is true I think it depends
If B is true, I think I could purge 30+ GB out of the existing PY to bring the free space to 290+ making room.
If A is true, I could be in trouble. If these were independent databases, I would have no problem dropping PY. However, they are part of our JDEdwards ERP system and I cringe about dropping a key database which may break a link somewhere in the JDE system databases. I may have to consult with JDE gurus on that.
In the past there has been no issue on disk space, so I haven't bothered to watch and see what happens to the files.
Thank you for your comments/corrections/laughter =) at my naive understanding and situation.