Home
%3CLINGO-SUB%20id%3D%22lingo-sub-906812%22%20slang%3D%22en-US%22%3ENew%20Data%20Exposed%20episode%3A%20It%E2%80%99s%20just%20SQL%3A%20Restoring%20a%20database%20to%20Azure%20SQL%20DB%20from%20backup%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-906812%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20this%20video%2C%20Jeroen%20ter%20Heerdt%20shows%20how%20to%20restore%20a%20database%20to%20Azure%20SQL%20from%20a%20BACPAC%20file.%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsql-database%2Fsql-database-import%3FWT.mc_id%3Ddataexposed-c9-niner%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3ERead%20more%20about%20importing%20an%20Azure%20SQL%20Database%20from%20BACPAC%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CIFRAME%20src%3D%22https%3A%2F%2Fchannel9.msdn.com%2FShows%2FData-Exposed%2FIts-just-SQL-Restoring-a-database-to-Azure-SQL-DB-from-backup%2Fplayer%22%20width%3D%22960%22%20height%3D%22540%22%20frameborder%3D%220%22%20allowfullscreen%3D%22allowfullscreen%22%20title%3D%22It%E2%80%99s%20just%20SQL%3A%20Restoring%20a%20database%20to%20Azure%20SQL%20DB%20from%20backup%20-%20Microsoft%20Channel%209%20Video%22%3E%3C%2FIFRAME%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-906812%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20this%20video%2C%20Jeroen%20ter%20Heerdt%20shows%20how%20to%20restore%20a%20database%20to%20Azure%20SQL%20from%20a%20BACPAC%20file.%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsql-database%2Fsql-database-import%3FWT.mc_id%3Ddataexposed-c9-niner%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%20target%3D%22_blank%22%3ERead%20more%20about%20importing%20an%20Azure%20SQL%20Database%20from%20BACPAC%3C%2FA%3E.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-SUB%20id%3D%22lingo-sub-913189%22%20slang%3D%22en-US%22%3ERe%3A%20New%20Data%20Exposed%20episode%3A%20It%E2%80%99s%20just%20SQL%3A%20Restoring%20a%20database%20to%20Azure%20SQL%20DB%20from%20backup%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-913189%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20is%20all%20true%2C%20unless%20you%20have%20a%20large%20database.%20A%20BACPAC%20file%20is%20not%20a%20true%20backup%2C%20it%20is%20a%20compressed%20script%20consisting%20of%20a%20series%20of%20commands%20to%20recreate%20your%20database's%20structure%2C%20and%20then%20populate%20it%20by%20inserting%20the%20data%20into%20each%20table%20(in%20an%20order%20optimized%20to%20avoid%20foreign%20key%20issues)%20one%20row%20at%20a%20time.%20There%20are%20two%20possible%20performance%20issues%20with%20this.%20One%20is%20that%20is%20can%20be%20very%20slow%20due%20to%20the%20row%20by%20row%20nature%20of%20the%20inserts.%20The%20other%20is%20that%20behind%20the%20scenes%2C%20Azure%20uses%20a%20VM%20to%20process%20the%20import.%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsql-database%2Fazure-sql-database-hangs-importing-exporting%23what-causes-the-process-to-take-a-long-time%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EThis%3C%2FA%3E%20describes%20a%20possible%20performance%20problem%20related%20to%20that.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20run%20into%20cases%20where%20the%20restore%20fails%20entirely%20because%20the%20special%20Compute%20VM%20Azure%20uses%20doesn't%20have%20sufficient%20capacity.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Microsoft

In this video, Jeroen ter Heerdt shows how to restore a database to Azure SQL from a BACPAC file.

Read more about importing an Azure SQL Database from BACPAC.

 

1 Comment
Regular Visitor

This is all true, unless you have a large database. A BACPAC file is not a true backup, it is a compressed script consisting of a series of commands to recreate your database's structure, and then populate it by inserting the data into each table (in an order optimized to avoid foreign key issues) one row at a time. There are two possible performance issues with this. One is that is can be very slow due to the row by row nature of the inserts. The other is that behind the scenes, Azure uses a VM to process the import. This describes a possible performance problem related to that.

 

We have run into cases where the restore fails entirely because the special Compute VM Azure uses doesn't have sufficient capacity.