Tracon.SqlServer
1.0.0-preview.2
Prefix Reserved
See the version list below for details.
dotnet add package Tracon.SqlServer --version 1.0.0-preview.2
NuGet\Install-Package Tracon.SqlServer -Version 1.0.0-preview.2
<PackageReference Include="Tracon.SqlServer" Version="1.0.0-preview.2" />
<PackageVersion Include="Tracon.SqlServer" Version="1.0.0-preview.2" />
<PackageReference Include="Tracon.SqlServer" />
paket add Tracon.SqlServer --version 1.0.0-preview.2
#r "nuget: Tracon.SqlServer, 1.0.0-preview.2"
#:package Tracon.SqlServer@1.0.0-preview.2
#addin nuget:?package=Tracon.SqlServer&version=1.0.0-preview.2&prerelease
#tool nuget:?package=Tracon.SqlServer&version=1.0.0-preview.2&prerelease
Tracon.SqlServer
SQL Server persistence layer for Tracon.
Agent definitions, sessions, conversations, runs, events, workflows, job queue,
evaluation, quota, and webhook records are stored in a separate tracon
schema. The consumer's dbo schema is left untouched.
Setup
dotnet add package Tracon.SqlServer --prerelease
builder.AddTracon()
.UseSqlServer(builder.Configuration.GetConnectionString("Tracon")!);
With options:
builder.AddTracon()
.UseSqlServer(options =>
{
options.ConnectionString = "..."; // secret: user-secrets or an environment variable
options.SchemaName = "tracon";
options.CommandTimeoutSeconds = 30;
options.AutoApplyMigrations = true;
});
The connection string is a secret and is not written to a file. Use
dotnet user-secrets, an environment variable, or a secret manager.
Sharing a connection pool
Give DataSource instead of ConnectionString when your host already owns a
DbDataSource for the same database and you want Tracon's traffic on that
same pool:
options.DataSource = yourDbDataSource; // ConnectionString is then not required
Tracon never disposes an instance it did not build; the caller keeps
ownership. Microsoft.Data.SqlClient does not itself offer a DbDataSource
implementation (measured against version 7.0.2), so this is for a DbDataSource
adapter you write yourself — see Tracon.PostgreSql's
https://tracon.dev/guides/ef-core/ for the pattern.
Supported versions
| Environment | Status |
|---|---|
| SQL Server 2019+ | Supported, tested in CI (2022 image) |
| Azure SQL Database | Supported, not tested in CI — cannot be spun up via container |
| SQL Server 2017 and earlier | Not supported |
Migrations
Embedded .sql files are applied automatically at application startup. They are
protected with sp_getapplock: if multiple replicas start at the same time, only
one applies them.
In production you can disable auto-apply and run MigrationRunner as a separate
deployment step:
options.AutoApplyMigrations = false;
Migration numbers are per provider; they do not align with
Tracon.PostgreSql and are not meant to.
Read contract view
Set EnableReadViews = true to publish {schema}.runs_v1, a narrow, versioned,
read-only view over run data — query it with your own SQL or map it as an EF Core
keyless entity, without depending on the internal runs table shape. Off by
default; a deployment that never turns it on never sees the object. See
Read contract views for
the column list and the compatibility rule.
AOT
This package is not AOT-compatible: Microsoft.Data.SqlClient is not marked
for trimming. For setups that need AOT, use Tracon.PostgreSql.
Two providers at once
If UsePostgreSql() and UseSqlServer() are called in the same chain, the last
registration wins and a warning is logged at startup. This is a configuration
error; call only one of them.
Links
- Guide: https://tracon.dev/getting-started/persistence/
- Capability map: https://tracon.dev/capabilities/
- API reference: https://tracon.dev/api/
Licence: PolyForm Small Business 1.0.0 - free below 100 people and 1,000,000 USD (2019, inflation adjusted) revenue; a commercial licence applies above that. Terms ship in the package as LICENSE.md. Details: https://tracon.dev/reference/licensing/
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Data.SqlClient (>= 7.0.2)
- Tracon.Core (>= 1.0.0-preview.2)
-
net8.0
- Microsoft.Data.SqlClient (>= 7.0.2)
- Tracon.Core (>= 1.0.0-preview.2)
-
net9.0
- Microsoft.Data.SqlClient (>= 7.0.2)
- Tracon.Core (>= 1.0.0-preview.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-preview.3 | 48 | 9/24/2026 |
| 1.0.0-preview.2 | 75 | 9/20/2026 |
| 1.0.0-preview.1 | 56 | 9/20/2026 |