Basically in SQL server DBA teams apply the password policies (i.e. enforce password policy & enforce password expiration) in sql login while creating new login for improve the security. But once password policy applied there are no options available in SSMS for getting the alert notification to DBA team about your created password will be expire on particular date before expire the login.
I have create one stored procedure which is select the list of sql or window authentication logins from master database which login created with password policy and check the expiry date of respective login. If any login will be expire after 2 day it will send proactively mail to DBA having list of login with expiry date.
How to Use:
-
Create a “SQL_Login_Password_Expriy_Notification” store procedure on your master database
-
Create one SQL Job with Name” SQLPassword_Expriy_Notification” and schedule it every day once on suitable time.
I Would like to request, If you have any more idea to improve in above alert notification script please suggest
Thanks & regards
Abhijit Y Shedulkar
SQL Database Administrator
Clover Infotech Pvt.Ltd (India)