How to download a DB from Azure to local SQL server

LFDS 1 Reputation point
2021-04-07T10:41:12.177+00:00

I want to download my DB in Azure to a local SQL server but I cant do it with the BACPAC option, is giving an error: "External references are not supported when creating a package from this platform".
Also, i think the bacpac option only export the tables, I also need to export the procedures, views, indexes...

Azure SQL Database
SQL Server Migration Assistant
SQL Server Migration Assistant
A Microsoft tool designed to automate database migration to SQL Server from Access, DB2, MySQL, Oracle, and SAP ASE.
496 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Anurag Sharma 17,576 Reputation points
    2021-04-07T12:02:28.28+00:00

    Hi @LFDS , welcome to Microsoft Q&A forum.

    This error message comes because of schema verification. There are number of ways to work around it:

    1. Remove the three part named objects to two. Example [database].[schema].[table] to [schema].[table]
    2. Another way is to use SQLPackage.exe that does not do schema verification by default.
    3. You can use VS and SSDT to extract the .dacpac file which can be imported through SSMS in local database.

    Please refer to below article for more reference:

    How to extract MSSQLServer database as .dacpac without VerifyExtraction?

    Please let me know if this helps or else we can discuss further.

    ----------

    If answer help, please mark it as 'Accept Answer'


  2. AmeliaGu-MSFT 13,961 Reputation points Microsoft Vendor
    2021-04-08T09:33:15.75+00:00

    Hi LFDS-4457,

    In addition, please refer to this article which might help.

    i think the bacpac option only export the tables, I also need to export the procedures, views, indexes...

    You can use the Generate and Publish Scripts Wizard in the SSMS to create scripts for the tables, procedures, views and indexes. Please refer to Generate and Publish Scripts Wizard which might help.

    Best Regards,
    Amelia

    0 comments No comments

  3. LFDS 1 Reputation point
    2021-04-14T09:58:53.917+00:00

    I tried all things mentioned before but it's still giving me errors...


  4. Alberto Morillo 32,896 Reputation points MVP
    2021-04-29T15:19:54.883+00:00

    Instead of using SQL Server Express please install SQL Server Developer Edition, which is free, and supports memory optimized tables.

    Please install SQL Server 2019 and select "Developer Edition" on the Product Key page of SQL Server setup. Please see this article about how to install Developer Edition. You can also perform an edition upgrade from SQL Server Express to Developer Edition read here for more information.

    Please apply the latest cumulative update for SQL 2019 before trying to import the bacpac.

    0 comments No comments