Home > SQL > MSSQL Changing login for user

MSSQL Changing login for user

October 18th, 2011 Leave a comment Go to comments

Sometimes when you move a database to another server it is necessary to change the login for a user to match the new environment. You can use the alter user command to do this. Do something like the following:

ALTER USER [THE_USER_NAME] WITH NAME = NEW_USER_NAME, LOGIN = [MACHINENAME\NEW_USER_NAME];

Not really complicated, but handy when you need it. 🙂

Categories: SQL Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Time limit is exhausted. Please reload CAPTCHA.