February 1, 2011 at 7:38 pm
Does anyone have any script or a way of sending an email automatically if/when the "sa" account logs in? Ideally no one should be using this account or know the password but I wanted to be alerted should anyone manage to get in with the sa account.
Thanks.
February 2, 2011 at 12:14 am
I don't have any code, but I can give you a gentle push in the right direction. Lookup DDL triggers in Books Online. Also, event notifications. Either of those coupled with database mail may give you what you are looking for here.
February 2, 2011 at 1:16 am
Lynn Pettis (2/2/2011)
I don't have any code, but I can give you a gentle push in the right direction. Lookup DDL triggers in Books Online. Also, event notifications. Either of those coupled with database mail may give you what you are looking for here.
Agreed. It's a logon trigger, indeed.
Just be sure to test the trigger code thoroughly before deploying, because a misbehaviour in a logon trigger can prevent everyone from loggin in to the server.
-- Gianluca Sartori
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply