Re: Permissions Across Databases



Flyguy (flyguy@xxxxxxxxxxxxx) writes:
I have two databases. In the first database I have a view that needs to
be able insert into a table in the second database. I want the user to
only have select permissions in the second database’s table. Because of
this restriction the view cannot insert into the table when the user
inserts into the view. Is there some way of granting the view insert
permissions to the table? I know this will work if the view and table
are in the same database but I have to have them in different databases
in this situation.

You need to do two things:

1) Ensure that the databases have the same owner.
2) Enable database chaining for the databases.

The latter could be a security issue, if there are users that are db_owner
on one of the databases, but are not supposed to do much in the other.

--
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
.



Relevant Pages

  • Re: Hiding database
    ... Jasper Smith (SQL Server MVP) ... >>>Can someone explan how to hide databases in enterprise manager. ... >> permissions are granted to these users. ... > have access rights to one of them. ...
    (microsoft.public.sqlserver.tools)
  • 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: Security Script
    ... You when you restore a database, or attach it, SQL Server maintains the ... logins but removes all permissions to databases and their objects. ...
    (microsoft.public.sqlserver.security)
  • 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: public role???
    ... What exactly do you mean by "new users have access to all DBs"? ... If you mean that new users can see the names of the other databases, ... Documentation on the "guest" account is available in the SQL Server Books ... > permissions. ...
    (microsoft.public.sqlserver.security)