Database.EnumTransactions Database.EnumTransactions Database.EnumTransactions Method

정의

데이터베이스에 대해 열린 트랜잭션의 목록을 열거합니다. Enumerates a list of open transactions on the database.

오버로드

EnumTransactions() EnumTransactions() EnumTransactions()

데이터베이스에 대해 열린 트랜잭션의 목록을 열거합니다. Enumerates a list of open transactions on the database.

EnumTransactions(TransactionTypes) EnumTransactions(TransactionTypes) EnumTransactions(TransactionTypes)

데이터베이스에 대해 지정된 유형의 열린 트랜잭션 목록을 열거합니다. Enumerates a list of open transactions of a specified type on the database.

EnumTransactions() EnumTransactions() EnumTransactions()

데이터베이스에 대해 열린 트랜잭션의 목록을 열거합니다. Enumerates a list of open transactions on the database.

public:
 System::Data::DataTable ^ EnumTransactions();
public System.Data.DataTable EnumTransactions ();
Public Function EnumTransactions () As DataTable
반환

A DataTable 개체는 데이터베이스에 영향을 주는 열린 트랜잭션 목록을 포함 하는 값입니다. A DataTable object value that contains a list of open transactions that affect the database. 반환 된 다른 열을 설명 하는 테이블 DataTable합니다. The table describes the different columns of the returned DataTable.

데이터 형식 설명 합니다.
* * 이름 * * String 트랜잭션의 이름입니다.
* * 트랜잭션 Id * * String 트랜잭션을 고유 하 게 식별 하는 ID 값입니다. See sys.dm_tran_active_transactions (Transact-SQL).
BeginTime DateTime The date and time when the transaction started.
Spid Int32 The session ID that uniquely identifies the session in which the transaction is running.
DatabaseName String The name of the database in which the transaction is running.
DatabaseID Int32 The ID value of the database in which the transaction is running.
DatabaseBeginTime DateTime The date and time when the database came online.
IsVersioned Boolean The Boolean value that specifies whether the transaction is a snapshot transaction and has a sequence number. 참조 TransactionTypes 열거형 클래스입니다.
Column Data type Description.
Name String The name of the transaction.
TransactionID String The ID value that uniquely identifies the transaction. See sys.dm_tran_active_transactions (Transact-SQL).
BeginTime DateTime The date and time when the transaction started.
Spid Int32 The session ID that uniquely identifies the session in which the transaction is running.
DatabaseName String The name of the database in which the transaction is running.
DatabaseID Int32 The ID value of the database in which the transaction is running.
DatabaseBeginTime DateTime The date and time when the database came online.
IsVersioned Boolean The Boolean value that specifies whether the transaction is a snapshot transaction and has a sequence number. See TransactionTypes enumeration class.

예제

이 예에서는 Server 개체 열거형 메서드를 실행하지만 DataTable 개체에서 정보를 추출하는 것은 데이터베이스 열거형 메서드에 대해 동일합니다.The example runs a Server object enumeration method, but extracting the information from the DataTable object is the same for Database enumeration methods.

VBVB

PowerShellPowerShell

$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")  

$d = new-object System.Data.Datatable  
$d = $srv.EnumCollations  

Foreach ($r in $d.Rows)  
{  
   Write-Host "============================================"  
   Foreach ($c in $d.Columns)  
   {  
      Write-Host $c.ColumnName "=" $r[$c]  
   }  
}  

EnumTransactions(TransactionTypes) EnumTransactions(TransactionTypes) EnumTransactions(TransactionTypes)

데이터베이스에 대해 지정된 유형의 열린 트랜잭션 목록을 열거합니다. Enumerates a list of open transactions of a specified type on the database.

public:
 System::Data::DataTable ^ EnumTransactions(Microsoft::SqlServer::Management::Smo::TransactionTypes transactionType);
public System.Data.DataTable EnumTransactions (Microsoft.SqlServer.Management.Smo.TransactionTypes transactionType);
Public Function EnumTransactions (transactionType As TransactionTypes) As DataTable
매개 변수
transactionType
TransactionTypes TransactionTypes TransactionTypes

A TransactionTypes 개체 트랜잭션 유형을 지정 하는 값입니다. A TransactionTypes object value that specifies the type of transaction.

반환

A DataTable 개체는 데이터베이스에 영향을 주는 열린 트랜잭션 목록을 포함 하는 값입니다. A DataTable object value that contains a list of open transactions that affect the database. 반환 된 다른 열을 설명 하는 테이블 DataTable합니다. The table describes the different columns of the returned DataTable.

데이터 형식 설명 합니다.
* * 이름 * * String 트랜잭션의 이름입니다.
* * 트랜잭션 Id * * String 트랜잭션을 고유 하 게 식별 하는 ID 값입니다. See sys.dm_tran_active_transactions (Transact-SQL).
BeginTime DateTime The date and time when the transaction started.
Spid Int32 The session ID that uniquely identifies the session in which the transaction is running.
DatabaseName String The name of the database in which the transaction is running.
DatabaseID Int32 The ID value of the database in which the transaction is running. 참조 sys.databases (Transact SQL)합니다.
* * DatabaseBeginTime * * DateTime 날짜와 시간 고 데이터베이스가 온라인 상태가 됩니다.
* * IsVersioned * * Boolean 트랜잭션이 인지를 지정 하는 부울 값을 스냅숏 트랜잭션이 고 시퀀스 번호가 있습니다. 참조 TransactionTypes 열거형 클래스입니다.
Column Data type Description.
Name String The name of the transaction.
TransactionID String The ID value that uniquely identifies the transaction. See sys.dm_tran_active_transactions (Transact-SQL).
BeginTime DateTime The date and time when the transaction started.
Spid Int32 The session ID that uniquely identifies the session in which the transaction is running.
DatabaseName String The name of the database in which the transaction is running.
DatabaseID Int32 The ID value of the database in which the transaction is running. See sys.databases (Transact-SQL).
DatabaseBeginTime DateTime The date and time when the database came online.
IsVersioned Boolean The Boolean value that specifies whether the transaction is a snapshot transaction and has a sequence number. See TransactionTypes enumeration class.

예제

이 예에서는 Server 개체 열거형 메서드를 실행하지만 <xref:System.DataTable> 개체에서 정보를 추출하는 것은 데이터베이스 열거형 메서드에 대해 동일합니다.The example runs a Server object enumeration method, but extracting the information from the <xref:System.DataTable> object is the same for Database enumeration methods.

VBVB

PowerShellPowerShell

$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")  

$d = new-object System.Data.Datatable  
$d = $srv.EnumCollations  

Foreach ($r in $d.Rows)  
{  
   Write-Host "============================================"  
   Foreach ($c in $d.Columns)  
   {  
      Write-Host $c.ColumnName "=" $r[$c]  
   }  
}  

적용 대상