question

cliveswan-6857 avatar image
0 Votes"
cliveswan-6857 asked Cathyji-msft answered

'PRIMARY' filegroup is full

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

sql-server-generalsql-server-transact-sql
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ErlandSommarskog avatar image
1 Vote"
ErlandSommarskog answered

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Cathyji-msft avatar image
1 Vote"
Cathyji-msft answered Cathyji-msft edited

Hi @cliveswan-6857 ,

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.




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

cliveswan-6857 avatar image
0 Votes"
cliveswan-6857 answered ErlandSommarskog commented

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??!



[1]: /answers/storage/attachments/133338-general.png

[2]: /answers/storage/attachments/133396-files.png


general.png (15.3 KiB)
files.png (18.4 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

So what does "SELECT @@version" report?

0 Votes 0 ·
Cathyji-msft avatar image
0 Votes"
Cathyji-msft answered

Hi @cliveswan-6857,

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.