dbatools is a free PowerShell module with over 300 SQL Server administration, best practice and migration commands included.

Please note that documentation and command names may be out of date while we work furiously towards 1.0


Get-DbaOpenTransaction

This command is based on open transaction script published by Paul Randal.
Reference: SQL Skills

Screenshots

dbatools-Get-DbaOpenTransaction

Examples

Returns open transactions for sqlserver2014a.

Get-DbaOpenTransaction -SqlInstance sqlserver2014a

Logs into sqlserver2014a using the login “sqladmin”.

Get-DbaOpenTransaction -SqlInstance sqlserver2014a -SqlCredential (Get-Credential sqladmin)

Author

This command was created by Chrissy LeMaire. You can find Chrissy on Twitter.

Get-Help

From PowerShell, execute Get-Help Get-DbaOpenTransaction -Detailed for more information on this function.

Source Code

Want to see the source code? View Get-DbaOpenTransaction.ps1 on GitHub
 

Related commands