This article was previously published under Q305711
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.
This problem only occurs after you apply SQL Server 2000 Service Pack 1 (SP1) to the server. Prior to Service Pack 1, the dbo user displays with a blank Login Name.
Enterprise Manager is incorrectly filtering out all the users that do not have matching logins, and the dbo user does not have a matching login. Two possible reasons for this behavior to occur are:
If a database is created by a Microsoft Windows NT authenticated login that is granted access to the computer that is running SQL Server through group membership (such as BUILTIN\Administrators), the security identification number (SID) stored in the sysusers system table in that database does not have a matching SID in the syslogins system table.
If a database is restored where the dbo user's SID in the sysusers system table is not matched with the SID in the syslogins system table.
If the dbo user does not have an explicit login, change the owner of the database to a user that has an explicit login. For example, change the owner of the database to the system administrator (sa), and then execute the following code:
exec sp_changedbowner 'sa'
Microsoft has confirmed this to be a problem in SQL Server 2000 Service Pack 1 (SP1).
To determine if the dbo user is unmatched in a user database, execute the following query:
Use <User_Database>GOSELECT u.name AS "Name", ISNULL(l.name, 'dbo is unmatched') AS "Matched Login"FROM sysusers u LEFT JOIN master.dbo.syslogins l ON u.sid = l.sidWHERE u.name = 'dbo'GO
For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
218172 PRB: Cannot change SA password in Enterprise Manager
274188 PRB: "Troubleshooting Orphaned Users" topic in Books Online is incomplete
168001 PRB: User logon and/or permission errors after restoring dump
246133 How to transfer logins and passwords between instances of SQL Server
298758 PRB: Using the Auto_Fix option with sp_change_users_login can leave security vulnerabilities