First, the operating environment
System: Windows 10
Database: SQL Server 2014
Database name: App new user name: App
Second, the Operation procedure
1. Open MS SQL Server Management Studio and log in as Windows authentication.
2. Under Object Explorer, security ==> login name ==> Right-click Properties ==> New Login
3. After opening the "Login-New" dialog, General ==> Select "SQL Server Authentication" ==> fill in "Login name" and "Password",
(This time, I canceled the "Enforce Password Policy")
Select the default database as "APP".
(The database app has been created, and if you haven't created your own database before, the default master is OK)
Set Server Roles tab
Set the User Mappings tab
Set Status tab
Confirm after input is completed
4. Under Object Explorer, right-click the server instance name (. \sqlexpress), select Properties
Under the Security tab, in Server Authentication, select SQL Server and Windows Authentication mode
5, disconnect, reconnect with "SQL Server Authentication", when the new user is successful.
Third, configure permissions
Because app users have very low privileges, they can only connect, and permissions are configured in the property configuration of the corresponding database
Iv. Description of the error
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 is not mapped to the appropriate database in the Step 3 User Mapping tab, the user cannot log in correctly even if the default database is specified on the General tab, error 4064, the user is not in the database user list, and the user is denied action when logged on
3. If you do not specify a server authentication method in step 4, a 18456 error will occur when you log on
V. References
http://blog.csdn.net/zhouquan2009/article/details/7010387
Thanks for the exchange
MS SQL Server 2014 Fundamentals: Create a new logon user, assign permissions, and specify the user's database