This how to article explains how to fix orphaned user after migration in SQL Server
\uD83D\uDCD8 Instructions
Follow steps below:
Connect to migrated SQL server and find migrated database.
Right click and run a new query.
EXEC sp_change_users_login 'Report'
Get the results and run another query by replacing usernames in the result and execute.
EXEC sp_change_users_login 'Auto_Fix', 'replace_user_name_in_the_result'
You can find your user name prefix from config file, here is an example below:
<dbdatabasename>epicentre_database</dbdatabasename>
<dbuserprefix>epicentre_prefix</dbuserprefix>
After migration, usernames in the result should be like:
epicentre_prefix_user
epicentre_prefix_dbo
epicentre_prefix_reader
\uD83D\uDCCB Related articles
Filter by label
There are no items with the selected labels at this time.