"Reprint" A new user in SQL Server 2008 logs in and specifies the user's database

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

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

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.