New-DtcDiagnosticTransaction

Creates a new transaction in a Transaction Manager on the local computer.

Syntax

New-DtcDiagnosticTransaction
   [[-Timeout] <Int32>]
   [[-IsolationLevel] <IsolationLevel>]
   [<CommonParameters>]

Description

The New-DtcDiagnosticTransaction cmdlet creates a new transaction in a Transaction Manager (TM) on the local computer. By default it creates a transaction on the default transaction manager on the local computer. This cmdlet returns a transaction object that you can pass to other cmdlets.

Examples

Example 1: Create a diagnostic transaction

PS C:\> New-DtcDiagnosticTransaction -Timeout 60 -IsolationLevel Serializable
Id
--
4625a5a3-af35-465d-a331-f224d79e4c85

This command creates a new serializable diagnostic transaction with a timeout of 60 seconds.

Parameters

-IsolationLevel

Specifies the isolation level for a transaction.The acceptable values for this parameter are:

  • Serializable
  • RepeatableRead
  • ReadCommitted
  • ReadUncommitted
  • Snapshot
  • Chaos

If you do not specify this parameter, the cmdlet uses the default IsolationLevel value specified in the System.Transactions.Transaction object.

Type:IsolationLevel
Accepted values:Serializable, RepeatableRead, ReadCommitted, ReadUncommitted, Snapshot, Chaos, Unspecified
Position:1
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Timeout

Specifies the timeout, in seconds, for the transaction. If you do not specify this parameter, the cmdlet uses the default timeout value specified in the System.Transactions.Transaction object.

Type:Int32
Position:0
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False