Book Image

Microsoft Azure Development Cookbook Second Edition

Book Image

Microsoft Azure Development Cookbook Second Edition

Overview of this book

Table of Contents (15 chapters)
Microsoft Azure Development Cookbook Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Automating SQL Database operations


The Azure SQL Database is the fully managed PaaS version of a SQLServer-like database engine in the cloud.

When dealing with big multitenant infrastructures, where we pool group of tenants into the same database, automation solutions on database management are necessary.

Let's assume that we need to automate the creation process of a new database. As far as we know, we can proceed as follows:

  1. Use the Azure T-SQL (create database).

  2. Use the Management API (even through the managed libraries).

If then we need to create new servers, only the second option remains available. It is easy to understand that if we want to scale out automatically, an automated management solution has to be implemented on the Management API side.

In this recipe, we will see some basics of SQL Database management through the APIs.

Getting ready

This recipe assumes that we created a valid certificate, and we exported it to a CER file and a PFX file. The first file should be uploaded to the...