This article demonstrates the steps to create an SQL Server Login which enforces password policies and password expiration policies.
Let us start by creating a new SQL Server Login.
1. Using SQL Server Management Studio, connect to SQL Server Instance.
2. Expand Security, and right click Logins to choose New Login… option from the popup menu to open up Login dialog box as shown in the snippet below.
3. In Login dialog box, you will be able to see checks boxes for Enforce Password Policy and Enforce Password Expiration as highlighted in the snippet below. If you select those check boxes while creating the new SQL Server logins, then the SQL Server will leverage the Windows password policies set by the windows administrator across the organization. Click OK to create the SQL Server Login with Public server role.
Where I will be able to see the Password Policies?
1. Navigate to Start | Control Panel | Administrative Tools | Local Security Policy or Run SECPOL.MSC from Command Prompt.
2. To review the local policies on the machine expand Security Settings | Account Policies | Password Policy as shown in the snippet below.
- COPY_ONLY Backup in SQL Server Step by Step Tutorial with Examples
- How to Change Select Top 1000 Rows and Edit Top 200 Rows Default Value in SQL Server Management Studio
- How to Recycle SQL Server Error Log file without restarting SQL Server Service
- How to Detect Virtual Log Files in SQL Server Transaction Log File
- How to Repair Suspect Database in SQL Server
- What are Virtual Log Files in SQL Server Transaction Log File?
- Identify Deadlocks in SQL Server Using Trace Flag 1222 and 1204
Logon Error: 18487, Severity: 14, State: 1. Logon Login failed for user 'Login Name'. Reason: The password of the account has expired.
In this article you have seen how to leverage Windows Polices to enforce password policies and password expiration for SQL Server Logins.