How to restore local database

خلفاوي الطاهر 0 Reputation points
2023-09-05T09:26:57.8866667+00:00

Hello Azure

please I have MS SQL database (.bak) 2017 how to restore it into my Azure SQL Database server ?

Azure SQL Database
{count} votes

3 answers

Sort by: Most helpful
  1. Olaf Helper 47,436 Reputation points
    2023-09-05T09:52:05.6866667+00:00

    Use BLOB storage to transfer the BAK file, then you can restore it from there

    https://learn.microsoft.com/en-us/sql/relational-databases/tutorial-sql-server-backup-and-restore-to-azure-blob-storage-service?view=sql-server-ver16&tabs=SSMS

    Instead working with backup you can copy/transfer the database use DMA = "Data Migration Assistant"

    https://learn.microsoft.com/en-us/sql/dma/dma-overview?view=sql-server-ver16

    0 comments No comments

  2. Alberto Morillo 34,671 Reputation points MVP Volunteer Moderator
    2023-09-05T12:54:08.5833333+00:00

    Unfortunately, you cannot restore a native SQL Server backup to Azure SQL. You can restore it to a local SQL Server instance and from there you can export the database as a bacpac, upload it to an Azure Storage account, and using the Azure portal, finally import it.

    An easier way to migrate the database to Azure SQL is using Azure Data Migration Assistant, which will first identify any incompatibilities and once they are resolved it will easily migrate the database to Azure SQL for you, as explained here.

    0 comments No comments

  3. RahulRandive 10,486 Reputation points Volunteer Moderator
    2023-09-05T17:13:36.4566667+00:00

    Hi @خلفاوي الطاهر

    Consider exploring the option of offline migrations for your specific needs.

    https://techcommunity.microsoft.com/t5/microsoft-data-migration-blog/introducing-azure-sql-database-offline-migrations-for-the-azure/ba-p/3655381

    Also please find detailed blog and various option on "Is it possible to upload a SQL server backup to an Azure database"

    https://techcommunity.microsoft.com/t5/azure-database-support-blog/lesson-learned-14-is-it-possible-to-upload-a-sql-server-backup/ba-p/368833

    Thank you!

    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.