| Reply To Message: |
| Posted By |
n/a on 1/1/2001 |
| Subject: |
Logging |
| Message: |
Sure - you can use the sp_trace procedures to log the data as in the following: alter procedure sp_mytrace as declare @tid int exec sp_trace_create @traceid = @tid OUTPUT , @options = 1 , @tracefile = N'c:\trace.txt' exec sp_trace_setevent @traceid = @tid, @eventid =14, @columnid = 1, @on =1 exec sp_trace_setevent @traceid = @tid, @eventid =15, @columnid = 1, @on =1 exec sp_trace_setstatus @traceid = @tid, @status = 1 go exec sp_procoption 'sp_mytrace', 'startup', 'true'
Sorry I didn't have time to test this but using my example and touching it up with Books Online you should be in business. Make sure to include the additional columns you are interested in such as NT Login Name etc...
Chip
|
|