You can set up a trace for failed logins.DECLARE @queue_handle int --queue handle to refer --to this trace byDECLARE @column_value int --data column bitmask--Set the column mask for the data columns to captureSET @column_value = 67108864|1|33554432|16384|512|128|64|32--Create a queue.EXEC xp_trace_addnewqueue 1000, 5, 95, 90, @column_value, @queue_handle OUTPUT--Specify the event classes to trace.--To look up the names, execute xp_trace_geteventnames.EXEC xp_trace_seteventclassrequired @queue_handle, 20, 1 --LoginFailed--Set any filters. (Don't trace the Profiler).EXEC xp_trace_setappfilter @queue_handle, NULL, 'SQL Server Profiler%'EXEC xp_trace_sethostfilter @queue_handle, '<yourserver>', NULL--Configure the queue to write to a table.EXEC xp_trace_setqueuedestination @queue_handle, 4, 1, '<yourserver>', 'database.owner.table'--Start the consumer that actually writes to a file.EXEC xp_trace_startconsumer @queue_handle--Display the queue handle. It will be needed --later to stop the queue.SELECT @queue_handle--Save the queue definition.EXEC xp_trace_savequeuedefinition @queue_handle, 'FailedLogins', 1--Mark it for autostartEXEC xp_trace_setqueueautostart 'FailedLogins', 1
Jay White{0}