'PRIMARY' filegroup is full

clive swan 1 Reputation point
2021-09-16T18:01:11.037+00:00

Greetings,

I am getting a 1105 error message: 'PRIMARY' filegroup is full, when to a I try to add data to a table.

I tried running an ALTER INDEX ALL

I tried to remove data from the file group, was unable to.

This doesn't work.

I would appreciate any

Developer technologies Transact-SQL
SQL Server Other
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2021-09-16T22:03:44.163+00:00

    What is the output from sp_helpdb on your database?

    How much free space is there on the drive?

    How big is the database?

    In most cases, the fastest solution to this problem is to see your local hardware dealer to get more disk space.

    2 people found this answer helpful.
    0 comments No comments

  2. CathyJi-MSFT 22,396 Reputation points Microsoft External Staff
    2021-09-17T02:58:11.347+00:00

    Hi @clive swan ,

    When we set the value of the MAXSIZE parameter limited to a specific value, we might encounter the Primary filegroup is full error. This error also occurs when we are using the SQL Server express edition. The maximum allowed size of the database in SQL Server Express edition is 10GB. When the database tries to grow beyond 10GB, the user will encounter the Primary filegroup is full error.

    Please check the following things to resolve your issue.

    1. Using select @@version to check your SQL server version.
    2. Please check the value of the MAXSIZE parameter of your database from SSMS UI. If the value of maxsize is small, suggest you resetting it to a suitable value or setting it to unlimited. Please also make sure that you enabled auto growth for the database files.

    132899-screenshot-2021-09-17-105304.jpg

    132909-screenshot-2021-09-17-105345.jpg

    3... Using below powershell command to check the available disk space in the workstation.

    Get-WmiObject -Class Win32_logicaldisk -Filter "DriveType = '3'" |   
    Select-Object -Property DeviceID, DriveType, VolumeName,   
    @{L='AvailableSpace';E={"{0:N2}" -f ($_.FreeSpace /1GB)}},  
    @{L="TotalDiskSize";E={"{0:N2}" -f ($_.Size/1GB)}}  
    

    Refer to the blog Resolving SQL Server errors: The Primary Filegroup is full to get more detail information.


    If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar thread.

    2 people found this answer helpful.
    0 comments No comments

  3. CathyJi-MSFT 22,396 Reputation points Microsoft External Staff
    2021-09-20T02:13:41.887+00:00

    Hi @clive swan ,

    Please using select @@version to check your SQL server edition. And share us the output.

    When you set up a database you set the initial size and the autogrowth. Let's say 10MB and 2MB.

    When the db achieve 9MB the available space is 1MB, but when it achieves 10MB the autogrowth reset the maximun size to 12MB (10MB initial size + autogrowth 2). So if you are at 9MB the available size is 1MB (to 10MB) but when achieve 10MB the available size is 2MB (to 12MB). The available size in database properties will not limit the database growth.

    By the way, suggest you setting the max size of log file to unlimited.


    If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar thread.

    1 person found this answer helpful.
    0 comments No comments

  4. clive swan 1 Reputation point
    2021-09-19T21:33:37.603+00:00

    I ran the script and got:
    DeviceID : C:
    DriveType : 3
    VolumeName :
    AvailableSpace : 233.06 GB
    TotalDiskSize : 950.71 GB

    The database size is: 10282.25 MB
    The maxserver memory is: 2147483647 MB

    I set the Filegroup to unlimited.

    Under General it says there is 0.23MB available??!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.