Import the SQL Database from Server to Serverless database

GeethaThatipatri-MSFT 29,542 Reputation points Microsoft Employee Moderator
2024-07-19T19:35:56.18+00:00

Issue with importing a SQL database from an old Azure VM to a new SQL Server. How can I import a .bak file into an Azure SQL Database using SQL Server Management Studio (SSMS).

PS - Based on common issues that we have seen from customers and other sources, we are posting these questions to help the Azure community.

Azure SQL Database
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. GeethaThatipatri-MSFT 29,542 Reputation points Microsoft Employee Moderator
    2024-07-19T19:37:37.2966667+00:00

    Greetings!

    ·  You cannot import .bak file directly in Azure SQL database. Import/Export feature of Azure SQL database support .bacpac file.

    ·  Instead of taking a backup you can export the database to .bacpac file.

    ·  After this you can import the .bacpac file to create an Azure SQL Database either through SSMS or through the Azure Portal.

    Please refer the below links to export database as .bacpac file: Export a Data-tier Application - SQL Server | Microsoft Learn  

    Import Bacpac file using Azure Portal: Import a .bacpac file to create a database in Azure SQL Database - Azure SQL Database | Microsoft Learn

    upload the bacpac file in storage account in Azure Portal to import using the Portal.

     Import Bacpac file using SSMS: Import a BACPAC file to create a new user database - SQL Server | Microsoft Learn

    Regards

    Geetha

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.