Microsoft Azure SQL Database

Connecting to Microsoft Azure SQL database.

This tutorial shows you how to create and configure an SQL cloud database for your Microsoft Azure account, construct firewall rules for it, and how to connect it with API Express.

The first step is to create a Microsoft Azure account if you don't have one already.

Creating Microsoft Azure Account

  1. Open the link https://portal.azure.com. Log in with your account credentials; if you do not have it you will need to create one.
  2. In order to create a cloud SQL database, on the left panel click Create a resource > SQL Database:
1144
  1. In the pop-up list, fill in the required fields with your parameters. Start with the DB name, then configure the required Server settings.
  2. Click on Create a new server in the pop-up list and enter the new server name (you can also select an existing server). Add an admin login and password, then choose the server location. Finally, click OK:
729

🚧

Server name

Remember the full name of the server you have just created as you will need it later for configuring the Appery.io API Express database connection.

  1. Proceed to the Networking tab.
  2. Check the Public endpoint option in the Network connectivity section.
  3. Select Yes for Allow Azure services and resources to access this server.
  4. Select the TLS 1.0 for the Minimum TLS version and go to the Additional settings tab:
496
  1. Select the Sample for the Use existing data.
  2. Click the Review + create button:
735
  1. Finally, confirm creating your SQL Database by clicking on the Create button.

How to Configure Firewall Rules

  1. Open the just created DB.
  2. Note your Server Name (you can copy it to clipboarcd) as this will be used as the Hostof your database connection and then click the Set server firewall button:
1376
  1. Add firewall rules, using the IP addresses listed in the Exposing Your Database to API Express document:
623
  1. Save.

👍

Database created

After a few minutes your rules will have been applied, and you will have successfully created/setup a Microsoft Azure SQL server and a SQL database in the Microsoft Manuals.

Creating API Express Database Connection

  1. Login to your Appery.io account.
  2. In the Visual App Builder, go to the API Express tab and click Create new DB Connection. Fill in all of the required information and enter the name.
  3. In the next window, add your Database connection name, set the Connection type to Relational database, then select the SGL Server as Database Type, and add the Host.

📘

Host

The host value is the name you created above: your_server_name.database.windows.net.

  1. Define the Port = 1433, Database Name, Username and password. Those are for your Microsoft Azure SQL Database created earlier.
  2. Click Save.
  3. Define the ssl=request;sslProtocol=TLSv1.0 for Connection properties.

📘

Ports

1433 is the default port for Microsoft Azure SQL DB Server.

  1. To ensure that the API Express connection can access your Microsoft Azure SQL database click Test, then Save:
615