I came across an interesting situation today that I thought I would pass along. A person contacted me asking about a specific error message:
Could not allocate space for object 'whatever' in database 'dbname' because the 'PRIMARY' filegroup is full
I asked them to verify that there was space available on the disk and they confirmed that there was. My next thought was to have them check the autogrowth settings and they came back and said the file was configured to autogrow. I didn’t have access to the server at the time so I asked them to next review the SQL error log for more details, just in case there might be something pertinent there.
They came back to say that they had found:
CREATE DATABASE or ALTER DATABASE failed because the resulting cumulative database size would exceed your licensed limit of 4096 MB per database.
So there you go. It is probably a good idea to read your SQL error logs first, but that doesn’t always happen. If you are ever asked to investigate a similar space issue it might be a good idea to ask about the version of SQL that is being used. There is quite a proliferation of SQL Express in the world these days and I bet people come across the 4GB limit quite often. And when they do they are likely to point and say “there’s a problem with the server and/or application”, which we know is not true, so be prepared.
I guess they could always upgrade to SQL Server 2008 R2 with its increased limite of 10GB. http://bit.ly/cnmSWy