'PRIMARY' filegroup is full

Posted on 2009-04-22
Last Modified: 2012-05-06
Trying to run a sql job I get "Could not allocate space for object (table name) in database (db name) because the 'PRIMARY' filegroup is full. [SQLSTATE 42000] [Erro 1105] The step failed.  How do I clean up the filegroup as backing up the database doesn't seem to be working?  I am running sql 2000.
Question by:jimhallenjr
    LVL 4

    Assisted Solution

    Backing up the database will not help.  You need to increase the size of the PRIMARY datafile.


    DBName - Name of the database
    FileName - Logical file name of the datafile.
    X - You can specify in MB, GB.  If the database is currently 10MB you could change the X to 20MB.  If your database is 5GB you could change X to 6GB.  Obviously this depends on how much space you have.

    LVL 31

    Accepted Solution

    ThorSG1 gave you perfect solution but this problem keep occurring when your given limit will full again, you can do one thing, you can set your primary file group for auto growth, however, you can limit autogrowth so that it will not be grown more than your limit.


    Right click on database from SSMS

    click on property and follow screen shot.
    LVL 142

    Expert Comment

    by:Guy Hengel [angelIII / a3]
    question: what edition is your sql installation?
    I ask, because if it's sql express, your database size is limited and cannot be grown.

    apart from that, I agree than manually resizeing the data file is a good method, however, you should check out if your have only 1 filegroup (PRIMARY) to move your tables and indexes to dedicated filegroups, which shall increase I/O performance.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
    I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    This video discusses moving either the default database or any database to a new volume.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now