Am able to get all the connections which are connecting to database but, is there any way that we can get an email notification when a user connected to the sql database ?
Thanks in advance,
Tried sp_whoisactive and sp_connections but didn't helped.
Am able to get all the connections which are connecting to database but, is there any way that we can get an email notification when a user connected to the sql database ?
Thanks in advance,
Tried sp_whoisactive and sp_connections but didn't helped.
1条答案
按热度按时间slsn1g291#
You can use a
LOGON TRIGGER
. In this trigger you can create your email.https://learn.microsoft.com/en-us/sql/t-sql/statements/create-trigger-transact-sql?view=sql-server-ver16