Re: Question about View permissions
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Mon, 10 Dec 2007 14:33:23 -0800
B. Chernick (BChernick@xxxxxxxxxxxxxxxxxxxxxxxxx) writes:
(I'm a little rusty on SQL admin and security. Please refresh my memory.)
I'm writing an ASP.Net 2.0 demo using a SQL Server 2000 database,
nothing too fancy. For the purpose of this demo I have created a SQL
authentication login and granted it ownership of this one database.
A little while later, I had a need to create a view to populate one of
the Object Data Sources on a web page. This worked fine while I was in
my own development environment but when published the site to the server
using that SQL login, the page with the o.d.s. started crashing. After
a little bit of trial and error, I found that this would not work unless
I went into the database and explcitly granted the view Select
permission on both the demo's SQL authentication login and 'guest'.
(The view's permissions were originally completely blank.)
Is this normal operating procedure for setting up Views or could I be
forgetting something at a higher level?
In SQL Server a view is not something you grant permission to access
something. You grant principals access to the view. But maybe when you talk
about a "view" you mean a web page or something else?
But in case, this is a view in SQL, yes, you have to grant the SQL
login with which you access the database SELECT permission on the
view one way or another.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- Prev by Date: Re: db_owner
- Next by Date: Re: current security context is not trusted (cross db ownership ch
- Previous by thread: sell running sport shoes(accept paypal)(www.ecpopzone.com)
- Next by thread: Re: Sp_changepassword
- Index(es):
Relevant Pages
|
|