Apr 13, 2014

Could not allocate a new page for database '' because of insufficient disk space in filegroup 'PRIMARY'. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup

When we are creating a new database objects like table, database or trying to insert records into a table we may get error message like:

Could not allocate a new page for database '' because of insufficient disk space in filegroup 'PRIMARY'. Create the necessary space by dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.

Cause: You have less disk space in the file group where data is stored.

Solution: Solution is very simple you have to increase the disk space. We can do it by following ways:

1. Delete the unnecessary file from the disk.

2. Empty recycle bin.

3. Delete unnecessary database backup files. Default path of database backup files is: C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLSERVER\MSSQL\Backup

4. Delete the records from big tables. After that shrink database to release the disk spaces. To shrink database, use following script:


DBCC SHRINKDATABASE (YourDbName, 10);

No comments:

Post a Comment