Creating an Azure SQL Database

In order to create an Azure SQL Database, you need to create an Azure SQL Server first:

  1. Navigate to the Azure portal, then to All services, and search for SQL servers.
  2. When you open SQL servers, a new blade pops up, and if there are any SQL Servers that you created earlier, they will be displayed here. But since no SQL Servers have been created so far, it will be blank, as shown in the following screenshot:

  1. To create a new Azure SQL Database, click on Add.
  2. Once you have clicked on Add, a new blade will be opened where you have to specify the following:
    • Server name: Specify a descriptive server name for the server, although the name you might provide will not be valid because it has been used before for another SQL Server in the database.windows.net domain.
    • Server admin login: Specify the SQL Server admin username.
    • Password: Specify a strong password for the SQL Server.
    • Subscription: Specify the subscription that will be charged for using this service.
    • Resource group: Specify the resource group in which this resource will exist.
    • Location: Select the nearest location to the service for which you are creating Azure SQL Server. For example, if you are going to use it for a web app, make sure they are in the same region, or if you are going to use it as a backend of an application hosted on-premises or somewhere else, it's recommended to use the nearest region.
    • Allow Azure services to access server: If you enable this option, you are allowing other Azure services to access this server.
    • Advanced Threat Protection: This is a unified security package for discovering and classifying sensitive data, surfacing, mitigating potential database vulnerabilities, and detecting anomalous activities that could indicate a threat to your database. If you want to use it, you can have a trial for 60 days, and then it is 15 USD/server/month:

  1. Once you are done, click on Create and the server will be created after few moments.

With SQL Server in place, you can now start to create the database by performing the following steps:

  1. Navigate to the Azure portal, then to All services, and search for SQL database.
  2. When you open SQL databases, a new blade pops up, and if there are any SQL Databases that you created earlier, they will be displayed here. But since no SQL Servers have been created so far, it will be blank, as shown in the following screenshot:

  1. To create a new Azure SQL Database, click on Add.
  2. A new blade will be opened where you have to specify the following:
    • Database name: A descriptive name for the database.
    • Subscription: Specify the subscription the SQL Server you have created earlier is using.
    • Resource group: Specify the resource group in which this database exists.
    • Select source: You can select one of the following as a source for the database:
      • Blank database: An empty database where you can create your own tables.
      •  Sample (AdventureWorksLT): You can use this option to have a sample database provided by Azure. If selected, it loads the AdventureWorks schema and data into your new database.
      • Backup: If you want to restore a previously backed-up Azure SQL Database to be used in this case.
    • Server: Specify the SQL Server you want to build the database into. You can either select an existing one, such as the one we have just created, or create a new one, as shown in the following screenshot:

    • Want to use SQL elastic pools: If you select Not now, it means this database will be a single database.
    • Pricing tier: Choose a SQL service tier and performance level that best fits your application needs. There are two purchasing models:
      • DTU-base model: This consists of the DTU service tiers we discussed earlier (Basic, Standard, and Premium), where you can specify the DTUs and the size that can be used by the database:

      • vCore-based model: This is a more customizable model, where you can select compute and storage resources. Moreover, you can make use of Azure Hybrid Benefit for SQL Server to save costs:

    • Collation: Database collation defines the rules that sort and compare data, and cannot be changed after database creation. The default database collation is SQL_Latin1_General_CP1_CI_AS
  1. Once you are ready, click on Create:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.7.102