System.Data.SqlClient.SqlError: There is insufficient free space on disk volume 'C:\ to create the database.
Question
Thursday, November 19, 2009 3:09 PM
I received the following error...
*****
System.Data.SqlClient.SqlError: There is insufficient free space on disk volume 'C:\ to create the database. The database requires 2739929088 additional free bytes, while only 801185792 bytes are available. (Microsoft.SqlServer.Smo)
*****
I have looked at the solution recommended on this forum http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=79848 but I am still baffled as to why it says that I don't have enough disk space? I ran the RESTORE FILELISTONLY command and it told me that the "size" was 1.4 GB and I've got 60GB left. I am starting to resolve that my .BAK is corrupt. Are there any other reasons as to why I am unable to restore my backup?
Thanks for any help in advance!
All replies (11)
Friday, July 30, 2010 3:26 AM âś…Answered
1) are you using move command while restoring if not then it might be going to different location where you do not have sufficient space
2) What is your original database size (reserved)? you will require that much of space.
3) In case your last transaction log restore requires more space than available then you may try try to follow steps described in article http://www.sqlvillage.com/Articles/How%20to%20move%20files%20when%20database%20is%20in%20restoring%20state%20in%20SQL%20Server%202008.asp
Thanks, Mohan Kumar www.sqlvillage.com -- Please mark the post as answered if it answers your question.
Tuesday, November 24, 2009 11:03 AM
The error message says that your drive C: had only 800MB free space left while creating the database requires 2.7GB. Could you please let us know:
- How much free space left on your drive C:\
- How did you restore the database?
- What is the result if you restore the database to another location by explicitly using T-SQL like the following?
RESTORE DATABASE TestDB
FROM DISK='xxxxxx'
WITH MOVE 'AdventureWorks_Data' TO 'D:\MySQLServer\testdb.mdf',
MOVE 'AdventureWorks_Log' TO 'D:\MySQLServer\testdb.ldf';
GO
Please remember to mark the replies as answers if they help and unmark them if they provide no help
Sunday, June 20, 2010 5:42 PM
I have the same problem with sql server 2008 :(.
I am trying to restore a small DB (1GB), i have 12 GB free on my disk, and it gives me this error:
"System.Data.SqlClient.SqlError: There is insufficient free space on disk volume 'C:\ to create the database. The database requires 43502469120 additional free bytes, while only 12776620032 bytes are available. (Microsoft.SqlServer.Smo)
"
Why would i need 40GB of free space, to restore a .bak file of 1GB? What am i doing wrong? Please, help.
Sunday, June 20, 2010 6:42 PM
How big is the log file for this database? Check the source system and find out what the size of the log file is, I would bet it is very large and that the source system is not performing any transaction log backups. Then again, I could be wrong...
"alinne-marie" wrote in message ...
I have the same problem with sql server 2008 :(.
I am trying to restore a small DB (1GB), i have 12 GB free on my disk, and it gives me this error:
"System.Data.SqlClient.SqlError: There is insufficient free space on disk volume 'C:\ to create the database. The database requires 43502469120 additional free bytes, while only 12776620032 bytes are available. (Microsoft.SqlServer.Smo)
"Why would i need 40GB of free space, to restore a .bak file of 1GB? What am i doing wrong? Please, help.
Monday, August 23, 2010 5:32 PM
There are three possibilities that I can see:
1) There is something other than what you think there is in that backup file
2) The backup was taken with compression on, which can make the backup files many times smaller than the actual database.
3) The backup is corrupt in some way.
Please use the command RESTORE FILELISTONLY FROM DISK='mybackupfile.bak'
This should tell you what the contents of the backup file are.
You can also try RESTORE VERIFYONLY FROM DISK='mybackupfile.bak' to verify that the backup is intact.
Microsoft SQL Server Storage Engine PM
Sunday, August 29, 2010 2:58 PM
indeed, the log file was very big; i had to shrink the database first; for this i used this command: DBCC SHRINKDATABASE (myDatabase)
thank you for your responses :)
Sunday, January 16, 2011 12:49 AM
1) are you using move command while restoring if not then it might be going to different location where you do not have sufficient space
2) What is your original database size (reserved)? you will require that much of space.
3) In case your last transaction log restore requires more space than available then you may try try to follow steps described in articlehttp://www.sqlvillage.com/Articles/How%20to%20move%20files%20when%20database%20is%20in%20restoring%20state%20in%20SQL%20Server%202008.asp
Thanks, Mohan Kumar www.sqlvillage.com -- Please mark the post as answered if it answers your question.
I learned a lot from your answer, What you said it very valuable, Thanks for your reply!
Thursday, January 27, 2011 4:35 PM
My Pleasure Don!Thanks, Mohan Kumar - www.sqlvillage.com -- Please mark the post as answered if it answers your question.
Friday, December 9, 2011 12:59 PM
ThanksThanks Shiven:) If Answer is Helpful, Please Vote
Friday, January 8, 2016 1:29 PM
1) are you using move command while restoring if not then it might be going to different location where you do not have sufficient space
2) What is your original database size (reserved)? you will require that much of space.
3) In case your last transaction log restore requires more space than available then you may try try to follow steps described in article http://www.sqlvillage.com/Articles/How%20to%20move%20files%20when%20database%20is%20in%20restoring%20state%20in%20SQL%20Server%202008.asp
Thanks, Mohan Kumar www.sqlvillage.com -- Please mark the post as answered if it answers your question.
Just update the link: http://www.dataplatformexperts.com/how-to-move-files-when-database-is-in-restoringloading-state-in-sql-server-2008/
Friday, November 23, 2018 2:27 PM
I had the same issue sometimes trying to restore to new drives added to the server. Try looking for the security settings on the destination drive, the SQL service account which is running on the server should have full access in the drive that you're trying to use.
Regards,
Leonardo Almiron.