Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 table access in sql server 2008

Author  Topic 

Anand.A
Posting Yak Master

109 Posts

Posted - 2011-10-13 : 05:05:34
Hi,

i want to create 2 user(ie,sysadd1,sysadd2) in sql server 2008..

In that one db_name is account_db...
In that account_db i am having 50tables..

So that 1st user(sysadd1) can access only 1st 25 table in account_db..next user(sysadd2) can access next 25 tables account_db..

can we do like this in sql server..

if u knw plz tell me that solution..

anand

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-13 : 05:45:01
you need to put the tables in different schemas and map them to two users. each user should be given access to his own schema

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Anand.A
Posting Yak Master

109 Posts

Posted - 2011-10-13 : 05:54:48
quote:
Originally posted by visakh16

you need to put the tables in different schemas and map them to two users. each user should be given access to his own schema

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/









no no i want to do in single schema only..
my client want to use this 1 schema if i separate this into 2 schema means they cant understand this
so i cant create 2 schema separately

anand
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-13 : 07:01:28
then you need to manually deny users access to restricted table and give them access only to allowable ones. have a look at GRANT and DENY statements in books online

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -