Solved

Set up user to have only access to one view

Posted on 2011-09-22
3
309 Views
Last Modified: 2012-05-12
I am trying to set up an user to have access to only one view.  Is there a way to take all rights to all the database and table and give the right to the view only?  I would like to do this with the user login screen in SQL server Management Studio.  

Thanks
0
Comment
Question by:DowneyCity
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 18

Accepted Solution

by:
lludden earned 250 total points
ID: 36581153
Create a user in the database.
CREATE USER [MyLimitedUser] FOR LOGIN [MyLimitedUser] WITH DEFAULT_SCHEMA=[MyLimitedUser]
GRANT SELECT ON [dbo].[myView] TO [MyLimitedUser]

You can do this through the GUI also.
0
 
LVL 5

Expert Comment

by:zvytas
ID: 36581163
Yes, it is possible. Simply create new user with no right at all and grant select permission on the view in question:

GRANT SELECT ON <view> TO <user>
0
 

Author Closing Comment

by:DowneyCity
ID: 36581641
Understand the sql statement but would of like to see it done with the GUI.  Was able to figure it out from the statement.

thanks
0

Featured Post

Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question