dp-300-database-administrator (2024)

Estimated Time: 40 minutes

Students will configure basic resources needed to deploy an Azure SQL Database with a Virtual Network Endpoint. Connectivity to the SQL Database will be validated using Azure Data Studio from the lab VM.

As a database administrator for AdventureWorks, you will set up a new SQL Database, including a Virtual Network Endpoint to increase and simplify the security of the deployment. Azure Data Studio will be used to evaluate the use of a SQL Notebook for data querying and results retention.

Navigate on Azure portal

  1. From the lab virtual machine, start a browser session and navigate to https://portal.azure.com. Connect to the Portal using the Azure Username and Password provided on the Resources tab for this lab virtual machine.

    dp-300-database-administrator (1)

  2. From the Azure portal, search for “resource groups” in the search box at the top, then select Resource groups from the list of options.

    dp-300-database-administrator (2)

  3. On the Resource group page, check the resource group listed (it should start with contoso-rg), make note of the Location assigned to your resource group, as you will use it in the next exercise.

    Note: You may have a different location assigned.

    dp-300-database-administrator (3)

Create a Virtual Network

  1. In the Azure portal home page, select the left hand menu.

    dp-300-database-administrator (4)

  2. In the left navigation pane, click Virtual Networks

  3. Click + Create to open the Create Virtual Network page. On the Basics tab, complete the following information:

    • Subscription: <Your subscription>
    • Resource group: starting with contoso-rg
    • Name: lab02-vnet
    • Region: Select the same region where your resource group was created
  4. Click Review + Create, review the settings for the new virtual network, and then click Create.

  5. Configure the virtual network’s IP range for the Azure SQL database endpoint by navigating to the virtual network created, and on the Settings pane, click Subnets.

  6. Click on the default subnet link. Note that the Subnet address range you see might be different.

  7. In the Edit subnet pane on the right, expand the Services drop-down, and select Microsoft.Sql. Select Save.

Provision an Azure SQL Database

  1. From the Azure Portal, search for “SQL databases” in the search box at the top, then click SQL databases from the list of options.

    dp-300-database-administrator (5)

  2. On the SQL databases blade, select + Create.

    dp-300-database-administrator (6)

  3. On the Create SQL Database page, select the following options on the Basics tab and then click Next: Networking.

    • Subscription: <Your subscription>
    • Resource group: starting with contoso-rg
    • Database Name: AdventureWorksLT
    • Server: click on Create new link. The Create SQL Database Server page will open. Provide the server details as follow:
      • Server name: dp300-lab-<your initials (lower case)> (server name must be globally unique)
      • Location: <your local region, same as the selected region for your resource group, otherwise it may fail>
      • Authentication method: Use SQL authentication
      • Server admin login: dp300admin
      • Password: dp300P@ssword!
      • Confirm password: dp300P@ssword!

      Your Create SQL Database Server page should look similar to the one below. Then click OK.

      dp-300-database-administrator (7)

    • Back to the Create SQL Database page, make sure Want to use Elastic Pool? is set to No.
    • On the Compute + Storage option, click on Configure database link. On the Configure page, for Service tier dropdown, select Basic, and then Apply.

    Note: Make note of this server name, and your login information. You will use it in subsequent labs.

  4. For the Backup storage redundancy option, keep the default value: Geo-redundant backup storage.

  5. Then click Next: Networking.

  6. On the Networking tab, for Network Connectivity option, click the Private endpoint radio button.

    dp-300-database-administrator (8)

  7. Then click the + Add private endpoint link under the Private endpoints option.

    dp-300-database-administrator (9)

  8. Complete the Create private endpoint right pane as follows:

    • Subscription: <Your subscription>
    • Resource group: starting with contoso-rg
    • Location: <your local region, same as the selected region for your resource group, otherwise it may fail>
    • Name: DP-300-SQL-Endpoint
    • Target sub-resource: SqlServer
    • Virtual network: lab02-vnet
    • Subnet: lab02-vnet/default (10.x.0.0/24)
    • Integrate with private DNS zone: Yes
    • Private DNS zone: keep the default value
    • Review settings, and then click OK

    dp-300-database-administrator (10)

  9. The new endpoint will appear on the Private endpoints list.

    dp-300-database-administrator (11)

  10. Click Next: Security, and then Next: Additional settings.

  11. On the Additional settings page, select Sample on the Use existing data option. Select OK if a pop-up message is displayed for the sample database.

    dp-300-database-administrator (12)

  12. Click Review + Create.

  13. Review the settings before clicking Create.

  14. Once the deployment is complete, click Go to resource.

Enable access to an Azure SQL Database

  1. From the SQL database page, select the Overview section, and then select the link for the server name in the top section:

    dp-300-database-administrator (13)

  2. On the SQL servers navigation blade, select Networking under the Security section.

    dp-300-database-administrator (14)

  3. On the Public access tab, select Selected networks, and then check the Allow Azure services and resources to access this server property. Click Save.

    dp-300-database-administrator (15)

