Create an Azure SQL Database via the Azure portal

In this “Azure SQL Database and Python” tutorial series, you will learn how to create an Azure SQL Database and connect to the database by using Python. Then you will use Python and SQL statements in Jupyter Notebooks to create tables and manipulate data.

In the first part, you will learn how to create an Azure SQL Database via the Azure Portal and configure firewall rules to enable connectivity. To complete the exercise, you will need an Azure subscription.

Create an Azure SQL Database

  1. Sign in to Azure Portal and search for Azure SQL.

    Search for Azure SQL
  2. In the new tab, select Add.

  3. In the Select SQL deployment option window, select SQL Database > Single Database.

    Create a single SQL database
  4. Then, configure the new database. Select:

    • Subscription.
    • Resource Group: Click Create new and enter the name of the new resource group.
    • Database name: Select a unique name.
    • Server: Click Create new, select a unique name and a region, and create an admin user (username and password).
    • Compute + storage: We are going to use Severless, 1 vCore(s), 1 GB. Select Configure database. Then select the General Purpose tab, choose Severless and set the Max vCores to 1 vCore and Data max size to 1 GB.
    Configure Azure SQL database
  5. Select the Networking tab. Under Connectivity method, select Public endpoint and the set the Add current client IP address option to Yes.

    Connectivity method
  6. At the bottom of the page select Review + create and wait for the server to be created (it may take several minutes). Once the deployment is complete, select Go to resource.

Next steps

In the next tutorials, you will use Python and Jupyter Notebooks in Visual Studio Code to connect to your database and execute SQL statements to create and populate tables with data, manipulate and query data and run aggregate functions.

You May Also Like