I am going to show you how to use the Azure Portal to create a cloud-based SQL database with just a few mouse clicks
In this article, I will tell you,
- Introduction of Microsoft Azure SQL database
- Create an Azure SQL database
- Set up firewall rules for SQL DB server
Let’s get started,
Introduction of Microsoft SQL database
I will give some introduction about the Microsoft Azure SQL database before we start to create the Microsoft Azure SQL database. Microsoft Azure SQL Database is a managed cloud database for programmers/developers to develop their products easier due to less involvement in maintenance allowing the customer to concentrate on their products, because, most of the data maintenance or infrastructure is taken care of by the cloud service providers.
Few Advantages of a cloud database.
- Limitless Storage
- Lowered costs (due to reduced hardware overhead)
- Quick, easy and reliable disaster recovery
- Instant backups and restores for databases via the Azure Snapshot feature
Create an Azure SQL database
To start, First, you have to go to the Azure portal. Then select SQL Databases in Azure services and click the “Add” button. Then you can navigate to a page like the below picture.
First, select your free subscription and select your existing resource group, or also you can create a new resource group if you need it. By the way, I use the existing resource group which I created to deploy my API project in azure. Then Enter your DB name and select or create a Server for your database. and choose your plan for computer + storage. Azure will default to the standard pricing tier, but you select a plan as you want. The basic pricing tier starts at $4.99/month for storage of up to 2GB. The Standard tier starts at $15/month for 250GB, and the Premium tier starts at $465/month for 500GB. Select Apply when you have made your decision.
If you want to create a new server you have to add the server name, server admin login, and password for it. And we use these details for connection string when we connect our database to our API project.
After that then create your database. Then your deployment will be complete after a few minutes. Then you can select your resource and it navigates to the database dashboard. And it will be like the below picture.
Then you can check your database by navigating to query editor and try to log your database through SQL server authentication. Then you will get an error. Because you didn’t set firewall rules for the SQL database server. If you try to connect your DB to your project, then you will get an error as same. So now we have to set firewall rules for our to create SQL DB server.
Set up firewall rules for SQL DB server
So for set firewall rules, navigate to the DB dashboard and then click set server firewall on top of the dashboard.
Then you will navigate to the firewall settings page and then select the “Add Client IP” button. Then it will automatically add the IP address of the computer that you’re using, Then save it. Then try to login to SQL DB and then it will be a success.
Now you can see the database. Also now you can write any query in the query editor and check your SQL database in Azure.
Now we Created our Azure SQL database Successfully !!!
So, Guys, That’s it for today and I think you learned something new from my article.
Good Luck All!!
No comments:
Post a Comment