First, the Operation procedure
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
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