Microsoft KB Archive/272220

From BetaArchive Wiki
Knowledge Base


Article ID: 272220

Article Last Modified on 3/14/2006



APPLIES TO

  • Microsoft SQL Server 7.0 Standard Edition



This article was previously published under Q272220

BUG #: 57959 (SQLBUG_70)

SYMPTOMS

If you delete text or image data, space may not be reused when new data is inserted. This can lead to the sp_spaceused stored procedure showing unused space within a table, but an attempt to insert new data will either cause the relevant files to grow or fail with errors of type 1105:

Could not allocate space for object '%.*ls' in database '%.*ls' because the '%.*ls' filegroup is full.

CAUSE

When space is required for text or image data outside of the pages maintained by the current Page Free Space (PFS) page, that space is allocated by searching for a full free extent, to optimize for speed. This leaves partially used extents with space that will not be reused unless those extents become completely free.

For further information about PFS pages and allocation, see SQL Server Books Online.

WORKAROUND

To defragment the text or image data and recover the unavailable unused space, use the bulk copy program (BCP) to bulk copy the data out of the table and then back into the table so that the storage will then be contiguous.

STATUS

Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

274799 INF: How to Obtain Service Pack 3 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0


For more information, contact your primary support provider.

MORE INFORMATION

With the fix installed, the allocation will start using free pages within existing extents when no more free extents can be allocated. This will only happen when the files within the relevant filegroup are unable to grow. Text or image data can be stored to a specified filegroup using the TEXTIMAGE_ON clause of the CREATE TABLE statement in order to place text or image data separately and reserve space for other data.

Alternatively, with the fix installed, you can use trace flag 1180 to force allocation to use free pages for text or image data and maintain efficiency of storage; however, this may impact performance.


Additional query words: data type datatype

Keywords: kbbug kbfix kbqfe KB272220