2009-07-23

Login Failedleri Alma

/*
Son bir günde alınan login failed leri aşağıdaki SQL kodları ile alabilirsiniz.
*/

CREATE TABLE #tmploginfailed (
LogDate smallDATETIME,
ProcessInfo NVARCHAR(50),
[Text] NVARCHAR(MAX))
go


insert into #tmploginfailed
EXEC xp_readerrorlog 0,1,'login failed','login failed'

go

select cast(cast(LogDate as varchar(12)) as smalldatetime) as Date ,Text,count(1) as AttemptCount
from #tmploginfailed
where LogDate>=getdate()-1
group by cast(cast(LogDate as varchar(12)) as smalldatetime),text
order by count(1) desc,cast(cast(LogDate as varchar(12)) as smalldatetime)
go

drop table #tmploginfailed
go

Hiç yorum yok:

.::YASAL UYARI::.

©2004-2023 Mehmet GÜZEL, www.mehmetguzel.net

Site içeriği kaynak gösterilmek koşuluyla yayınlanabilir. Yazılan yazı ve yorumlar sadece yazı ve yorum sahiplerini bağlar.