Microsoft KB Archive/132448

= INFO: Using DBCC FIX_AL =

Article ID: 132448

Article Last Modified on 2/22/2005

-

APPLIES TO


 * Microsoft SQL Server 4.21a Standard Edition
 * Microsoft SQL Server 6.0 Standard Edition
 * Microsoft SQL Server 6.5 Standard Edition

-



This article was previously published under Q132448



SUMMARY
This article provides information about running the DBCC FIX_AL command.



MORE INFORMATION
The DBCC FIX_AL command (short for "fix allocation") can be used to fix 2540 and 2521 errors detected by DBCC CHECKALLOC or DBCC NEWALLOC. Run DBCC CHECKDB and check to ensure that no other errors exist before running the FIX_AL command. The database must be in single user mode before running the FIX_AL command, and you should run this command from a database other than the one being fixed.

The DBCC FIX_AL command makes the allocation bitmaps match the actual data or index page chains. If there are any errors in the page chains, you should not run the FIX_AL command because it will try to rebuild the allocation bitmaps according to the information from the damaged chains.

The FIX_AL command will run the equivalent of a DBCC NEWALLOC to gather the necessary information to rebuild the bitmaps, and to try to ensure that no other errors will prevent it from running. After this, it will rebuild the bitmaps for all pages in the database.

The following is a script that could be used to run FIX_AL against the "pubs" database:

use master go  sp_dboption pubs, single, true go  use pubs go  checkpoint go  use master go  dbcc fix_al(pubs) go  sp_dboption pubs, single, false go  use pubs go  checkpoint go

Additional query words: Windows NT

Keywords: kbinfo kbother KB132448

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.