Hi, My name is Jimmy Sam. If you need DBA help, please email to jimmy_sam001@yahoo.com for further discussion. Thanks.
mssql setspn     loginproperty    

login property and password hash


-- ------------

Use the Manipulate Service Principal Names for Accounts (SetSPN.exe) utility
loginproperty

DECLARE @my_login_name char(20);  
SET @my_login_name = 'sa';   
SELECT 'IsLocked' AS Property, LOGINPROPERTY(@my_login_name, 'IsLocked') AS Value
union all
SELECT 'IsExpired' AS Property, LOGINPROPERTY(@my_login_name, 'IsExpired') AS Value
union all
SELECT 'DaysUntilExpiration' AS Property, LOGINPROPERTY(@my_login_name, 'DaysUntilExpiration') AS Value
union all
SELECT 'IsMustChange' AS Property, LOGINPROPERTY(@my_login_name, 'IsMustChange') AS Value
union all
SELECT 'BadPasswordCount' AS Property, LOGINPROPERTY(@my_login_name, 'BadPasswordCount') AS Value
union all
SELECT 'PasswordLastSetTime' AS Property, LOGINPROPERTY(@my_login_name, 'PasswordLastSetTime') AS Value
union all
SELECT 'BadPasswordTime' AS Property, LOGINPROPERTY(@my_login_name, 'BadPasswordTime') AS Value
union all
SELECT 'LockoutTime' AS Property, LOGINPROPERTY(@my_login_name, 'LockoutTime') AS Value
union all
SELECT 'PasswordHash' AS Property, LOGINPROPERTY(@my_login_name, 'PasswordHash') AS Value
union all
SELECT 'PasswordHashAlgorithm' AS Property, LOGINPROPERTY(@my_login_name, 'PasswordHashAlgorithm') AS Value;
GO



SELECT 'IsLocked' AS Property, LOGINPROPERTY('sa', 'IsLocked') AS Value
union all
SELECT 'IsExpired' AS Property, LOGINPROPERTY('sa', 'IsExpired') AS Value
union all
SELECT 'DaysUntilExpiration' AS Property, LOGINPROPERTY('sa', 'DaysUntilExpiration') AS Value
union all
SELECT 'IsMustChange' AS Property, LOGINPROPERTY('sa', 'IsMustChange') AS Value
union all
SELECT 'BadPasswordCount' AS Property, LOGINPROPERTY('sa', 'BadPasswordCount') AS Value
union all
SELECT 'PasswordLastSetTime' AS Property, LOGINPROPERTY('sa', 'PasswordLastSetTime') AS Value
union all
SELECT 'BadPasswordTime' AS Property, LOGINPROPERTY('sa', 'BadPasswordTime') AS Value
union all
SELECT 'LockoutTime' AS Property, LOGINPROPERTY('sa', 'LockoutTime') AS Value
union all
SELECT 'PasswordHash' AS Property, LOGINPROPERTY('sa', 'PasswordHash') AS Value
union all
SELECT 'PasswordHashAlgorithm' AS Property, LOGINPROPERTY('sa', 'PasswordHashAlgorithm') AS Value;
GO