Search code examples
sql-serverazuresql-server-2014database-migrationazure-sql-database

How to resolve Azure data Migration blocker User: has an unresolved reference to Login


II am migrating an existing SQL Server 2014 DB to Azure. Always failing so I ran Data Migration Assistant to Assess the DB compactibility and I get this result. Cannot still figure out how to solved that.

User: [eAgricDBUser] has an unresolved reference to Login [eAgricDBUser].


Solution

  • The error occurs because it's referring to logins that existed in the source SQL Server instance but not in your target Azure SQL DB instance (logical master).

    Suggest you think about how your users should access the database now that it is in Azure SQL DB. Contained users are helpful here as they can be moved around to any server and still function. AD users are even better but you'll need to have your on-premises AD integrated with Azure AD. Both save you lots of headaches with login migrations.

    Alternatively, you can create the required logins in master before you run the database migration scripts which contain create user statements. Note that you will be creating them with a new password so you will need to provide that to the users plus you'll need some way for the users to change that to their own password.