views:

33

answers:

1

I just created two tables and they are named as tblA and tblB. I also created a user(Security/Login) who will be used for a remote insert/update.

What is the best way to permit this user to access for only those two table out of 50 table. I have tried look for the way from (Security/Login) and (Database/Properties). Can I limit it from user account level?

+4  A: 

Use a 'grant' statement:

grant select on tblA to the_user_name
grant insert on tblA to the_user_name
grant update  on tblA to the_user_name
Ray
Does that mean that the user is only allowed to tblA? Do I not have to deny for other tables?
Hoorayo
I tried it and it works as I expected. Thanks.!
Hoorayo
I am glad it worked. No, you do not have to deny access to other tables. This is only useful if the user was granted rights inn some other way (say, as a role member) and you want to revoke those rights.
Ray