My C# .NET 3.5 application uses MS SQL Server 2008 Express. I am writing huge amount of data to the database. At some point I get an exception:
Could not allocate space for object 'dbo.Attachment'.'PK_Attachme_3214EC0707020F21' in database 'Cases' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
Looking in the database I cannot see any problems: the initial size is set to 4Gb, autogrowth is set by 1Mb (I then set it to 10%) but this did not make any difference.
General page of properties shows me that database size is 4117M and the space av开发者_如何学Cailable is 0,15M. Why doesn't it increase the size automatically? Is it Express restriction?
SQL Server Express 2008 is limited to 4GB.
SQL Server Express 2008 R2 is limited to 10GB.
Sounds like you have the first one. You might consider just upgrading to the latest R2 edition.
Wiki link
MS Info for 2008 R2 editions.
and a Very Related Stack Overflow link
精彩评论