Importing data from a BAK file in Cloud Storage

1,192 views
Skip to first unread message

Sulman A.

unread,
Sep 15, 2020, 3:50:00 PM9/15/20
to Google Cloud SQL discuss
[An unknown error occurred] message during import [.bak] file

I was able to import SQL Server db by Importing data from SQL files into Cloud SQL but that was time consuming because [.sql] files contain insert statements and it took time.

Now I'm trying to import a [.bak] but getting this message [An unknown error occurred] no other details? 

Before I was getting these errors while trying to import [.bak] file which I've resolved.
1) Multiple databases detected in BAK file. Only importing a single database is supported.
2) 80 is not a supported compatibility level. Supported: [140, 130, 120, 110, 100]

But now error message is [An unknown error occurred] with no other details?

I'm following this documentation:

Alexis (Google Cloud Support)

unread,
Sep 17, 2020, 5:56:37 PM9/17/20
to Google Cloud SQL discuss
Hello,

I will try to assist the best I can. 

I investigated internally and noticed that Google has had a few cases with this error and it appears that it may be due to a limitation issue in product versions. Even though the error is not very descriptive, one of these[1] limits may be causing the issue with the delta between your environment and ours. It's a vague error and hard to tell, but ensuring these limitations should be our first step, especially if it worked before.

Please check the version/features your are exporting[1] and importing from. For the import, it's here[2] under "database version" (to see which one you have in GCP).

Let us know if this helps.

Sulman A.

unread,
Sep 18, 2020, 8:52:38 AM9/18/20
to Google Cloud SQL discuss
Hi Alexis,
Google Cloud SQL Database version is "SQL Server 2017 Standard"
Below are attached screenshots of SQL Servers which I'm using to create `.bak` file.
I don't know about these limits.

Thanks for the reply. :)

image_2020_09_17T13_04_02_174Z.pngimage_2020_09_17T13_03_39_894Z.pngimage_2020_09_17T15_54_39_540Z.png

Sulman A.

unread,
Sep 21, 2020, 12:29:14 PM9/21/20
to Google Cloud SQL discuss
Hi Alexis,

Can you just mention which SQL Server should I use to export/create .bak file which can be easily imported on  Google Cloud SQL Database version "SQL Server 2017 Standard" ?

Thanks!

alfio

unread,
Sep 21, 2020, 9:11:02 PM9/21/20
to Google Cloud SQL discuss
Hello, 

Theoritically, all SQL Servers that have the ability to export database to a .bak file are compatbile with the Google Cloud SQL Database. The important thing to note, which is stipulated in the documentation you previously linked [1], is that you cannot import a database that was exported from a higher version or edition of SQL Server or import from a higher compatibility level into a lower one. Cloud SQL also only supports importing a full backup with a single backup set. Given the screenshots that you posted, I am unable to determine which one would best work for your current use case. If I misunderstood in any way or if you have any other questions, please feel free to let us know.

Kind Regards,
Alfio.

Sulman A.

unread,
Sep 22, 2020, 4:16:28 PM9/22/20
to Google Cloud SQL discuss
Hi Alfio,

Issue is resolved now. I think it was space issue. 
I created new instance with higher space and then import the .bak file it got imported successfully.
I'm little confuse that was it space issue or was it instance issue.
It's working now.

Thanks!

Reply all
Reply to author
Forward
0 new messages