Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why would a .bacpac file take several hours to import?

I'm developing an Umbraco 8 site and in the very early stages so an extremely small database set up on SQL Server 2017 Express.

I've got to the point where I'd like to transfer this to a server so that I can show other people. I've exported a .bacpac file using the Export Data Tier Application option in SQL Server Management Studio 2018 and copied this over to the server. The file is 55kb so would export it to import within seconds - if I do this locally, it does indeed complete quickly.

However, on the server when I use the Import Data Tier Application option, the database restore takes several hours, getting stuck on:

- Importing package schema and data into database
- Updating Database
- Importing Data
- Processing Import

It also seemed to stick on Processing Table '[dbo].[umbracoUser]' although I didn't monitor the whole process so not sure if that was just one of several slow imports.

The server also runs SQL Server 2017 Express and I'm importing through SQL Server Management Studio 2017. The server is running Windows Server 2016.

I've noticed this with a couple of databases and struggling to come up with any reasoning.

I've attempted to use SqlPackage.exe to import this too and that also appears slow.

Thanks,

Ben

like image 710
0Neji Avatar asked Nov 23 '19 13:11

0Neji


People also ask

How do I import a Bacpac file?

Steps to Import/Restore BACPAC file. Open SQL Server management studio, connect to SQL instances where you want to restore database and right click on Database. Then you will get option as shown in below picture. Click on Import Data-tier Application.

What is the Bacpac file?

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.


1 Answers

It can be solved by change the version of SQL Server Management Studio to a old version. I encountered this problem on 18.8 and after I change the version to 18.6 it worked.

like image 57
Theepag Avatar answered Oct 16 '22 14:10

Theepag