SQL Server Database Full: Failed to Allocate Space for Object

My C # .NET 3.5 application uses MS SQL Server 2008 Express. I am writing a huge amount of data to the database. At some point, I get an exception:

Failed to allocate space for object 'dbo.Attachment'. 'PK_Attachme_3214EC0707020F21' in the database 'Cases' because the file group 'PRIMARY' is full. Create disk space by deleting unnecessary files, drop objects in the file group, add additional files to the file group, or set autorun for existing files in the file group.

Looking at the database, I see no problems: the initial size is set to 4Gb, auto-development is set to 1Mb (then I set it to 10%), but it did not matter.

The general property page shows that the database size is 4117M and the available space is 0.15M. Why doesn’t it increase the size automatically? Is this an Express limitation?

+3
source share
1 answer

SQL Server Express 2008 is limited to 4 GB.

SQL Server Express 2008 R2 is limited to 10 GB.

It looks like you have the first one. You may consider upgrading to the latest version of R2.

Wiki Link

MS Info for 2008 R2 releases .

and very related stack overflow

+6
source

Source: https://habr.com/ru/post/1766791/


All Articles