Corrupt Database | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Corrupt Database

I had a raid failure on a SQL 200 SP4 server and i have a database that states it is corrupt. I am very new to SQL and would like to know if there is a way to repair the database with out losing data. The only non corrupt backup i have is 7 days old so i am unable to revert to it. I ran DBCC CHKDB and got the below results. Any advise would be greatly appreciated.<br /><br />DBCC results for ‘KShipU’.<br />DBCC results for ‘sysobjects’.<br />There are 98 rows in 2 pages for object ‘sysobjects’.<br />DBCC results for ‘sysindexes’.<br />There are 211 rows in 10 pages for object ‘sysindexes’.<br />DBCC results for ‘syscolumns’.<br />There are 657 rows in 14 pages for object ‘syscolumns’.<br />DBCC results for ‘systypes’.<br />There are 26 rows in 1 pages for object ‘systypes’.<br />DBCC results for ‘syscomments’.<br />There are 131 rows in 16 pages for object ‘syscomments’.<br />DBCC results for ‘sysfiles1’.<br />There are 2 rows in 1 pages for object ‘sysfiles1’.<br />DBCC results for ‘syspermissions’.<br />There are 49 rows in 1 pages for object ‘syspermissions’.<br />DBCC results for ‘sysusers’.<br />There are 14 rows in 1 pages for object ‘sysusers’.<br />DBCC results for ‘sysproperties’.<br />There are 0 rows in 0 pages for object ‘sysproperties’.<br />DBCC results for ‘sysdepends’.<br />There are 474 rows in 3 pages for object ‘sysdepends’.<br />DBCC results for ‘sysreferences’.<br />There are 0 rows in 1 pages for object ‘sysreferences’.<br />DBCC results for ‘sysfulltextcatalogs’.<br />There are 0 rows in 1 pages for object ‘sysfulltextcatalogs’.<br />DBCC results for ‘sysfulltextnotify’.<br />There are 0 rows in 0 pages for object ‘sysfulltextnotify’.<br />DBCC results for ‘sysfilegroups’.<br />There are 1 rows in 1 pages for object ‘sysfilegroups’.<br />DBCC results for ‘Addresses’.<br />There are 2551 rows in 59 pages for object ‘Addresses’.<br />DBCC results for ‘AddressGroups’.<br />There are 0 rows in 1 pages for object ‘AddressGroups’.<br />DBCC results for ‘AddressGroups_Addresses’.<br />There are 0 rows in 1 pages for object ‘AddressGroups_Addresses’.<br />DBCC results for ‘Commodities’.<br />There are 5 rows in 2 pages for object ‘Commodities’.<br />DBCC results for ‘ContentOptions’.<br />There are 561205 rows in 5471 pages for object ‘ContentOptions’.<br />DBCC results for ‘Departments’.<br />There are 1 rows in 1 pages for object ‘Departments’.<br />DBCC results for ‘Dimensions’.<br />There are 0 rows in 1 pages for object ‘Dimensions’.<br />DBCC results for ‘DupeCheck’.<br />There are 0 rows in 1 pages for object ‘DupeCheck’.<br />DBCC results for ‘PackageOptions’.<br />There are 505571 rows in 3539 pages for object ‘PackageOptions’.<br />DBCC results for ‘Preferences’.<br />There are 176 rows in 4 pages for object ‘Preferences’.<br />DBCC results for ‘ShipmentOptions’.<br />There are 893191 rows in 5598 pages for object ‘ShipmentOptions’.<br />DBCC results for ‘StateZip’.<br />There are 0 rows in 1 pages for object ‘StateZip’.<br />DBCC results for ‘ManSendLog’.<br />There are 8505 rows in 144 pages for object ‘ManSendLog’.<br />DBCC results for ‘ShipmentCounter’.<br />There are 0 rows in 8 pages for object ‘ShipmentCounter’.<br />DBCC results for ‘ObjectProperties’.<br />There are 273 rows in 4 pages for object ‘ObjectProperties’.<br />DBCC results for ‘ShipAddresses’.<br />There are 0 rows in 1 pages for object ‘ShipAddresses’.<br />DBCC results for ‘IntlInfo’.<br />There are 57 rows in 2 pages for object ‘IntlInfo’.<br />DBCC results for ‘dtproperties’.<br />There are 0 rows in 1 pages for object ‘dtproperties’.<br /><font color="red">DBCC results for ‘Packages’.<br />Server: Msg 8928, Level 16, State 1, Line 1<br />Object ID 1397580017, index ID 0: Page (1:7016) could not be processed. See other errors for details.<br />Server: Msg 8944, Level 16, State 1, Line 1<br />Table error: Object ID 1397580017, index ID 0, page (1:7016), row 1. Test (ColumnOffsets &lt;= (nextRec – pRec)) failed. Values are 16336 and 219.<br />Server: Msg 8909, Level 16, State 1, Line 1<br />Table error: Object ID 1397580017, index ID 0, page ID (1:7017). The PageId in the page header = (1:7021).<br />Server: Msg 8928, Level 16, State 1, Line 1<br />Object ID 1397580017, index ID 0: Page (1:7017) could not be processed. See other errors for details.<br />Server: Msg 8909, Level 16, State 1, Line 1<br />Table error: Object ID 1397580017, index ID 0, page ID (1:701<img src=’/community/emoticons/emotion-11.gif’ alt=’8)’ />. The PageId in the page header = (1:7022).<br />Server: Msg 8928, Level 16, State 1, Line 1<br />Object ID 1397580017, index ID 0: Page (1:701<img src=’/community/emoticons/emotion-11.gif’ alt=’8)’ /> could not be processed. See other errors for details.<br />Server: Msg 8909, Level 16, State 1, Line 1<br />Table error: Object ID 1397580017, index ID 0, page ID (1:7019). The PageId in the page header = (1:7023).<br />Server: Msg 8928, Level 16, State 1, Line 1<br />Object ID 1397580017, index ID 0: Page (1:7019) could not be processed. See other errors for details.<br />Server: Msg 8928, Level 16, State 1, Line 1<br />Object ID 1397580017, index ID 0: Page (1:7020) could not be processed. See other errors for details.<br />Server: Msg 8909, Level 16, State 1, Line 1<br />Table error: Object ID 1414549324, index ID 12848, page ID (1:7020). The PageId in the page header = (52672:1703984).<br />There are 778187 rows in 22412 pages for object ‘Packages’.<br />CHECKDB found 0 allocation errors and 9 consistency errors in table ‘Packages’ (object ID 1397580017).<br />CHECKDB found 0 allocation errors and 1 consistency errors in table ‘(Object ID 1414549324)’ (object ID 1414549324).</font id="red"><br />DBCC results for ‘Shipments’.<br />There are 733773 rows in 73036 pages for object ‘Shipments’.<br />DBCC results for ‘PackageHazmat’.<br />There are 0 rows in 1 pages for object ‘PackageHazmat’.<br />DBCC results for ‘ArchiveLog’.<br />There are 0 rows in 0 pages for object ‘ArchiveLog’.<br />CHECKDB found 0 allocation errors and 10 consistency errors in database ‘KShipU’.<br />repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (KShipU ).<br />DBCC execution completed. If DBCC printed error messages, contact your system administrator.<br />
Run this command to see if you can repair any minor errors DBCC CHECKDB (‘KShipU’, REPAIR_FAST) this will not expose you to data loss. Raulie
I will try this tonight and post the results again. Thanks for you quick response
99% of the times repair_fast will not work… First thing if you can get the data out copy the data to a new table…
Then take the row count and run the repair with repair_allow_data_loss option… If table not repaired with repair_allow_data_loss option and you were able to take out the data to a new table then drop the existing table and rename the new table…
MohammedU.
Microsoft SQL Server MVP
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.

There was a good disucussion by Paul Randal inhttp://www.sqlteam.com/forums/topic.asp?TOPIC_ID=64564&http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=58529 links. Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing. Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it.
]]>