March 3, 2004 at 10:07 am
I am using a cursor to step through a table and send emails to the email address contained in the table.
Currently am trapping whether each was successful using:
if @rc <> 0
BEGIN
SET @Error = 'Email failed for ' + @FilterLong
RAISERROR (@Error,16,1) WITH LOG
END
This creates an error for each failed message in the Windows Event Viewer and SQL Server Log.
Is this an acceptable approach or should I log errors to a table and monitor this.
Would appreciate views as I am not really up to speed as far as error trapping in procedures / jobs concerned.
March 3, 2004 at 10:18 am
Good question!
I'd say it depends on who and how error resolution is going to be accomplished. If network administrators are going to try and solve the e-mail error failure this might be a good place to put the error. Any good network administrator monitors the event log and thus will see the errors.
If you place these errors in a table then whoever is responsible for problem resolution will need to get to the contents of the table, whether that is through an application or manually through Query Analyzer. Anyway, it adds a layer which may not be needed.
Just my 2-bits
March 4, 2004 at 8:44 am
I wondered if there was anything I was missing. Have only recently started working with Windows 2000.
I guess that I was wondering where the catch was. But seems it as simple as putting a shortcut to EventVwr ServerName on the desktop and I can then monitor the success of backups, failed jobs etc here.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply