Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Allocating file space best practice vs. restores

Author  Topic 

khermann
Starting Member

10 Posts

Posted - 2009-12-09 : 20:43:17
I try to pre-allocate my MDF and LDF's to the 'as large as reasonable' to prevent auto-growth during production hours. In highly controlled environments we like to turn off auto-growth all together and manage this activity manually.

I thought there was a way to handle my problem with the RESTORE command but I am mistaken.
The problem I am having is this, using the following scenario:
1. My data is 50GB in a 100GB file that i set the initial size to as 100GB.
2. I backup the database, mybackup.bak
3. I want to restore the database to a system but it only has 75GB of free space; I can't do this because the 100GB initial size set I am told there is not enough disk space for the restore, when i really only have 50GB of data.

There must be a way to accomplish this without having to alter my production instance or shrinking files prior to taking a backup. I could have sworn I've done this in the past, so I'm feeling a bit dim - what am I missing?

Thanks very much
k
p.s. sql2005 sp3

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-09 : 22:24:29
You would need to shrink the data file down on the source system. This is obviously not what you want, but there's no way around it with backup/restore.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

khermann
Starting Member

10 Posts

Posted - 2009-12-10 : 14:49:10
I appreciate the quick response. I was afraid that would be the answer.
Thanks again.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-10 : 15:13:40
You're welcome.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -