Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I've tried Tasks>Generate Scripts... and set 'Script Logins' in the Advanced Scripting Options, but I get this in the output:

/* For security reasons the login is created disabled and with a random password. */

Is there a simple way to script these logins with passwords or another way to transfer logins from a 2008R2 instance to a 2014 instance?

share|improve this question
2  
sqlsoldier.com/wp/sqlserver/… (just ignore the mirroring references - this works for moving any logins between any instances). –  Aaron Bertrand Apr 19 at 17:27
    
@Aaron that looks very nice at first glance, thanks. –  Jack Douglas Apr 19 at 17:31
    
@Aaron I ended up using this which is basically the same thing. Thanks for pointing me in the right direction. –  Jack Douglas Apr 19 at 21:33

1 Answer 1

In order to transfer logins, you will need to use the sp_help_revlogin script and procedure. This will allow you to transfer logins and retain the password from on instance to another.

share|improve this answer
    
I've been to that page but I evidently don't understand it. Method 3 says "Create a log in script that has a blank password", so presumably that isn't it? –  Jack Douglas Apr 19 at 17:08
    
@JackDouglas Not sure what that phrase means, but you just need to create those two stored procedures on the source server and, in the end, just execute sp_help_revlogin, take its output from SSMS and execute it on the new server. You'll have your logins recreated with the correct pwds. –  Marian Apr 20 at 15:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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