在导入bacpac文件时,sqlserver接收“归档文件不能为0号”。

时间:2022-07-29 02:43:22

I'm exporting a bacpac file from my Azure SQL Server database to my local file system. Then when I try to import this bacpac file into a local instance of SQL Server I get a "Archive file cannot be size 0." error.

我正在将一个bacpac文件从我的Azure SQL Server数据库导出到我的本地文件系统。然后,当我尝试将这个bacpac文件导入到SQL Server的本地实例时,我得到一个“归档文件大小不能为0”的错误。

I've tried the import via the GUI Import Data-tier Application functionality as well as executing the SqlPackage.exe via the command prompt. I recieve the same error either way.

我尝试了通过GUI导入数据层应用程序功能进行导入,以及执行SqlPackage。通过命令提示符执行。无论哪种方式,我都会犯同样的错误。

Any ideas?

什么好主意吗?

在导入bacpac文件时,sqlserver接收“归档文件不能为0号”。

在导入bacpac文件时,sqlserver接收“归档文件不能为0号”。

2 个解决方案

#1


4  

When you are exporting a Sql database in Azure to bacpac blob in Azure Storage, only a request is submitted to Azure. You have to wait until that request is completed (could be some time if the database is large). If you try to download the file before the request is completed the file will be size 0 and the SSMS import will fail.

当您将Azure中的Sql数据库导出到Azure存储中的bacpac blob时,只有一个请求被提交给Azure。您必须等待该请求完成(如果数据库很大,可能需要一段时间)。如果您试图在请求完成之前下载该文件,那么该文件的大小将为0,SSMS导入将失败。

#2


1  

This error turned out to be because there was nothing in the bacpac file. When exporting from Azure it failed the export but still created the file. So I didn't realize it failed.

这个错误原来是由于bacpac文件中什么都没有。当从Azure导出时,它失败了导出,但仍然创建了文件。所以我没有意识到它失败了。

#1


4  

When you are exporting a Sql database in Azure to bacpac blob in Azure Storage, only a request is submitted to Azure. You have to wait until that request is completed (could be some time if the database is large). If you try to download the file before the request is completed the file will be size 0 and the SSMS import will fail.

当您将Azure中的Sql数据库导出到Azure存储中的bacpac blob时,只有一个请求被提交给Azure。您必须等待该请求完成(如果数据库很大,可能需要一段时间)。如果您试图在请求完成之前下载该文件,那么该文件的大小将为0,SSMS导入将失败。

#2


1  

This error turned out to be because there was nothing in the bacpac file. When exporting from Azure it failed the export but still created the file. So I didn't realize it failed.

这个错误原来是由于bacpac文件中什么都没有。当从Azure导出时,它失败了导出,但仍然创建了文件。所以我没有意识到它失败了。