How to change the dump directory for SQL Server or SQL Agent

 

SQL Server creates dump files (files with a .mdmp extension) by default under the LOG folder. If you don't know where is this folder, you can run the query below :

CREATE TABLE #temp (logDate varchar(50), processInfo varchar(50), [Text] text);
INSERT #temp EXEC ('sp_readerrorlog');
SELECT [Text] FROM #temp WHERE [Text] like '%Logging SQL Server messages in file%';
DROP TABLE #temp;

These dump files are generally created when SQL Server encounters an exception or access violation.


If you see these kind ofdump files :
- First, check if you are the last service pack for your SQL server version.
- If the issue are still facing to this issue,it might be good idea to contact SQL Server Support team to ensure everything is fine with your server.

 

If your LOG folder is located on a disk drive that doesnt have enough space left on it, you can change that value to a location on a drive that has enough space. So, since SQL 2005, you can change the default dump directory inside Configuration Manager. Don't forget that it's not supported to change the value directly into the Registry.

 

Step 1: Start the Configuration Manager from Configuration Tools menu.

Step 2: Double click on SQL Server (instancename) service

Step 3: And go to ADVANCED tab. You will see the option for DUMP DIRECTORY.

How to change the dump directory for SQL Server or SQL Agent

The changes will be applied only after a restart.


Michel Degremont| Microsoft EMEA
Product Support Services Developer -SQL Server Core Engineer |