TriggerAction Enumeration

The TriggerAction enumeration is used by the SqlTriggerContext class to indicate what action fired the trigger.

Namespace:  Microsoft.SqlServer.Server
Assembly:  System.Data (in System.Data.dll)

public enum TriggerAction

Member nameDescription
InvalidAn invalid trigger action, one that is not exposed to the user, occurred.
InsertAn INSERT Transact-SQL statement was executed.
UpdateAn UPDATE Transact-SQL statement was executed.
DeleteA DELETE Transact-SQL statement was executed.
CreateTableA CREATE TABLE Transact-SQL statement was executed.
AlterTableAn ALTER TABLE Transact-SQL statement was executed.
DropTableA DROP TABLE Transact-SQL statement was executed.
CreateIndexA CREATE INDEX Transact-SQL statement was executed.
AlterIndexAn ALTER INDEX Transact-SQL statement was executed.
DropIndexA DROP INDEX Transact-SQL statement was executed.
CreateSynonymA CREATE SYNONYM Transact-SQL statement was executed.
DropSynonymA DROP SYNONYM Transact-SQL statement was executed.
CreateSecurityExpressionNot available.
DropSecurityExpressionNot available.
CreateViewA CREATE VIEW Transact-SQL statement was executed.
AlterViewAn ALTER VIEW Transact-SQL statement was executed.
DropViewA DROP VIEW Transact-SQL statement was executed.
CreateProcedureA CREATE PROCEDURE Transact-SQL statement was executed.
AlterProcedureAn ALTER PROCEDURE Transact-SQL statement was executed.
DropProcedureA DROP PROCEDURE Transact-SQL statement was executed.
CreateFunctionA CREATE FUNCTION Transact-SQL statement was executed.
AlterFunctionAn ALTER FUNCTION Transact-SQL statement was executed.
DropFunctionA DROP FUNCTION Transact-SQL statement was executed.
CreateTriggerA CREATE TRIGGER Transact-SQL statement was executed.
AlterTriggerAn ALTER TRIGGER Transact-SQL statement was executed.
DropTriggerA DROP TRIGGER Transact-SQL statement was executed.
CreateEventNotificationA CREATE EVENT NOTIFICATION Transact-SQL statement was executed.
DropEventNotificationA DROP EVENT NOTIFICATION Transact-SQL statement was executed.
CreateTypeA CREATE TYPE Transact-SQL statement was executed.
DropTypeA DROP TYPE Transact-SQL statement was executed.
CreateAssemblyA CREATE ASSEMBLY Transact-SQL statement was executed.
AlterAssemblyAn ALTER ASSEMBLY Transact-SQL statement was executed.
DropAssemblyA DROP ASSEMBLY Transact-SQL statement was executed.
CreateUserA CREATE USER Transact-SQL statement was executed.
AlterUserAn ALTER USER Transact-SQL statement was executed.
DropUserA DROP USER Transact-SQL statement was executed.
CreateRoleA CREATE ROLE Transact-SQL statement was executed.
AlterRoleAn ALTER ROLE Transact-SQL statement was executed.
DropRoleA DROP ROLE Transact-SQL statement was executed.
CreateAppRoleA CREATE APPLICATION ROLE Transact-SQL statement was executed.
AlterAppRoleAn ALTER APPLICATION ROLE Transact-SQL statement was executed.
DropAppRoleA DROP APPLICATION ROLE Transact-SQL statement was executed.
CreateSchemaA CREATE SCHEMA Transact-SQL statement was executed.
AlterSchemaAn ALTER SCHEMA Transact-SQL statement was executed.
DropSchemaA DROP SCHEMA Transact-SQL statement was executed.
CreateLoginA CREATE LOGIN Transact-SQL statement was executed.
AlterLoginAn ALTER LOGIN Transact-SQL statement was executed.
DropLoginA DROP LOGIN Transact-SQL statement was executed.
CreateMsgTypeA CREATE MESSAGE TYPE Transact-SQL statement was executed.
DropMsgTypeA DROP MESSAGE TYPE Transact-SQL statement was executed.
CreateContractA CREATE CONTRACT Transact-SQL statement was executed.
DropContractA DROP CONTRACT Transact-SQL statement was executed.
CreateQueueA CREATE QUEUE Transact-SQL statement was executed.
AlterQueueAn ALTER QUEUE Transact-SQL statement was executed.
DropQueueA DROP QUEUE Transact-SQL statement was executed.
CreateServiceA CREATE SERVICE Transact-SQL statement was executed.
AlterServiceAn ALTER SERVICE Transact-SQL statement was executed.
DropServiceA DROP SERVICE Transact-SQL statement was executed.
CreateRouteA CREATE ROUTE Transact-SQL statement was executed.
AlterRouteAn ALTER ROUTE Transact-SQL statement was executed.
DropRouteA DROP ROUTE Transact-SQL statement was executed.
GrantStatementA GRANT Transact-SQL statement was executed.
DenyStatementA DENY Transact-SQL statement was executed.
RevokeStatementA REVOKE Transact-SQL statement was executed.
GrantObjectA GRANT OBJECT Transact-SQL statement was executed.
DenyObjectA DENY Object Permissions Transact-SQL statement was executed.
RevokeObjectA REVOKE OBJECT Transact-SQL statement was executed.
CreateBindingA CREATE_REMOTE_SERVICE_BINDING event type was specified when an event notification was created on the database or server instance.
AlterBindingAn ALTER_REMOTE_SERVICE_BINDING event type was specified when an event notification was created on the database or server instance.
DropBindingA DROP_REMOTE_SERVICE_BINDING event type was specified when an event notification was created on the database or server instance.
CreatePartitionFunctionA CREATE PARTITION FUNCTION Transact-SQL statement was executed.
AlterPartitionFunctionAn ALTER PARTITION FUNCTION Transact-SQL statement was executed.
DropPartitionFunctionA DROP PARTITION FUNCTION Transact-SQL statement was executed.
CreatePartitionSchemeA CREATE PARTITION SCHEME Transact-SQL statement was executed.
AlterPartitionSchemeAn ALTER PARTITION SCHEME Transact-SQL statement was executed.
DropPartitionSchemeA DROP PARTITION SCHEME Transact-SQL statement was executed.

The TriggerAction enumeration is used by the SqlTriggerContext class to indicate what action fired the trigger.

For more information, see the Transact-SQL Reference of SQL Server Books Online.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft