Re: Using Views for Security

From: DebHerman (DebHerman_at_discussions.microsoft.com)
Date: 05/18/05


Date: Wed, 18 May 2005 00:19:20 -0700

The user is defined in both databases, the one with the view and the one with
the underlying tables in the view. I don't want to have to assing
permissions to the underlying tables, just the view.

"Uri Dimant" wrote:

> I see, you have to have the user defined in the database
> I'm affraid you cannot assign permissions to the user who does not exist in
> the database .
>
>
> "DebHerman" <DebHerman@discussions.microsoft.com> wrote in message
> news:03E78361-58D6-449D-8D10-A56DA3EA18A3@microsoft.com...
> > Thanks for the reply, but I don't believe this article addressed what I am
> > trying to do, or if it did, I didn't recognise it. My problem is when I
> try
> > to go across databases, I don't get the same results as within the same
> > database. I'm not really looking for row level security. I want to give
> > users access to a view but not the the underlying tables. This works in
> the
> > same database but not across databases.
> > "Uri Dimant" wrote:
> >
> > > Hi
> > > Read Vyas's article describing row level security
> > >
> > > http://vyaskn.tripod.com/row_level_security_in_sql_server_databases.htm
> > >
> > > "DebHerman" <DebHerman@discussions.microsoft.com> wrote in message
> > > news:373B1A28-B090-488A-89D1-1DFDF1FEA1FA@microsoft.com...
> > > > I am using SQL views to aid with security in my SQL Server
> implementation.
> > > > For example I create viewA as select field1, field2 from TAble1. I
> grant
> > > > select access to viewA to user1 but not access to the underlying
> table.
> > > As
> > > > long as the owner of viewA has permissions to the table user1 can
> access
> > > the
> > > > view but not the table. This works great. However I want to take
> this
> > > one
> > > > step further in that viewA acutally is created on tables in another
> > > database
> > > > on the same server. In this scenario I give select access to viewA to
> > > > User1. The owner of viewA rights to the table is the other database;
> he
> > > > even has dbo rights to the database. In this case user1 can't select
> from
> > > > viewA. User1 gets the error that he does not have rights to the table
> in
> > > the
> > > > other database. Is there something I am missing or is this not
> allowed. I
> > > > can't find any specific documentation regarding this. Thanks.
> > > >
> > >
> > >
> > >
>
>
>



Relevant Pages

  • Re: denying permissions on the views underlying tables
    ... databases. ... underlying tables only work if the views and the tables ... >owner you should only need to give select permissions on ... >> implement data portals and linked servers. ...
    (microsoft.public.sqlserver.security)
  • RE: missing system.mdw file
    ... permissions to create the file, ... >The registry key is not missing. ... Running the SCAN program from the Windows ... >>| I cannot create any new databases in Access 2002 on ...
    (microsoft.public.access.setupconfig)
  • Re: one SQL DB getting info from another - user setup?
    ... It appears from your narrative that the Main and DB1 databases ... EXEC sp_helpdb 'Main' ... SQL 2000 SP3 and is turned off by default. ... > In the permissions for Main, USER1 and USER2 are listed, but have NO ...
    (microsoft.public.sqlserver.security)
  • Re: MDB remembers old MDW
    ... The workgroup file is used for a session of Access - any number of databases ... The mdw defines the usernames/passwords and group memberships. ... permissions are stored in the mdb file with the objects. ...
    (microsoft.public.access.security)
  • Re: Application roles Please Help!
    ... May I point out that with the guest account, any server login will have ... access to any db even without permissions. ... > Other databases can be accessed only via the guest user security context ...
    (microsoft.public.sqlserver.security)