SQL SERVER – Types of Triggers

The types of triggers in SQL Server include DML, DDL and logon triggers. A customer requested this three-part summary.

Drawer, construction-frame and entrance fittings show three distinct event scopes.

KindEvent and scope
DMLINSERT, UPDATE or DELETE on a table or view. AFTER and INSTEAD OF have distinct behavior.
DDLSupported schema or definition events, such as CREATE, ALTER and DROP. Scope can be database or server.
LogonA LOGON event after authentication succeeds, before the user session is established. Server scope.

DML triggers process statements and inserted/deleted rowsets that can contain multiple rows. Avoid single-row assumptions. Logon triggers execute after authentication rather than for failed authentication. An incorrect design can block normal connections.

I prefer explicit business workflows instead of unnecessary triggers. That does not mean every trigger is wrong. Auditing, controlled DDL and other requirements deserve their own design assessment.

Inspect event, scope, enabled state and dependencies before changes. The videos provide related examples. This conceptual explanation does not create or disable a trigger.

Reference: Trigger kinds and event behavior.

Related reading

A trigger category is not the complete design, it is an event scope whose behavior and dependencies still matter.

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.


Discover more from SQL Authority with Pinal Dave

Subscribe to get the latest posts sent to your email.

SQL Scripts, SQL Server, SQL Trigger
Previous Post
SQL SERVER – How to Break Mirroring?
Next Post
System Threads Outside Max Worker Threads in SQL Server

Related Posts

4 Comments. Leave new

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.