March 22, 2010 at 4:26 pm
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!
March 22, 2010 at 4:46 pm
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
March 23, 2010 at 8:29 am
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 White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
March 23, 2010 at 8:43 am
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
March 23, 2010 at 8:54 am
GRE (Gethyn Ellis) (3/23/2010)
Paul, is there a 'report' feature of the new syntax...I can't see anything in BOLan 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.
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply