Syncing logins between SQL 2005/2008 servers

Below SQL code can be used to generate the SQL that can be used to sync SQL logins across SQL 2005/2008 data servers.

SELECT ‘create login [‘ + name + ‘] with password=’, convert(varbinary,password_hash),
‘HASHED, sid=’, sid FROM master.sys.sql_logins

http://support.microsoft.com/kb/918992

Advertisements

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