Solved

Set up user to have only access to one view

Posted on 2011-09-22
3
279 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
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to enforce inte 8 43
Change variables in SQL table 6 81
SQL Backup skipping a few tables 7 35
how to eliminate duplicates in a string variable in t-sql? 30 62
by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now