/*
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:
Yorum Gönder