MS SQL Server 2014 Fundamentals: Create a new logon user, assign permissions, and specify the user's database

Source: Internet
Author: User
Tags management studio sql server management sql server management studio

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
    1. 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.