Summary: When I log in to a new user in SQL Server, there are three errors, 18456, 15128, 4064, respectively, of the error codes
-----------------------------------Body-----------------------------------
First, the experimental environment
Windows 7
SQL Server 2008
The DB instance name is TestDB and the new user name is TestUser
Second, the Operation procedure
1. Open SQL Server Management Studio and log on as Windows authentication
2. Under Object Explorer, right-click Security ==> Logins ==> New Login
3. After you open the new Login dialog box, enter the appropriate login name, password, and default data to the right of the general
User Mappings Tab under
Status tab under
Confirm after input is completed
4, Object Explorer, right-click Instance name (do not know so called right), the part of the blue background ==> Properties
After selecting the hybrid authentication mode under the Security tab, determine
5. Restart the SQL Server service
The new user succeeds at this point.
Three, several notes
1. If the Enforce password policy is checked in the General tab of Step 3, a 15128 error will occur
At this point, you need to log on as Windows Authentication mode and execute the following statement
[SQL]View Plaincopy
- AlTER LOGIN testUser with PASSWORD = ' new password '
2, if the User Mapping tab in the Step 3 is not mapped to the appropriate database, even if the default database is specified in the General tab, the user will not be able to log in, this time error 4064, I understand that the database user list does not have the user, so the user logon denied action
3. If you do not specify a server authentication method in step 4, a 18456 error will occur when you log on
Iv. Summary
1, at this time the TestUser user has a very low privilege, only can connect, the permissions are configured in the corresponding database property configuration
2, the entire configuration process can be understood as the new user ==> add the user to the appropriate database user list ==> Configure user Rights ==> Change the authentication method for SQL Server