LockEscalation 속성
테이블에 사용되는 잠금 에스컬레이션의 유형을 가져오거나 설정합니다.
네임스페이스: Microsoft.SqlServer.Management.Smo
어셈블리: Microsoft.SqlServer.Smo(Microsoft.SqlServer.Smo.dll)
구문
‘선언
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase Or SfcPropertyFlags.Deploy)> _
Public Property LockEscalation As LockEscalationType
Get
Set
‘사용 방법
Dim instance As Table
Dim value As LockEscalationType
value = instance.LockEscalation
instance.LockEscalation = value
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase|SfcPropertyFlags.Deploy)]
public LockEscalationType LockEscalation { get; set; }
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::Standalone|SfcPropertyFlags::SqlAzureDatabase|SfcPropertyFlags::Deploy)]
public:
virtual property LockEscalationType LockEscalation {
LockEscalationType get () sealed;
void set (LockEscalationType value) sealed;
}
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase|SfcPropertyFlags.Deploy)>]
abstract LockEscalation : LockEscalationType with get, set
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase|SfcPropertyFlags.Deploy)>]
override LockEscalation : LockEscalationType with get, set
final function get LockEscalation () : LockEscalationType
final function set LockEscalation (value : LockEscalationType)
속성 값
유형: Microsoft.SqlServer.Management.Smo. . :: . .LockEscalationType
테이블에 사용되는 잠금 에스컬레이션의 유형을 지정하는 LockEscalationType 값입니다.
구현
예
The following code example shows how to set the lock escalation type used by the table, and display that information.
C#
Server srv = new Server("(local)");
Database db = srv.Databases["AdventureWorks2008R2"];
Table tb = new Table(db, "Test Table");
Column col1 = new Column(tb, "Name", DataType.NChar(50));
Column col2 = new Column(tb, "ID", DataType.Int);
tb.Columns.Add(col1);
tb.Columns.Add(col2);
tb.LockEscalation = LockEscalationType.Auto;
tb.Create();
Console.WriteLine("The table uses the " + tb.LockEscalation.ToString() + " escalation type.");
Powershell
$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$db = New-Object Microsoft.SqlServer.Management.Smo.Database
$db = $srv.Databases.Item("AdventureWorks2008R2")
#Create the Table
$tb = new-object Microsoft.SqlServer.Management.Smo.Table($db, "Tesghjt Table")
$col1 = new-object Microsoft.SqlServer.Management.Smo.Column($tb, "Name", [Microsoft.SqlServer.Management.Smo.DataType]::NChar(50))
$col2 = new-object Microsoft.SqlServer.Management.Smo.Column($tb, "ID", [Microsoft.SqlServer.Management.Smo.DataType]::Int)
$tb.Columns.Add($col1)
$tb.Columns.Add($col2)
$tb.LockEscalation = [Microsoft.SqlServer.Management.Smo.LockEscalationType]::Auto
$tb.Create()
Write-Host "The table uses the" $tb.LockEscalation "escalation type."