How to set SQL database user rights

Source: Internet
Author: User

First, the Operation procedure

    1. First, enter the database-level security-Login name-New login name

(Figure 1: New login name)

2. In the General tab, create a login name as shown, and set the default database.

(Figure 2: Setting options)

3. In the User Mappings tab, as shown in, tick the database you need to set up, and set the "Schema", click "Confirm" button to complete the creation of the user's action

(Figure 3: Select the corresponding database)

4. Now we can set permissions on the user table in the Testlog database, "table"-"Properties"

(Figure 4: Select the corresponding table)

5. In the "Permissions" tab, as shown, click "Add"-"Browse"-"Select Object"

(Figure 5: Set the user to access the table)

6. After clicking on "Confirm" above, we can find the corresponding permission in the list below, if you want to refine the permissions of the column, there is a "column permission" button in the lower right corner to set, click "Confirm" button to complete the settings of these permissions

(Figure 6: List of permissions)

7. Now use the TestUser user login database, after landing as shown, now only see a table

(Figure 7: effects)

Second, the matters needing attention

    1. In the 3rd step above you need to note: if there is no corresponding database selected, then go to testlog database is not found testuser.

(Figure 8: TestUser user not found)

2. In the 3rd step above, after setting up the Testlog data, you need to click "Confirm" button to complete the creation of user action, if this time to set "security object", is unable to "add"-"specific Object"-"Object Type"-"Login"-"Browse" The newly created TestUser user is found in the.

3. In fact, the user created at the database level "security" is a global one, and when a database is set up, such as Testlog, the user appears in the security list of the database. If you delete testlog This user, you will receive the following prompt. Once deleted, the user will not be able to log in. Need to go to the corresponding database to delete the user, if not deleted and created, will be an error.

(Figure 9: Delete testuser user)

4. In the "Explicit Permissions" list in step 6th, if you select the "Control" option, setting the Query "column permissions" in the "select" is meaningless and the query is not restricted. If you set "column Permissions", the error message will be displayed under normal circumstances:

(Figure 10: effects)

5. In the Testlog database "security"-"TestUser"-"Properties"-"securable"-"Add"-"Object type" Here are more about the database level of some object types can be set.

(Figure 11: Other object types)

Note: Reference Digest

Https://zhidao.baidu.com/question/1702891267796183220.html

How to set SQL database user rights

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.