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?

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

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.