Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
TonyTheDBA
Posting Yak Master
121 Posts |
Posted - 2007-06-12 : 06:32:01
|
Hi Guys,I need to determine in TSQL the Path used by (an instance of) SQL Server (2K) to store the error log.I know that it's either in the Default Installation Location or in the location specified by the -e startup parameter.What I'm trying to do is to write a job that looks at the size of the ERRORLOG file, and then if its bigger than a certain size runs sp_cycle_error_log. I know the easy way is to just do it on a weekly basis regardless, but some of our Error logs grow at much faster rates than others.At the moment I am passing the error log path as a parameter to the sp, but would much rather the sp determine it for itself.Cheers All-- RegardsTony The DBA |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-06-12 : 12:10:54
|
It's stored in registry. |
 |
|
TonyTheDBA
Posting Yak Master
121 Posts |
Posted - 2007-06-13 : 04:31:31
|
Thanks for that, what I was hoping was that there is a system SP that returns the Path. :(IIRC there may be an xp that allows access to registry keys, guess I'll have to keep digging-- RegardsTony The DBA |
 |
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-06-13 : 11:27:06
|
master..xp_regread |
 |
|
|
|
|