Skip to main content

Posts

Showing posts from October, 2018

The most dangerous command in SQL

Vijay is a SQL Server/Microsoft Data Platform professional with over 10 years of experience working in various fields such as financial, healthcare, and Manufacturing Domains. He has worked in various DB-related roles from database Modeler to database developer to Data Warehouse. The most dangerous command in SQL There’s one command, in particular, that has been effectively hidden since it was introduced pre-SQL Server 2000. I present to you  DBCC WRITEPAGE  – the most dangerous command you can use in SQL Server. Well, no danger of death  DBCC WRITEPAGE  allows you to alter any byte on any page in any database, as long as you have sysadmin privileges. It also allows you to completely circumvent the buffer pool, in other words, you can force page checksum failures. The purposes of  DBCC WRITEPAGE  are: To allow automated testing of  DBCC CHECKDB and repair by the SQL Server team. To engineer corruptions for demos and testing. To allow for last-ditch disaster recovery b