Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to log events in the Event Log using SQL Server Expand / Collapse
Author
Message
Posted Tuesday, September 29, 2009 12:23 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, June 20, 2013 2:04 AM
Points: 222, Visits: 331
How to log events in the event log using sql server, i am trying to do something like, if there is a condition and its success/failure then a log should go into the event log

Sriram

Post #794928
Posted Tuesday, September 29, 2009 1:00 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, August 1, 2014 1:26 PM
Points: 2,242, Visits: 3,645
use RaiseError or xp_logevent sp.
refer : http://tejasnshah.wordpress.com/2009/04/02/sql-sever-how-to-make-an-entry-in-event-viewer-using-sql-server/
http://www.codeproject.com/KB/database/Raiserror.aspx





Pradeep Singh
Post #794938
Posted Tuesday, September 29, 2009 4:05 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, June 20, 2013 2:04 AM
Points: 222, Visits: 331
Is there any way to get the work done without needing the permission off dbo on master database. or without having a sysadmin role....

thanks.


Sriram

Post #794995
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse