Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a corrupt .bak file for testing?

I know it's kind of an odd question, but is it possible to deliberately make a .bak file for an MS SQL Server database corrupt for testing purposes ? I'd like to make it corrupt so I can attempt restore through troubleshooting and to improve my troubleshooting skills of database recovery.

Cheers !

like image 523
Claudio Avatar asked Dec 19 '14 16:12

Claudio


People also ask

How do I corrupt a .BAK file?

you can corrupt the . bak file simply opening it with a text editor and changing some arts, but you will not able to restore this file. An alternative can be to use the unix dd command (you can find the windows executable).

What is a BAK file SQL?

A file with . bak extension is usually a backup file that is used by different software tools to store backups of data. From database perspective, a BAK file is used by Microsoft SQL Server for storing the contents of a database.


1 Answers

I would assume that even if you select any test/word document file and rename it as .bak, SQL would recognize it as corrupt!

like image 85
Evan Camilleri Avatar answered Oct 05 '22 19:10

Evan Camilleri