Event Log and XML Question… | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Event Log and XML Question…

I have a couple of questions: 1. Is there a way to write to the NT Event Log within an SQL Server 7 stored procedure? 2. Is there a way to dump the contents of a record in SQL Server 7 to an XML file? Thank you!! [8D] ———-
T Kelley
MS, MCDBA, OCA, CIW
Use xp_logevent for logging a ad-hoc statement into NT log. Of you are using the same in conjugation with RAISEERROR, use option LOG for logging error into NT log. SQL Server 7.0 does not support writing into XML format. I am not aware of any third party utilities doing the same. But there is always an option of wring program to do the same. HTH. Gaurav
Moderator
Man thrives, oddly enough, only in the presence of a challenging environment- L. Ron Hubbard

You can use RAISEERROR to return the message to event log and also refer to SQLXML http://www.sqlxml.org which may help you with the code examples. HTH _________
Satya SKJ
Moderator
SQL-Server-Performance.Com

]]>