Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002
    Posts
    17

    Unanswered: unknown orphaned users

    hi
    We performed a restore of a bunch of databases from another server and now when i try to go in and change the sa pwd i get the following error:

    Error 21776: [SQL-DMO] The name 'XXXX' 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.

    Now i run the query below to isolate the orphaned users and i get none!

    select u.name from master..syslogins l right join
    sysusers u on l.sid = u.sid
    where l.sid is null and issqlrole <> 1 and isapprole <> 1
    and (u.name <> 'INFORMATION_SCHEMA' and u.name <> 'guest'
    and u.name <> 'system_function_schema')


    - So now i am at a complete loss as to what to do next.
    If anyone has any ideas it wil be great!
    thanks
    Hinal

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Refer to this http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q218/1/72.ASP&NoWebContent=1 to resolve the issue.

    Also run SP_CHANGE_USERS_LOGIN and use AUTO_FIX to fix the issue, refer to books online for more information.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •