Re: Cross-database ownership with different dbo

From: Aidar (aidar_at_onyx-pharm.ru)
Date: 08/29/03


Date: Fri, 29 Aug 2003 15:11:11 +0400


Thank you for the answer, this part of the problem was solved.
To solve this problem once and for all, do you know, can we enable
cross-database ownership when user has been granted access only to one of
this databases.
I have granted access to database [Assets] to user [DOMAIN\firstuser], then
I have granted him SELECT permissions to the view ("SELECT * FROM
[AnotherDB].[dbo].[TheTable]"), that references another database.
When [DOMAIN\firstuser] tries to use this view, SQL Server answers " Server
user 'DOMAIN\firstuser' is not a valid user in database 'AnotherDB' ".
I have granted this user access to [AnotherDB] database and after this
everything worked just fine.
But I am [dbo] for each of these databases and, logically, it would be nice,
if SQL Server had used cross-database ownership feature without granting
[DOMAIN\firstuser] direct access to [AnotherDB].
Is there any way to let SQL Server work this way or I have to grant access
to each of these databases to all users, that need cross-database ownership
feature?

"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@avtenta.si>
сообщил/сообщила в новостях следующее:
news:u3avpmgbDHA.656@tk2msftngp13.phx.gbl...
> First try to use sp_changedbowner system SP (check the syntax in Books
> OnLine). I guess this should fix your problem.
>
> --
> Dejan Sarka, SQL Server MVP
> FAQ from Neil & others at: http://www.sqlserverfaq.com
> Please reply only to the newsgroups.
> PASS - the definitive, global community
> for SQL Server professionals - http://www.sqlpass.org
>
> "Aidar" <aidar@onyx-pharm.ru> wrote in message
> news:u9f6kGgbDHA.656@tk2msftngp13.phx.gbl...
> > We have several databases within a single instance of SQL Server SP3a.
> > Cross-database ownership is enabled for the instance. If we look into
> > 'Users' container in Enterprise Manager we can see, that in most
databses
> > [dbo] user does not have a corresponding login (the field is blank).
> > Cross-databse ownership works fine between these databases.
> > Recently I have greated a new database [Assets]. In this database user
> [dbo]
> > has a corresponding login - "DOMAIN\aidar" - member of [sysadmin] fixed
> > role. The cross-database ownership does not work between [Assets] and
> other
> > databases.
> > It seems, that SQL Server thinks, that these databases have different
> > owners.
> > Does anybody know, in which cases SQL Server creates databases with
blank
> > login corresponding to [dbo] user, and in which cases it assigns login
of
> > current user to [dbo] user?
> > What is the best way to enable cross-database ownership in this case:
> > manually delete corresponding login from [dbo] user in database [Assets]
> or
> > assign my login "DOMAIN\aidar" to [dbo] user in each database that
> > participates in cross-database ownership?
> >
> > Thanks for any answer.
> >
> >
>
>



Relevant Pages

  • Re: Cross-database ownership with different dbo
    ... But be aware that cross-database ownership chains and using guest ... Dejan Sarka, SQL Server MVP ... > I have granted access to database to user, ... > But I am for each of these databases and, logically, it would be ...
    (microsoft.public.sqlserver.security)
  • Re: why>?
    ... On your desktop-- you'll be running SQL Server behind the scenes. ... it isn't risky to allow end users to create databases. ... it is no more risky than giving you the ability to create spreadsheets. ... I'm not saying that Oracle and IBM are going away. ...
    (microsoft.public.excel)
  • Re: Please answer my queries for fresh Installation
    ... Moving SQL Server Databases ... Using WITH MOVE in a Restore to a New Location with Detach/Attach ... Disaster Recovery Articles for SQL Server ...
    (microsoft.public.sqlserver.server)
  • Re: Please answer my queries for fresh Installation
    ... You can restore MSDB as well as master. ... > SQL Server, It will create Master, MSDB databases. ...
    (microsoft.public.sqlserver.server)
  • Re: Moving SQL Server 2000 from NT4.0 to Windows 2003
    ... Detach your existing user databases, ... user databases (or RESTORE) to the new server. ... > Hey Steve, ... Windows 2003 will not allow SQL Server SP less than 3. ...
    (microsoft.public.sqlserver.server)