Learn how to create a SQL database on Azure.
- [Instructor] Now we get to the fun part of creating our Azure SQL database. Let's return to the portal, open up the menu, click on new, a number of options come up, we're going to choose database, and then we're going to choose SQL Database. The configuration comes up. The first thing we want to do is give it a name, jl-azuredb.
Choose the subscription as we did before. Let's open up an existing resource group to keep everything together. And, that will be our jl-AzureData as we used before. Next, we need to select our source. If we hover over this little question mark next to select source, you can see that we can use this to create a new blank database. We could create a sample. We can use backup to create a new database from an existing backup. We're going to choose blank database because we do not have an existing one.
We want to start from scratch. Next, we come down to server, and we'll create a new server, and we'll give that new server a name. So, we're going to say jl-azuredbserver. And, notice that it'll be appended with .database.windows.net. Now, we need to give our server an administrative login. I will use jesseliberty, and then I will fill in a password for that admin.
And then, I'll confirm that password to make sure that we have it the way we want. And they match, so that's good. And, we'll continue setting that to West US. We're ready to select that server, which we see come up in the configuration blade. And the next question you need to ask is do we want to use a SQL elastic pool? SQL elastic pools are used to create a pool of SQL databases which allow you to manage a single execution point.
This is very useful when you're managing many databases with the same schema. We're not in that position, so we're going to say not now. We'll except the standard pricing tier. Notice that pricing is in terms of DTUs. We can find out more about DTUs by coming to this page of documentation from Microsoft Azure. Down here and it shows you what a database transaction unit or DTU is.
And, this is well worth reading through in terms of how many DTUs you'll need and what the cost for those will be. We're going to except the default pricing tier which gives us 50 DTUs. And, we can pin our new database to the dashboard and click create. Once again, it takes a few minutes for Azure to deploy your new database. You'll want to be patient here.
Can take quite a while for the database to be deployed. Once it is, you'll see the deployment is successful, and you'll come to the information page about your new database. Notice here, that one of your options is to show the database connection string. Go ahead and click on that. Here is the connection string, and we're going to use that next to connect this database to our local visual studio project.
- Creating an MVC web app
- Publishing an MVC app to Azure
- Creating a SQL database on Azure
- Enabling migrations
- Updating an Azure database
- Changing the schema
- Exploring various types of Blob storage
- Creating Blob storage accounts in Azure
- Examining Azure statistics for monitoring Blob storage