Thursday, March 8, 2012

Cant restore the database backup in SQL server 2005?

I wrote a sql like this to restore my database backup

use test
RESTORE DATABASE [Lorenzo]
FROM DISK = N'D:\Lorenzo'
WITH FILE = 1,
NOUNLOAD,
REPLACE,
STATS = 10
GO

But this is the error message that i am getting, but still i have 58.5GB free space in my hard drive ?

what is the wrongwith this SQL server 2005 ? i am using sql server 2005 standard edition !

===== Error=====
Msg 3257, Level 16, State 1, Line 2
There is insufficient free space on disk volume 'C:\' to create the database. The database requires 63689129984 additional free bytes, while only 54682599424 bytes are available.
Msg 3119, Level 16, State 4, Line 2
Problems were identified while planning for the RESTORE statement. Previous messages provide details.
Msg 3013, Level 16, State 1, Line 2
RESTORE DATABASE is terminating abnormally.

any idea ! i am so stuck with this now !

thanks

regards

sujithf

Sujithf:

To me it looks like you don't have enough disk to cover the "nominal" size of the dtabase. You might have 58.5 GB freespace on the harddrive, but it looks like the database wants somewhere around 63GB. Do you have multiple drives on your server? If so, try allocating one of your files on an alternate drive. If not, see if you can purge some data off the drive.

Also, try to keep your database files off the OS drive whenever possible (and it looks like that is not possible in this case). In many cases in which I have needed space I have been able to migrate backups off to another disk or even to an external device. See if there are any old "large" backups that are clearly not needed.


Dave

|||

But my database backup size is just 5.11 GB ?

why is it need too many free space on c : drive to restore just 5.11 Gb size database ?

regards

sujithf

|||

Sujithf:

Again, this has to do with the "nominal" database size. If you have a pre-copy database with 70 GB and 69GB free space you are still going to need 70GB to restore the database. This is what I am calling the "nominal" size. Try shrinking your database. Often times you will have a large log file that can be shrunk and you also might be able to shrink your data file.


Dave

|||

thank you very much for u r profesional ideas Dave,

now i am going to shrink my database

my current allocated space is :60743.63 MB

avialable free space 1585.26 MP 2%

so what should i type for Maximum free space in files sfter shrinking ? ...........%

sujithf

|||

Well, this means that you require about 60GB of space. I don't think you are going to be do much of a shrink. If this is the case, I think you are going to have to scrounge to free up some space. Yikes!


Dave

|||

Yes dave i will allocate some free space in to my c drive by tomorrow

and again many thanks 4 u r information,cos i was so stuck diring this week to do this task,

now i know at least a solution for this matter

thanks to MSDN forum and Mr.dave

regards

sujith

|||You're welcome. :-)

No comments:

Post a Comment