Solved

Disk space required for SQL Server 2005 Restore

Posted on 2011-03-11
6
384 Views
Last Modified: 2012-08-13
Hello All,

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.

Our system:

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

My understanding:
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.

Thanks,

Jeremy
0
Comment
Question by:WvrLthr
  • 3
  • 2
6 Comments
 
LVL 29

Expert Comment

by:Randy Downs
ID: 35112892
Maybe these will help.
http://msdn.microsoft.com/en-us/library/ms188223.aspx
http://msdn.microsoft.com/en-us/library/ms191315.aspx

 Intuitively the Replace option would not need a temporary file so should fit on your drive. If it were me, I'd call JDE for their opinion. If you can wait, you might try replacing the drive with something larger before the restore.
0
 
LVL 29

Accepted Solution

by:
Randy Downs earned 250 total points
ID: 35112938
You could test your theory by backing up a small test database $ restoring to see how much space it takes. You could do a real life restore test restoring to the big drive.
0
 
LVL 2

Assisted Solution

by:Umesh_Madap
Umesh_Madap earned 50 total points
ID: 35115932
as other guys suggested if possible replace the drive with higher space or SAN.

you can do once thing.

if you want to restore the database on non-production server, you can test once by restoring the with the prod backup, i don't think it required free space for team db.

As per my knowledge it should work i am sure.

0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 1

Author Comment

by:WvrLthr
ID: 35129036
Number-1,

Thank you for the attempt to answer.  I was really looking for someone to definitively answer the question.  I had read those links and, like you, believed it would work by immediately replacing the file.  Your second post about doing a test was what I was hoping to avoid, but I decided that was going to be the way to know for sure, so I took the time this morning to create a new database and tested.

I am going to give points for your time, even though the answer was indirect.
0
 
LVL 1

Author Comment

by:WvrLthr
ID: 35129059
Umesh Madap,

Thank you for the attempt.  We are not going to add disk to the SAN anytime soon and restoring on a non-production server is not feasible.

I decided to take the time and create a test scenario with smaller databases.

Thanks for your time.
0
 
LVL 1

Author Closing Comment

by:WvrLthr
ID: 35129108
The specific questions were not answered definitively from experience.  Some pointers and options were provided.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now