February 13, 2004 at 1:21 pm
I found a thread pointing to using RAISERROR to produce output from within a stored proc. Here is my dilemma: I want to truncate user tables on a nightly basis. How do I create a log of each table I truncate? I know I can write to a table but I'd prefer to put it to a log. I've tried RAISERROR but cannot find where it puts the information.
Terry
February 13, 2004 at 1:25 pm
the Log RAISEERROR uses are the Windows Application Log and the SQL Server Error Log!!!!
* Noel
February 13, 2004 at 1:35 pm
I'm using RAISERROR('FYI: This message should be sent without delay', 10, 1) WITH NOWAIT and I cannot find it in the application log, sql server log or the errorlog. What am I doing wrong?? I'm sure it's something real dumb. Thanks.
Terry
February 13, 2004 at 1:38 pm
RAISERROR('FYI: This message should be sent without delay', 10, 1) WITH NOWAIT,LOG
* Noel
February 13, 2004 at 1:39 pm
If you don't need to return anything to the client use xp_logevent instead!
* Noel
February 19, 2004 at 3:33 pm
Even better, write the message to a table in the database. That way you can produce reports on what was done, when and how often.
--------------------
Colt 45 - the original point and click interface
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply