Fatal Actions Guard

There is always a possibility to accidentally execute UPDATE or DELETE statement without WHERE clause, ruining the data. Yes, in theory, it should never happen, backups should exist, triggers and foreign keys should stop deadly modification, but in reality additional protection can save you hours or work, or, maybe even your job ;)
Fatal Actions Guard parses scripts executed in SSMS and checks for potentially dangerous statements, like DELETE or UPDATE with missing WHERE clause, or usage or TRUNCATE statement, which bypasses delete triggers. To get an overview about the feature, open SSMSBoost settings and search for "Fatal actions guard".
It is possible to configure what will happen if critical statements are found: should execution be stopped or should user be able to continue, confirming his intentions. You can also exclude particular tables from this check ("Exclude table names"). Further, you can enter custom tokens, that will cause following actions, if found:
  • "ask" token - will force SSMSBoost to ask user for execution confirmation. For example, if you add "#checklater" token in "ask" tokens list and will start adding it to your scripts, SSMSBoost will keep asking you for execution confirmation, until you delete all these tokens. This can be practical, if you are working on some script and want to mark some critical places, that should be verified.
  • "prohibit" token - pretty the same logic as "ask" token, only SSMSBoost will not allow you to run the script at all. You can add it to script files, that are not intended for blind execution. Sometimes system administrators collect frequently used commands in one script, and it can be fatal if someone just executes that file.
  • "magic unblocking" tokens allow you to disable execution guard for some particular script. For example, if you often use "full wipe" script to initialize your test database and use TRUNCATES there, just add #breakingbad in settings and then add this token as a comment to your script and. Execution Guard will be disabled for that particular file.


Fatal Actions Guard