2
votes

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:

  • Import database 'xxxx' failed
  • Successfully retrieved the BLOB storage access key.
  • Successfully submitted the import request: operation ID 14a9d202-4a22-4b41-beae-cca2ddb877c8.
  • Import database 'xxxx' failed
  • Error encountered during the service operation. Could not import package. Unable to connect to target server.

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

1
Did you make sure that the user name and password for SQL Authentication is correct? It looks like it is failing to log in to the SQL server you are trying to import to.elfisher
Thanks. That's what it was. The error message was cryptic. The dialog to ask for password was also cryptic. I thought it was asking me to set a new login/password for the new database.Old Geezer

1 Answers

2
votes

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.