Answered by:
How to create a torn page.

Question
-
Answers
-
To simulate a torn page, you'll have to "corrupt" a database page on disk.
This can be done with a hex editor, or other tool.
Our pages are 8K in size, so 16 sectors of 512bytes.
We have 2 kinds of validation: checksum or torn page.
For the torn page, you'll want to corrupt bytes at 0 mod 512 in sectors 1..15 of a page. You could write 0x00 at offset 512, and 0xFF at offset 1024, for example.
Checksums are more robust, so you should be able to change any bit on the page to cause the corruption to be detected.
In order for this corruption to cause any problem, you'd have to pick a page that actually holds data, and then cause the engine to try to read that page.
Hope that gives you some ideas.
All replies
-
-
To simulate a torn page, you'll have to "corrupt" a database page on disk.
This can be done with a hex editor, or other tool.
Our pages are 8K in size, so 16 sectors of 512bytes.
We have 2 kinds of validation: checksum or torn page.
For the torn page, you'll want to corrupt bytes at 0 mod 512 in sectors 1..15 of a page. You could write 0x00 at offset 512, and 0xFF at offset 1024, for example.
Checksums are more robust, so you should be able to change any bit on the page to cause the corruption to be detected.
In order for this corruption to cause any problem, you'd have to pick a page that actually holds data, and then cause the engine to try to read that page.
Hope that gives you some ideas.
-