I moved a database from SQL Server 2005 to SQL Server 2012. Is there any way of restoring all the logins on the new server?


1 Answer 1


You will want to use the 'transfer logins' script provided by MS. Pinal had a write up of it here. I do not remember if I used this to move logins TO 2012, I think I did to setup a QA environment but not sure. You might need to make minor adjustments but I think it'll work fine.

Keep in mind if you use AD logins and changed domains with no trusts, those users will need to be recreated with the correct security permissions which this script does not do. This post references SQLSoldier (A SQL guru) and has a handy script.

  • 1
    If you are moving a single database from one instance to another you will also want to be sure that you move ONLY those logins that are required by that database. If you are like me and have an instance with 100s of databases/applications then you probably don't want to grant the 90% that are unrelated to the new DB access to the new instance. Jul 31, 2013 at 20:34
  • Good point Kenneth, the OP did mention 'a database' and not 'database server'. OP, please only copy users that are in the DB that is in question, if that's the case. Jul 31, 2013 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.