Re: Cross-database ownership with different dbo
From: Aidar (aidar_at_onyx-pharm.ru)
Date: 08/29/03
- Next message: Dejan Sarka: "Re: Cross-database ownership with different dbo"
- Previous message: John: "beginers encryption question"
- In reply to: Dejan Sarka: "Re: Cross-database ownership with different dbo"
- Next in thread: Dejan Sarka: "Re: Cross-database ownership with different dbo"
- Reply: Dejan Sarka: "Re: Cross-database ownership with different dbo"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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.
> >
> >
>
>
- Next message: Dejan Sarka: "Re: Cross-database ownership with different dbo"
- Previous message: John: "beginers encryption question"
- In reply to: Dejan Sarka: "Re: Cross-database ownership with different dbo"
- Next in thread: Dejan Sarka: "Re: Cross-database ownership with different dbo"
- Reply: Dejan Sarka: "Re: Cross-database ownership with different dbo"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|