Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DBCC CHECKDB Errors

Status
Not open for further replies.

MrMystery

Technical User
Apr 24, 2002
39
GB
I am having a problem with a database on SQL 7.
When I run DBCC CHECKDB ('dbname') I get the following results.
Is there any way I can recover this database without having to restore from backup?

Server: Msg 8966, Level 16, State 5, Line 2
Could not read and latch page (1:380136) with latch type SH. PFS failed.
Server: Msg 8921, Level 16, State 1, Line 2
CHECKTABLE terminated. A failure was detected while collecting facts. Possibly tempdb out of space or a system table is corrupt. Check previous errors.
Server: Msg 8998, Level 16, State 1, Line 2
Page corruptions on the GAM, SGAM, or PFS pages do not allow CHECKALLOC to verify database ID 7 pages from (1:0) to (1:486344). See other errors for cause.
Server: Msg 8939, Level 16, State 1, Line 2
Table Corrupt: Object ID 0, index ID 0, page (1:380136). Test (!ISALLOCPGID (GetId ()) || m_objId == SYSALLOCPG) failed. Values are 0 and 99.
Server: Msg 8939, Level 16, State 1, Line 2
Table Corrupt: Object ID 0, index ID 0, page (1:380136). Test (m_headerVersion == HEADER_7_0) failed. Values are 0 and 1.
Server: Msg 8939, Level 16, State 1, Line 2
Table Corrupt: Object ID 0, index ID 0, page (1:380136). Test ((m_type >=DATA_PAGE && m_type <= UNDOFILE_HEADER_PAGE) || (m_type == UNKNOWN_PAGE && level == BASIC_HEADER)) failed. Values are 0 and 101.
Server: Msg 8939, Level 16, State 1, Line 2
Table Corrupt: Object ID 0, index ID 0, page (1:380136). Test (m_freeData >= PAGEHEADSIZE && m_freeData <= PAGESIZE - m_slotCnt * sizeof (Slot)) failed. Values are 0 and 8192.
Server: Msg 8939, Level 16, State 1, Line 2
Table Corrupt: Object ID 0, index ID 0, page (1:380136). Test (!ISALLOCPGID (GetId ()) || m_objId == SYSALLOCPG) failed. Values are 0 and 99.
Server: Msg 8939, Level 16, State 1, Line 2
Table Corrupt: Object ID 0, index ID 0, page (1:380136). Test (m_headerVersion == HEADER_7_0) failed. Values are 0 and 1.
Server: Msg 8939, Level 16, State 1, Line 2
Table Corrupt: Object ID 0, index ID 0, page (1:380136). Test ((m_type >=DATA_PAGE && m_type <= UNDOFILE_HEADER_PAGE) || (m_type == UNKNOWN_PAGE && level == BASIC_HEADER)) failed. Values are 0 and 101.
Server: Msg 8939, Level 16, State 1, Line 2
Table Corrupt: Object ID 0, index ID 0, page (1:380136). Test (m_freeData >= PAGEHEADSIZE && m_freeData <= PAGESIZE - m_slotCnt * sizeof (Slot)) failed. Values are 0 and 8192.
DBCC results for 'agrprod'.
CHECKDB found 1 allocation errors and 9 consistency errors not associated with any single object.
CHECKDB found 1 allocation errors and 9 consistency errors in database 'agrprod'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
 
How much room is there on the harddrive? It implies that maybe your tempdb is not big enough, so you might try expanding it and rerun your DBCC command. Why were you running DBCC CHECKDB in the first place? Were you having problems with your database before? How big is your database 'agrprod'?

Thank you.
 
My database is approx 5 Gb. I have 20 Gb free on my hard drive.
The reason for running DBCC CHECKDB was because I was having problems running SQL queries on one of the tables

This doesnt happen with any other table, therefore I can't believe that it is actually a network connection problem.

It would return a couple of rows and then give me the following error ;

[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionCheckForData (CheckforData()).
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]General network error. Check your network documentation.

Connection Broken

Any help would be appreciated!
 
Look at your tempdb and verify that it has room,if not expand it. Next run DBCC CHECKTABLE against the one table you are having problems with. See if that can get you going.

Good Luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top