On Windows Servers running Microsoft SQL Server, you may encounter an error “Could not allocate space for object” or “Primary filegroup is full” in the course of normal operations:
Unhandled Exception: System.Data.SqlClient.SqlException: Could not allocate space for object 'dbo.SearchedUserItems' ... in database 'db_database' 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.at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)...
This error is basically equivalent to a “disk full” error. It means the database does not have any space left to expand, according to its pre-defined size restrictions.
First, do a quick check to ensure your Windows Server or VPS has sufficient free disk space on C: or your SQL partition. It’s possible that your server or VPS is simply out of space!
If the server has enough disk space, follow these steps to update the Storage Allocation for the database.
Cick OK. (You might also want to consider your “Autogrowth” values while you’re here.)
You want to give your database as much storage allocation as you can afford to give it. If it runs out of space you’ll receive this error without auto-grow on and if auto-grow is on you’ll take a performance hit each time it has to auto-grow.
(Originally posted on: https://dba.stackexchange.com/questions/33700/primary-filegroup-is-full-sql-server-2008/)
This article applies to:

Lightning-fast VPS hosting with enterprise SSD storage, global data centers, and 99.99% uptime. Built for developers, trusted by enterprises.
support@solvps.com
1-888-256-8213
Live Chat Now