You could load the SDF file into a byte array, randomly alter some of the bytes and save the array back over the original file (or for that matter, load the file into a hex editor and go all Shakespeare's monkeys on it).
I think this will do what you want without doing what you want. In my experience, the problems that I've had with corrupted SqlCE databases weren't fixed by SqlCeEngine.Repair
(see this answer to a related question). It may be that Repair
can fix a database that has had some of its bytes randomly altered, but I'm sure this would depend on where in the file the alteration occured (e.g. in a data page somewhere or in the file header, if there is one).