Re: Error 21776: after transferring databases

From: Dan Guzman (danguzman@nospam-earthlink.net)
Date: 12/10/02


From: "Dan Guzman" <danguzman@nospam-earthlink.net>
Date: Mon, 9 Dec 2002 21:56:32 -0600


Try the following from Query Analyzer:

USE MyDatabase
EXEC sp_addlogin 'TempDBOwner'
EXEC sp_changedbowner 'TempDBOwner'
EXEC sp_changedbowner 'sa'
EXEC sp_droplogin 'TempDBOwner'
GO

-- 
Hope this helps.
Dan Guzman
SQL Server MVP
-----------------------
SQL FAQ links (courtesy  Neil Pike):
http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
-----------------------
"Mike Thomason" <thomasom@tapemark.com> wrote in message
news:056001c29fb0$06cd1800$8ef82ecf@TK2MSFTNGXA04...
> I transferred databases from SSSrvr to FRXSrvr.
>
> The error 21776 is displayed when I try to change the 'SA'
> password. I have the 'SA' password using sp_password.
>
> I now want to link the 'DBO' in the databases to the login
> DBO by correcting the SID. I have followed the suggested
> workarounds in Microsoft help(see the copied message
> below). The workarounds do not work for 'DBO'.
>
> Can anyone help me?
>
> Thank you.
> Mike
> _________________________________________________
> BUG #: 355065 (SHILOH_BUGS)
> SYMPTOMS
> The database owner (dbo) user in a user database is not
> listed in the Users folder in Enterprise Manager.
> Additionally, when you view the properties of any login in
> the Logins folder in Enterprise Manager, you may receive
> the following error messages:
>
> Error 21776: [SQL-DMO] The name 'dbo' was not found in the
> Users collection. If the name is a qualified name, use []
> to separate various parts of the name, and try again.
>


Relevant Pages

  • Re: Error 21776: after transferring databases
    ... >EXEC sp_changedbowner 'TempDBOwner' ... >> I transferred databases from SSSrvr to FRXSrvr. ... >> DBO by correcting the SID. ...
    (microsoft.public.sqlserver.security)
  • Re: Security between databases
    ... When objects reside in different databases, ... For more information on cross-database ownership chains, ... EXEC sp_addlogin 'MyApplictionLogin','MyPassword' ... SQL Server MVP ...
    (microsoft.public.sqlserver.security)
  • typo error...
    ... First Proc should be p1 and not p3 ... > exec p1 ... >> Over night we take a copy of various live SQL databases onto another SQL ... >> I connect to the live databases using linked servers. ...
    (microsoft.public.sqlserver.programming)
  • Re: Description in the table
    ... EXEC sp_addextendedproperty 'caption', 'Employee Name', 'user', dbo, ...
    (microsoft.public.sqlserver.programming)
  • Re: Error 21776 - dbo account
    ... EXEC sp_changedbowner 'TempOwner' ... SQL FAQ links: ... > I am able to access the databases without any problems. ... > drives, but I fail to see how SQL could have any way of knowing this. ...
    (microsoft.public.sqlserver.security)