Deployment fails with 'Unable to connect to master or target server 'mydb_svr'. You must have a user with the same password in master or target server 'mydb-db'
Published Mar 14 2019 01:48 AM 25K Views
Copper Contributor
First published on MSDN on Sep 19, 2017
This will be a very short post to address what appears to be a slight trend in support at the moment.

When attempting a deployment fails with an exception, attempting a deployment of the dacpac for the database via sqlpackage.exe also fails with the error:
'Unable to connect to master or target server 'mydb_svr'. You must have a user with the same password in master or target server 'mydb-db'
This occurs when the deployment is to a recently created database server, deployments to older database servers do not result in the error

Resolution:

There seem to be a few reasons for this error, which is a little misleading

If your SSDT is not up to date you can see this error, this is because the latest compatibility level for Azure DB is 140, and the older sqlpackage.exe does not recognize this it works with compatibility levels up to 130. To resolve this issue you can get the latest version (17.3 version) from here .

You can also get this error if your client computer fails to pass the firewall rules for the server.
2 Comments
Version history
Last update:
‎Mar 13 2019 06:48 PM
Updated by: