Computer >> Computer tutorials >  >> Programming >> SQL Server

Decentralizing User Permissions in MS SQL Server: A Practical Guide

Administrators can create, delete or deny permissions in MS SQL Server. The permissions here refer to database access (CSDL). You can create, delete or deny permissions in MS SQL Server.

To decentralize, use 1 of 2 ways.

Method 1: Use T-SQL

Use <database name>
Grant <permission name> on <object name> to <usernameprinciple>

For example:

To authorize the user named TestUser on the object TestTable on the database named TestDB, run the following query.

USE TestDB
GO
Grant select on TestTable to TestUser

Method 2: Use SQL Server Management Studio SSMS

Step 1 : Connect to the database, expand the directory as shown in the image below.

Decentralizing User Permissions in MS SQL Server: A Practical Guide image 1 : How to decentralize users in MS SQL Server

Open the Security> Users folder and find the username you want to decentralize

Step 2 : Right-click TestUser and select Properties. The screen below will appear.

Decentralizing User Permissions in MS SQL Server: A Practical Guide image 2 : How to decentralize users in MS SQL Server

TestUser user management screen

Step 3 : Use Search to search and then select the object you want to decentralize, here is the Table TestTable.

Step 4 : Click on the TestTable table , then select the Grant checkbox for the operations in the list below as shown in the image below. In this example, the right to select a table (Select) is given.

Decentralizing User Permissions in MS SQL Server: A Practical Guide image 3 : How to decentralize users in MS SQL Server

Tick ​​select the authority box

Step 5 : Click OK to complete the authorization.

You've just finished reading the article "How to decentralize users in MS SQL Server" edited by the TipsMake team. We hope this article has provided you with many useful tech tips and tricks. You can search for similar articles on tips and guides. Thank you for reading and for following us regularly.

Decentralizing User Permissions in MS SQL Server: A Practical Guide Isabella Humphrey

Update 25 May 2019