ADO.NET database configuration
Orleans keeps its ADO.NET schema scripts beside each provider’s source. Run the main script before the capability scripts. Use scripts from the same Orleans release as the packages deployed by the application.
Driver invariants
Section titled “Driver invariants”| Database | Driver package | Orleans invariant |
|---|---|---|
| SQL Server | Microsoft.Data.SqlClient | Microsoft.Data.SqlClient |
| PostgreSQL | Npgsql | Npgsql |
| MySQL/MariaDB | MySql.Data | MySql.Data.MySqlClient |
| Oracle | Oracle.ManagedDataAccess.Core | Oracle.DataAccess.Client |
Main scripts
Section titled “Main scripts”- SQL Server
- PostgreSQL
- MySQL/MariaDB
- Oracle
- SQLite for supported local persistence scenarios
Clustering
Section titled “Clustering”Persistence
Section titled “Persistence”Reminders
Section titled “Reminders”Grain directory scripts
Section titled “Grain directory scripts”Not every capability supports every database. The presence of a script in the provider directory is the authoritative support signal for that Orleans release.
Apply and upgrade schemas
Section titled “Apply and upgrade schemas”- Back up application data according to the database recovery policy.
- Apply the main script for a new database.
- Apply the script for each configured Orleans capability.
- Review and apply scripts under the provider’s
Migrationsdirectory when upgrading from an older schema. - Validate with a staging cluster using the same driver and database engine version.
Production database layout
Section titled “Production database layout”The supplied scripts are a starting schema, not a universal production
database layout. They create unqualified table names in the database user’s
default schema, and the ADO.NET providers do not expose schema or filegroup
configuration. A production deployment may choose a dedicated schema,
filegroups, partitioning, or other database-specific storage features, but
those choices must be implemented in the database deployment and kept
consistent with the queries stored in OrleansQuery. Preserve the table names,
columns, parameters, and result shapes expected by the provider, and validate
the customized scripts and queries with a staging cluster before rollout.
See Configure ADO.NET providers for host configuration.
