SQL Server Add login account configuration Permissions

Source: Internet
Author: User

First, new login name

1. Enter the new administrator account name in the text box to the right of the login name;
2. In a pair of radio button groups, select SQL Server authentication and enter the login password;
3. Tick the Enforce Password policy check box, (password policy generally refers to the password method to strengthen the user login, such as: May require at least 8 characters, or after a number of unsuccessful attempts to login the account is forbidden to login and so on!) If you feel the trouble can not be checked! )
4. Do not check the mandatory password expires, (if the item is checked, the system will prompt the user must change the existing password, such as non-special needs, not recommended to check this!) )

Second, set administrator permissions
Go to server roles in the server Roles panel on the right, tick public and sysadmin two!

Note: Do not tick the sysadmin entry if the established account does not require the privileges of the system administrator!

Third, set non-administrator permissions

Go to "User mapping" in the right pane, tick the name of the database where the account can manage operations! And in database role membership below the panel, tick the db_owner
Item

Note: If you assign a management database to an account that does not have administrative privileges, you must check the db_owner key! Otherwise the account will not be able to see any data tables in that database!

Enter "status" to set the connection engine authorization;

Third, the situation can not be logged

Check the Database property page "Security" to see if SQL Server and Windows Authentication mode are enabled;

Iv. creating a user with T-SQL

1 --Add a role2  Usetest_db3 Go4Sp_addlogin'test_db','123456','test_db'   5 Go6Sp_addsrvrolemember'test_db','sysadmin'   7 Go8Sp_adduser'test_db','test_db','db_owner'9 Go

SQL Server Add login account configuration Permissions

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.