| Author |
Topic  |
|
|
sebastian11c
Posting Yak Master
125 Posts |
Posted - 11/06/2012 : 16:16:29
|
hi there
i have a sql server 2008 r2 and i want to create a user with login , that only have access to a database called "company" and inside the databse company he can only select , update , and insert in 3 tables called " products", "sevices", "clients", and run only one stored procedured called "insert_new_clients" and thats it, he cant acces anything else, no system database, no other sp, no other tables, and obviously he cant modified his permissions,
am a newbie in sql server so i need you help
many thanks in advanced
regards |
Edited by - sebastian11c on 11/06/2012 16:26:01
|
|
|
TG
Flowing Fount of Yak Knowledge
USA
5467 Posts |
Posted - 11/06/2012 : 16:29:32
|
Are you looking for T-Sql code or simply how to navigate the Management Studio interface?
Sounds like you have it already. Just be sure not to add the login to any server roles and not to add the user to any database roles. That way the user has no permissions that you didn't explicitly grant. Furthermore if the SPs perform the insert/update/delete work and the SPs are in the same database as the tables then you don't even need to grant insert,update,delete on the tables. Just EXECUTE on the Procedure(s) will be sufficient.
Be One with the Optimizer TG |
 |
|
|
sebastian11c
Posting Yak Master
125 Posts |
Posted - 11/06/2012 : 16:57:47
|
thanks tg for your reply
but i dont have it at all, could you explain me please with an example, ,it can be with t-sql or managemente studio interface,, thanks for your help
regards |
 |
|
|
sebastian11c
Posting Yak Master
125 Posts |
Posted - 11/07/2012 : 08:31:32
|
quote: Originally posted by TG
Are you looking for T-Sql code or simply how to navigate the Management Studio interface?
Sounds like you have it already. Just be sure not to add the login to any server roles and not to add the user to any database roles. That way the user has no permissions that you didn't explicitly grant. Furthermore if the SPs perform the insert/update/delete work and the SPs are in the same database as the tables then you don't even need to grant insert,update,delete on the tables. Just EXECUTE on the Procedure(s) will be sufficient.
Be One with the Optimizer TG
please tg, i dint know how to do it, give me an extra hand
regards |
 |
|
|
TG
Flowing Fount of Yak Knowledge
USA
5467 Posts |
Posted - 11/07/2012 : 10:09:01
|
>>please tg, i dint know how to do it, give me an extra hand
- Open "Microsoft Sql Server Management Studio" - Make sure that "Object Explorer" is open (if not then from context menu: View | Object explorer) - Find your server in tree view (if not there then click: Connect | Database Engine) - Expand the tree under your server - Expand "Logins" - Right Click "Logins" then click "New Login".
See if you can take it from there. Be sure to look through the "select a page" items. If you still have problems then post a specific question.
EDIT: Once you have the login created: - expand databases - expand the database you want the login to access. - expand "Security" - expand "Users" - If the user is not there then right-click | new users - If it is there then right-click the user | Properties - Add specific permissions in the "Securables" page
Be One with the Optimizer TG |
Edited by - TG on 11/07/2012 10:13:31 |
 |
|
|
sebastian11c
Posting Yak Master
125 Posts |
Posted - 11/07/2012 : 10:29:19
|
lovely..
thanks a lot |
 |
|
| |
Topic  |
|