March 20, 2006 at 4:22 pm
I have a process to restore a Production Database to the Development SQL Server. This is done via a restore of the Database. Potentially, there may be several users in the Production Database that do not have Logins on the Development SQL Server and therefore they are orphaned users in the Database on the Development Server.
Some time ago, I heard about a System Stored Procedre that corrects orphaned users in a Database. Does anyone know what it is?
If not, what is the best way to deal with this situation?
March 20, 2006 at 7:31 pm
That would be sp_change_users_login.
You still need to have the logins on the development server though.
--------------------
Colt 45 - the original point and click interface
March 20, 2006 at 9:14 pm
March 22, 2006 at 7:14 am
As part of your process, you may want to think about adding a DTS/Transfer Login task from production to deveolopment. After restore, use the sp_change_users_login to link the users to the logins.
MG
"There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies."
Tony Hoare
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
March 22, 2006 at 11:49 am
There is also a GUI tool mapsid.exe to map orphaned users and you can delete the users you do not want to have access to production
Mike
March 23, 2006 at 3:28 am
You may also find this useful.
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q246133&ID=KB;EN-US;Q246133
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply