×


Could not allocate space for object sql server error

Are you having a hard time fixing the error 'Could not allocate space for object' sql server error?

This guide is for you.


Generally, the database stores the website details. SQL Server Management Studio is used to manage the MSSQL database. Also, the SQL Server Management Studio has set a default size limit for each database.

When we reach this limit the error message 'Could not allocate space for object' occurs on the website.

There is multiple maintenance job that is running at the background in SQL server by default. The details are logged in tables which makes the database size to increase. Another reason is that the database utilizes the maximum size by adding contents in the database.


Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to fix database related errors.

In this context, we shall look into how to fix this SQl error.


How we resolve the SQL Server error "Could not allocate space for object"  ?

Here are the steps to follow to resolve the error.


1. Increasing the size limit of the database

First, we analyze the size of the database. After determining it from SQL Server Management Studio we increase the size of the database. The Plesk user manages the database from mylittleadmin. The option to increase the size is not available in mylittleadmin.

There is a restriction when increasing the database size for SQL server express edition. While, Microsoft SQL Server 2008 express the database size can be increased up to 4GB. The version from Microsoft SQL Server 2008 R2 express and above let us to increase the database size to 10GB.


2. Decreasing the size of the database

If the current database size has reached its limit, we will decrease the size of the database.

We will truncate the log tables to decrease the size of the database. There can be multiple log tables in the database. We find out the log tables that are consuming high disk space and truncate the table.

Here is the SQL query we use to truncate the log files:

truncate table tablename;

Truncating the non-log tables will crash the database. As a precaution, we always take the database backup before performing such tasks.


[Still not able to fix this SQL error? We're available if any assistance is required. ]


Conclusion

This article will guide you on how to fix #SQl #error "Could not allocate space for object" which occurs due to insufficient space in the database. 

SQL SERVER – Msg 1105 – Could Not Allocate Space for #Object Name in Database ‘DB’ Because the ‘PRIMARY’ Filegroup is Full.

Whenever you get such error check below:

1. Check if auto growth is restricted.

2. Check if auto growth is set to a high value which would cause disk space to become full.

3. Check if disk space is low.

4. Check SQL edition because SQL #Express has a database file size limit.

Here is the command to set the growth to UNLIMITED:

[sq]USE [master] GO

ALTER DATABASE


[SQLAuthDB] MODIFY FILE (NAME = N’SQLAuthDB’, MAXSIZE = UNLIMITED)

GO[/sql]