0

I am trying to migrate a SQL Server database from my on-premises server to an Azure SQL Server. I'm attempting to do this using the command line.

I have taken help from few guides also like https://critiquid.com/how-to-import-a-bak-file-in-azure-sql-server/

I have taken a .bak (backup) file of my on-premises SQL Server database.

I've restored the .bak file to a separate on-premises SQL Server.

I've installed SQL Server Management Studio (SSMS) and SQLPackage.exe.

I'm trying to export the restored database to a .bacpac file using SQLPackage.exe to eventually import it into Azure SQL Server.

Here's the command I'm running:

SqlPackage.exe /Action:Export /SourceConnectionString:"Server=.\;Database=MyDatabase;Integrated Security=True;" /TargetFile:"C:\backup\MyDatabase.bacpac"

While running this command, I'm getting the following error:

Error: Could not extract package from specified database. The underlying error message is: Internal Error. The internal target platform type 'SqlAzureV12DatabaseSchemaProvider' does not support schema file version '3.5'.

What am I doing wrong? How can I successfully export the database to a .bacpac file and then import that into Azure SQL Server?

Any help would be greatly appreciated. Thank you!

0 Answers0