Connect to an Azure SQL Database in Azure Data Studio

  1. Launch Azure Data Studio from the lab virtual machine.

    • You may see this pop-up at initial launch of Azure Data Studio. If you receive it, click Yes (recommended)

      dp-300-database-administrator (16)

  2. When Azure Data Studio opens, click the Connections button in top left corner, and then Add Connection.

    dp-300-database-administrator (17)

  3. In the Connection sidebar, fill out the Connection Details section with connection information to connect to the SQL database created previously.

    • Connection Type: Microsoft SQL Server
    • Server: Enter the name of the SQL Server created previously. For example: dp300-lab-xxxxxxxx.database.windows.net (Where ‘xxxxxxxx’ is a ramdom number)
    • Authentication Type: SQL Login
    • User name: dp300admin
    • Password: dp300P@ssword!
    • Expand the Database drop-down to select AdventureWorksLT.
      • NOTE: You may be asked to add a firewall rule that allows your client IP access to this server. If you are asked to add a firewall rule, click on Add account and login to your Azure account. On Create new firewall rule screen, click OK.

      dp-300-database-administrator (18)

      Alternatively, you can manually create a firewall rule for your SQL server on Azure portal by navigating to your SQL server, selecting Networking, and then selecting + Add your client IPv4 address (your IP address)

      dp-300-database-administrator (19)

    Back on the Connection sidebar, continue filling out the connection details:

    • Server group will remain on <default>
    • Name (optional) can be populated with a friendly name of the database, if desired
    • Review settings and click Connect

    dp-300-database-administrator (20)

  4. Azure Data Studio will connect to the database, and show some basic information about the database, plus a partial list of objects.

    dp-300-database-administrator (21)

Query an Azure SQL Database with a SQL Notebook

  1. In Azure Data Studio, connected to this lab’s AdventureWorksLT database, click the New Notebook button.

    dp-300-database-administrator (22)

  2. Click the +Text link to add a new text box in the notebook

    dp-300-database-administrator (23)

Note: Within the notebook you can embed plain text to explain queries or result sets.

  1. Enter the text Top Ten Customers by Order SubTotal, making it Bold if desired.

    dp-300-database-administrator (24)

  2. Click the + Cell button, then Code cell to add a new code cell at the end of the notebook.

    dp-300-database-administrator (25)

  3. Paste the following SQL statement into the new cell:

SELECT TOP 10 cust.[CustomerID], cust.[CompanyName], SUM(sohead.[SubTotal]) as OverallOrderSubTotalFROM [SalesLT].[Customer] cust INNER JOIN [SalesLT].[SalesOrderHeader] sohead ON sohead.[CustomerID] = cust.[CustomerID]GROUP BY cust.[CustomerID], cust.[CompanyName]ORDER BY [OverallOrderSubTotal] DESC
  1. Click on the blue circle with the arrow to execute the query. Note how the results are included within the cell with the query.

  2. Click the + Text button to add a new text cell.

  3. Enter the text Top Ten Ordered Product Categories, making it Bold if desired.

  4. Click the + Code button again to add a new cell, and paste the following SQL statement into the cell:

SELECT TOP 10 cat.[Name] AS ProductCategory, SUM(detail.[OrderQty]) AS OrderedQuantityFROM salesLT.[ProductCategory] cat INNER JOIN [SalesLT].[Product] prod ON prod.[ProductCategoryID] = cat.[ProductCategoryID] INNER JOIN [SalesLT].[SalesOrderDetail] detail ON detail.[ProductID] = prod.[ProductID]GROUP BY cat.[name]ORDER BY [OrderedQuantity] DESC
  1. Click on the blue circle with the arrow to execute the query.

  2. To run all cells in the notebook and present results, click the Run all button in the toolbar.

    dp-300-database-administrator (26)

  3. Within Azure Data Studio save the notebook from File menu (either Save or Save As) to the C:\Labfiles\Deploy Azure SQL Database path (create the folder structure if it does not exist). Make sure the file extension is .ipynb

  4. Close the tab for the Notebook from inside of Azure Data Studio. From the File Menu, select Open File, and open the notebook you just saved. Observe that query results were saved along with the queries in the notebook.

In this exercise, you’ve seen how you deploy a Azure SQL Database with a Virtual Network Endpoint. You were also able to connect to the SQL Database you’ve created using SQL Server Management Studio.

dp-300-database-administrator (2024)
Top Articles
Why The Rich Don't Work For Money - Robert Kiyosaki - New Trader U
Re: How Do I Manually Complete Two-Factor Authentication?
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Movies - EPIC Theatres
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Mia Malkova Bio, Net Worth, Age & More - Magzica
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Selly Medaline
Latest Posts
Article information

Author: Mrs. Angelic Larkin

Last Updated:

Views: 5935

Rating: 4.7 / 5 (47 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Mrs. Angelic Larkin

Birthday: 1992-06-28

Address: Apt. 413 8275 Mueller Overpass, South Magnolia, IA 99527-6023

Phone: +6824704719725

Job: District Real-Estate Facilitator

Hobby: Letterboxing, Vacation, Poi, Homebrewing, Mountain biking, Slacklining, Cabaret

Introduction: My name is Mrs. Angelic Larkin, I am a cute, charming, funny, determined, inexpensive, joyous, cheerful person who loves writing and wants to share my knowledge and understanding with you.