Blog Post

Unable to Connect to Target Server? But, I'm Already Connected!

,

I am working on an Azure SQL Database migration from an on-premises VM, and at the client's request I am working through the BACPAC Import/Export process rather than using Azure Database Migration Service.

https://i.imgflip.com/2t69mm.jpg

I exported the database into a BACPAC file, and went to perform the Import operation into Azure, using the wizards in SSMS

(Awesome step-by-step instructions at https://www.mssqltips.com/sqlservertip/5255/learn-how-to-migrate-a-sql-server-database-to-sql-azure-server/ - thanks Vitor Montalvão!)

The problem is my Import operation failed with an error that didn't make any sense.  To start the process you connect to you Azure SQL Server in Management Studio, and then run the Import Data-Tier Application wizard:

..and point at you BACPAC file to import, providing details on what you want the new database to be called, what service level it needs to be in, etc.  At that point the import runs, and everything is slick, right?

"Unable to connect to target server"

Um...I was already connected to the server to get *this* far!

After some poking around, I tripped over several references to a potential "bug" related to importing BACPAC files, as described here https://stackoverflow.com/questions/19990779/unable-to-connect-to-target-server-when-restoring-bacpac-file-to-sql-server-20 

When I checked, sure enough the Management Studio on this server was 2014.

https://media.tenor.com/images/258a205ccd6bfa979a3505e95f1fcda7/raw

I went to https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms/ and downloaded the current Management Studio and applied it to the server, and:

If you can keep your tools updated - in most cases the tools are backwards compatible so unless you have written custom plug-ins, etc you are likely OK - also most recent versions let you install multiple versions side-by-side so you can install a new version without deleting the old one.

Hope this helps!

 

Original post (opens in new tab)

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating