Resolving errors related to "PRIMARY filegroup is full'

Issue:

Receiving an error message similar to the following:

Unexpected error occured in PAData:minsExecuteQuery
Could not allocate space for object 'dbo.sometable' in database 'PRINTAUDIT' 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.
You may encounter this error in a number of places, it could potentially be raised for any action which would involve writing new data to the database (a new user, a new job, a new printer, a new custom field value, etc. etc.)
Cause:
There is no additional room in the database.

Resolution:

Export old job data for archival (using Job Manager) and delete the old job data from the database. Other objects like former users, old printers/workstations, and custom field values that are no longer needed may be deleted as well, but only after all the print jobs associated with them have been deleted. For example to delete a custom field value that represents a former customer, you need to delete all the jobs with that custom field value associated first, then you can delete the custom field value.
Another alternative is to start with a new clean database. You can use Database Maintenance to create a new blank PrintAudit database, after activating the new database you can determine what if any data needs to be exported from the old database and imported into the new (typically custom field values, in some cases, Users.)
Typically this issue shows up with SQL Express installations, as there is a limit to the database size under SQL Express. So another option would be to create a new database on a full version of SQL, then use the export/import method to pull as much data as possible from the old to the new, or use the Database Migration Wizard, if available, to migrate the complete contents.

How did we do with this article?