0

Looking at one of our dev sql servers, it has a -e startup parameter to define the error log folder at this location : E:\DATA\MSSQL13.MSSQLSERVER\MSSQL\Log\ERRORLOG. However, only E:\DATA\MSSQL13.MSSQLSERVER\MSSQL exists on disk. I can see Ola's SQL maintenance output files on disk at E:\DATA\MSSQL13.MSSQLSERVER\MSSQL\Log

Who / what is responsible for creating the error log folder as defined by the -e startup parameter?

Does OLA's maintenance solution have a fallback if it can't find the log folder defined with -E startup parameter?

asked Nov 18, 2020 at 15:22

1 Answer 1

0

All the code is on github There is quite a lot of it now github link

IF @Version >= 11
 BEGIN
 SELECT @LogDirectory = [path]
 FROM sys.dm_os_server_diagnostics_log_configurations
 END
ELSE
 BEGIN
 SELECT @LogDirectory = LEFT(CAST(SERVERPROPERTY('ErrorLogFileName') AS nvarchar(max)),LEN(CAST(SERVERPROPERTY('ErrorLogFileName') AS nvarchar(max))) - CHARINDEX('\',REVERSE(CAST(SERVERPROPERTY('ErrorLogFileName') AS nvarchar(max)))))
END
answered Nov 18, 2020 at 16:08

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.