1

I did not find a way how to change Always On Log file location.

AlwaysOn Logs are saved in

C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Log

Even in configuration is set like this:

SQLBACKUPDIR="F:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Backup"

; Default directory for the Database Engine user databases. 

SQLUSERDBDIR="D:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Data"

; Default directory for the Database Engine user database logs.

SQLUSERDBLOGDIR="E:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Data"

; Directory for Database Engine TempDB files. 

SQLTEMPDBDIR="E:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Data"

We had a problem now that log file was 40 GB and filled drive C and server crashed. This is only for Always on logs, all other logs are where they should be. Databases and everything is ok. Just log files of AO.

Any ideas how to change AlwaysOn Log file location?

Thanks

  • First verify the log file as well as datafile THROUGH (Exec sp_helpdb @dbname='yourdatabasename'). you shall find out there log file size as well as their location. – Md Haidar Ali Khan Oct 11 '16 at 10:47
1

The Always on logs are written in the same location as the errorlog.

By moving the errorlog you can change this location. You will need to change the service startup parameter by opening the SQL Server configuration manager and changing the -e parameter and restarting the service.

  • Hi Thanks, It works like that. Only thing is that directory needs to be created before you change error log location otherwise it sql will fail – mehnihma Oct 11 '16 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.