Azure SQL Database local backup

Joseph Buttgenbach 1 Reputation point
2022-09-28T21:56:04.75+00:00

Hola a todos,
Tengo una base de datos Azure SQL Server y quisiera recibir soporte para poder exportar esta base de datos hacia mi PC local, para poder restaurarla en una instancia local de SQL Server.
De antemano, su ayuda para poder encontrar una solución.
Saludos,
Joseph

=================================================================

Translation.
Hi all,
I have an Azure SQL Server database and I would like to receive support to be able to export this database to my local PC, in order to restore it on a local SQL Server instance.
In advance, your help to be able to find a solution.
Best regards,
Joseph

Azure SQL Database
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Alberto Morillo 34,671 Reputation points MVP Volunteer Moderator
    2022-09-28T22:44:07.687+00:00

    Welcome to Microsoft QA Joseph,

    You can export the Azure SQL Database as bacpac using sqlpackage utility as shown below:

    SqlPackage /Action:Export /SourceServerName:SampleSQLServer.sample.net,1433  
      
    /SourceDatabaseName:SampleDatabase /TargetFile:"F:\Temp\SampleDatabase.bacpac"  
    

    You can also use PowerShell.

    $exportRequest = New-AzSqlDatabaseExport -ResourceGroupName $ResourceGroupName -ServerName $ServerName `  
      -DatabaseName $DatabaseName -StorageKeytype $StorageKeytype -StorageKey $StorageKey -StorageUri $BacpacUri `  
      -AdministratorLogin $creds.UserName -AdministratorLoginPassword $creds.Password  
    

    Once the bacpac is on your local drive, you can import it to a local SQL Server 2019 instance that has all the latest updates applied.

    ============================================================

    Traducción al español.

    Tu puedes exportar la base de datos de Azure SQL a tu disco local en tu computador usando el SqlPackage utility or PowerShell como te muestro arriba.

    Cuando ya tengas el bacpac en tu PC, puedes importarlo en una instancia SQL Server 2019 que tenga los últimos updates (actualizaciones).

    1 person found this answer helpful.
    0 comments No comments

  2. Oury Ba-MSFT 20,911 Reputation points Microsoft Employee Moderator
    2022-09-29T21:24:40.607+00:00

    Hi @Joseph Buttgenbach Thank you for posting your question on Microsoft Q&A and for using Azure services.

    In addition to what @Alberto Morillo mentioned above you can follow the blog here Export Azure SQL Database to local path to export an Azure SQL Database.

    Regards,
    Oury


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.