u936293
u936293

Reputation: 16224

Import into Azure - Could not import package, Unable to connect to target server

I am trying to move a small database from the SQL Server Express on my PC to SQL Azure.

I exported the BACPAC file successful to a storage container. On Azure side, I + New, Data Services, SQL Database, Import and used the UI to select the BACPAC file in the storage container. I gave the database a name and selected an existing SQL Server in my subscription.

After a minute or so, I get:

What does the error message mean and what target server is it referring to?

Upvotes: 2

Views: 3229

Answers (1)

elfisher
elfisher

Reputation: 1230

When submitting an import request for Azure SQL Database, you will need to select the source BACPAC file from an Azure Storage container, and provide the SQL Authentication to log in to the SQL server you are trying to import into. The import operation will proceed as follows:

  1. Attempt to retrieve the BLOB (aka the BACPAC file) from Azure Storage.
  2. Submit the request to Azure SQL.
  3. Attempt to log in, with SQL server authentication, to the target database server you want to import into.
  4. Create an empty database to import the BACPAC file into.
  5. Run the import operation to insert all data from the BACPAC file into the new database.

As mentioned in my comment above, the SQL Authentication provided was incorrect. This resulted in Azure to be unable to log in to the SQL server and connect in the third step.

Upvotes: 2

Related Questions