July 19, 2013 at 3:16 am
hello,
is it possible to have an alert on a create login?
with a trigger, an SQL Alert or ...
Thank you.
July 19, 2013 at 4:09 am
Hi,
Yes you can setup a DDL trigger to fire when a CREATE LOGIN is executed. Have a look here:-
http://msdn.microsoft.com/en-us/library/f44e5340-1d18-40e9-828e-0ffcca091ae3
Andrew
July 19, 2013 at 4:31 am
thank you Andrew,
I had looked but I hadn't seen the event "CREATE_LOGIN" !!!
:blush:
July 19, 2013 at 6:01 am
you can get that info from the default trace (if it is running)
to be alerted would require you to set up an agent job that parsed the default trace at a set interval looking for new values in TargetLoginName
declare @mytrclocal sql_variant
set @mytrclocal = (SELECT value FROM sys.fn_trace_getinfo(NULL) WHERE property= 2)
select * from fn_trace_gettable(convert(varchar(500),@mytrclocal), default)
where TargetLoginName is not NULL
July 19, 2013 at 6:15 am
double post...
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply