Class OracleDatasourceConnection
- Namespace
- YndigoBlue.Velocity.Data.Oracle
- Assembly
- YndigoBlue.Velocity.dll
Connection configuration for Oracle databases.
public class OracleDatasourceConnection : DatasourceConnection, IDatasourceConnection
- Inheritance
-
OracleDatasourceConnection
- Implements
Remarks
Warning
Oracle database support is not available in the Community Edition of Velocity. It requires the Full Edition.
Default port: 1521
Includes support for tablespaces and spatial tolerance settings.
SSL: Oracle uses the TCPS protocol for encrypted connections. ODP.NET has no connection-string parameters for certificate configuration, so SSL properties are treated as context settings rather than connection-string values — they do not appear in the ADO.NET connection string and cannot be set via SetAdvancedSettings(string).
When using this class directly, set SslMode,
SslCaPath, SslCertificatePath,
SslKeyPath, and UseIntegratedSecurity
as properties. Velocity builds the TCPS DATA SOURCE descriptor and injects the certificate
material via ODP.NET's OraclePEM API (requires Oracle.ManagedDataAccess.Core 23.26.2 or later).
When using a raw ADO.NET connection string, pass SSL properties via the
contextSettings parameter of Manager (e.g.
"SslMode=VerifyCA;SslCertificatePath=...;SslKeyPath=...;SslCaPath=...").
The connection string itself must already use PROTOCOL=TCPS in the DATA SOURCE descriptor.
Integrated security: UseIntegratedSecurity
sets User ID=/ and omits the password. Oracle interprets this as a request for external
authentication. The actual mechanism — OS authentication, Kerberos, RADIUS, Windows NTS, or
client certificate — is determined entirely by SQLNET.AUTHENTICATION_SERVICES in
sqlnet.ora on the client and server. Velocity does not configure the authentication
infrastructure itself.
Examples
// Connect to Oracle with TNS connection
var conn = new OracleDatasourceConnection
{
Hostname = "localhost",
Port = 1521,
Database = "ORCL",
Username = "system",
Password = "oracle"
};
using (var m = new Manager(conn))
{
var schema = m.LoadSchema("MYSCHEMA");
// Perform database operations
}
Properties
- DatasourceType
Gets the datasource type for Oracle.
- EscapeIdentifiers
Gets or sets whether Oracle identifiers (table names, column names) should be wrapped in double quotes. Only relevant when connecting to Oracle 19c or earlier. Defaults to
true.
- SslMode
Overrides the default Prefer to Disable for Oracle, since Prefer and Require are not supported.
- Tablespace
Gets or sets the tablespace for database objects.
- Tolerance
Gets or sets the tolerance for spatial operations.
- UseBooleanDataType
Gets or sets whether to use Oracle's native boolean data type (Oracle 23c+).