Overview
This article explains how to configure a Red Lion / HMS device running Crimson® 3.2 to connect to a Microsoft Azure SQL Database. Azure SQL can be used as a cloud-hosted data repository for applications requiring centralized storage and access to production, process, or operational data. Azure SQL configuration requires administrative access during setup.
Applicable Products
- CR3000 Series HMIs
- Graphite® HMIs
- DA30D Data Stations
- DA50 and DA70 Controllers
- FlexEdge® devices with the appropriate licensing
SQL functionality is supported in Crimson 3.x on these platforms.
Prerequisites
Software
- Crimson® 3.2
- Microsoft Azure Subscription
- Azure SQL Database
- SQL Server Management Studio (SSMS) for verification and testing
Network Requirements
The Crimson device must be able to communicate with:
- Azure SQL Database server hostname
- TCP Port 1433
Example Azure SQL server address:
Step 1: Create an Azure SQL Database
- Log into the Azure Portal.
- Select Create Resource > Azure SQL Database.
- Enter:
- Database Name
- Server Name
- Region
- Administrator Login
- Administrator Password
- Complete the deployment.
Record the following:
- Server Name (example:
mydatabase.database.windows.net) - Database Name
- SQL Username
- SQL Password
Step 2: Configure Azure SQL Firewall Rules
By default, Azure SQL blocks incoming connections.
- Open the Azure SQL Database resource.
- Navigate to Networking.
- Add the public IP address of the network where the Crimson device is installed.
- Save the configuration.
If the device is located behind a corporate firewall, ensure outbound TCP Port 1433 traffic is permitted.
Step 3: Verify Connectivity
From a PC on the same network as the Crimson device:
Confirm the hostname resolves successfully.
Using SQL Server Management Studio, connect with:
Successful connection confirms that DNS resolution, firewall settings, and credentials are configured correctly.
Step 4: Configure the SQL Connection in Crimson
Within Crimson 3.2:
- Navigate to SQL Queries.
- Set Enable SQL Queries to Yes.
- Configure the SQL Server connection settings:
| Setting | Value |
|---|---|
| Server Address | Azure SQL server hostname |
| TCP Port | 1433 |
| Username | Azure SQL login |
| Password | Azure SQL password |
| Database Name | Target database |
Use the fully qualified Azure SQL server name rather than an IP address. Azure SQL uses DNS-based connectivity. It is recommended to create a string tag with the source as General and the FQDN as its properties. See images below for example.
Troubleshooting
Connection Failure
Verify:
- Azure SQL firewall rules
- TCP Port 1433 access
- Correct server name
- Correct username and password
- Internet connectivity from the Crimson device
- Check TLS Support setting in SQL Queries
DNS Resolution Failure
Verify the device has access to a valid DNS server and confirm the Azure SQL hostname can be resolved.
Authentication Errors
Ensure:
- SQL Authentication is being used
- The login has access to the target database
- The username and password are entered correctly
Security Recommendations
- Create a dedicated SQL account for Crimson communications.
- Restrict Azure SQL firewall access to known public IP addresses only.
- Use strong passwords and rotate credentials according to company policy.
- Avoid using administrator credentials for routine device access.
References
- Crimson 3.x: SQL Queries
- How To: Connect Crimson to Microsoft SQL Server
- Please contact technical support if you require additional assistance using this link: HMS Support Portal
© HMS Networks AB 2026