How much space needed for 'Could not allocate space for object'

  • Hello experts,

    I'm working on the following error:

    ALTER INDEX [] ON [dbo].[..." failed with the following error: "Could not allocate space for object 'dbo.'.'' ... because the 'PRIMARY' filegroup is full

    Is there a way to get info on how much space that command was trying to allocate, so I can troubleshoot?

    In particular, I would normally expand the database accordingly. But (1) I don't know how much space I need from the error above and (2) I want to know whether to ask our systems people expand the entire drive to allow for more space as well.

    Also, in this case the database growth is not Unlimited but set to a specific size such as 250 GB.

    Thanks for any help.

    -- webrunner

    • This topic was modified 4 years, 5 months ago by  webrunner.

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html

  • as a rule always allow for free space 2.5 times the space of your biggest index. - both on data and on log file

    1. Get the count of the number of rows on the table
    2. Get the average size of all the columns on the index
    3. Multiply the answers from 1. and 2. together

    Then add a bit to that result for some of the index overheads.

  • Thanks both!!

    -- webrunner

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply