Friday, February 24, 2012

Creating messages from SQL to the Windows Event Viewer app log

(For MS SQL 2000... Please don't suggest anything using VB or .NET. I need
something either somehow built-in with SQL 2000 or using VBscript.)
Anyone know of a way to create a test message somehow through MS SQL so that
it shows in the Windows application event log?
For example, would creating a job to run a dummy stored procedure create an
entry in the app event log?
(Problem is that when SQL is clustered, it uses a different 'source' name in
the event viewer. The 'source' name can't be different when writing a
simple script from what I can tell. I need to be able to easily create test
messages using the SQL cluster name.)
MarcoMarco Shaw wrote:
> (For MS SQL 2000... Please don't suggest anything using VB or .NET. I ne
ed
> something either somehow built-in with SQL 2000 or using VBscript.)
> Anyone know of a way to create a test message somehow through MS SQL so th
at
> it shows in the Windows application event log?
> For example, would creating a job to run a dummy stored procedure create a
n
> entry in the app event log?
> (Problem is that when SQL is clustered, it uses a different 'source' name
in
> the event viewer. The 'source' name can't be different when writing a
> simple script from what I can tell. I need to be able to easily create te
st
> messages using the SQL cluster name.)
> Marco
>
>
Have you looked at RAISERROR?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||RAISERROR( 'This is a test event message', 10, 1 ) WITH LOG
--
Arnie Rowland
"To be successful, your heart must accompany your knowledge."
"Marco Shaw" <marco@.Znbnet.nb.ca> wrote in message news:OAXoOx2pGHA.1600@.TK2MSFTNGP04.phx.gb
l...
> (For MS SQL 2000... Please don't suggest anything using VB or .NET. I ne
ed
> something either somehow built-in with SQL 2000 or using VBscript.)
>
> Anyone know of a way to create a test message somehow through MS SQL so th
at
> it shows in the Windows application event log?
>
> For example, would creating a job to run a dummy stored procedure create a
n
> entry in the app event log?
>
> (Problem is that when SQL is clustered, it uses a different 'source' name
in
> the event viewer. The 'source' name can't be different when writing a
> simple script from what I can tell. I need to be able to easily create te
st
> messages using the SQL cluster name.)
>
> Marco
>
>
>

No comments:

Post a Comment