Fixing SQL orphaned users

by Andrew Jackson 7. July 2009 10:57

More a note to myself for this age old problem when restoring SQL databases.

Run this against the database you have the orphaned user in and it will fix the record in the master database.

Username/Password is for the user you need to fix.

EXEC sp_change_users_login 'Auto_Fix', 'username', NULL, 'password'

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

SQL

Comments

Comments are closed

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen