Sunday, February 19, 2012

dbo does not have a login name..

Hi
In one of the databases, dbo users under Users option does not have the
login name.Is there any way to assign a login name "sa" to dbo.
Thanks and Regards
Jagmindersp_changedbowner
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jagminder Chugh" <JagminderChugh@.discussions.microsoft.com> wrote in message
news:3250D5AC-F964-4BD7-8C09-C0773AD46721@.microsoft.com...
> Hi
> In one of the databases, dbo users under Users option does not have the
> login name.Is there any way to assign a login name "sa" to dbo.
> Thanks and Regards
> Jagminder|||when i try that it says,
Cannot change the owner of the master database.
"Tibor Karaszi" wrote:
> sp_changedbowner
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Jagminder Chugh" <JagminderChugh@.discussions.microsoft.com> wrote in message
> news:3250D5AC-F964-4BD7-8C09-C0773AD46721@.microsoft.com...
> > Hi
> > In one of the databases, dbo users under Users option does not have the
> > login name.Is there any way to assign a login name "sa" to dbo.
> >
> > Thanks and Regards
> > Jagminder
>
>|||Are you saying that it is the *master* database that doesn't have an owner? That shouldn't be
possible. The proc changes the owner for the current database, so you need to USE the database you
want to change owner for first. See Books Online for details on how to use this procedure.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jagminder Chugh" <JagminderChugh@.discussions.microsoft.com> wrote in message
news:336DF028-34FB-431C-8739-C35C9FBF7460@.microsoft.com...
> when i try that it says,
> Cannot change the owner of the master database.
> "Tibor Karaszi" wrote:
>> sp_changedbowner
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Jagminder Chugh" <JagminderChugh@.discussions.microsoft.com> wrote in message
>> news:3250D5AC-F964-4BD7-8C09-C0773AD46721@.microsoft.com...
>> > Hi
>> > In one of the databases, dbo users under Users option does not have the
>> > login name.Is there any way to assign a login name "sa" to dbo.
>> >
>> > Thanks and Regards
>> > Jagminder
>>|||hey tibor, your site is down..|||Thanks. It was down for a while, but I can reach it now...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"mb" <mb@.discussions.microsoft.com> wrote in message
news:CE44A7CB-CD22-41D7-991D-91817BE5D28F@.microsoft.com...
> hey tibor, your site is down..
>|||Usually that happens when you restore databases from different servers.
Anyway, try running sp_change_users_login. You can find it in the BOL.
--
Lionel Chacon
"Jagminder Chugh" wrote:
> Hi
> In one of the databases, dbo users under Users option does not have the
> login name.Is there any way to assign a login name "sa" to dbo.
> Thanks and Regards
> Jagminder|||sp_change_users_login doesn't work for the owner of the database. For that you need to use
sp_changedbowner.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Lionel Chacon" <LionelChacon@.discussions.microsoft.com> wrote in message
news:5C767497-923B-4041-9A25-787C6D5A4801@.microsoft.com...
> Usually that happens when you restore databases from different servers.
> Anyway, try running sp_change_users_login. You can find it in the BOL.
> --
> Lionel Chacon
>
> "Jagminder Chugh" wrote:
>> Hi
>> In one of the databases, dbo users under Users option does not have the
>> login name.Is there any way to assign a login name "sa" to dbo.
>> Thanks and Regards
>> Jagminder

No comments:

Post a Comment