bonjour hi welcome to another video of cloud in five minutes I'm Frank Boucher and
today I want to show you not one not two but four different ways to create an SQL
database in Azure every solution required data today the focus is about
SQL database but of course many different solution are available in
Azure so let's get started the first way is to use the portal so open your
favorite internet browser and go to portal develop calm this is the main
portal for a sure now click on that big green plus button in the top left corner
and select SQL database from now it's pretty easy you just need to fill up
that form for every database you need a server a server can contain multiple
database so now we need to create a server you can select many different
tiers of database here so because it's a demo I will go for a basic one voila now
I just need to click the create button and my database will be created once the
database is created you still need to do a little thing before you can connect by
default I sure will locked the database from any
access that's very good but we need to open it so we can connect the way to do
it is to go grab your resource group we just created in my case it was clouded
five minutes and here we see the two resources we created our server and the
database let's click on the database to change the firewall rules we just need
to click in here the set server firewall now from there you can select your own
IP or set a range of IP so you could access the database of course put
something that is meaningful to you and don't forget to save to get their
connection string also it's available from here connections
and all you will have this information all over there note that dear
username and password are not included in that connection stream to access the
database you also have a tool inside the portal just click here on query editor
it's in preview right now so you just need to enter your password and voila
you could now enter your query it's very convenient when you're on the road and
you just want to do a quick query over like if you need some more every lifting
of course you can use any other tool that way you are using previously one
that is pretty new and cool is the azure data studio it works on Mac Linux and
windows it's very easy to install and very easy to use let me show you quickly
I have it install here it looks a lot like Visual Studio code once you're
connected you can run your query just like any other tool it's a very light
and convenient tool I have it on all my devices of course creating a database
from the portal is very easy and convenient but it's really the solution
we'll use inner deployment because it's manual so that brings me to the second
way using Azure CLI or PowerShell command so let's open the terminal and
I'll just go in code I have a script prepared for you so here you only need
three command to create your database so the first one here is of course like any
deployment you will need a resource group so easy group create you specify
the name in my case cloud five minutes and east us of course you pick the
location close to you or your user then we need to create that server so it's
easy SQL Server create and then you specify
the name of that server the resource group that was just created previously
the location again and then you need to specify the username and the password of
the don't forget that the password need to
be strong so uppercase lowercase and special character the last comment to be
able to have a database is to create a database so it's easy
SQL again but this time it will be DB for database create you will specify the
resource group created previously the server name and the database name run
this and you will have the same result as creating the database from the portal
of course you could add more command to set up re the firewalls and many
different other things but those are the minimum now the third way to create a
database it's to use the azure resource manager the arm template so for that we
need an adjacent file I have one here empty just for you that's okay perfect
so now we need to create our empty template voila and we need to define a
server first so again we'll create my server and I need to specify the user
and password for my admin so voila now the server is created we still need to
add another node for the database so if you look here we are in our node server
and in this node we have a resources list the database need to be defined
inside the server just like in the portal so we'll go here at the end and
we'll had a new node now we need the database we specify the server name and
the database name pora now your database is defined so you could add those nodes
in an existing arm template or just create a new one using that middle this
way your database will be created when you will be deploying a big plus when
you're using an arm template vs CLI or partial command
is that with the arm template you don't need to check if the database already
exists before trying to create it since the arm template will just update what's
missing in the resource group the fourth and last way to create a database that I
want to show you is to use the DIF ups pipeline so to do that we'll go back in
our browser and we'll go on the azure dev ops website here I have the project
Frankie demo that I created in a previous video so you need to go in the
pipeline and we'll go in deeper you need to go in the release pipeline to create
your database so right now I already have the pipeline define if you have
none then you need to create one if it's already there and just you just want to
add the database you need to click on the edit and we'll have one task here we
click on the plus and search for database now here you have MySQL and SQL
Server in my case I will use the SQL database so just like before we fill up
the form so here by default it will suggest that we restore a DAC pack
attack pack is a backup of the database with the data it's very convenient and
it's also possible to do the same thing from the azure portal the azure CLI and
PowerShell command and from the arm template if you prefer running a SQL
script you just need here to change for an SQL script you could even have a in
line if you prefer come in once everything is filip when the release
pipeline will be running your database will be created and voila
so now directly from the portal using a asher CLI or powershell script using an
arm template or directly from the azure interrupts you can create your SQL or
any kind of database in Azure I hope you liked this video and I hope
it was useful if you have a question don't hesitate to write it down in the
comment section it helps me to define topic of future videos if it was your
first cloud in five minutes then know that every
can we I published short video to insert your technical question so don't is date
to share like and subscribe this way you won't miss any next video thank you for
watching