INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

How to create login that has access to only certain tables in a database

How to create login that has access to only certain tables in a database

(OP)
SQL 2008R2. The title is pretty self explanatory. I need a SQL login that could run select and update queries, but be restricted from doing so on certain tables within a database.

I can grant access to the database under "user mapping", then I went to "secureables" to try to restrict access to certain financial tables. I couldn't find anything that looked promising. Surely there is a way to do this? Any insights appreciated.

Software Training, Implementation, Programming and Support for Macola Progression, Macola ES, Synergy, and Crystal Reports. Check out our Macola tools: www.gainfocus.biz/exceladdin.html

RE: How to create login that has access to only certain tables in a database

Have you tried creating a DB that only contains links to the specific tables?

Dave idea
[http://flashspot.com]

RE: How to create login that has access to only certain tables in a database

(OP)
No, because that is not the requirement. I'll consider that if nothing else works.

Software Training, Implementation, Programming and Support for Macola Progression, Macola ES, Synergy, and Crystal Reports. Check out our Macola tools: www.gainfocus.biz/exceladdin.html

RE: How to create login that has access to only certain tables in a database

create login
create user on the database - do not give any of the permissions listed if doing it through the wizard
set the user default schema - either dbo or its own.

create a role and assign the user to it (best practice)

grant select and update (delete also????) on the individual tables to the role or the user if you decide not to create a role

all done throuth T-sql would be the easiest

Regards

Frederico Fonseca
SysSoft Integrated Ltd
www.syssoft-int.com

FAQ219-2884: How Do I Get Great Answers To my Tek-Tips Questions?
FAQ181-2886: How can I maximize my chances of getting an answer?

RE: How to create login that has access to only certain tables in a database

Yet another option if this has to be done for several users...create views of just the tables/data the users need to see and only give them access to the views.

But Frederico's suggestion may be the best. Create a role in the database like LimitedUser. Grant it the appropriate rights to the tables and then add the users to that role.

-SQLBill


The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875: What should I know before I post?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close