0
votes

I'm trying to import .bak file from google cloud storage into cloud sql and getting below error

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"

I tried to google error but I didn't find any useful information except there is probability the backup file is bad.

Update The database in cloud SQL is shown with Default collation

when I type

Use mydatabase

I got

Database 'mydatabase' cannot be opened. It is in the middle of a restore.
1
Are your instances (source and target ) running the same version of SQL server?Jan Hernandez
Sorry I didn't understand the question. my source is SQL Server 2012. My destination is Cloud SQL SQL Server 2017 StandardfromSAS2Spark
I read that I may need to do a process called restoration in cloud sql. Any idea what that mean?fromSAS2Spark
This seems a kind of incompatibility between versions, try to upgrade your 2012 database to 2017 and after export your bak file to Cloud SQL,Jan Hernandez
@JanHernandez this is not an option. Based on MS-SQL documentation this shouldn't be an issuefromSAS2Spark

1 Answers

0
votes

This is due to the disk size of the VM your SQL Server instance is running being too small. If you have an autoscaling disk size, it might still not work. I'm assuming this is because the VM has no reason to scale the disk because it isn't being filled. The presize check will probably just look at the disk size and see that it will be too small.

We fixed it by setting the disk size to a fixed size we know is large enough, instead of autoscaling.