table of Contents
- First, the demand scenario:
- Second, the steps:
- 1, log SSMS select [security], right-click [login] in the pop-up menu, select New Login] [options;
- 2, in the [General] tab, create a login name and set the default database;
- 3, the user mapping [] is selected from the video card, check the database schema and settings [];
- 4, the operation permission of the need to set permissions table, Table] - [] attributes;
- 5. Use [] zyl login database, you can only see the User table;
- Third, pay attention
First, the demand scenario:
When docking and other vendors, will often let go of some of the tables of a database permissions CRUD (CRUD) to the other party, this time, we must create a new user, grant certain rights CRUD table of a database; there are only authorized when SELECT permissions, other permissions can not be granted;
Second, the steps:
The demo version of the database: SQL Server Management Studio V17.8.1
1, log SSMS select [security], right-click [login] in the pop-up menu, select New Login] [options;
2, in the [General] tab, create a login name and set the default database;
3, the user mapping [] is selected from the video card, check the database schema and settings [];
4, the operation permission of the need to set permissions table, Table] - [] attributes;
TestDB already have two database tables, respectively, and User Salary, now User table permissions set permissions Insert, update, delete, select [zyl] assigned to the user;
1), the right table select [Property] select the tab [permission]:
2), click on [Search], in the pop-up box, click [Browse], select the user to be set;
3), in the above click OK, you're ready option in the [authority] card to see the list of permissions, select the required permissions and click OK;
4), elected in [select] and [quote] permission, you can also set permissions [column];
5. Use [] zyl login database, you can only see the User table;
[Zyl] and the user can only be CRUD User table, the table structure can not be modified;
Third, pay attention
1, in the list of permissions if you select the [setting], then another column permission settings [] does not make sense, because the inquiry has unrestricted;
If you set the [column] rights, no rights to select [Setup], then select * will error;
2, in addition to set permissions on the table, but also can set permissions to view, and other functions;
In the [security] database - [user] - [zyl] - [Properties] - [security] objects;