M
Meza AI

🗃️ MS SQL Server Connection

Connect Microsoft SQL Server or Azure SQL to Meza AI.

Overview

Connect your Microsoft SQL Server or Azure SQL Database to Meza AI. This integration supports SQL Server 2016+ and Azure SQL Database, covering both on-premises and cloud deployments.

Prerequisites

  • SQL Server 2016+ or Azure SQL Database
  • SQL authentication credentials with read access
  • Network access (configure firewall rules for Azure)
  • TCP/IP protocol enabled (for on-premises)

Connection Steps

1

Navigate to Databases

Go to ConfigurationDatabases in the left sidebar.

2

Select MS SQL Server

Click Add Connection and select MS SQL Server.

3

Enter Connection Details

Fill in server hostname, port, database, username, and password.

4

Configure Encryption

Enable TLS encryption for secure connections (recommended).

5

Test & Save

Click Test Connection then Save.

Connection Parameters

ParameterDescriptionExample
HostServer hostname or IPserver.database.windows.net
PortSQL Server port (default: 1433)1433
DatabaseDatabase namemyapp_production
UsernameSQL login usernamemeza_readonly
PasswordSQL login password********
EncryptEnable TLS encryptionYes
Trust Server CertificateTrust self-signed certsNo

⚠️ Warning

Always create a dedicated read-only SQL login for Meza AI.

Creating a Read-Only User

Run these T-SQL commands to create a read-only user:

-- Create a login at server level
CREATE LOGIN meza_readonly WITH PASSWORD = 'YourSecurePassword123!';

-- Switch to your database
USE your_database;

-- Create a user for the login
CREATE USER meza_readonly FOR LOGIN meza_readonly;

-- Grant read-only access
ALTER ROLE db_datareader ADD MEMBER meza_readonly;

Azure SQL Database

For Azure SQL Database, additional configuration is required:

Firewall Rules

  1. Go to your Azure SQL Server in the Azure Portal
  2. Click Networking under Security
  3. Add Meza AI IP addresses to the firewall rules:
    34.102.136.180
    35.247.10.205
  4. Click Save

Connection String Format

Azure SQL uses this hostname format:

your-server-name.database.windows.net

On-Premises SQL Server

For on-premises SQL Server installations:

  • Enable TCP/IP protocol in SQL Server Configuration Manager
  • Configure Windows Firewall to allow port 1433
  • Enable SQL Server Authentication (mixed mode)
  • Consider using an SSH tunnel for secure access

Troubleshooting

Connection Timeout

  • Verify firewall rules allow Meza AI IPs
  • Check that TCP/IP is enabled
  • Ensure SQL Server Browser service is running (for named instances)

Login Failed

  • Verify SQL authentication is enabled
  • Double-check username and password
  • Ensure the login is mapped to the database

What's Next?