Managing SQL Database

Create and manage Azure SQL Database servers and databases
March 10, 2017 – 04:06 pm
Overview of Tools to Use with Windows Azure SQL Database - TechNet

When you create a logical server, you provide a server login account and password that has administrative rights to the master database on that server and all databases created on that server. This initial account is a SQL login account. Azure SQL Database supports SQL authentication and Azure Active Directory Authentication for authentication. For information about logins and authentication, see Managing Databases and Logins in Azure SQL Database. Windows Authentication is not supported.

An Azure Database logical server:

  • Is created within an Azure subscription, but can be moved with its contained resources to another subscription
  • Is the parent resource for databases, elastic pools, and data warehouses
  • Provides a namespace for databases, elastic pools, and data warehouses
  • Is a logical container with strong lifetime semantics - delete a server and it deletes the contained databases, elastic pools, and data warehouses
  • Is a high-order element of the identity of databases, elastic pools, and data warehouses for Azure resource management purposes (see the URL scheme for databases and pools)
  • Collocates resources in a region
  • Provides a connection endpoint for database access (.database.windows.net)
  • Provides access to metadata regarding contained resources via DMVs by connecting to a master database
  • Provides the scope for management policies that apply to its databases - logins, firewall, audit, threat detection, etc.
  • Provides the scope for database quota and DTU quota for the resources it contains (such as 45, 000 DTU)
  • Is the versioning scope for capabilities enabled on contained resources
  • Server-level principal logins can manage all databases on a server
  • Can contain logins similar to those in instances of SQL Server on your premises that are granted access to one or more databases on the server, and can be granted limited administrative rights. For more information, see Logins.

Azure SQL databases protected by SQL Database firewall

To help protect your data, a SQL Database firewall prevents all access to your database server or any of its databases from outside of your connection to the server directly through your Azure subscription connection. To enable additional connectivity, you must create one or more firewall rules. For creating and managing SQL elastic pools, see Elastic pools.

Manage Azure SQL servers, databases, and firewalls using the Azure portal

You can create the Azure SQL database's resource group ahead of time or while creating the server itself. There are multiple methods for getting to a new SQL server form, either by creating a new SQL server or as part of creating a new database.

Create a blank SQL server (logical server)

To create an Azure SQL Database server (without a database) using the Azure portal, navigate to a blank SQL server (logical server) form. The following screenshot shows one method for opening a form to create a blank logical SQL server.

If you get to this form using another method, the information on the form is identical.

Create a blank or sample SQL database

To create an Azure SQL database using the Azure portal, navigate to a blank SQL Database form and provide the requested information. You can create the Azure SQL database's resource group and logical server ahead of time or while creating the database itself. You can create a blank database or create a sample database based on Adventure Works LT.

Manage an existing SQL server

To manage an existing server, navigate to the server using a number of methods - such as from specific SQL database page, the SQL servers page, or the All resources page. The following screenshot shows how to begin setting a server-level firewall from the Overview page for a server.

To manage an existing database, navigate to the SQL databases page and click the database you wish to manage. The following screenshot shows how to begin setting a server-level firewall for a database from the Overview page for a database.

Manage Azure SQL servers, databases, and firewalls using PowerShell

To create and manage Azure SQL server, databases, and firewalls with Azure PowerShell, use the following PowerShell cmdlets. If you need to install or upgrade PowerShell, see Install Azure PowerShell module. For creating and managing SQL elastic pools, see Elastic pools.

Manage Azure SQL servers, databases, and firewalls using the Azure CLI

To create and manage Azure SQL server, databases, and firewalls with the Azure CLI, use the following Azure CLI SQL Database commands. Use the Cloud Shell to run the CLI in your browser, or install it on macOS, Linux, or Windows. For creating and managing SQL elastic pools, see Elastic pools.

Manage Azure SQL servers, databases, and firewalls using Transact-SQL

To create and manage Azure SQL server, databases, and firewalls with Transact-SQL, use the following T-SQL commands. You can issue these commands using the Azure portal, SQL Server Management Studio, Visual Studio Code, or any other program that can connect to an Azure SQL Database server and pass Transact-SQL commands. For managing SQL elastic pools, see Elastic pools.

Source: docs.microsoft.com
Related Posts