Did you know? Sp_helprevlogin

Posted: June 24, 2010 in Uncategorized

 

In a discussion last week I had the chance to learn something new. I was moving some SQL Server accounts from one server to another. During this process I was going the long roundabout way to do this. Cynthia from the User group shared with me the sp_help_revlogin stored procedure. After doing some looking around I have found that there looks to be a couple different version of this so that it will work correctly with the system tables and or views.

The way these procedures work is to copy accounts and the passwords in an encrypted state from Point a to Point b, To include the default database. The KB articles these links point to will also give you added information about moving the logins.

If you use SQL Server 2005 as a source the procedure can be found here.

If you use SQL server 7.0 or 2000 the source procedure can be found here.

After you create the stored procedure in the master database, execute the proc and a create script will be created that you can copy from one location to another.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s