November 24, 2015 at 6:22 pm
It is good. However, hard-coded WHILE (@no < 7)
There are times you need more than 7 log files, for example, SOX may require to retain a year data.
This parameter needs to read all logs or can be overridden by caller.:-P
November 25, 2015 at 12:40 am
yech61813 (11/24/2015)
It is good. However, hard-coded WHILE (@no < 7)There are times you need more than 7 log files, for example, SOX may require to retain a year data.
This parameter needs to read all logs or can be overridden by caller.:-P
Thank you for your thoughts. This script is intended for daily use / monitoring of the SQL error log(s), not for storing/archiving them. You are right, however, that even within 24 hours, more than 7 error logs could have been created, e.g. through several reboots/restarts of the SQL engine. I have at one time included code to determine the max number of error logs, using master.dbo.xp_instance_regread. That works well on a default instance, but needs additional coding in the case of a named instance. I'll look into it for a future version.
June 1, 2021 at 9:44 pm
I am trying to set this up and am getting the following error.
USE MonitorDB
EXEC [Retrieve_LinkedServer_ErrorLog]
Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded.
Running SQL 2019.
Viewing 3 posts - 16 through 18 (of 18 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy