Restricting access to contained databases: a DBA friend wanted to limit which users can connect, and logon triggers can do that. Here is how.
Audit Triggers That Record the Real User Behind EXECUTE AS
Your audit table says dbo for every change, and nobody can tell who really did it. Here is how to capture the person behind EXECUTE AS.
A Server Trigger That Blocks Accidental Database Drops
A server trigger can turn a wrong-tab DROP DATABASE into an error message. Here is a small demo that guards one name and removes itself at the end.
UPDATE() in a Trigger Is True Even When Nothing Changed
Understand why UPDATE() in a trigger fires for unchanged SET values and log only real changes with inserted and deleted row comparisons.
Enforcing Object Naming Rules With a DDL Trigger
Enforce procedure and index names with a DDL trigger, inspect EVENTDATA, audit rejected attempts, and list existing violations.
SQL SERVER – How to Use Instead of Trigger
Triggers come in two kinds, Instead of and After. Here is how an Instead of Trigger can intercept an insert, update or delete on a table, with an example.
CONTEXT_INFO: Passing a Value Through a Session
CONTEXT_INFO lets you attach a small value to a session and read it anywhere in that session, even inside a trigger. This post tests SET CONTEXT_INFO on SQL Server 2025, uses it to log who changed a price, and compares it with SESSION_CONTEXT.






