I am getting an error Msg 2503, Level 16, State 1 Table Corrupt on my SQL Server - what can I do?
March 4, 1999
A. Full error message is - "Msg 2503, Level 16, State 1 TableCorrupt: Page linkage is not consistent; check the following pages: currentpage#=xxx; page# pointing to this page=yyyy; previous page#=zzzz"
Make sure that is a "real" 2503 by running the dbcc in single-usermode as they can be spuriously reported if updates are occuring at the time ofthe dbcc.
At this point if you have a good backup and will not lose any data, then nowis the time to use it. If you don't have a good backup then look at your backupprocedures! To try and resolve the problem read on :-
Use DBCC PAGE (doc'd in the Books Online) to determine whether the page is adata or index page. If it is an index you are in luck and you may be able todrop and recreate the index.
If it is not an index page or this does not work then you will need totransfer all the data/objects into a new database. For the problem table(s)this may not work as the page chain is broken, so you will probably need tomanually select out data in ranges based on keys above and below the brokenpoint.
Once you have transferred all the objects across drop the old database andrename the new one.
If you don't want to transfer all the data across then you can just do thebroken table. When this is done, rename the broken table by directly updatingit's name in sysobjects. Then create a new table with the old name. Make sureno other errors are in the database first. Make sure you also re-create anyviews/stored-procedures that reference the table so that they start pointing tothe new one.
If the above is not possible due to the size of the database or otherreasons then your only alternative is to pay for Microsoft PSS support who maybe able to patch the pointers in the tables/pages directly for you. Howeverthis sort of fix is not guaranteed and is done (if at all) on a best effortsbasis totally at your risk.
About the Author
You May Also Like