/
How to fix orphaned SQL Server users after migration
How to fix orphaned SQL Server users after migration
This how to article explains how to fix orphaned user after migration in SQL Server
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
Related articles
Filter by label
There are no items with the selected labels at this time.
Related content
Migrating the epiCentre database from one SQL instance to another
Migrating the epiCentre database from one SQL instance to another
More like this
How to fix login issues on epiCentre 2.3.0
How to fix login issues on epiCentre 2.3.0
More like this
Database scripts epiCentre 2.2 sql
Database scripts epiCentre 2.2 sql
More like this
Using the database creation scripts
Using the database creation scripts
More like this