4

I was recently tasked with moving some databases to a new server. I created backups then restored the databases to the new server and it looks like the database users were retained, however there's no corresponding logins, prohibiting the users from accessing the new server. All of the users are domain users. Is there any way to iterate over the existing users in a database and create a login for each?

4

Google for sp_help_revlogin and find the version for your version of SQL (the SQL 2008 version works on SQL 2008 and up). Install this sp on the old server. Run sp_help_revlogin on the old server. Take the output and put it in a query window on the new server, and run the query to create all the logins.

| improve this answer | |

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.