sp_change_users_login 'update_one' has problem

  • sp_change_users_login 'update_one', 'dbo', 'dbo'

    I get an error message stating that 'dbo' is a forbidden value for the login

    parameter in this procedure. How to fix this orphan id? Please help asap... Thanks a bunch!

  • hydbadrose (3/22/2010)


    sp_change_users_login 'update_one', 'dbo', 'dbo'

    I get an error message stating that 'dbo' is a forbidden value for the login

    parameter in this procedure. How to fix this orphan id? Please help asap... Thanks a bunch!

    You can't have a login called dbo...Have a look at this link

    http://msdn.microsoft.com/en-us/library/aa905208(SQL.80).aspx

    Gethyn Elliswww.gethynellis.com

  • If the statement was generated by an automated procedure, you need to check that code. If you post it here, we can take a look.

    BTW sp_change_users_login is deprecated and will be removed. While you are fixing the bug, change the procedure to generate statements based on the new ALTER USER WITH LOGIN... syntax.

  • Paul, is there a 'report' feature of the new syntax...I can't see anything in BOL

    an equivalent of sp_change_users_login 'report' ?

    Gethyn Elliswww.gethynellis.com

  • GRE (Gethyn Ellis) (3/23/2010)


    Paul, is there a 'report' feature of the new syntax...I can't see anything in BOL

    an equivalent of sp_change_users_login 'report' ?

    No...but it is a pretty trivial query to write based on sys.database_principals and sys.server_principals.

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

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