databaseazureimportazure-sql-databasebacpac

Error "The storage URI is not valid" when creating a new SQL Azure database from a bacpac


I'm trying to create a new SQL Azure database from a bacpac file I exported locally and uploaded as a BLOB to a storage account container.

When I choose Import Database on the SQL server and choose to use the uploaded bacpac as the source for the import, the import fails with the error "The storage URI is not valid".

What's wrong?


Solution

  • The error is a little cryptic but this can happen if the name of your bacpac file has a space in it.

    My bacpac was called something like "20200122 Database.bacpac" and the space in the name caused the URI to the blob to be deemed invalid.

    Removing the space fixed the issue.