![]() ![]() WHERE NUMBER < = 500000 -Cluster on BirdId.ĬREATE UNIQUE CLUSTERED INDEX cxBirdsBirdId ON dbo.DeadBirdies(BirdId) INSERT dbo.DeadBirdies (birdId, birdName, rowCreatedDate) Tally AS ( SELECT ROW_NUMBER() OVER( ORDER BY C) AS NUMBER FROM Pass5) Pass5 AS ( SELECT 1 AS C FROM Pass4 AS A, Pass4 AS B), Pass4 AS ( SELECT 1 AS C FROM Pass3 AS A, Pass3 AS B), Pass3 AS ( SELECT 1 AS C FROM Pass2 AS A, Pass2 AS B), Pass2 AS ( SELECT 1 AS C FROM Pass1 AS A, Pass1 AS B), Pass1 AS ( SELECT 1 AS C FROM Pass0 AS A, Pass0 AS B), Pass0 AS ( SELECT 1 AS C UNION ALL SELECT 1), I'll talk about other settings in a later post.ĪLTER DATABASE CorruptMe SET PAGE_VERIFY CHECKSUM GO -Make sure we're using CHECKSUM as our page verify option IF db_id( 'CorruptMe') IS NOT NULL BEGIN ALTER DATABASE CorruptMe SET SINGLE_USER WITH ROLLBACK IMMEDIATE DROP DATABASE CorruptMe ( Note: Data generation technique found on Stack Overflow, attributed to Itzik Ben-Gan.) We’ll create a single table, insert some data, and create a clustered index and nonclustered index on it. No installer is necessary: download the zip file, then unzip all files to a directory and run XVI32.exe Create a database to corruptįor our adventure, our database is named CorruptMe. Steps to corrupt your database First, get your hex editorĭownload XVI32 by Christian Maas. You can also download Sample corrupt databases to play with from SQLSkills if you prefer not to run with scissors.This post is where I got the recommendation to use the XVI32 Hex editor. That’s different than what I’m doing in this post, but you should test that also. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |