Skip to main content

Connect to Microsoft SQL Server

Securely connect your Hex workspace to your Microsoft SQL Server database.

info
  • Users need the Admin workspace role to create a shared workspace data connection.
  • Users need Can Edit or higher project permissions to create project data connections.

Microsoft SQL Server is a traditional relational database management system (RDBMS) designed primarily for transactional workloads like enterprise applications, ERP systems, and line-of-business software. SQL Server can run on-premises, in Azure as Azure SQL Database, or as a managed instance, and includes features for business intelligence, reporting (SQL Server Reporting Services), and data integration (SQL Server Integration Services).

SQL Server is a good choice operational data already lives there and you need to query or visualize it directly, particularly for small to medium-sized datasets or departmental analytics. However, it does have some limitations for analytical use cases:

  1. SQL Server is optimized for transactional processing (OLTP), not analytics (OLAP), so performance can suffer with large datasets, complex joins, or heavy aggregations.
  2. Unlike modern cloud data warehouses, it doesn't scale elastically. You're constrained by the resources of your database instance, which can impact query performance in Hex when multiple users are running analyses.

How to get set up

  1. Log into Microsoft SQL Server.
  2. Set up a service account for usage by Hex (instructions to create).
  3. In Hex, go to SettingsData sources.
  4. Click + Connection, select Microsoft SQL Server, and fill out the fields below.

Basic settings

  1. Name and Description - Set a display name and optional description to help identify your data connection.
  2. Host - The address of your Microsoft SQL Server database.
  3. Port - The port used for secure native connections to your Microsoft SQL Server database.
  4. Username - The username for the Microsoft SQL Server service account.
  5. Password - The password for the Microsoft SQL Server service account.
MS SQL Server data connection form

Additional settings

The data connection form includes several optional sections:

tip

If you use a firewall to restrict database access, you'll need to add Hex's IP addresses to your allowlist.