We can restrict SQL database users to fire some critical queries, e.g. Update, Delete, etc. through SQL Server Management Studio.
This article will guide you on how to assign specific permissions to SQL Server database user for accessing a table residing in the database. Kindly follow the below-mentioned steps, in order to proceed:
- Login to the SQL Server via SQL Server Management Studio, by using the below-mentioned login details as shown in the following image. Please refer to connect MsSQL database using management studio for more details.
- Server type: Database Engine
- Server name: IP address,1533
- Authentication: SQL Server Authentication
- Login: SQL Server database user
- Password: As per set by you
- Select your SQL database, Expand database name then select the table residing in that database for which you want to assign the required permissions to that database user, as shown in the following image:
- Right-click on the table and select Properties. Click on Permissions option from Table Properties dialog box.
- Click on Search button and click on Object Types button.
- Now, check the Users option and click on OK button, as shown in the following image:
- Click on Browse button and select your SQL database user and click OK.
- Once again click on OK button from "Select Users or Roles" Dialog box.
- Assign appropriate permissions to the user, as shown in the following image:
By referring to these steps, you can assign particular permissions to the specific database user in SQL Server.
Note: The above steps are performed on SQL Server 2008 R2 Express Edition.
→ Looking to change DB user schema to DBO in MSSQL? Please refer to change DB schema for more details?