Trigger 类
The Trigger object represents a SQL Server trigger.
继承层次结构
System. . :: . .Object
Microsoft.SqlServer.Management.Smo. . :: . .SmoObjectBase
Microsoft.SqlServer.Management.Smo. . :: . .SqlSmoObject
Microsoft.SqlServer.Management.Smo. . :: . .NamedSmoObject
Microsoft.SqlServer.Management.Smo. . :: . .ScriptNameObjectBase
Microsoft.SqlServer.Management.Smo..::..Trigger
命名空间: Microsoft.SqlServer.Management.Smo
程序集: Microsoft.SqlServer.Smo(在 Microsoft.SqlServer.Smo.dll 中)
语法
声明
<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)> _
<PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)> _
Public NotInheritable Class Trigger _
Inherits ScriptNameObjectBase _
Implements ICreatable, IAlterable, IDroppable, IMarkForDrop, _
IExtendedProperties, IScriptable, ITextObject
用法
Dim instance As Trigger
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)]
[PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)]
public sealed class Trigger : ScriptNameObjectBase,
ICreatable, IAlterable, IDroppable, IMarkForDrop, IExtendedProperties,
IScriptable, ITextObject
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode::CheckOnSchedule)]
[PhysicalFacetAttribute(PhysicalFacetOptions::ReadOnly)]
public ref class Trigger sealed : public ScriptNameObjectBase,
ICreatable, IAlterable, IDroppable, IMarkForDrop, IExtendedProperties,
IScriptable, ITextObject
[<SealedAttribute>]
[<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)>]
[<PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)>]
type Trigger =
class
inherit ScriptNameObjectBase
interface ICreatable
interface IAlterable
interface IDroppable
interface IMarkForDrop
interface IExtendedProperties
interface IScriptable
interface ITextObject
end
public final class Trigger extends ScriptNameObjectBase implements ICreatable, IAlterable, IDroppable, IMarkForDrop, IExtendedProperties, IScriptable, ITextObject
Trigger 类型公开以下成员。
构造函数
名称 | 说明 | |
---|---|---|
Trigger() () () () | Initializes a new instance of the Trigger class. | |
Trigger(SqlSmoObject, String) | Initializes a new instance of the Trigger class on the specified object, and with the specified name. |
页首
属性
名称 | 说明 | |
---|---|---|
AnsiNullsStatus | Gets the Boolean property value that specifies whether ISO NULL handling is enabled in the trigger. | |
AssemblyName | Gets or sets the name of the .NET assembly that is required by the referenced trigger. | |
ClassName | Gets or sets the name of the class that is called by the referenced trigger. | |
CreateDate | Gets the date and time when the trigger was created. | |
DateLastModified | Gets the date and time when the trigger was last modified. | |
Delete | Gets or sets the Boolean property value that specifies whether the trigger is executed when records are deleted from the table. | |
DeleteOrder | Gets or sets the order in which the trigger and the delete operation are executed. | |
Events | Gets the events that are associated with the trigger. | |
ExecuteForScalar | Gets or sets the Boolean property value that specifies whether the object is set to the execute for scalar option. (从 SqlSmoObject 继承。) | |
ExecutionContext | Gets or sets the execution context. | |
ExecutionContextPrincipal | Gets or sets the execution context principal. | |
ExtendedProperties | Gets the extended properties of the Trigger object. | |
ID | Gets the ID value that uniquely identifies the trigger. | |
ImplementationType | Gets or sets the implementation type of the trigger. | |
Insert | Gets or sets the Boolean property value that specifies whether the trigger is fired when records are inserted into the table. | |
InsertOrder | Gets or sets the order in which the trigger and the insert operation are executed. | |
InsteadOf | Gets or sets a Boolean property that specifies whether the trigger runs instead of the insert, delete, or update operation. | |
IsEnabled | Gets or sets the Boolean property that specifies whether the trigger is enabled. | |
IsEncrypted | Gets or sets the Boolean property value that specifies whether the trigger is encrypted. | |
IsSystemObject | Gets the Boolean property value that specifies whether the trigger is a system object. | |
IsTouched | Gets the Boolean property value that specifies whether the object properties have been updated but not yet persisted on the server. (从 SqlSmoObject 继承。) | |
MethodName | Gets the method name for the trigger. | |
Name | Gets or sets the name of the object. (从 NamedSmoObject 继承。) | |
NotForReplication | Gets or sets a Boolean property value that specifies whether the trigger is included in replication operations. | |
ObjectInSpace | Gets the Boolean property value that specifies whether the object exists in isolation, or whether it is directly or indirectly connected to the instance of SQL Server. (从 SqlSmoObject 继承。) | |
Parent | Gets or sets the SqlSmoObject object that is the parent of the Trigger object. | |
Properties | Gets a collection of Property objects that represent the object properties. (从 SqlSmoObject 继承。) | |
QuotedIdentifierStatus | Gets or sets a Boolean property value that specifies whether identifiers delimited by double quotation marks are Transact-SQL reserved keywords or contain characters not usually allowed by the Transact-SQL syntax rules. | |
ScalarResult | Gets the scalar result for the referenced object. (从 SqlSmoObject 继承。) | |
State | Gets the state of the referenced object. (从 SmoObjectBase 继承。) | |
TextBody | Gets or sets the Transact-SQL string that defines the trigger. | |
TextHeader | Gets or sets the header part of the Transact-SQL string that defines the trigger. | |
TextMode | Gets or sets the Boolean property that specifies whether the text header is editable as text. | |
Update | Gets or sets the Boolean property value that specifies whether the trigger is fired when records are updated in the table. | |
UpdateOrder | Gets or sets the order in which the trigger and the update operation are executed. | |
Urn | Gets the Uniform Resource Name (URN) address value that uniquely identifies the object. (从 SqlSmoObject 继承。) | |
UserData | Gets or sets user-defined data associated with the referenced object. (从 SmoObjectBase 继承。) |
页首
方法
页首
显式接口实现
名称 | 说明 | |
---|---|---|
IAlienObjectDiscover | (从 SqlSmoObject 继承。) | |
IAlienObjectGetParent | (从 SqlSmoObject 继承。) | |
IAlienObjectGetProperty | (从 SqlSmoObject 继承。) | |
ISfcPropertyProviderGetPropertySet | (从 SqlSmoObject 继承。) | |
IAlienObjectGetUrn | (从 SqlSmoObject 继承。) | |
IAlienObjectResolve | (从 SqlSmoObject 继承。) | |
IAlienObjectSetProperty | (从 SqlSmoObject 继承。) |
页首
注释
To get Trigger object properties, users can be a member of the public fixed server role.
To set Trigger object properties, users must have ALTER permission on the parent table or view.
To create or drop a trigger, users must have ALTER permission on the parent table or view.
To grant, deny, or revoke permission on the trigger to other users, users must have CONTROL permission on the trigger.
Thread Safety
此类型的任何公共静态(Microsoft Visual Basic 中的 Shared)成员在多线程操作中是安全的。 不保证所有实例成员都对于线程安全的。
线程安全
此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。不保证所有实例成员都是线程安全的。