Friday, February 17, 2012

DBCC CHECKDB how to invoke to return any errors

Hello,
I would like to make intented error in the consistency of a database
and watch what will be the outcome from the DBCC CHECKDB.
Then train repair the database.
I would like to corrupt some data or index pages in mdf file.
How to do that ?
Tanks.
misoHmmmm...
well - you could try this, BUT BE CAREFUL!!! Do not run this on a live
database - it WILL break it!
It will definately cause DBCC CHECKDB to error.
Use this script at your own risk!!!
sp_configure allow, 1
go
reconfigure with override
go
update sysindexes set FirstIAM = 1234 where id = (select max(id) from
sysindexes)
go
sp_configure allow, 0
go
reconfigure with override
go
Immy
"Michal Valent" <valent@.spirit.sk> wrote in message
news:OeBJmQSRHHA.488@.TK2MSFTNGP06.phx.gbl...
> Hello,
> I would like to make intented error in the consistency of a database
> and watch what will be the outcome from the DBCC CHECKDB.
> Then train repair the database.
> I would like to corrupt some data or index pages in mdf file.
> How to do that ?
> Tanks.
> miso
>

No comments:

Post a Comment