Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dexalex84/0a1789930ed00dfcd0713ce1ffcb47a0 to your computer and use it in GitHub Desktop.
Save dexalex84/0a1789930ed00dfcd0713ce1ffcb47a0 to your computer and use it in GitHub Desktop.
MSSQL Inspect transation log
https://www.mssqltips.com/sqlservertip/3076/how-to-read-the-sql-server-database-transaction-log/?utm_source=dailynewsletter&utm_medium=email&utm_content=headline&utm_campaign=20170503
select [Current LSN],
[Operation],
[Transaction Name],
[Transaction ID],
[Transaction SID],
[SPID],
[Begin Time]
FROM fn_dblog(null,null)
SELECT
[Current LSN],
[Transaction ID],
[Operation],
[Transaction Name],
[CONTEXT],
[AllocUnitName],
[Page ID],
[Slot ID],
[Begin Time],
[End Time],
[Number of Locks],
[Lock Information]
FROM sys.fn_dblog(NULL,NULL)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment