Skip to content

SQL Server – Add Powershell dbatools module

Add Powershell dbatools module Execute an elevated powershell session (Execute as administrator) and run the command: Import-Module dbatools Windows PowerShell Copyright (C) 2016 Microsoft Corporation. All rights reserved. Loading personal and system profiles took 756ms.… 

SQL Server – kill with statusonly

When a SQL Server process is killed (kill spid), the non-commited work (transactions) will take a certain amount of time to roll back. Use kill spid with statusonly to determine how much time a killed… 

SQL Server – Deadlock History with Extended Events

Using SSMS to Display Deadlock History with Extended Events To use Extended Events to display deadlock history, the following method can be used. In the Object Explorer, Open Management folder Open Extended Events/Sessions/system_health Right-click on… 

SQL Server – Truncate transaction log

The transaction log is truncated when a transaction log backup is executed (recovery mode Full). In an emergency situation, if the log becomes full and it is not possible to backup the log normally, it…