Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
vijayakumar_svk
Yak Posting Veteran
50 Posts |
Posted - 2005-05-05 : 05:05:41
|
| HiWhen I attache a DB which is taken from another machine.I am unable to set the same user for the DB in my new server. Let me explain the problem in detail..Assume that I have a DB(Sample.Mdf) in server1 and the User X is associated with this DB. I am compying this Mdf file and placing into another server(Server2) and I am attaching the DB(Sample.Mdf). Then I am creating a user X in Server2 and trying to set the DataAccess for "sample" DB to this X. When I try to do this I am getting the error "User already exist". I can't remove the existing user X associated with this DB. If I take the Mdf file from Server1 after removing the association between User X and Sample DB. Then it is ok.How can I solve this issue in server2?Thanks in AdvanceVJWork smarter not harder take control of your life be a super achiever |
|
|
mr_mist
Grunnio
1870 Posts |
Posted - 2005-05-05 : 05:11:23
|
| use the sp_changeuserslogin procedure to sort it.-------Moo. :) |
 |
|
|
vijayakumar_svk
Yak Posting Veteran
50 Posts |
Posted - 2005-05-05 : 06:27:17
|
| No I have some objects created by User X.Work smarter not harder take control of your life be a super achiever |
 |
|
|
mr_mist
Grunnio
1870 Posts |
Posted - 2005-05-05 : 07:25:20
|
| Whether you have objects or not is irrelevant. The procedure is used to fix orphaned users, which is the scenerio you are describing.-------Moo. :) |
 |
|
|
|
|
|