Full MSSQL support with Tiberius driver, including Azure SQL, indexed views, MERGE statements, and SQL Agent jobs.
Prax provides comprehensive Microsoft SQL Server support through the Tiberius async driver. This includes Azure SQL Database, Azure SQL Managed Instance, and on-premises SQL Server instances.
Full Azure SQL support with TLS and AAD authentication
Native upsert with MERGE and RETURNING via OUTPUT
Scheduled jobs via SQL Server Agent integration
Configure your MSSQL connection in prax.toml.
Supports both SQL authentication and Windows/Azure AD authentication.
Use MSSQL-specific data types with the @db. attribute.
| Prax Type | MSSQL Type | Notes |
|---|---|---|
String |
NVARCHAR(255) |
Use @db.NVarChar(Max) for unlimited |
Int |
INT |
@db.BigInt for larger values |
DateTime |
DATETIME2 |
Higher precision than DATETIME |
Decimal |
DECIMAL(18,2) |
Configurable precision/scale |
Bytes |
VARBINARY(MAX) |
Binary data storage |
MSSQL supports indexed views, which are materialized views with a clustered index. They're automatically updated when base tables change.
Note: Indexed views require SCHEMABINDING and have restrictions on
the types of queries they can contain. Prax automatically handles these requirements.
MSSQL uses the MERGE statement for upsert operations,
providing atomic insert-or-update functionality.
Get inserted/updated/deleted values back from DML statements using the OUTPUT clause.
MSSQL's CROSS APPLY and OUTER APPLY are equivalent to LATERAL joins in PostgreSQL.
Control locking behavior with MSSQL table hints.
Define and manage scheduled jobs that run on SQL Server Agent.
Configure read replicas and automatic failover with AlwaysOn.
| Feature | Status | Notes |
|---|---|---|
| Indexed Views | ✅ | Automatic maintenance |
| MERGE Statement | ✅ | Full upsert support |
| OUTPUT Clause | ✅ | INSERTED/DELETED access |
| CROSS/OUTER APPLY | ✅ | Lateral join equivalent |
| SQL Agent Jobs | ✅ | Scheduled tasks |
| AlwaysOn | ✅ | HA and read replicas |
| Row-Level Security | ✅ | Security predicates |
| Dynamic Data Masking | ✅ | Column masking |