February 8, 2008 at 2:00 pm
Hello,
I have restored a database on a another server and I need to create or associate these users with their LOGINs.
However, the logins do not exists.
How can I programmatically / TSQL recreate the LOGINs?
thx
JohnE
Cheers,
John Esraelo
February 8, 2008 at 2:26 pm
There are quite a few good scripts here on SSC for scripting out logins ... I haven't used it, but this looks like it should help: http://www.sqlservercentral.com/scripts/Replication/31160/
If not, just search the scripts section for "script logins", quite a few to choose from.
After you move the logins, you'll need to correct the database user to login mapping. Use sp_change_users_login to accomplish that.
February 9, 2008 at 2:38 pm
thank you for the reply.
I will give it a shot on Monday, thx.
JohnE
Cheers,
John Esraelo
February 10, 2008 at 9:09 am
sp_help_revlogin is a script that can create a script for logins from the old server.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply