

For more about their compatibility, see Introducing the new Azure PowerShell Az module. The arguments for the commands in the Az module and in the AzureRm modules are substantially identical.

The AzureRM module will continue to receive bug fixes until at least December 2020. The PowerShell Azure Resource Manager (RM) module is still supported, but all future development is for the Az.Sql module. sqlpackage.exe /a:import /tcs:"Data Source=. Initial Catalog= User Id= Password=" /sf:AdventureWorks2008R2.bacpac /p:DatabaseEdition=Premium /p:DatabaseServiceObjective=P6 Change these values as appropriate for your environment. It creates a new database called myMigratedDatabase with a Premium service tier and a P6 Service Objective. The following SqlPackage command imports the AdventureWorks2008R2 database from local storage to a logical SQL server named mynewserver20170403.

When importing a database use one of these supported values. The DTU based provisioning model supports select database max size values for each tier. For a SQL Server Customer Advisory Team blog about migrating using BACPAC files, see migrating from SQL Server to Azure SQL Database using BACPAC Files. You can download the latest SqlPackage for Windows, macOS, or Linux.įor scale and performance, we recommend using SqlPackage in most production environments rather than using the Azure portal. To import a SQL Server database using the SqlPackage command-line utility, see import parameters and properties. To verify the database is live on the server, select SQL databases and verify the new database is Online. When successful, the import has a Completed status. To monitor an import's progress, open the database's server page, and, under Settings, select Import/Export history. For a list of possible values for a new database in Azure SQL Database, see Create Database. Specify the new database size (usually the same as origin) and provide the destination SQL Server credentials. Select the storage account and the container for the BACPAC file and then select the BACPAC file from which to import. To import from a BACPAC file into a new single database using the Azure portal, open the appropriate server page and then, on the toolbar, select Import database. We encourage using SqlPackage to import/export databases larger than 150GB to avoid this issue. In this case, the workaround is to run sqlpackage.exe on a machine with enough local disk space. As a result, some requests may fail with the error There is not enough space on the disk. Machines running the import/export request only have 450GB local disk space. The disk space required varies significantly among databases with the same size and can require disk space up to 3 times the size of the database. Machines processing import/export requests submitted through the Azure portal or PowerShell need to store the BACPAC file as well as temporary files generated by the Data-Tier Application Framework (DacFX).
