将 .bak 文件导入谷歌云 sql

问题描述

我正在尝试将 .bak 文件从谷歌云存储导入到云 sql 中,但出现以下错误

generic::invalid_argument: execution of restore command Failed with error: {mssql: RESTORE DATABASE is terminating abnormally.} KNown Issue: presizediskForImportHelper: Error doing disk presize check with error: connection error: desc = "transport: Error while dialing dial tcp [::1]:8086: connect: connection refused"

我试图用谷歌搜索错误,但我没有找到任何有用的信息,除非备份文件有可能是坏的。

更新 云 sql 中的数据库显示认排序规则

当我打字时

Use mydatabase

我得到了

Database 'mydatabase' cannot be opened. It is in the middle of a restore.

解决方法

这是由于您的 SQL Server 实例运行的 VM 的磁盘大小太小。如果您有自动缩放磁盘大小,它可能仍然无法正常工作。我假设这是因为 VM 没有理由扩展磁盘,因为它没有被填充。 presize check 可能只会查看磁盘大小,发现它太小了。

我们通过将磁盘大小设置为我们知道足够大的固定大小来修复它,而不是自动缩放。