SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Can I grant read-only access to table for view
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

KilpAr
Yak Posting Veteran

80 Posts

Posted - 11/14/2012 :  02:28:37  Show Profile  Reply with Quote
Is there a way to use a view as an user i.e. grant an access for a view to read a table?

sunitabeck
Flowing Fount of Yak Knowledge

5155 Posts

Posted - 11/14/2012 :  06:57:40  Show Profile  Reply with Quote
You mean grant access to select from the view?
GRANT SELECT ON dbo.YourView to TheUserNameOrRolename;
Go to Top of Page

sgondesi
Posting Yak Master

India
194 Posts

Posted - 11/08/2013 :  04:40:56  Show Profile  Reply with Quote
quote:
Originally posted by KilpAr

Is there a way to use a view as an user i.e. grant an access for a view to read a table?



we can only grant access to users of a database on its objects.

users are created in order to access a database.

Before a user can access the database, that particular user should be mapped to a login created for accessing instance.

--
Thanks and Regards
Srikar Reddy Gondesi,
BTECH-IT 2013 Passed Out,
Trainee for SQL Server Administration,
Miracle Software systems, Inc.
Go to Top of Page

sgondesi
Posting Yak Master

India
194 Posts

Posted - 11/08/2013 :  04:44:45  Show Profile  Reply with Quote
quote:
Originally posted by KilpAr

Is there a way to use a view as an user i.e. grant an access for a view to read a table?



or in other way.

if the user in which you logged in has access to the table, then obviously the view which you are talking about can access that particular table.

--
Thanks and Regards
Srikar Reddy Gondesi,
BTECH-IT 2013 Passed Out,
Trainee for SQL Server Administration,
Miracle Software systems, Inc.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000