Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Azure icon
Labs

Provisioning a MS SQL Database Instance in Azure

In this hands-on lab, we will practice provisioning an Azure SQL Database (SQL DB) instance two ways. First, we will provision a SQL DB instance using the Azure Portal. Next, we will provision an instance using PowerShell.

Azure icon
Labs

Path Info

Level
Clock icon Beginner
Duration
Clock icon 1h 0m
Published
Clock icon Jun 21, 2019

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Create a SQL Database Instance Using the Azure Portal

    Create a SQL Database

    1. Navigate to the "SQL databases" page of the Azure Portal.
    2. Click Create sql database.
    3. Configure the following settings:
      • Location: East US
      • Use SQL elastic pool: No
      • Database tier: Standard
      • DTUs: 10
      • Data max size: 50 GB
      • Data source: Sample

    Configure Geo-Replication

    1. Navigate to the SQL database we just created.
    2. Under Settings, click Geo-Replication.
    3. Under TARGET REGIONS, select West US.
    4. In the Create secondary menu, click Target server.
    5. Create and configure a new server.
    6. Click Select, then OK.

    Encrypt Data at Rest

    1. Under Security, click Transparent data encryption.
    2. Under Data encryption, select ON.

    Enable Dynamic Data Masking

    1. Under Security, click Dynamic Data Masking.
    2. Add a new masking rule with the following settings:
      • Schema: SalesLT
      • Table: Customer
      • Column: EmailAddress (nvarchar)
      • Masking field format: Email ([email protected])
    3. Click Add.
    4. Click Save.
  2. Challenge

    Create a SQL Database Instance Using PowerShell

    Create a SQL Server

    1. From the Azure dashboard, click the Cloud Shell icon at the top of the page.
    2. Click PowerShell.
    3. Under Subscription, click Show advanced settings.
    4. Select the same region as your lab provided Resource Group. Under Storage account, select Create new, and enter a unique name in the field below.
    5. Under File Share, select Create new, and enter a unique name in the field below.
    6. Click Create storage.
    7. In the PowerShell terminal window, run the following command to check the Azure subscription:
    8. Run the following command to check the Azure subscription:
    Get-AzSubscription
    
    1. Check the resource group and its current location.
    Get-AzResourceGroup
    
    1. Create a new SQL server.
    New-AzSqlServer
    
    1. At the ServerName prompt, enter a unique name (e.g., test1990235).
    2. At the User prompt, enter a unique name (e.g., admin1990235).
    3. At the Password prompt, enter a unique password (e.g., Test123456).
    4. At the Location prompt, enter southcentralus.
    5. At the ResourceGroupName prompt, enter the resource group name (found in the output of the Get-AzResourceGroup cmdlet).

    Create a SQL Database

    1. Run the following command:
    New-AzSqlDatabase ` -DatabaseName [DATABASE_NAME] ` -MaxSizeBytes 53687091200 ` -Edition "Standard" -ResourceGroupName [RESOURCE_GROUP_NAME] -RequestedServiceObjectiveName S0
    
    1. At the ServerName prompt, enter the server name.

    Note: Some PowerShell commands take a while to run. If you don't immediately see an output, be patient and wait for PowerShell to finish executing the query (could take 5-15 minutes).

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans