Table of Contents

Class ObjectSchema.Trigger

Namespace
LinqToDB.Tools.DataProvider.SqlServer.Schemas
Assembly
linq2db.Tools.dll

sys.triggers (Transact-SQL)

Applies to: √ SQL Server (all supported versions) √ Azure SQL Database

Contains a row for each object that is a trigger, with a type of TR or TA. DML trigger names are schema-scoped and, therefore, are visible in sys.objects. DDL trigger names are scoped by the parent entity and are only visible in this view.
The parent_class and name columns uniquely identify the trigger in the database.


See sys.triggers.

[Table(Schema = "sys", Name = "triggers", IsView = true)]
public class ObjectSchema.Trigger
Inheritance
ObjectSchema.Trigger
Extension Methods

Properties

CreateDate

Date the trigger was created.

[Column("create_date")]
[NotNull]
public DateTime CreateDate { get; set; }

Property Value

DateTime

IsDisabled

Trigger is disabled.

[Column("is_disabled")]
[NotNull]
public bool IsDisabled { get; set; }

Property Value

bool

IsInsteadOfTrigger

1 = INSTEAD OF triggers

0 = AFTER triggers.

[Column("is_instead_of_trigger")]
[NotNull]
public bool IsInsteadOfTrigger { get; set; }

Property Value

bool

IsMSShipped

Trigger created on behalf of the user by an internal SQL Server component.

[Column("is_ms_shipped")]
[NotNull]
public bool IsMSShipped { get; set; }

Property Value

bool

IsNotForReplication

Trigger was created as NOT FOR REPLICATION.

[Column("is_not_for_replication")]
[NotNull]
public bool IsNotForReplication { get; set; }

Property Value

bool

ModifyDate

Date the object was last modified by using an ALTER statement.

[Column("modify_date")]
[NotNull]
public DateTime ModifyDate { get; set; }

Property Value

DateTime

Name

Trigger name. DML trigger names are schema-scoped. DDL trigger names are scoped with respect to the parent entity.

[Column("name")]
[NotNull]
public string Name { get; set; }

Property Value

string

Object

objects (sys.objects)

[Association(ThisKey = "ObjectID", OtherKey = "ObjectID", CanBeNull = false)]
public ObjectSchema.Object Object { get; set; }

Property Value

ObjectSchema.Object

ObjectID

Object identification number. Is unique within a database.

[Column("object_id")]
[NotNull]
public int ObjectID { get; set; }

Property Value

int

ParentClass

Class of the parent of the trigger.

0 = Database, for the DDL triggers.

1 = Object or column for the DML triggers.

[Column("parent_class")]
[NotNull]
public byte ParentClass { get; set; }

Property Value

byte

ParentClassDesc

Description of the parent class of the trigger.

DATABASE

OBJECT_OR_COLUMN

[Column("parent_class_desc")]
[Nullable]
public string? ParentClassDesc { get; set; }

Property Value

string

ParentID

ID of the parent of the trigger, as follows:

0 = Triggers that are database-parented triggers.

For DML triggers, this is the object_id of the table or view on which the DML trigger is defined.

[Column("parent_id")]
[NotNull]
public int ParentID { get; set; }

Property Value

int

TypeColumn

Object type:

TA = Assembly (CLR) trigger

TR = SQL trigger

[Column("type")]
[NotNull]
public string TypeColumn { get; set; }

Property Value

string

TypeDesc

Description of object type.

CLR_TRIGGER

SQL_TRIGGER

[Column("type_desc")]
[Nullable]
public string? TypeDesc { get; set; }

Property Value

string