table access in sql server 2008

  • 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..

  • Create 2 schemas and place your tables accordingly. Then grant permissions to users for particular schema.

    User-Schema Separation

    http://msdn.microsoft.com/en-us/library/ms190387.aspx

  • 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

  • if i separate this into 2 schema means they cant understand this

    Then you must take the pain (as a developer) and assign individual object level permissions to respective user.

    It's not recommended for 2 reasons:

    1.You require giving object level permissions for each newly created object to respective users. It would be never ending if you DB designs are not finalized.

    2.In long run, if users of application increases then the trouble would be n-fold (assuming database roles are also not acceptable by your client :hehe:).

  • ya ok Thanks..but i want to do like that way only the solution..

    shall u plz tell me how to do object level permission in sql server 2008

  • In SQL Server you can give permissions at table level! Check this link. Good luck!

  • shall u plz tell me how to do object level permission in sql server 2008

    GRANT Object Permissions (Transact-SQL)

    http://msdn.microsoft.com/en-us/library/ms188371.aspx

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply