Fixing SQL orphaned users

by Andrew Jackson 7. July 2009 03: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:

Development | SQL

Comments

Comments are closed

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About Me

Andrew Jackson

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2008,2009 Andrew K. Jackson

RecentComments

Comment RSS