Error 21776

  • I restored a database from one server to another, I knew that the SID is not matched for an account 'test1'. I issued 'sp_change_users_login 'update_one', 'test1', 'test1'', but when I tried to change the permission on the server lever for this account, I got an error 'Error 21776: [SQL-DMO] The name 'test1' 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.' What else do I need to do?

    BTW, an account 'test1' is the objects owners.

  • I think you will need to run the above SP with AUTOFIX option..



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

  • I tried and got error below.

    'Server: Msg 15290, Level 16, State 1, Procedure sp_change_users_login, Line 137 Terminating this procedure. The Action 'auto_fix' is incompatible with the other parameter values ('User_Name', '(null)'). '

  • You need to include the user name. Look up the syntax in BOL.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply