But last week I got a good opportunity to play with these permission settings.I had to grant update and select permission for a SQL database user on a particular view.Initially we did using the SQL Server Management Studio.It is very easy.Below are the steps.
- Navigate to <Your Database>->Security->Users and double click on the user to whom you need to grant or revoke permission.
- On the Database user window select the securables page.
- There are 2 portions at the right side.Top section is to select securables and below section for the Permissions on the selected securable.
- Add your securable using the search window.The search window can be poped up using the search button.
- You can add a securable in 3 modes.Specific database object,all object of specific type or all objects in a schema.
- Once you add the securable using the search window, the bottom pane will show you what are the permissions you can set on those db objects.
Below is the Database user window where you can set the permissions visually.
This is the script generated when clicked on the button”Script Action to new query window”
use [AddressBook] GO GRANT SELECT ON [dbo].[PersonView] TO [joymon] GO use [AddressBook] GO GRANT UPDATE ON [dbo].[PersonView] TO [joymon] GO