SQL Query to Get Login Password Expiry

Microsoft SQL ServerI don’t recall exactly why this script was required, but the below SQL query can be used to get the expiration date for logins in Microsoft SQL Server. Some of the data is available directly from the sys.sql_logins table, but other pieces had to be retrieved using the LOGINPROPERTY function:

SELECT
[‘SQL Logins’].name AS ‘LoginName’
,LOGINPROPERTY([‘SQL Logins’].name, ‘PasswordLastSetTime’)

Continue Reading Ian Grieve’s Article on their blog

SQL Query to Get Login Password Expiry

I don’t recall exactly why this script was required, but the below SQL query can be used to get the expiration date for logins in Microsoft SQL Server. Some of the data is available directly from the sys.sql_logins table, but other pieces had to be retrieved using the LOGINPROPERTY function: ISC Software Solutions are UK and Ireland based experts on Microsoft Dynamics GP.

Blog Syndicated with Ian Grieve’s Permission

Author: Ian Grieve

Share This Post On

SCOTtish summit 2021

On February the 27th Scottish Summit 2021 will come to you as a virtual event. With over 250 sessions from all Microsoft technologies. You need to register for your FREE ticket and download the Scottish Summit App to see all the great sessions.