Table.LockEscalation Table.LockEscalation Table.LockEscalation Property

정의

테이블에 사용되는 잠금 에스컬레이션의 유형을 가져오거나 설정합니다. Gets or sets the type of lock escalation that is used on the table.

public:
 property Microsoft::SqlServer::Management::Smo::LockEscalationType LockEscalation { Microsoft::SqlServer::Management::Smo::LockEscalationType get(); void set(Microsoft::SqlServer::Management::Smo::LockEscalationType value); };
[Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcProperty(Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.Standalone | Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.SqlAzureDatabase | Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.Deploy)]
public Microsoft.SqlServer.Management.Smo.LockEscalationType LockEscalation { get; set; }
Public Property LockEscalation As LockEscalationType
속성 값

A LockEscalationType 테이블에 사용 되는 잠금 에스컬레이션의 유형을 지정 하는 값입니다. A LockEscalationType value that specifies the type of lock escalation that is used on the table.

구현

예제

다음 코드 예에서는 테이블에 사용되는 잠금 에스컬레이션 유형을 설정하고 해당 정보를 표시하는 방법을 보여 줍니다.The following code example shows how to set the lock escalation type used by the table, and display that information.

C#C#

Server srv = new Server("(local)");  
Database db = srv.Databases["AdventureWorks2012"];  

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.");  

PowershellPowershell

$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")  
$db = New-Object Microsoft.SqlServer.Management.Smo.Database  
$db = $srv.Databases.Item("AdventureWorks2012")  

#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."  

적용 대상