Tracon.SqlServer 1.0.0-preview.3

Prefix Reserved
This is a prerelease version of Tracon.SqlServer.
dotnet add package Tracon.SqlServer --version 1.0.0-preview.3
                    
NuGet\Install-Package Tracon.SqlServer -Version 1.0.0-preview.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Tracon.SqlServer" Version="1.0.0-preview.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Tracon.SqlServer" Version="1.0.0-preview.3" />
                    
Directory.Packages.props
<PackageReference Include="Tracon.SqlServer" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Tracon.SqlServer --version 1.0.0-preview.3
                    
#r "nuget: Tracon.SqlServer, 1.0.0-preview.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Tracon.SqlServer@1.0.0-preview.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Tracon.SqlServer&version=1.0.0-preview.3&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Tracon.SqlServer&version=1.0.0-preview.3&prerelease
                    
Install as a Cake Tool

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 apply migrations as a separate deployment step — with tracon migrate, or by calling ApplyAsync() on the registered IMigrationApplier:

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.

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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