Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

alert or trigger on create login Expand / Collapse
Author
Message
Posted Friday, July 19, 2013 3:16 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, August 6, 2014 7:00 AM
Points: 54, Visits: 225
hello,

is it possible to have an alert on a create login?
with a trigger, an SQL Alert or ...
Thank you.
Post #1475330
Posted Friday, July 19, 2013 4:09 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 3:35 PM
Points: 1,173, Visits: 859
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
Post #1475351
Posted Friday, July 19, 2013 4:31 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, August 6, 2014 7:00 AM
Points: 54, Visits: 225
thank you Andrew,

I had looked but I hadn't seen the event "CREATE_LOGIN" !!!

Post #1475363
Posted Friday, July 19, 2013 6:01 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Yesterday @ 4:26 AM
Points: 514, Visits: 1,728
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

Post #1475410
Posted Friday, July 19, 2013 6:15 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Yesterday @ 4:26 AM
Points: 514, Visits: 1,728
double post...
Post #1475421
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse