The quick solution is to hold the Shift-key while right clicking the SSMS shortcut in the start menu. Then the 'Run as different user' option appears, which allows you to enter different credentials.
A login provides to a user or application the ability to connect to a SQL Server instance, whereas a database user provides the login rights to access a database. Each database a login needs access to will require a database user to be defined, except when a login has been given sysadmin rights.
The new way (SQL 2008 onwards) is to use ALTER USER
ALTER USER OrphanUser WITH LOGIN = correctedLoginName;
I think it's sp_change_users_login
. It's been a little while, but I used to do that when detaching and reattaching databases.
I've used the sp_change_users_login
procedure to accomplish, I think, that scenario.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With