Wednesday
Aug182010
Fixing orphaned SQL user accounts
Wednesday, August 18, 2010 at 11:53PM
Ever refresh/restore a database only to find out your database logins don't match up with the database user accounts? I run the following query to simultaneously identify any database user permissions that aren't mapped to current database logins and also synch up the passwords to the appropriate logins. Copying/pasting the output to a new query window should get permissions back the way they should be (assuming you want to set the password to "opensezME!":

Reader Comments