SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Role
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Christech82
Starting Member

Hungary
20 Posts

Posted - 05/02/2013 :  15:57:57  Show Profile  Reply with Quote
Hi there
I would like to now how do I let the clerk Privileges by using ROLE on certain table are:
Client, Contracts and products
I need to know what is the first step that I can do and then granting the privileges according to these table ?

Thank you

Bustaz Kool
Flowing Fount of Yak Knowledge

USA
1693 Posts

Posted - 05/02/2013 :  18:08:39  Show Profile  Reply with Quote
1) Create the Role
CREATE ROLE MyRole;
2) Add the Users into the Role
EXEC sp_AddRoleMember 'MyRole', 'User1';
EXEC sp_AddRoleMember 'MyRole', 'User2';
3) GRANT the desired privileges to the Role
GRANT SELECT ON OBJECT::Client to MyRole;
GRANT SELECT ON OBJECT::Contracts to MyRole;
GRANT SELECT ON OBJECT::Products to MyRole;


=================================================
There are two kinds of light -- the glow that illuminates, and the glare that obscures. -James Thurber

Edited by - Bustaz Kool on 05/02/2013 18:09:24
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000