Microsoft Knowledge Base Email Alertz

FIX: Error message when you try to change a column of a table by using the ALTER TABLE statement in SQL Server 2005: Could not allocate space

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 916780 - Last Review: April 19, 2006 - Revision: 1.1

FIX: Error message when you try to change a column of a table by using the ALTER TABLE statement in SQL Server 2005: "Could not allocate space"

BUG #: 430307 (SQLBUDT)

On This Page

SYMPTOMS

In Microsoft SQL Server 2005, when you try to change a column of a table by using the ALTER TABLE statement, various unpredictable problems may occur. For example, the following problems may occur:
  • Access violations may occur.
  • Assertions may occur.
  • The SQL Server service may stop.
  • A database may become corrupted.
  • You may receive error messages that are similar to the following:
    Error message 1
    Server: Msg 1105, Level 17, State 2, Line 1
    Could not allocate space for object 'ObjectName' in database 'DatabaseName' because the 'FileGroupName' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
    Error message 2
    Msg 109, Level 20, State 0, Line 0
    A transport-level error has occurred when receiving results from the server. (provider: Shared Memory Provider, error: 0 - The pipe has been ended.)

CAUSE

This problem occurs because the row size for the table is calculated incorrectly when SQL Server changes the column of the table.

RESOLUTION

Service pack information

To resolve this problem, obtain the latest service pack for SQL Server 2005. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
913089  (http://kbalertz.com/Feedback.aspx?kbNumber=913089/ ) How to obtain the latest service pack for SQL Server 2005

WORKAROUND

To work around this problem, use one of the following methods:
  • If the table is not a heap table, rebuild the indexes on the table. A heap table is a table that does not have a clustered index defined.
  • Use the DBCC CLEANTABLE statement to reclaim the space that is used by the dropped column. For example, use the following statement.
    DBCC CLEANTABLE ('DatabaseName','TableName')

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section. This problem was first corrected in SQL Server 2005 Service Pack 1.

APPLIES TO
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Express Edition
  • Microsoft SQL Server 2005 Workgroup Edition
Keywords: 
kbsql2005engine kbsql2005tsql kbsql2005presp1fix kbexpertiseadvanced kbfix KB916780
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate