Azure Classroom series – 04/May/2020

Azure SQL using Powershell

  • Launch Powershell from your laptop
    Install-Module -Name Az -AllowClobber
    • Login into Azure:
  • Launch CloudShell if you are not in suitable environment

Finding the Right Commands (cmdlets) in Powershell

  • In Powershell we have
    • Cmd-lets:
      • Commands of Powershell organized in <verb>-<noun> for eg: Get-PS, New-Item,
      • Finding a Right cmdlet is simple
      Get-Command <pattern> 
      # and find the right cmdlet or change the pattern
      Get-Help <cmd-let> -Online
  • Azure Powershell is installed on the Machine as Powershell Module Az, all the cmdlets of Azure Powershell will be in the form of <verb>-Az<noun> for eg: Get-AzGroup, New-AzVm

Scenario: Create an Azure SQL Server

  1. Create a Resource Group
    • Get-Command *-AzResource*
    • Get-Help New-AzResourceGroup -Online
  2. Script Changes:
$resg = New-AzResourceGroup -Name sqlserverfromps -Location centralus

Preview 3. Create an SQL Server

Get-Command *-AzSQL*
Get-Help  New-AzSqlServer -Online
  1. Exercise: Try to write the complete script to create Azure SQL Database and try to acheive all the things as mentioned over here

Azure SQL For Other Databases

  • Azure also provides managed services for
    • mySQL
    • Postgres Preview
  • We need to understand the features provider for SQL Server and other managed databases.
  • Exercise:
    • Ensure you have one Azure SQL Server Created
    • Ensure you have one Azure mySQL Server Created Refer Here or Create Azure Postgresql from here

Next Topics

  • Features Provided by Azure to
    • SQL Server
    • mySQL
    • Postgres
  • Synapse Analytics and then how about Oracle?
  • SQL Server Instance
  • Cache Databases

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin