Some of developers on my team know passwords from SQL accounts that have extended permissions
We would like to track and be alerted whenever any of developers are using any of those SQL accounts to connect
We are about to implement logon trigger
that would for each log in attempt, evaluate login's properties, and send email report if they match certain criteria. Logic is following:
if original_login() in (...SQL accounts list here...) and:
a) client IP address is 192.168.x.x VPN subnet (no Production apps connecting from this subnet, only developers can) or
b) client host name in (... list of Dev's host machine names...) or
c) client application name in (SSMS,az-Data etc.)
exec sp_send_dbmail (send report over email to DBA)
Trigger would have "execute as" clause and run on behalf of a SQL login whose only permission is to send db mail emails
What can be unwanted side effects of enabling this kind of logon trigger on Production ?
Can it slow login process or cause any other issues ?
p.s. I am aware about DAC
and how to use it.
Tested connecting using DAC
and counting on it to help me disable the trigger if any trouble begins