converting SQL . BAK to SQL backpac format

user1504387 picture user1504387 · Aug 21, 2012 · Viewed 17.1k times · Source

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?

Answer

BStateham picture BStateham · Aug 22, 2012

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.