Skip to content

Instantly share code, notes, and snippets.

@matejskubic
Last active May 14, 2020 10:13
Show Gist options
  • Save matejskubic/a49d35b2cd69c61417c29b63a9b8ab8d to your computer and use it in GitHub Desktop.
Save matejskubic/a49d35b2cd69c61417c29b63a9b8ab8d to your computer and use it in GitHub Desktop.
inspect / analyse sql transaction log
SELECT
--TOP 100
AllocUnitName,
Operation,
COUNT(*) c,
SUM([Log Record Length]) l
FROM sys.fn_dblog(NULL,NULL)
GROUP BY
AllocUnitName,
Operation
ORDER BY COUNT(*) DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment