Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Automatically Disable Logins on access expiry date

$
0
0

Hi All,

As SQL Server don't have  native way to disable logins on access expiry date. I am planning to create a table with

three columns

1. LoginName

2.RolesGranted

3.ExpiryDate

Now I will schedule a job which runs every day at 23:59 PM. Here the script in the job should compare the Expirydate column with Getdate(). If both dates are equal it should generate disable script for those specific logins that are going to expire on Getdate().

Is this is the right approach ?


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>