Search code examples
t-sqlazure-sql-databasedatabase-backupsdatabase-restoreazure-elasticpool

How to backup and restore databases through stored procedure in Azure SQL using Elastic Pool?


I have a C# ASP.NET MVC based web application in which there is a functionality of Archiving (backup) and Restoring Databases on the click of button. Currently, our system is On-Prem and so we are using the stored procedures in SQL Server to do the backup and restore.

Now we are migrating to Azure PaaS and are using Elastic Pool. As the backup and restore T-SQL commands do not work in Azure SQL, so can someone please help me in finding a way to do the backup and restore of DBs manually through T-SQL?

Any help would be highly appreciated!


Solution

  • Auto backups is a feature of Azure SQL database. enter image description here

    In SQL Azure, database backups are executed automatically and it is not possible to change this behavior. This is a service offered when you create a SQL Azure database and the first full backup occurs immediately after you create a new SQL Azure database and the rest of the backups are scheduled by SQL Azure itself.

    There is no way can help you backup and restore of DBs manually through T-SQL.

    Hope this helps.