Where Them
Logs App
WTLA-01

SQL Server

7 log locations · Windows, Linux

Microsoft Corporation

Where SQL Server keeps its logs

SQL Server logs to C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\Log\ERRORLOG on Windows. 3 other Windows log locations are recorded below.

SQL Server logs to /var/opt/mssql/log/ERRORLOG on Linux. 2 other Linux log locations are recorded below.

Paths are printed exactly as SQL Server writes them. Environment variables like %LOCALAPPDATA% and $XDG_STATE_HOME are never expanded, so a path can be pasted straight into a shell. Where a path differs between installer types or shipping flavours, each one is racked as its own card below - why that happens.

Finding your way around Windows and Linux.

WIN

SQL Server - Windows

Microsoft Corporation
engine error log, default instanceC:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\Log\ERRORLOG
SQL AgentC:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\Log\SQLAGENT.OUT
setup/patching; read Summary.txt firstC:\Program Files\Microsoft SQL Server\<VersionNumber>\Setup Bootstrap\Log\
PolyBaseC:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\Log\Polybase\
LNX

SQL Server - Linux

Microsoft Corporation
engine error log (same path inside Docker)/var/opt/mssql/log/ERRORLOG
SQL Agent/var/opt/mssql/log/sqlagent.out
setup/var/opt/mssql/setup.log
SQL Server log file locations - Windows, Linux · Where Them Logs App