• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 530
  • Last Modified:

SQL - View permission for Select

I created a view and wanted to know how I can setup permission for users to only have "Select" permission.  

I looked around and see the following, but I don't want to have to do this for each user.  How can I set it so that it applies to all users?

USE AdventureWorks2012;
GRANT SELECT ON OBJECT::Person.Address TO RosaQdM;
GO
0
holemania
Asked:
holemania
  • 2
1 Solution
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
>but I don't want to have to do this for each user.
A better idea would be to (1) create a group, (2) assign priveliges to that group, then (3)  assign users to the group.

That way, when users come and go, all you have to do is identity the groups they should belong to, and assign away, instead of having to run a huge-mongous script to assign them to invidivual objects.

Hope this helps.
Jim
0
 
sqlxlCommented:
USE AdventureWorks2012;
GRANT SELECT ON OBJECT::Person.Address TO public;
GO
0
 
holemaniaAuthor Commented:
Thanks that works.
0
 
sqlxlCommented:
Perfect!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now