I am deploying a large database (both schema and data) from an on-premise server to Azure SQL. I plan on using sqlpackage.exe from the command line. It looks like there are two options:
Is there a preferred option? I need this process to run in the fastest way possible, so I'd be curious if one option is better for performance.
A DAC is a logical database management entity that defines all of the SQL Server objects which associates with a user's database. A BACPAC includes the database schema as well as the data stored in the database.
A BACPAC file is a ZIP file with an extension of BACPAC containing the metadata and data from the database. A BACPAC file can be stored in Azure Blob storage or in local storage in an on-premises location and later imported back into Azure SQL Database, Azure SQL Managed Instance, or a SQL Server instance.
The . dacpac can be used to update a database with new or modified objects, to revert to a previous version of the database, or to provision an entirely new database. Conversely, a . dacpac can be generated from an existing database and used to establish a SQL database project based on the current database schema.
As Grant said bacpac is dacpac+data.Below is one more definition that might help
"A bacpac includes the schema and data from the database. A dacpac containers only the schema and not the data"
You might have understood, you need bacpac.
I need this process to run in the fastest way possible, so I'd be curious if one option is better for performance.
We have few databases(400Gb) in Azure.we observed it is faster to import data when we load data from storage..The approach we followed was to load data into storage which is in same location as database and then import data..
SQLSERVER team tested a few options and they observed BCP is fastest compared to remaining options..
Below is how you import bcp data into azure
bcp TestDB.dbo.Customer in "C:\Users\cesardl\BCP\Customer.txt"
-c -U mysqlazureuser@mysqlazureservername
-S tcp:mysqlazureservername.database.windows.net
-P mypassword
Further reading/References:
Importing/Exporting data to SQL Azure databases using BCP and SQL Scripts
Loading data to SQL Azure the fast way
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With