Thor Logo dbatools

LogFile

Expand-DbaDbLogFile

Claudio Silva (@ClaudioESSilva)

Expand-DbaDbLogFile View Source Claudio Silva (@ClaudioESSilva) Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Grows transaction log files using calculated increment sizes to prevent excessive Virtual Log File (VLF) fragmentation. Description This function intelligently grows transaction log files to target sizes while minimizing Virtual Log File (VLF) fragmentation. It calculates optimal increment sizes based on your SQL Server version and target log size, then grows the log in controlled chunks instead of letting autogrowth create excessive VLFs.

Read more

Get-DbaDbVirtualLogFile

Chrissy LeMaire (@cl), netnerds.net

Get-DbaDbVirtualLogFile View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves detailed virtual log file (VLF) metadata from transaction logs for performance analysis and troubleshooting. Description This function uses DBCC LOGINFO to return detailed metadata about each virtual log file (VLF) within database transaction logs. The output includes VLF size, file offsets, sequence numbers, status, and parity information that’s essential for analyzing transaction log structure and performance.

Read more

Measure-DbaDbVirtualLogFile

Chrissy LeMaire (@cl), netnerds.net

Measure-DbaDbVirtualLogFile View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Measures Virtual Log File (VLF) counts in transaction logs to identify performance bottlenecks Description Analyzes Virtual Log File (VLF) fragmentation across databases by counting total, active, and inactive VLFs in transaction logs. This function helps identify databases with excessive VLF counts that can severely impact performance.

Read more

Read-DbaTransactionLog

Stuart Moore (@napalmgram), stuart-moore.com

Read-DbaTransactionLog View Source Stuart Moore (@napalmgram), stuart-moore.com Windows, Linux, macOS On this page: Synopsis · Description · Syntax · Examples · Parameters · Outputs Synopsis Retrieves raw transaction log records from a database using fn_dblog for forensic analysis and troubleshooting Description Uses SQL Server’s built-in fn_dblog function to extract raw transaction log records from a live database, returning detailed information about every transaction in the format used by the SQL Server logging subsystem.

Read more