How to find out error log folder using script? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

How to find out error log folder using script?

Hi all
i need error log folder.
i want a script to find out error log folder. Thanks
S. Ramesh

EXECUTE master.dbo.xp_instance_regread N’HKEY_LOCAL_MACHINE’, N’SOFTWAREMicrosoftMSSQLServerSQLServerAgent’, N’ErrorLogFile’ Works for SQL 2000 & 2005. You’ll get 2 columns, value & dat. You need the second.
]]>