There is one such command in SQL Server that if not used properly,
- May corrupt the database (if you don’t have a backup you are lost)
- May corrupt the system databases and the server (if you don’t have backup of system databases you are dead)
- May loss your job or entire career (if used in production)!
When using this command nothing will be recorded in transaction log! You cannot rollback the changes. The command is:
Using this command, one having sysadmin role can modify any page of any databases. I repeat, “Any page of any databases including system databases”! You can either modify the data or fill with junk bytes. Be away from this as far as you can and never think about executing this in production databases. Fortunately this is an undocumented command and used by SQL Server development teams internally for testing purposes.
Then what is the use of this command? If used this command properly you can create corrupted SQL Server databases for testing your disaster recovery policies and for demo purposes.
You can read more about this directly from Paul Randal, who is the developer of many of the DBCC commands (http://www.sqlskills.com/blogs/paul/dbcc-writepage/). Here is another blog that has some interesting demo scripts using WRITEPAGE (http://www.sqlnotes.info/2011/11/23/dbcc-writepage/).