Book Image

Professional Azure SQL Database Administration - Second Edition

By : Ahmad Osama
Book Image

Professional Azure SQL Database Administration - Second Edition

By: Ahmad Osama

Overview of this book

Despite being the cloud version of SQL Server, Azure SQL Database differs in key ways when it comes to management, maintenance, and administration. This book shows you how to administer Azure SQL Database to fully benefit from its wide range of features and functionalities. Professional Azure SQL Database Administration begins by covering the architecture and explaining the difference between Azure SQL Database and the on-premise SQL Server to help you get comfortable with Azure SQL Database. You’ll perform common tasks such as migrating, backing up and restoring a SQL Server database to an Azure database. As you progress, you’ll understand how you can reduce costs, and manage and scale multiple SQL databases using elastic pools. You’ll also implement a disaster recovery solution using standard and active geo-replication. Whether it is learning different techniques to monitor and tune an Azure SQL Database or improving performance using in-memory technology, this book will enable you to make the most out of Azure SQL database features and functionality for data management solutions. By the end of this book, you’ll be well-versed with key aspects of an Azure SQL Database instance, such as migration, backup restorations, performance optimization, high availability, and disaster recovery.
Table of Contents (11 chapters)

Manual Backups

Conventional database backup statements don't work in Azure SQL Database. Manual backup consists of exporting the database as a DACPAC (data and schema) or BACPAC (schema) and bcp out the data into csv files.

Manual backups can be performed in the following ways:

  • Export BACPAC to your Azure storage account using the Azure portal
  • Export BACPAC to your Azure storage account using PowerShell
  • Export BACPAC using SQL Server Management Studio
  • Export BACPAC or DACPAC to an on-premises system using sqlpackage.exe

Backing up an Azure SQL Database Using SQL Server Management Studio (SSMS)

In this section, we will back up the Azure SQL toystore database using SSMS:

  1. Open SSMS and press F8 to open Object Explorer if it's not already open.
  2. From Object Explorer, connect to Azure SQL Server. Once done, this is what you will see:
    Figure 3.5: The toystore database in the Object Explorer pane
  3. Right-click the toystore database, select tasks, then select Export...