Connecting to Microsoft Azure SQL
Azure SQL Server Requirements​
Microsoft Azure SQL Server uses the same Java Database Connectivity (JDBC) driver as Microsoft SQL Server (MSSQL). As long as you are able to connect to an MSSQL database in Ignition, you can use the same JDBC driver to connect to Azure SQL Server. The steps below will show you how to set up Ignition to connect to Azure SQL Server.
Connect Ignition to Azure SQL Server​
In this example, we are using SQL Authentication. For information on using Microsoft Entra ID (formerly Azure Active Directory) authentication with Java-based applications, see Microsoft's official documentation.
On the Gateway Webpage, go to the Config section.
Scroll down to Databases > Connections.
The Database Connections page is displayed. Click on Create new Database Connection...
Select Microsoft SQLServer, and click Next.
On the Database Connections page, enter the following information:
Name: The name of the connection. In this example, we are naming our connection AzureSQLServer.
Connect URL: The address that your Azure SQL Server instance is hosted on. In this example, we are using jdbc:sqlserver://sudev.database.windows.net:1433.
Username: The username of your database login credentials. In this example, we are using dev_admin@sudev.
Password: The password of your database login credentials.
Extra Connection Properties (Optional): Any other properties you may need to configure to connect to your Azure SQL Server instance will be listed here, such as the database name and SSL.
noteIn this example, we are using port 1433 to connect to our Azure instance. This is the default port Ignition uses and and is called Proxy since it uses Microsoft's proxy servers to connect. Connecting to an Azure SQL Server instance while using Microsoft's proxy servers is easier to configure as you only need to have one IP/port open. However, this method can increase latency and reduce throughput.
If you want to connect directly to your Azure SQL Server instance, you can instead use port 3306. This policy is called Redirect and requires many more open ports and IP addresses. However, since the connection is direct, performance will be much better with decreases in latency and increases in throughput.
You can learn more about Microsoft's proxy settings in their Azure SQL documentation.
At the bottom of the form, click in Create New Database Connection.
Your connection is now created. The Database Connections page is displayed and will show the status of Reconnecting, then Valid.
To display the details about the status of your database connection, see the Note on the above window and click on the Database Connection Status link.
Troubleshooting and Tips​
TCP/IP Communication​
If your database connection is not successfully connecting, you may need to check your TCP/IP settings. See Microsoft's documentation on configuring IP addresses for an Azure network interface.
Windows Firewall​
In some situations, you may need to configure your firewall to set up any required ports. Typically, ports 1433 and 1434 need to be open for TCP traffic, but other ports may also need to be configured, such as when connecting to your Azure SQL Server instance directly using port 3306.
JDBC Drivers​
When using a JDBC driver to connect Ignition to Azure SQL Server, there are two things you may need to check:
- Make sure your JDBC driver is up to date.
- Make sure the JDBC driver version you are using is the same as the Java version Ignition is using. Using an incompatible JDBC driver may result in Gateway errors and crashes.