Frage

I have written scripts for database maintains plan

now i want to test my script

i dont have any currpted database then how can i belive my integirty check script giving right error message if my DB is corrpted

i want to corrpt my database to test this how to corrpt the databse :)

DBCC CHECKDB WITH NO_INFOMSGS; GO

War es hilfreich?

Lösung

Paul Randal has some corrupted databases on the the SQL Skills site.

See www.sqlskills.com

http://www.sqlskills.com/blogs/paul/corruption-demo-databases-and-scripts/

Andere Tipps

For a possible test scenario, drop constraints and/or triggers, corrupt your data (i.e. set former-foreign key references to NULL) then see if your script detects the corruption.

Get to the internal services and delete stuff that looks important. If that is not what you want then copy all the files onto a flash drive and repeatedly eject it incorrectly - eventually it will be corrupted. Then upload it back onto the server machine and check. But the likelihood is that your script will be corrupted

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top