Skip to main content

Overview

OpenSRE connects to Azure SQL to diagnose database alerts — checking server health, finding slow queries, monitoring resource usage, and analyzing wait stats to pinpoint bottlenecks. Uses ODBC (ODBC Driver 18 for SQL Server by default).

Prerequisites

  • An Azure SQL Database instance
  • Network connectivity from your OpenSRE environment to your Azure SQL server (firewall / VNet)
  • SQL authentication username and password
  • Server hostname (for example myserver.database.windows.net)

Setup

Option 1: Interactive CLI

Option 2: Environment variables

Option 3: Persistent store

Credentials

Finding your connection details

  1. Open the Azure Portal
  2. Navigate to your SQL Database resource
  3. Copy Server name from the overview panel (add .database.windows.net if needed)

Network access: Firewall

  1. In Azure Portal, go to your SQL server → SecurityFirewalls and virtual networks
  2. Add your OpenSRE environment’s IP address
  3. Or enable Allow Azure services and resources to access this server if running in Azure
If you’re not sure of your IP, start with a permissive rule temporarily, get OpenSRE working, then lock it down.

Investigation tools

Verify

Expected output:

Troubleshooting

Security

  • Use a dedicated read-only SQL user for OpenSRE — avoid admin credentials.
  • Keep encryption enabled (AZURE_SQL_ENCRYPT=true) in production.
  • Restrict firewall rules to the OpenSRE environment’s egress IP.
  • Store credentials in .env or the integration store, never in source code.