I have MSSQL .BAK file, and for logistical reason (the DB being huge for my infra) I want to convert the same to BacPac file, so that I could upload the same to Azure.
All this while I thought .BAK and BacPac are same, so there was error, is there a utility to get it converted?
Azure SQL Managed Instance does not currently support exporting a database to a BACPAC file using the Azure portal or Azure PowerShell. To export a managed instance into a BACPAC file, use SQL Server Management Studio (SSMS) or SQLPackage.
Bak files are snapshots of entire Database as it existed at a point in time and Bacpac files are snapshots of how the Database existed over the period of time while the backup was made.
They are different formats. "bacpac" files do not include Transaction logs and are not transitionally consistent by themselves. You can read more about it here "Windows Azure SQL Database Backup and Restore Strategy"
Your best path would be to restore the backup (".bak") of the database to a local server, and then to create a ".bacpac" file from the restored DB. You don't need the restored local copy of the DB to be high performance (other than for the purposes of extracting its data into the bacpac) so you can restore it onto a server that just has enough space to accommodate the data. That should help with the "the DB being huge for my infra" problem.
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