Dan Sinclair
Dan Sinclair

Reputation: 973

Where are the SQL Server Management Studio log files stored?

I want to look at the log files for SQL Server Management Studio and I can't figure out where they are stored on the file system. Where are they?

Upvotes: 1

Views: 5244

Answers (1)

Dan Sinclair
Dan Sinclair

Reputation: 973

Mine are at C:\Users\username\AppData\Local\Temp\SSMS:

pic of log files folder

How I found them

Looking in the app.config for my version of SSMS (located at C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\Ssms.exe.config), I found a section that adds a logger:

<!-- Enhanced logging to help troubleshoot password loss issues -->
<system.diagnostics>
    <sources>
        <source name="UserSettings" switchName="SourceSwitch" switchType="System.Diagnostics.SourceSwitch" >
            <listeners>
                <add name="logFile" type="Microsoft.SqlServer.Diagnostics.STrace.LogFileTraceListener,&#xD;&#xA;                        Microsoft.SqlServer.Diagnostics.STrace, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
                    logPath="%TEMP%\SSMS\" encrypt="false" >
                </add>
            </listeners>
        </source>
   </sources>
   <!-- ... other config here ... -->
</system.diagnostics>

In my case, %TEMP% evaluates to C:\Users\username\AppData\Local\Temp.

Upvotes: 4

Related Questions