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)

Authorization

Authorization refers to the object-level permission a user has within a SQL database. For example, a user may have access to read one set of tables and to read-write on another set of tables.

The admin accounts, SQL authentication accounts, and Azure AD accounts have db_owner access to all databases and are allowed to do anything within a database.

Server-Level Administrative Roles

There are two additional server-level administrative roles: database creators and login managers.

Database Creators

Members of database creators (dbmanager) are allowed to create new SQL databases. To create a new user with the database creator role:

  1. Log in to SSMS with either Azure AD admin or SQL Server admin.
  2. Create a new login in the master database using the following query:

    CREATE LOGIN John WITH PASSWORD = 'Very$Stro9gPa$$w0rd';

  3. Create a new user in the master database mapped to log in John using the following query:

    CREATE USER John FROM LOGIN John

  4. Add the user John to...