Friday, 19 April 2013

How to grant Database level permissions to user in SQL Server

To grant Database level permissions to user in SQL Server (in this example the ‘Execute’ permission):
In SQL Server Management Studio:
Right-click on a database -> choose Properties -> Permissions:
grant database permissions in ssms
Choose a user to which you are granting the permission, check the ‘Grant’ (or ‘With Grant’) box next to the permission, and click OK.
To grant “EXECUTE” rights to user “LGN_test” you can issue the following command:
USE AdventureWorks;
GRANT EXECUTE TO LGN_test;
GO

To grant “EXECUTE” rights to user “LGN_test” with the right to grant “EXECUTE” to other users:
USE AdventureWorks;
GRANT EXECUTE TO LGN_test WITH GRANT OPTION;
GO

No comments:

Post a Comment