Under what occasions does the SQL Server 7 write events to the Windows NT application log?
-
When the xp_logevent stored procedure is invoked
-
When sp_addmessage or sp_altermessage define errors to be written to the NT application log
-
When SQL Server errors occur with severity levels between 19 and 25
-
When the RAISEERROR WITH LOG statement is executed
-
All of the above
SQL Server writes to the Windows NT application log through multiple mechanisms. The xp_logevent extended stored procedure explicitly logs custom messages. System stored procedures sp_addmessage and sp_altermessage can configure error messages to write to the NT log. SQL Server automatically logs errors with severity levels 19-25 (critical errors). The RAISERROR WITH LOG statement also forces logging. Since all four methods are valid, option E is correct.
SQL Server 7 writes to the Windows NT application log in several distinct situations: when xp_logevent is explicitly called, when sp_addmessage/sp_altermessage have configured a message to be logged, when an error's severity falls in the 19–25 range (these are treated as serious/fatal), and when RAISERROR ... WITH LOG is executed. Since all of these independently trigger a log write, "all of the above" is the accurate summary answer.