How can I use it on the dbo.syscomments table with only
REPAIR_REBUILD mode ?
DBCC CHECKTABLE
( 'table_name' | 'view_name'
[ , NOINDEX
| index_id
| { REPAIR_ALLOW_DATA_LOSS
| REPAIR_FAST
| REPAIR_REBUILD }
]
) [ WITH { [ ALL_ERRORMSGS | NO_INFOMSGS ]
[ , [ TABLOCK ] ]
[ , [ ESTIMATEONLY ] ]
[ , [ PHYSICAL_ONLY ] ]
}
]
What error are you trying to repair?
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"MK" <anonymous@.discussions.microsoft.com> wrote in message
news:000001c4ac8f$6818c0d0$a501280a@.phx.gbl...
> How can I use it on the dbo.syscomments table with only
> REPAIR_REBUILD mode ?
>
> DBCC CHECKTABLE
> ( 'table_name' | 'view_name'
> [ , NOINDEX
> | index_id
> | { REPAIR_ALLOW_DATA_LOSS
> | REPAIR_FAST
> | REPAIR_REBUILD }
> ]
> ) [ WITH { [ ALL_ERRORMSGS | NO_INFOMSGS ]
> [ , [ TABLOCK ] ]
> [ , [ ESTIMATEONLY ] ]
> [ , [ PHYSICAL_ONLY ] ]
> }
> ]
>
>
|||Yuu should be able to run DBCC CHECKTABLE ('syscomments', REPAIR_REBUILD) without a problem. This will only allow REPAIR to repair errors that can be fixed by a rebuild the clustered index on syscomments. Have you found corruption in this table? I'm curious as to why you're looking for a way to do this.
Thanks,
Ryan Stonecipher
Microsoft SQL Server Storage Engine, DBCC
"MK" <anonymous@.discussions.microsoft.com> wrote in message news:000001c4ac8f$6818c0d0$a501280a@.phx.gbl...
How can I use it on the dbo.syscomments table with only
REPAIR_REBUILD mode ?
DBCC CHECKTABLE
( 'table_name' | 'view_name'
[ , NOINDEX
| index_id
| { REPAIR_ALLOW_DATA_LOSS
| REPAIR_FAST
| REPAIR_REBUILD }
]
) [ WITH { [ ALL_ERRORMSGS | NO_INFOMSGS ]
[ , [ TABLOCK ] ]
[ , [ ESTIMATEONLY ] ]
[ , [ PHYSICAL_ONLY ] ]
}
]
|||DBCC CHECKTABLE ('syscomments')
GO
Server: Msg 8978, Level 16, State 1, Line 1
Table error: Object ID 6, index ID 1. Page (1:94571) is
missing a reference from previous page (1:1031985).
Possible chain linkage problem.
Server: Msg 8976, Level 16, State 1, Line 1
Table error: Object ID 6, index ID 1. Page (1:1031984) was
not seen in the scan although its parent (1:51) and
previous (4:4594265) refer to it. Check any previous
errors.
Server: Msg 8976, Level 16, State 1, Line 1
Table error: Object ID 6, index ID 1. Page (1:1031985) was
not seen in the scan although its parent (1:51) and
previous (1:94572) refer to it. Check any previous errors.
Server: Msg 8978, Level 16, State 1, Line 1
Table error: Object ID 6, index ID 1. Page (4:2785610) is
missing a reference from previous page (1:1031984).
Possible chain linkage problem.
DBCC results for 'syscomments'.
There are 674 rows in 133 pages for object 'syscomments'.
CHECKTABLE found 0 allocation errors and 4 consistency
errors in table 'syscomments' (object ID 6).
repair_rebuild is the minimum repair level for the errors
found by DBCC CHECKTABLE (SAB.dbo.syscomments ).
>--Original Message--
>What error are you trying to repair?
>--
>Paul Randal
>Dev Lead, Microsoft SQL Server Storage Engine
>This posting is provided "AS IS" with no warranties, and
confers no rights.
Friday, February 24, 2012
DBCC CHECKTABLE with REPAIR_REBUILD
Labels:
checktable,
database,
dbcc,
dbo,
microsoft,
mode,
mysql,
noindex,
onlyrepair_rebuild,
oracle,
repair_rebuild,
server,
sql,
syscomments,
table,
table_name,
view_name
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment