Migrating Logins To Another Server

  • Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/glarsen/migratingloginstoanotherserver.asp

    Gregory A. Larsen, MVP

  • I have experienced problems transferring logins so this article will be very useful if I have to do it in a live situation. Just one clarification.

    Would it be necessary to run this script if I restored backups to a completely new server. I imagine the order would be to transfer the system databases first followed by the user databases. Would the logins and users be correctly linked after the restore?

  • I just use the script to transfer the logins from a DEC ALPHA SQL 7 server to a new Intel SQL 2000 server with no problems. I was unable to use the Transfer Logins DTS job on this combination. Timely ... Absolutely :>)

  • It does not transfer the default database though.

  • When you transfer master all the logins will come across so you would not have to run this script. This script is used to copy logins and passwords without restore the master database.

    Gregory A. Larsen, DBA

    Contributor to 'The Best of SQLServerCentral.com 2002' book. Get a copy here:http:www.sqlservercentral.com/bestof/purchase.asp

    Need SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

    Gregory A. Larsen, MVP

  • I agree it would be nice to transfer the default database. As the script comes from Microsoft it does not set the default database, and that is what I presented in the article.

    Normally if I am only moving one database I modify the sp_help_revlogin SP to only select logins if they are associated with the database I am moving and I add "execute master..sp_defaultdb " commands to the SP to make sure the default db get set.

    It could also be modified to determine the default database and set it appropriately. This would be a good enhancement to this script.

    Gregory A. Larsen, DBA

    Contributor to 'The Best of SQLServerCentral.com 2002' book. Get a copy here:http:www.sqlservercentral.com/bestof/purchase.asp

    Need SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

    Gregory A. Larsen, MVP

  • Can anyone remember the SP that fixes orphaned users?

    I seem to remember that if the login name and user name were the same it assigns a matching SID.

  • Is sp_change_users_login you are looking for?

  • Thats the baby. Thanks

  • This would be a lot better if it was fit to screen size rather than having to scroll back and forth to read it...

  • When using the script to transfer logins and passwords from one server to another. After doing so... Does the logins and passwords still appear on the server transfering from??? I am doing a parallel install and need to keep the production database logins and passwords still intact.

     

    Thanks

    Chris

  • Hi,

    Does using the script from sp_help_revlogin also copy the user's permisions?

    Thanks,

    Joel

  • is this still possible with sql server 2005/2008 with the new DMV's?

Viewing 13 posts - 1 through 12 (of 12 total)

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