Started a new job and there is a 2008 sql database that is 250gb in size. The developers insist that the size is about right. THe problem is that the 250gb MDF file is sitting on a 250GB drive.
I have tried to do a backup of the database but i get this error:
System.Data.SqlClient.SqlError: A nonrecoverable I/O error occurred on file "C:\Backup\backup.bkf:" 112(failed to retrieve text for this error. Reason: 1815). (Microsoft.SqlServer.Smo)
I basically have two options:
- Try and reduce the size of the MDF, if this is possible!
- Upgrade the Raid Array
Any help appreciated.
Thanks
Best Answer
Yes, you'll definitely have to perform the backup to a different location that has sufficient free space. If you have SQL2008 R2 Standard (or any release of 2008 Enterprise), you can do a compressed backup (also possible with 3rd-party software like Quest Litespeed). Otherwise, your backup will be as big as your data file size + log file size.
Regarding shrinking, you'll have to first determine if it is even possible to shrink the file, by knowing the used space/free space within the file itself. A 250GB file could have 240GB used and 10GB free, or vice-versa. (Easiest way to determine this: right click the database and go to Tasks > Shrink > Files. DON'T hit OK, just look at the Currently allocated space VS "Available free space" figures, dropping down the "File type" box to see the data vs log).
Depending on what you find, you'll have a few choices: