JanuarioFL


Hy to all,

I'm new to this forum and I'm trying to find out a solutiona for a huge problem in a SQL2005 DB.

When I run DBCC CHECKDB it gives me the folowing error:

Msg 7985, Level 16, State 2, Line 1

System table pre-checks: Object ID 5. Could not read and latch page (1:64255) with latch type SH. Check statement terminated due to unrepairable error.

DBCC results for 'testdb'.

Msg 5233, Level 16, State 106, Line 1

Table error: alloc unit ID 327680, page (1:64255). The test (m_freeCnt == freeCnt) failed. The values are 6687 and 6688.

CHECKDB found 0 allocation errors and 1 consistency errors not associated with any single object.

CHECKDB found 0 allocation errors and 1 consistency errors in database 'testdb'.

Can someone help me please

Thanks in advanced...





Re: SQL 2005 DB Error

ggciubuc


Try to use the arguments (REPAIR_ALLOW_DATA_LOSS | REPAIR_FAST | REPAIR_REBUILD ) of DBCC CHECKDB

command.(For more see books online)

Another ideea is to export database objects into another.







Re: SQL 2005 DB Error

Sue Hoegemeier

Don't run a repair_allow_data_loss - that's the last resort for when you don't even have a backup to use and absolutely no other alternative. I would suspect that the repair options may not have any effect anyway. It looks a lot like a clustered index corruption. Restoring from a backup is generally the best course of action. - if you've had this issue for awhile, that may not be an option for you. In that case, contact PSS. If it's not a critical database and it's not suspect, start by poking around the DBCC articles in this blog:

http://blogs.msdn.com/sqlserverstorageengine/archive/tags/DBCC/default.aspx

If you can poke around with this, do a DBCC PAGE on page 64255 to find what object is associated with that page. You could try dropping the clustered index and then adding it back. Or try rebuilding that one table.

-Sue






Re: SQL 2005 DB Error

Paul Randal

One of the pages at the leaf-level of a critical system table (on which CHECKDB bases all the rest of its checks) is corrupt, and so no checks can proceed. See my blog post http://blogs.msdn.com/sqlserverstorageengine/archive/2006/06/19/636410.aspx for details.

ggcuibuc - none of the repair options will work as this is an unrepairable error as the output clearly states - 'Check statement terminated due to unrepairable error' and as Sue says, this would be a last resort and is really bad advice.

Your only options here are to restore from a backup or suck as much data as possible into another database. Make sure you check the SQL Server error logs and Windows event logs for clues as to what could have caused the corruption.

Thanks






Re: SQL 2005 DB Error

JanuarioFL

Hy all!

thank you all for your comments. I like to waite for diferent prespectives of same problem!

In fact the database is corupted because the server unexpected shutdown when sql transactions are runing....

There's no backups at all.... Sad

I will try to suck the information... the problem is that we are talking about 5000 tables withe thousands of rows each!!!

there's only one table corupted and I have already detected witch one. I can "rebuild" that table using some triggers... the problem is to move all data....

Thanks for your help.

I would like to have even more comments.

Bye.

Janu






Re: SQL 2005 DB Error

Paul Randal

Feel free to wait for other perspectives - but you'll be waiting a long time :-) I wrote DBCC CHECKDB for 2005 and I don't believe there's a different way to explain that error message, or your options for recovery.

One other things I'd add is that you should get a backup strategy sorted out...






Re: SQL 2005 DB Error

JanuarioFL

For sure Paul!

I'm moving the database for another server in order to aloud backups...

I have already started to recover BD acording with your advice (since 2/3 weeks ago), in fact I have posted to verify if theres a simplyest way to do it.

Thanks a lot your comments are important

Bye