| SQLUSA.com
|
| |
 |
|
|
| How to
log information to Windows Event Viewer? |
|
Execute the following Microsoft SQL Server T-SQL
script in SSMS Query Editor to create a stored procedure for logging messages to Windows Application Event Viewer:
Use AdventureWorks
Go
Create Procedure LogInfoToEventViewer @MessageText varchar(1000)
As
Begin
Exec master..xp_logevent 50001, @MessageText, INFORMATIONAL
End
Go
Exec LogInfoToEventViewer 'Evening batch job FinanceEOD executed successfully'
Go
|
|
| |
| SQLUSA.com
Home Page |
|
|
SQL Server Training at www.sqlusa.com.
SQL Server 2008 Video Training at www.sqlusa.com.
SQL Server 2005 Training Videos at www.sqlusa.com.
Microsoft SQL Server 2000 Training Videos at www.sqlusa.com.
|
FREE SQL & Business Intelligence / OLAP Short Videos on YOUTUBE.com |
|
Search SQLUSA FREE SQL Server Articles & FREE T-SQL Scripts |
Copyright 2005-2011, SMI Corp. All Rights Reserved.
SQL Server 2012 is a program product of Microsoft Corporation. SQL Server 2008 is a program product of Microsoft Corporation. SQL Server 2005 is a program product of Microsoft Corporation. SQL Server 2000 is a program product of Microsoft Corporation. |