Share via


ServerConnection.TransactionDepth プロパティ

参照された接続の現在のトランザクションの深さを取得します。

名前空間:  Microsoft.SqlServer.Management.Common
アセンブリ:  Microsoft.SqlServer.ConnectionInfo (Microsoft.SqlServer.ConnectionInfo.dll)

構文

'宣言
Public ReadOnly Property TransactionDepth As Integer 
    Get
'使用
Dim instance As ServerConnection 
Dim value As Integer 

value = instance.TransactionDepth
public int TransactionDepth { get; }
public:
property int TransactionDepth {
    int get ();
}
member TransactionDepth : int
function get TransactionDepth () : int

プロパティ値

型: Int32
参照された接続の現在のトランザクションの深さを示す Int32 値です。

説明

接続で処理されるトランザクションは、入れ子になっている場合があります。 トランザクションの深さは、入れ子になったトランザクションの数を示します。

使用例

C#

ServerConnection conn = new ServerConnection();
Console.WriteLine(conn.TransactionDepth);

PowerShell

$conn = new-object Microsoft.SqlServer.Management.Common.ServerConnection
Write-Host $conn.TransactionDepth

関連項目

参照

ServerConnection クラス

Microsoft.SqlServer.Management.Common 名前空間

その他の技術情報

Transaction Log Architecture