首页 > 解决方案 > 将 .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.

标签: google-cloud-storagegoogle-cloud-sqldatabase-restore

解决方案


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

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


推荐阅读