home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 18,089 of 19,505   
   m to Lutz Uhlmann   
   Re: transfering full backup from one ser   
   24 Jan 11 08:50:06   
   
   From: web12master@gmail.com   
      
   Thank you guys.   
      
   If I understood good, Microsoft recommend us to use ALTER USER instead   
   sp_change_user_login   
   But I got syntax error if I use ALTER USER (I don't what I'm doing wrong,   
   command is pretty straight forward) and sp_change_user_login works fine.   
    I solved the problem with sp_change_user_login   
      
   Thanks again,   
      
   cheers   
      
   "Lutz Uhlmann"  wrote in message   
   news:ihbdm5$aeo$1@news.albasani.net...   
   >> Let say we have user1 in datebase1   
   >>   
   >> Now we create login user1 and try to map that login to database1   
   >>   
   >> But now we got error, something like 'User, group or role 'user1' already   
   >> exists in the current database ...'   
   >>   
   >> Is there any different way, remapping or somthing?   
   >> What to do in this case?   
   >   
   > You can use sp_change_users_login   
   >   
   > The first time you restore the backup on another server you have to crate   
   > the login for your database user:   
   > EXEC sp_change_users_login 'Auto_Fix', 'User1', Null, 'user1password'   
   > GO   
   >   
   > After this Login User1 exists on the new server.   
   > Now you can use a shorter version to reconnect User and Login:   
   > EXEC sp_change_users_login 'Auto_Fix', 'User1'   
   > GO   
   >   
   > For an overview try:   
   > EXEC sp_change_users_login 'Report'   
   > GO   
   >   
   > Look at online-help for all informations ...   
   > http://msdn.microsoft.com/en-us/library/ms174378.aspx   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca