Running Azure SQL
Try reloading this page, or reviewing your browser settings
This video segment describes and teaches the viewer how to deploy an Azure SQL instance using Azure CLI.
- Azure CLI deploy setup Azure SQL instance Azure CloudShell
About this video
- Peter De Tender
- First online
- 09 August 2019
- Online ISBN
- Copyright information
- © Peter De Tender 2019
Welcome to this next video in the Azure SQL deployment series, where this one covers deploying Azure SQL using Azure Command Line Interface. This section covers the basics of deploying an Azure SQL database instance using Azure Command Line Interface. I’ll start with walking you through a sample script, after which I show you the actual deployment from a live demo.
I personally prefer running Azure command line from the cloud shell out of the Azure portal, but nothing would block you from installing Azure Command Line Interface tooling on your local management station. This works on a Windows machine, Linux, and Macs. But from here the concept is identical, or pretty similar even if you want, than deploying from an Azure portal or using Azure power shell.
So you start with creating a new resource group or linking it, pointing at an existing resource group, that would obviously also work. In case of creating a new resource group, Azure CLI comment would be az group create, specifying the name and location.
And then next, we’re going to define or use the az sql server create to get the actual Azure SQL server resource created. Although for this sample here, I’m storing my credentials as clear text in the script, know there are better ways to do so. Using Azure key vault would be the best approach. And that’s pretty much all I need to talk about from like a script sample perspective.
So let me switch over to another demo where I’m going to show you what this script deployment actually looks like. By the way, if you don’t like this minimized cloud shell option here, you could directly connect to shell.azure.com providing your log in credentials and getting access to a full screen environment. Another nice option is using it from a mobile phone where you can install that Azure mobile app, giving you a minimized, stripped down Azure portal interface, but also a cloud shell.
So in meantime, the cloud shell is loaded. And let me go back to my sample environment script here, where I’m going to start with creating my resource group, followed by creating MySQL server object. So I’m going to paste it in my cloud shell environment. The write’s going to start with running that resource group creation.
And as you can see, it only takes like a second or so. And it’s already running that second part of my deployment, creating that SQL Server instance. So I’ll give it like about a minute or two, where it’s going to present me that resource group and having that single instance in there.
As you can see in my CLI window, there’s some JSON output regarding my deployment. So if I close my cloud shell and refresh my resource group, I can see MySQL server instance. And from here, all options are available, which means another successful deployment.
This basically brings me to the end of this video, where you’ll learn about how to run Azure Command Line Interface, Azure CLI, to deploy your Azure SQL database server. Looking forward to see you again in one of the other Azure SQL videos we have here. Have a nice day for now.