diff --git a/src/frontend/config/sidebar/integrations.topics.ts b/src/frontend/config/sidebar/integrations.topics.ts
index 7916f562..fdb4613b 100644
--- a/src/frontend/config/sidebar/integrations.topics.ts
+++ b/src/frontend/config/sidebar/integrations.topics.ts
@@ -505,7 +505,24 @@ export const integrationTopics: StarlightSidebarTopicsUserConfig = {
label: 'MySQL Pomelo',
slug: 'integrations/databases/efcore/mysql',
},
- { label: 'Oracle', slug: 'integrations/databases/efcore/oracle' },
+ {
+ label: 'Oracle',
+ collapsed: true,
+ items: [
+ {
+ label: 'Get started',
+ slug: 'integrations/databases/efcore/oracle/oracle-get-started',
+ },
+ {
+ label: 'Hosting integration (AppHost)',
+ slug: 'integrations/databases/efcore/oracle/oracle-host',
+ },
+ {
+ label: 'Client integration (Your app)',
+ slug: 'integrations/databases/efcore/oracle/oracle-client',
+ },
+ ],
+ },
{
label: 'PostgreSQL',
slug: 'integrations/databases/efcore/postgresql',
@@ -547,7 +564,6 @@ export const integrationTopics: StarlightSidebarTopicsUserConfig = {
},
],
},
- { label: 'Oracle', slug: 'integrations/databases/oracle' },
{
label: 'PostgreSQL',
collapsed: true,
diff --git a/src/frontend/src/content/docs/integrations/databases/efcore/oracle.mdx b/src/frontend/src/content/docs/integrations/databases/efcore/oracle.mdx
deleted file mode 100644
index f53257de..00000000
--- a/src/frontend/src/content/docs/integrations/databases/efcore/oracle.mdx
+++ /dev/null
@@ -1,336 +0,0 @@
----
-title: Aspire Oracle Entity Framework Core integration
-description: Learn how to use the Aspire Oracle Entity Framework Core integration, which includes both hosting and client integrations.
----
-
-import { Aside, Tabs, TabItem } from '@astrojs/starlight/components';
-import InstallPackage from '@components/InstallPackage.astro';
-import InstallDotNetPackage from '@components/InstallDotNetPackage.astro';
-import { Image } from 'astro:assets';
-import oracleIcon from '@assets/icons/oracle-icon.svg';
-
-
-
-[Oracle Database](https://www.oracle.com/database/technologies/) is a widely-used relational database management system owned and developed by Oracle. The Aspire Oracle Entity Framework Core integration enables you to connect to existing Oracle servers or create new servers from the Aspire AppHost.
-
-## Hosting integration
-
-The Aspire Oracle hosting integration models the server as the `OracleDatabaseServerResource` type and the database as the `OracleDatabaseResource` type. To access these types and APIs, add the [📦 Aspire.Oracle.EntityFrameworkCore](https://www.nuget.org/packages/Aspire.Oracle.EntityFrameworkCore) NuGet package in the [AppHost](/get-started/app-host/) project.
-
-
-
-### Add Oracle server and database resources
-
-In your AppHost project, call `AddOracle` to add and return an Oracle server resource builder. Chain a call to the returned resource builder to `AddDatabase`, to add an Oracle database to the server resource:
-
-```csharp title="C# — AppHost.cs"
-var builder = DistributedApplication.CreateBuilder(args);
-
-var oracle = builder.AddOracle("oracle")
- .WithLifetime(ContainerLifetime.Persistent);
-
-var oracledb = oracle.AddDatabase("oracledb");
-
-builder.AddProject()
- .WithReference(oracledb);
- .WaitFor(oracledb);
-
-// After adding all resources, run the app...
-```
-
-> [!NOTE]
-> The Oracle database container can be slow to start, so it's best to use a _persistent_ lifetime to avoid unnecessary restarts.
-
-When Aspire adds a container image to the AppHost, as shown in the preceding example with the `container-registry.oracle.com/database/free` image, it creates a new Oracle server on your local machine. A reference to your Oracle resource builder (the `oracle` variable) is used to add a database. The database is named `oracledb` and then added to the `ExampleProject`. The Oracle resource includes a random `password` generated using the `CreateDefaultPasswordParameter` method.
-
-The `WithReference` method configures a connection in the `ExampleProject` named `"oracledb"`.md#container-resource-lifecycle).
-
-> [!TIP]
-> If you'd rather connect to an existing Oracle server, call `AddConnectionString` instead. For more information, see [Adding resources and wiring dependencies](/architecture/resource-model/#adding-resources-and-wiring-dependencies).
-
-### Add Oracle resource with password parameter
-
-The Oracle resource includes default credentials with a random password. Oracle supports configuration-based default passwords by using the environment variable `ORACLE_PWD`. When you want to provide a password explicitly, you can provide it as a parameter:
-
-```csharp title="C# — AppHost.cs"
-var password = builder.AddParameter("password", secret: true);
-
-var oracle = builder.AddOracle("oracle", password)
- .WithLifetime(ContainerLifetime.Persistent);
-
-var oracledb = oracle.AddDatabase("oracledb");
-
-var myService = builder.AddProject()
- .WithReference(oracledb)
- .WaitFor(oracledb);
-```
-
-The preceding code gets a parameter to pass to the `AddOracle` API, and internally assigns the parameter to the `ORACLE_PWD` environment variable of the Oracle container. The `password` parameter is usually specified as a _user secret_:
-
-
-
- ```json title='~/.microsoft/usersecrets//secrets.json'
- {
- "Parameters": {
- "password": "Non-default-P@ssw0rd"
- }
- }
- ```
-
-
- ```json title='~/.microsoft/usersecrets//secrets.json'
- {
- "Parameters": {
- "password": "Non-default-P@ssw0rd"
- }
- }
- ```
-
-
- ```json title='%APPDATA%\Microsoft\UserSecrets\\secrets.json'
- {
- "Parameters": {
- "password": "Non-default-P@ssw0rd"
- }
- }
- ```
-
-
-
-> [!TIP]
-> To find the ``, open the `.csproj` file of your AppHost project and look for the `UserSecretsId` property.
-
-### Add Oracle resource with data volume
-
-To add a data volume to the Oracle resource, call the `WithDataVolume` method:
-
-```csharp title="C# — AppHost.cs"
-var builder = DistributedApplication.CreateBuilder(args);
-
-var oracle = builder.AddOracle("oracle")
- .WithDataVolume()
- .WithLifetime(ContainerLifetime.Persistent);
-
-var oracledb = oracle.AddDatabase("oracle");
-
-builder.AddProject()
- .WithReference(oracledb)
- .WaitFor(oracledb);
-
-// After adding all resources, run the app...
-```
-
-The data volume is used to persist the Oracle data outside the lifecycle of its container. The data volume is mounted at the `/opt/oracle/oradata` path in the Oracle container and when a `name` parameter isn't provided, the name is generated at random. For more information on data volumes and details on why they're preferred over [bind mounts](#add-oracle-resource-with-data-bind-mount), see [Docker docs: Volumes](https://docs.docker.com/engine/storage/volumes).
-
-:::danger
-The password is stored in the data volume. When using a data volume and if the password changes, it will not work until you delete the volume.
-:::
-
-### Add Oracle resource with data bind mount
-
-To add a data bind mount to the Oracle resource, call the `WithDataBindMount` method:
-
-```csharp title="C# — AppHost.cs"
-var builder = DistributedApplication.CreateBuilder(args);
-
-var oracle = builder.AddOracle("oracle")
- .WithDataBindMount(source: @"C:\Oracle\Data");
-
-var oracledb = oracle.AddDatabase("oracledb");
-
-builder.AddProject()
- .WithReference(oracledb)
- .WaitFor(oracledb);
-
-// After adding all resources, run the app...
-```
-
-> [!IMPORTANT]
-> Data [bind mounts](https://docs.docker.com/engine/storage/bind-mounts/) have limited functionality compared to [volumes](https://docs.docker.com/engine/storage/volumes/), which offer better performance, portability, and security, making them more suitable for production environments. However, bind mounts allow direct access and modification of files on the host system, ideal for development and testing where real-time changes are needed.
-
-Data bind mounts rely on the host machine's filesystem to persist the Oracle data across container restarts. The data bind mount is mounted at the `C:\Oracle\Data` on Windows (or `/Oracle/Data` on Unix) path on the host machine in the Oracle container. For more information on data bind mounts, see [Docker docs: Bind mounts](https://docs.docker.com/engine/storage/bind-mounts).
-
-### Hosting integration health checks
-
-The Oracle hosting integration automatically adds a health check for the Oracle resource. The health check verifies that the Oracle server is running and that a connection can be established to it.
-
-The hosting integration relies on the [📦 AspNetCore.HealthChecks.Oracle](https://www.nuget.org/packages/AspNetCore.HealthChecks.Oracle) NuGet package.
-
-## Client integration
-
-You need an Oracle database and connection string for accessing the database. To get started with the Aspire Oracle client integration, install the [📦 Aspire.Oracle.EntityFrameworkCore](https://www.nuget.org/packages/Aspire.Microsoft.Data.SqlClient) NuGet package in the client-consuming project, that is, the project for the application that uses the Oracle client. The Oracle client integration registers a `System.Data.Entity.DbContext` instance that you can use to interact with Oracle.
-
-
-
-### Add Oracle client
-
-In the `Program.cs` file of your client-consuming project, call the `AddOracleDatabaseDbContext` extension method on any `IHostApplicationBuilder` to register a `DbContext` for use via the dependency injection container. The method takes a connection name parameter.
-
-```csharp
-builder.AddOracleDatabaseDbContext(
- connectionName: "oracledb");
-```
-
-> [!TIP]
-> The `connectionName` parameter must match the name used when adding the Oracle database resource in the AppHost project. In other words, when you call `AddDatabase` and provide a name of `oracledb` that same name should be used when calling `AddOracleDatabaseDbContext`. For more information, see [Add Oracle server and database resources](#add-oracle-server-and-database-resources).
-
-You can then retrieve the `DbContext` instance using dependency injection. For example, to retrieve the connection from an example service:
-
-```csharp
-public class ExampleService(ExampleDbContext context)
-{
- // Use database context...
-}
-```
-
-For more information on dependency injection, see [.NET dependency injection](https://learn.microsoft.com/dotnet/core/extensions/dependency-injection).
-
-### Enrich Oracle database context
-
-You may prefer to use the standard Entity Framework method to obtain a database context and add it to the dependency injection container:
-
-```csharp
-builder.Services.AddDbContext(options =>
- options.UseOracle(builder.Configuration.GetConnectionString("oracledb")
- ?? throw new InvalidOperationException("Connection string 'oracledb' not found.")));
-```
-
-> [!NOTE]
-> The connection string name that you pass to the `GetConnectionString` method must match the name used when adding the Oracle resource in the AppHost project. For more information, see [Add Oracle server and database resources](#add-oracle-server-and-database-resources).
-
-You have more flexibility when you create the database context in this way, for example:
-
-- You can reuse existing configuration code for the database context without rewriting it for Aspire.
-- You can use Entity Framework Core interceptors to modify database operations.
-- You can choose not to use Entity Framework Core context pooling, which may perform better in some circumstances.
-
-If you use this method, you can enhance the database context with Aspire-style retries, health checks, logging, and telemetry features by calling the `EnrichOracleDatabaseDbContext` method:
-
-```csharp
-builder.EnrichOracleDatabaseDbContext(
- configureSettings: settings =>
- {
- settings.DisableRetry = false;
- settings.CommandTimeout = 30 // seconds
- });
-```
-
-The `settings` parameter is an instance of the `OracleEntityFrameworkCoreSettings` class.
-
-### Configuration
-
-The Aspire Oracle Entity Framework Core integration provides multiple configuration approaches and options to meet the requirements and conventions of your project.
-
-#### Use a connection string
-
-When using a connection string from the `ConnectionStrings` configuration section, you provide the name of the connection string when calling `builder.AddOracleDatabaseDbContext()`:
-
-```csharp
-builder.AddOracleDatabaseDbContext("oracleConnection");
-```
-
-The connection string is retrieved from the `ConnectionStrings` configuration section:
-
-```json
-{
- "ConnectionStrings": {
- "oracleConnection": "Data Source=TORCL;User Id=OracleUser;Password=Non-default-P@ssw0rd;"
- }
-}
-```
-
-The `EnrichOracleDatabaseDbContext` won't make use of the `ConnectionStrings` configuration section since it expects a `DbContext` to be registered at the point it is called.
-
-For more information, see the [ODP.NET documentation](https://www.oracle.com/database/technologies/appdev/dotnet/odp.html).
-
-#### Use configuration providers
-
-The Aspire Oracle Entity Framework Core integration supports `Microsoft.Extensions.Configuration` from configuration files such as `appsettings.json` by using the `Aspire:Oracle:EntityFrameworkCore` key. If you have set up your configurations in the `Aspire:Oracle:EntityFrameworkCore` section you can just call the method without passing any parameter.
-
-The following is an example of an `appsettings.json` that configures some of the available options:
-
-```json title="JSON — appsettings.json"
-{
- "Aspire": {
- "Oracle": {
- "EntityFrameworkCore": {
- "DisableHealthChecks": true,
- "DisableTracing": true,
- "DisableRetry": false,
- "CommandTimeout": 30
- }
- }
- }
-}
-```
-
-> [!TIP]
-> The `CommandTimeout` property is in seconds. When set as shown in the preceding example, the timeout is 30 seconds.
-
-#### Use inline delegates
-
-You can also pass the `Action` delegate to set up some or all the options inline, for example to disable health checks from code:
-
-```csharp
-builder.AddOracleDatabaseDbContext(
- "oracle",
- static settings => settings.DisableHealthChecks = true);
-```
-
-— or —
-
-```csharp
-builder.EnrichOracleDatabaseDbContext(
- static settings => settings.DisableHealthChecks = true);
-```
-
-#### Configuration options
-
-Here are the configurable options with corresponding default values:
-
-| Name | Description |
-|-----------------------|--------------------------------------------------------------------------------------|
-| `ConnectionString` | The connection string of the Oracle database to connect to. |
-| `DisableHealthChecks` | A boolean value that indicates whether the database health check is disabled or not. |
-| `DisableTracing` | A boolean value that indicates whether the OpenTelemetry tracing is disabled or not. |
-| `DisableRetry` | A boolean value that indicates whether command retries should be disabled or not. |
-| `CommandTimeout` | The time in seconds to wait for the command to execute. |
-
-By default, the Aspire Oracle Entity Framework Core integration handles the following:
-
-- Checks if the `OracleEntityFrameworkCoreSettings.DisableHealthChecks` is `true`.
-- If so, adds the [`DbContextHealthCheck`](https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks/blob/master/src/HealthChecks.NpgSql/NpgSqlHealthCheck.cs), which calls EF Core's `CanConnectAsync` method. The name of the health check is the name of the `TContext` type.
-
-#### Logging
-
-The Aspire Oracle Entity Framework Core integration uses the following log categories:
-
-- `Microsoft.EntityFrameworkCore.ChangeTracking`
-- `Microsoft.EntityFrameworkCore.Database.Command`
-- `Microsoft.EntityFrameworkCore.Database.Connection`
-- `Microsoft.EntityFrameworkCore.Database.Transaction`
-- `Microsoft.EntityFrameworkCore.Infrastructure`
-- `Microsoft.EntityFrameworkCore.Migrations`
-- `Microsoft.EntityFrameworkCore.Model`
-- `Microsoft.EntityFrameworkCore.Model.Validation`
-- `Microsoft.EntityFrameworkCore.Query`
-- `Microsoft.EntityFrameworkCore.Update`
-
-#### Tracing
-
-The Aspire Oracle Entity Framework Core integration will emit the following tracing activities using OpenTelemetry:
-
-- `OpenTelemetry.Instrumentation.EntityFrameworkCore`
-
-#### Metrics
-
-The Aspire Oracle Entity Framework Core integration currently supports the following metrics:
-
-- `Microsoft.EntityFrameworkCore`
diff --git a/src/frontend/src/content/docs/integrations/databases/oracle.mdx b/src/frontend/src/content/docs/integrations/databases/efcore/oracle/oracle-client.mdx
similarity index 50%
rename from src/frontend/src/content/docs/integrations/databases/oracle.mdx
rename to src/frontend/src/content/docs/integrations/databases/efcore/oracle/oracle-client.mdx
index b7e1ee5c..0030fc8a 100644
--- a/src/frontend/src/content/docs/integrations/databases/oracle.mdx
+++ b/src/frontend/src/content/docs/integrations/databases/efcore/oracle/oracle-client.mdx
@@ -1,6 +1,7 @@
---
-title: Oracle integration
-description: Learn how to use the Oracle database integration with Entity Framework Core, which includes both hosting and client integrations.
+title: Oracle Client integration reference
+description: Learn how to use the Aspire Oracle Client integration to interact with Oracle databases from your Aspire projects.
+next: false
---
import { Aside } from '@astrojs/starlight/components';
@@ -18,141 +19,89 @@ import oracleIcon from '@assets/icons/oracle-icon.svg';
data-zoom-off
/>
-[Oracle Database](https://www.oracle.com/database/technologies/) is a widely-used relational database management system owned and developed by Oracle. The Aspire Oracle integration enables you to connect to existing Oracle servers or create new servers from Aspire with the `container-registry.oracle.com/database/free` container image.
+To get started with the Aspire Oracle integrations, follow the [Get started with Oracle integrations](../oracle-get-started/) guide.
-## Hosting integration
+This article includes full details about the Aspire Oracle Client integration, which allows you to connect to and interact with Oracle databases from your Aspire consuming projects.
-The Aspire Oracle hosting integration models the server as the `OracleDatabaseServerResource` type and the database as the `OracleDatabaseResource` type. To access these types and APIs, add the [📦 Aspire.Hosting.Oracle](https://www.nuget.org/packages/Aspire.Hosting.Oracle) NuGet package in the AppHost project:
+## Installation
-
-
-### Add Oracle server and database resources
-
-In the AppHost project, call `AddOracle` to add and return an Oracle server resource builder. Chain a call to the returned resource builder to `AddDatabase`, to add an Oracle database to the server resource:
-
-```csharp title="C# — AppHost.cs"
-var builder = DistributedApplication.CreateBuilder(args);
+You need an Oracle database and connection string for accessing the database. To get started with the Aspire Oracle client integration, install the [📦 Aspire.Oracle.EntityFrameworkCore](https://www.nuget.org/packages/Aspire.Oracle.EntityFrameworkCore) NuGet package in the client-consuming project, that is, the project for the application that uses the Oracle client. The Oracle client integration registers a `DbContext` instance that you can use to interact with Oracle.
-var oracle = builder.AddOracle("oracle")
- .WithLifetime(ContainerLifetime.Persistent);
+
-var oracledb = oracle.AddDatabase("oracledb");
+## Add Oracle client
-builder.AddProject()
- .WithReference(oracledb)
- .WaitFor(oracledb);
+In the `Program.cs` file of your client-consuming project, call the `AddOracleDatabaseDbContext` extension method on any `IHostApplicationBuilder` to register a `DbContext` for use via the dependency injection container. The method takes a connection name parameter.
-// After adding all resources, run the app...
+```csharp title="C# — Program.cs"
+builder.AddOracleDatabaseDbContext(connectionName: "oracledb");
```
-
-
-When Aspire adds a container image to the AppHost, as shown in the preceding example with the `container-registry.oracle.com/database/free` image, it creates a new Oracle server on your local machine. A reference to your Oracle resource builder (the `oracle` variable) is used to add a database. The database is named `oracledb` and then added to the `ExampleProject`. The Oracle resource includes a random `password` generated using the `CreateDefaultPasswordParameter` method.
-
-The `WithReference` method configures a connection in the `ExampleProject` named `"oracledb"`. For more information, see [Container resource lifecycle](/architecture/resource-model/#built-in-resources-and-lifecycle).
-
-### Add Oracle resource with password parameter
-
-The Oracle resource includes default credentials with a random password. Oracle supports configuration-based default passwords by using the environment variable `ORACLE_PWD`. When you want to provide a password explicitly, you can provide it as a parameter:
-
-```csharp
-var password = builder.AddParameter("password", secret: true);
-
-var oracle = builder.AddOracle("oracle", password)
- .WithLifetime(ContainerLifetime.Persistent);
-
-var oracledb = oracle.AddDatabase("oracledb");
-
-var myService = builder.AddProject()
- .WithReference(oracledb)
- .WaitFor(oracledb);
-```
-
-The preceding code gets a parameter to pass to the `AddOracle` API, and internally assigns the parameter to the `ORACLE_PWD` environment variable of the Oracle container. The `password` parameter is usually specified as a user secret:
+You can then retrieve the `DbContext` instance using dependency injection. For example, to retrieve the connection from an example service:
-```json
+```csharp title="C# — ExampleService.cs"
+public class ExampleService(ExampleDbContext context)
{
- "Parameters": {
- "password": "Non-default-P@ssw0rd"
- }
+ // Use database context...
}
```
-For more information, see [External parameters](/get-started/resources/).
-
-### Add Oracle resource with data volume
-
-To add a data volume to the Oracle resource, call the `WithDataVolume` method:
-
-```csharp title="C# — AppHost.cs"
-var builder = DistributedApplication.CreateBuilder(args);
-
-var oracle = builder.AddOracle("oracle")
- .WithDataVolume()
- .WithLifetime(ContainerLifetime.Persistent);
+For more information on dependency injection, see [.NET dependency injection](https://learn.microsoft.com/dotnet/core/extensions/dependency-injection).
-var oracledb = oracle.AddDatabase("oracle");
+## Enrich Oracle database context
-builder.AddProject()
- .WithReference(oracledb)
- .WaitFor(oracledb);
+You may prefer to use the standard Entity Framework method to obtain a database context and add it to the dependency injection container:
-// After adding all resources, run the app...
+```csharp title="C# — Program.cs"
+builder.Services.AddDbContext(options =>
+ options.UseOracle(builder.Configuration.GetConnectionString("oracledb")
+ ?? throw new InvalidOperationException("Connection string 'oracledb' not found.")));
```
-The data volume is used to persist the Oracle data outside the lifecycle of its container. The data volume is mounted at the `/opt/oracle/oradata` path in the Oracle container and when a `name` parameter isn't provided, the name is generated at random. For more information on data volumes and details on why they're preferred over [bind mounts](#add-oracle-resource-with-data-bind-mount), see [Docker docs: Volumes](https://docs.docker.com/engine/storage/volumes).
-
-:::danger
-The password is stored in the data volume. When using a data volume and if the password changes, it will not work until you delete the volume.
-:::
-
-### Add Oracle resource with data bind mount
-
-To add a data bind mount to the Oracle resource, call the `WithDataBindMount` method:
-
-```csharp title="C# — AppHost.cs"
-var builder = DistributedApplication.CreateBuilder(args);
+
-var oracle = builder.AddOracle("oracle")
- .WithDataBindMount(source: @"C:\Oracle\Data");
+You have more flexibility when you create the database context in this way, for example:
-var oracledb = oracle.AddDatabase("oracledb");
+- You can reuse existing configuration code for the database context without rewriting it for Aspire.
+- You can use Entity Framework Core interceptors to modify database operations.
+- You can choose not to use Entity Framework Core context pooling, which may perform better in some circumstances.
-builder.AddProject()
- .WithReference(oracledb)
- .WaitFor(oracledb);
+If you use this method, you can enhance the database context with Aspire-style retries, health checks, logging, and telemetry features by calling the `EnrichOracleDatabaseDbContext` method:
-// After adding all resources, run the app...
+```csharp title="C# — Program.cs"
+builder.EnrichOracleDatabaseDbContext(
+ configureSettings: settings =>
+ {
+ settings.DisableRetry = false;
+ settings.CommandTimeout = 30 // seconds
+ });
```
-
+The `settings` parameter is an instance of the `OracleEntityFrameworkCoreSettings` class.
+## Properties of the Oracle resources
-### Connection properties
+When you use the `WithReference` method to pass an Oracle server or database resource from the AppHost project to a consuming client project, several properties are available to use in the consuming project.
-When you reference an Oracle database resource using `WithReference`, the following connection properties are made available to the consuming project:
+Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `db1` becomes `DB1_URI`.
-#### Oracle database server
+### Oracle database server
The Oracle database server resource exposes the following connection properties:
-| Property Name | Description |
-|---------------|-------------|
-| `Host` | The hostname or IP address of the Oracle server |
-| `Port` | The port number the Oracle server is listening on |
-| `Username` | The username for authentication |
-| `Password` | The password for authentication |
-| `Uri` | The connection URI in oracle:// format, with the format `oracle://{Username}:{Password}@{Host}:{Port}` |
+| Property Name | Description |
+| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `Host` | The hostname or IP address of the Oracle server |
+| `Port` | The port number the Oracle server is listening on |
+| `Username` | The username for authentication |
+| `Password` | The password for authentication |
+| `Uri` | The connection URI in oracle:// format, with the format `oracle://{Username}:{Password}@{Host}:{Port}` |
| `JdbcConnectionString` | JDBC-format connection string, with the format `jdbc:oracle:thin:@//{Host}:{Port}`. User and password credentials are provided as separate `Username` and `Password` properties. |
**Example connection strings:**
@@ -162,15 +111,15 @@ Uri: oracle://system:p%40ssw0rd1@localhost:1521
JdbcConnectionString: jdbc:oracle:thin:@//localhost:1521
```
-#### Oracle database
+### Oracle database
The Oracle database resource inherits all properties from its parent `OracleDatabaseServerResource` and adds:
-| Property Name | Description |
-|---------------|-------------|
-| `Uri` | The connection URI in oracle:// format, with the format `oracle://{Username}:{Password}@{Host}:{Port}/{DatabaseName}` |
+| Property Name | Description |
+| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `Uri` | The connection URI in oracle:// format, with the format `oracle://{Username}:{Password}@{Host}:{Port}/{DatabaseName}` |
| `JdbcConnectionString` | JDBC connection string with database name, with the format `jdbc:oracle:thin:@//{Host}:{Port}/{DatabaseName}`. User and password credentials are provided as separate `Username` and `Password` properties. |
-| `DatabaseName` | The name of the database |
+| `DatabaseName` | The name of the database |
**Example connection strings:**
@@ -183,89 +132,21 @@ JdbcConnectionString: jdbc:oracle:thin:@//localhost:1521/FREEPDB1
Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `db1` becomes `DB1_URI`.
-### Hosting integration health checks
-
-The Oracle hosting integration automatically adds a health check for the Oracle resource. The health check verifies that the Oracle server is running and that a connection can be established to it.
-
-The hosting integration relies on the [📦 AspNetCore.HealthChecks.Oracle](https://www.nuget.org/packages/AspNetCore.HealthChecks.Oracle) NuGet package.
-
-## Client integration
-
-You need an Oracle database and connection string for accessing the database. To get started with the Aspire Oracle client integration, install the [📦 Aspire.Oracle.EntityFrameworkCore](https://www.nuget.org/packages/Aspire.Oracle.EntityFrameworkCore) NuGet package in the client-consuming project, that is, the project for the application that uses the Oracle client. The Oracle client integration registers a `DbContext` instance that you can use to interact with Oracle.
-
-
-
-### Add Oracle client
-
-In the `Program.cs` file of your client-consuming project, call the `AddOracleDatabaseDbContext` extension method on any `IHostApplicationBuilder` to register a `DbContext` for use via the dependency injection container. The method takes a connection name parameter.
-
-```csharp
-builder.AddOracleDatabaseDbContext(connectionName: "oracledb");
-```
-
-
-
-You can then retrieve the `DbContext` instance using dependency injection. For example, to retrieve the connection from an example service:
-
-```csharp
-public class ExampleService(ExampleDbContext context)
-{
- // Use database context...
-}
-```
-
-For more information on dependency injection, see [.NET dependency injection](https://learn.microsoft.com/dotnet/core/extensions/dependency-injection).
-
-### Enrich Oracle database context
-
-You may prefer to use the standard Entity Framework method to obtain a database context and add it to the dependency injection container:
-
-```csharp
-builder.Services.AddDbContext(options =>
- options.UseOracle(builder.Configuration.GetConnectionString("oracledb")
- ?? throw new InvalidOperationException("Connection string 'oracledb' not found.")));
-```
-
-
-
-You have more flexibility when you create the database context in this way, for example:
-
-- You can reuse existing configuration code for the database context without rewriting it for Aspire.
-- You can use Entity Framework Core interceptors to modify database operations.
-- You can choose not to use Entity Framework Core context pooling, which may perform better in some circumstances.
-
-If you use this method, you can enhance the database context with Aspire-style retries, health checks, logging, and telemetry features by calling the `EnrichOracleDatabaseDbContext` method:
-
-```csharp
-builder.EnrichOracleDatabaseDbContext(
- configureSettings: settings =>
- {
- settings.DisableRetry = false;
- settings.CommandTimeout = 30 // seconds
- });
-```
-
-The `settings` parameter is an instance of the `OracleEntityFrameworkCoreSettings` class.
-
-### Configuration
+## Configuration
The Aspire Oracle Entity Framework Core integration provides multiple configuration approaches and options to meet the requirements and conventions of your project.
-#### Use a connection string
+### Use a connection string
When using a connection string from the `ConnectionStrings` configuration section, you provide the name of the connection string when calling `builder.AddOracleDatabaseDbContext()`:
-```csharp
+```csharp title="C# — Program.cs"
builder.AddOracleDatabaseDbContext("oracleConnection");
```
The connection string is retrieved from the `ConnectionStrings` configuration section:
-```json
+```json title="JSON — appsettings.json"
{
"ConnectionStrings": {
"oracleConnection": "Data Source=TORCL;User Id=OracleUser;Password=Non-default-P@ssw0rd;"
@@ -277,13 +158,13 @@ The `EnrichOracleDatabaseDbContext` won't make use of the `ConnectionStrings` co
For more information, see the [ODP.NET documentation](https://www.oracle.com/database/technologies/appdev/dotnet/odp.html).
-#### Use configuration providers
+### Use configuration providers
The Aspire Oracle Entity Framework Core integration supports `Microsoft.Extensions.Configuration` from configuration files such as `appsettings.json` by using the `Aspire:Oracle:EntityFrameworkCore` key. If you have set up your configurations in the `Aspire:Oracle:EntityFrameworkCore` section you can just call the method without passing any parameter.
The following is an example of an `appsettings.json` that configures some of the available options:
-```json
+```json title="JSON — appsettings.json"
{
"Aspire": {
"Oracle": {
@@ -302,11 +183,11 @@ The following is an example of an `appsettings.json` that configures some of the
The `CommandTimeout` property is in seconds. When set as shown in the preceding example, the timeout is 30 seconds.
-#### Use inline delegates
+### Use inline delegates
You can also pass the `Action` delegate to set up some or all the options inline, for example to disable health checks from code:
-```csharp
+```csharp title="C# — Program.cs"
builder.AddOracleDatabaseDbContext(
"oracle",
static settings => settings.DisableHealthChecks = true);
@@ -314,12 +195,12 @@ builder.AddOracleDatabaseDbContext(
or
-```csharp
+```csharp title="C# — Program.cs"
builder.EnrichOracleDatabaseDbContext(
static settings => settings.DisableHealthChecks = true);
```
-#### Configuration options
+### Configuration options
Here are the configurable options with corresponding default values:
@@ -331,18 +212,20 @@ Here are the configurable options with corresponding default values:
| `DisableRetry` | A boolean value that indicates whether command retries should be disabled or not. |
| `CommandTimeout` | The time in seconds to wait for the command to execute. |
-### Client integration health checks
+## Client integration health checks
-By default, Aspire client integrations have health checks enabled for all services. Similarly, many Aspire hosting integrations also enable health check endpoints.
+By default, Aspire integrations enable [health checks](/fundamentals/health-checks/) for all services. For more information, see [Aspire integrations overview](/integrations/overview/).
By default, the Aspire Oracle Entity Framework Core integration handles the following:
- Checks if the `OracleEntityFrameworkCoreSettings.DisableHealthChecks` is `true`.
- If so, adds the `DbContextHealthCheck`, which calls EF Core's `CanConnectAsync` method. The name of the health check is the name of the `TContext` type.
-### Observability and telemetry
+## Observability and telemetry
+
+Aspire integrations automatically set up Logging, Tracing, and Metrics configurations, which are sometimes known as *the pillars of observability*. Depending on the backing service, some integrations may only support some of these features. For example, some integrations support logging and tracing, but not metrics. Telemetry features can also be disabled using the techniques presented in the [Configuration](#configuration) section.
-#### Logging
+### Logging
The Aspire Oracle Entity Framework Core integration uses the following log categories:
@@ -357,13 +240,13 @@ The Aspire Oracle Entity Framework Core integration uses the following log categ
- `Microsoft.EntityFrameworkCore.Query`
- `Microsoft.EntityFrameworkCore.Update`
-#### Tracing
+### Tracing
The Aspire Oracle Entity Framework Core integration will emit the following tracing activities using OpenTelemetry:
- `OpenTelemetry.Instrumentation.EntityFrameworkCore`
-#### Metrics
+### Metrics
The Aspire Oracle Entity Framework Core integration currently supports the following metrics:
diff --git a/src/frontend/src/content/docs/integrations/databases/efcore/oracle/oracle-get-started.mdx b/src/frontend/src/content/docs/integrations/databases/efcore/oracle/oracle-get-started.mdx
new file mode 100644
index 00000000..6dbb80e0
--- /dev/null
+++ b/src/frontend/src/content/docs/integrations/databases/efcore/oracle/oracle-get-started.mdx
@@ -0,0 +1,308 @@
+---
+title: Get started with the Oracle integrations
+description: Learn how to set up the Aspire Oracle Hosting and Client integrations simply.
+prev: false
+---
+
+import { Image } from 'astro:assets';
+import { Kbd } from 'starlight-kbd/components';
+import InstallPackage from '@components/InstallPackage.astro';
+import InstallDotNetPackage from '@components/InstallDotNetPackage.astro';
+import { Aside, CardGrid, LinkCard, Code, Steps, Tabs, TabItem } from '@astrojs/starlight/components';
+import PivotSelector from '@components/PivotSelector.astro';
+import Pivot from '@components/Pivot.astro';
+import ThemeImage from '@components/ThemeImage.astro';
+import oracleIcon from '@assets/icons/oracle-icon.svg';
+
+
+
+[Oracle Database](https://www.oracle.com/database/technologies/) is a widely-used relational database management system owned and developed by Oracle. The Aspire Oracle integration enables you to connect to existing Oracle servers or create new servers from Aspire with the [`container-registry.oracle.com/database/free` container image](https://container-registry.oracle.com/).
+
+In this introduction, you'll see how to install and use the Aspire Oracle integrations in a simple configuration. If you already have this knowledge, see [Oracle Hosting integration](../oracle-host/) for full reference details.
+
+
+
+## Set up hosting integration
+
+To begin, install the Aspire Oracle Hosting integration in your Aspire AppHost project. This integration allows you to create and manage Oracle database instances from your Aspire hosting projects:
+
+
+
+Next, in the AppHost project, create instances of Oracle server and database resources, then pass the database to the consuming client projects:
+
+
+
+
+
+```csharp title="C# — AppHost.cs"
+var builder = DistributedApplication.CreateBuilder(args);
+
+var oracle = builder.AddOracle("oracle")
+ .WithLifetime(ContainerLifetime.Persistent);
+
+var oracledb = oracle.AddDatabase("oracledb");
+
+var exampleProject = builder.AddProject("apiservice")
+ .WaitFor(oracledb)
+ .WithReference(oracledb);
+```
+
+
+
+
+
+```csharp title="C# — AppHost.cs"
+var builder = DistributedApplication.CreateBuilder(args);
+
+var oracle = builder.AddOracle("oracle")
+ .WithLifetime(ContainerLifetime.Persistent);
+
+var oracledb = oracle.AddDatabase("oracledb");
+
+var exampleProject = builder.AddUvicornApp("api", "./api", "main.app")
+ .WithExternalHttpEndpoints()
+ .WaitFor(oracledb)
+ .WithReference(oracledb);
+```
+
+
+
+
+
+```csharp title="C# — AppHost.cs"
+var builder = DistributedApplication.CreateBuilder(args);
+
+var oracle = builder.AddOracle("oracle")
+ .WithLifetime(ContainerLifetime.Persistent);
+
+var oracledb = oracle.AddDatabase("oracledb");
+
+var api = builder.AddNodeApp("api", "./api", scriptPath: "index.js")
+ .WithExternalHttpEndpoints()
+ .WaitFor(oracledb)
+ .WithReference(oracledb);
+```
+
+
+
+
+
+## Use the integration in client projects
+
+Now that the hosting integration is ready, the next step is to install and configure the client integration in any projects that need to use it.
+
+### Set up client projects
+
+
+
+In each of these consuming client projects, install the Aspire Oracle Entity Framework Core client integration:
+
+
+
+In the `Program.cs` file of your client-consuming project, call the `AddOracleDatabaseDbContext` extension method on any `IHostApplicationBuilder` to register a `DbContext` for use via the dependency injection container. The method takes a connection name parameter.
+
+```csharp title="C# — Program.cs"
+builder.AddOracleDatabaseDbContext(connectionName: "oracledb");
+```
+
+
+
+
+
+
+
+To interact with Oracle databases in your Python consuming projects, you need to include an Oracle database driver. The most popular option is `oracledb` (formerly known as cx_Oracle), which is Oracle's official Python driver. You can install this library using pip:
+
+```bash
+pip install oracledb
+```
+
+Ensure that you `import oracledb` in code files that interact with the database. You should also import the `os` module to access environment variables:
+
+```python title="Python - Import oracledb"
+import oracledb
+import os
+```
+
+
+
+
+
+To interact with Oracle databases in your JavaScript consuming projects, you need to include an Oracle database driver. The official option is `oracledb`, which is Oracle's Node.js driver. You can install this library using npm:
+
+```bash
+npm install oracledb
+```
+
+Ensure that you `import oracledb` in code files that interact with the database:
+
+```javascript title="JavaScript - Import oracledb"
+const oracledb = require('oracledb');
+```
+
+
+
+### Use injected Oracle properties
+
+In the AppHost, when you used the `WithReference` method to pass an Oracle database resource to a consuming client project, Aspire injects several configuration properties that you can use in the consuming project.
+
+Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `oracledb` becomes `ORACLEDB_URI`.
+
+
+
+Use the `GetValue()` method to obtain these environment variables in consuming projects:
+
+```csharp title="C# - Obtain configuration properties"
+string oracleHost = builder.Configuration.GetValue("ORACLEDB_HOST");
+string oraclePort = builder.Configuration.GetValue("ORACLEDB_PORT");
+string oracleJDBCConnectionString = builder.Configuration.GetValue("ORACLEDB_JDBCCONNECTIONSTRING");
+```
+
+
+
+
+
+Use the `os.getenv()` method to obtain these environment variables in consuming projects:
+
+```python title="Python - Obtain configuration properties"
+oracle_host = os.getenv("ORACLEDB_HOST")
+oracle_port = os.getenv("ORACLEDB_PORT")
+oracle_jdbc_connection_string = os.getenv("ORACLEDB_JDBCCONNECTIONSTRING")
+```
+
+
+
+
+
+Use the `process.env` method to obtain these environment variables in consuming projects:
+
+```javascript title="JavaScript - Obtain configuration properties"
+const oracleHost = process.env.ORACLEDB_HOST;
+const oraclePort = process.env.ORACLEDB_PORT;
+const oracleJDBCConnectionString = process.env.ORACLEDB_JDBCCONNECTIONSTRING;
+```
+
+
+
+
+
+### Use Oracle resources in client code
+
+
+
+Now that you've added `DbContext` to the builder in the consuming project, you can use the Oracle database to get and store data. Get the `DbContext` instance using dependency injection. For example, to retrieve your context object from an example service define it as a constructor parameter and ensure the `ExampleService` class is registered with the dependency injection container:
+
+```csharp title="C# — ExampleService.cs"
+public class ExampleService(ExampleDbContext context)
+{
+ // Use database context...
+}
+```
+
+Having obtained the context, you can work with the Oracle database using Entity Framework Core as you would in any other C# application.
+
+
+
+
+
+Use the information you have obtained about the Oracle resource to connect to the database. Here is an example of how to connect using `oracledb`:
+
+```python title="Python - Connect to Oracle"
+# Parse the connection URI
+# Format: oracle://username:password@host:port/service_name
+import re
+match = re.match(r'oracle://([^:]+):([^@]+)@([^:]+):(\d+)/(.+)', connection_uri)
+if match:
+ username = match.group(1)
+ password = match.group(2)
+ host = match.group(3)
+ port = int(match.group(4))
+ service_name = match.group(5)
+
+ # Create connection
+ connection = oracledb.connect(
+ user=username,
+ password=password,
+ dsn=f"{host}:{port}/{service_name}"
+ )
+ cursor = connection.cursor()
+```
+
+Having obtained the connection, you can work with the Oracle database as you would in any other Python application.
+
+
+
+
+
+Use the information you have obtained about the Oracle resource to connect to the database. Here is an example of how to connect using `oracledb`:
+
+```javascript title="JavaScript - Connect to Oracle"
+// Parse the connection URI
+// Format: oracle://username:password@host:port/service_name
+const url = require('url');
+const parsedUri = new url.URL(connectionUri);
+
+const config = {
+ user: parsedUri.username,
+ password: parsedUri.password,
+ connectString: `${parsedUri.hostname}:${parsedUri.port}${parsedUri.pathname}`
+};
+
+// Create connection
+let connection;
+try {
+ connection = await oracledb.getConnection(config);
+ console.log('Successfully connected to Oracle Database');
+ // Use connection...
+} catch (err) {
+ console.error(err);
+} finally {
+ if (connection) {
+ await connection.close();
+ }
+}
+```
+
+Having obtained the connection, you can work with the Oracle database as you would in any other JavaScript application.
+
+
+
+## Next steps
+
+Now, that you have an Aspire app with Oracle integrations up and running, you can use the following reference documents to learn how to configure and interact with the Oracle resources:
+
+
+
+
+
diff --git a/src/frontend/src/content/docs/integrations/databases/efcore/oracle/oracle-host.mdx b/src/frontend/src/content/docs/integrations/databases/efcore/oracle/oracle-host.mdx
new file mode 100644
index 00000000..24968388
--- /dev/null
+++ b/src/frontend/src/content/docs/integrations/databases/efcore/oracle/oracle-host.mdx
@@ -0,0 +1,216 @@
+---
+title: Oracle Hosting integration reference
+description: Learn how to use the Aspire Oracle Hosting integration to orchestrate and configure Oracle databases in your Aspire projects.
+---
+
+import { Aside } from '@astrojs/starlight/components';
+import InstallPackage from '@components/InstallPackage.astro';
+import { Image } from 'astro:assets';
+import oracleIcon from '@assets/icons/oracle-icon.svg';
+
+
+
+To get started with the Aspire Oracle integrations, follow the [Get started with Oracle integrations](../oracle-get-started/) guide.
+
+This article includes full details about the Aspire Oracle Hosting integration, which models Oracle server and database resources as the `OracleDatabaseServerResource` and `OracleDatabaseResource` types. To access these types and APIs, you need to install the Oracle Hosting integration in your AppHost project.
+
+## Installation
+
+The Aspire Oracle hosting integration models various Oracle resources as the following types:
+
+- `OracleDatabaseServerResource`
+- `OracleDatabaseResource`
+
+To access these types and APIs for expressing them as resources in your AppHost project, install the [📦 Aspire.Hosting.Oracle](https://www.nuget.org/packages/Aspire.Hosting.Oracle) NuGet package:
+
+
+
+## Add Oracle server and database resources
+
+In the AppHost project, call `AddOracle` to add and return an Oracle server resource builder. Chain a call to the returned resource builder to `AddDatabase`, to add an Oracle database to the server resource:
+
+```csharp title="C# — AppHost.cs"
+var builder = DistributedApplication.CreateBuilder(args);
+
+var oracle = builder.AddOracle("oracle")
+ .WithLifetime(ContainerLifetime.Persistent);
+
+var oracledb = oracle.AddDatabase("oracledb");
+
+builder.AddProject()
+ .WithReference(oracledb)
+ .WaitFor(oracledb);
+
+// After adding all resources, run the app...
+```
+
+
+
+When Aspire adds a container image to the AppHost, as shown in the preceding example with the `container-registry.oracle.com/database/free` image, it creates a new Oracle server on your local machine. A reference to your Oracle resource builder (the `oracle` variable) is used to add a database. The database is named `oracledb` and then added to the `ExampleProject`. The Oracle resource includes a random `password` generated using the `CreateDefaultPasswordParameter` method.
+
+The `WithReference` method configures a connection in the `ExampleProject` named `"oracledb"`. For more information, see [Container resource lifecycle](/architecture/resource-model/#built-in-resources-and-lifecycle).
+
+
+
+## Add Oracle resource with password parameter
+
+The Oracle resource includes default credentials with a random password. Oracle supports configuration-based default passwords by using the environment variable `ORACLE_PWD`. When you want to provide a password explicitly, you can provide it as a parameter:
+
+```csharp title="C# — AppHost.cs"
+var builder = DistributedApplication.CreateBuilder(args);
+
+var password = builder.AddParameter("password", secret: true);
+
+var oracle = builder.AddOracle("oracle", password)
+ .WithLifetime(ContainerLifetime.Persistent);
+
+var oracledb = oracle.AddDatabase("oracledb");
+
+var myService = builder.AddProject()
+ .WithReference(oracledb)
+ .WaitFor(oracledb);
+```
+
+The preceding code gets a parameter to pass to the `AddOracle` API, and internally assigns the parameter to the `ORACLE_PWD` environment variable of the Oracle container. The `password` parameter is usually specified as a user secret:
+
+```json title="JSON — secrets.json"
+{
+ "Parameters": {
+ "password": "Non-default-P@ssw0rd"
+ }
+}
+```
+
+For more information, see [External parameters](/get-started/resources/).
+
+## Add Oracle resource with data volume
+
+To add a data volume to the Oracle resource, call the `WithDataVolume` method:
+
+```csharp title="C# — AppHost.cs"
+var builder = DistributedApplication.CreateBuilder(args);
+
+var oracle = builder.AddOracle("oracle")
+ .WithDataVolume()
+ .WithLifetime(ContainerLifetime.Persistent);
+
+var oracledb = oracle.AddDatabase("oracledb");
+
+builder.AddProject()
+ .WithReference(oracledb)
+ .WaitFor(oracledb);
+
+// After adding all resources, run the app...
+```
+
+The data volume is used to persist the Oracle data outside the lifecycle of its container. The data volume is mounted at the `/opt/oracle/oradata` path in the Oracle container and when a `name` parameter isn't provided, the name is generated at random. For more information on data volumes and details on why they're preferred over [bind mounts](#add-oracle-resource-with-data-bind-mount), see [Docker docs: Volumes](https://docs.docker.com/engine/storage/volumes).
+
+:::danger
+The password is stored in the data volume. When using a data volume and if the password changes, it will not work until you delete the volume.
+:::
+
+## Add Oracle resource with data bind mount
+
+To add a data bind mount to the Oracle resource, call the `WithDataBindMount` method:
+
+```csharp title="C# — AppHost.cs"
+var builder = DistributedApplication.CreateBuilder(args);
+
+var oracle = builder.AddOracle("oracle")
+ .WithDataBindMount(source: @"C:\Oracle\Data");
+
+var oracledb = oracle.AddDatabase("oracledb");
+
+builder.AddProject()
+ .WithReference(oracledb)
+ .WaitFor(oracledb);
+
+// After adding all resources, run the app...
+```
+
+
+
+## Using with non-.NET applications
+
+When you use the `WithReference` method to pass an Oracle database resource to a non-.NET application (such as Python or JavaScript), Aspire automatically injects environment variables that describe the connection information.
+
+For example, if you reference an Oracle database resource named `oracledb`:
+
+```csharp title="C# — AppHost.cs"
+var oracle = builder.AddOracle("oracle");
+var oracledb = oracle.AddDatabase("oracledb");
+
+var pythonApp = builder.AddUvicornApp("api", "./api", "main.app")
+ .WithReference(oracledb);
+```
+
+The following environment variables are available in the Python application:
+
+- `ConnectionStrings__oracledb` - The connection string for the Oracle database
+- `ORACLEDB_HOST` - The hostname of the Oracle server
+- `ORACLEDB_PORT` - The port number
+- `ORACLEDB_USERNAME` - The username for authentication
+- `ORACLEDB_PASSWORD` - The password for authentication
+- `ORACLEDB_URI` - The connection URI in oracle:// format
+- `ORACLEDB_JDBCCONNECTIONSTRING` - JDBC-format connection string
+- `ORACLEDB_DATABASENAME` - The database name
+
+You can access these environment variables in your application code:
+
+```python title="Python example"
+import oracledb
+import os
+
+# Get connection properties
+host = os.getenv("ORACLEDB_HOST")
+port = os.getenv("ORACLEDB_PORT")
+username = os.getenv("ORACLEDB_USERNAME")
+password = os.getenv("ORACLEDB_PASSWORD")
+service_name = os.getenv("ORACLEDB_DATABASENAME")
+
+# Create connection
+connection = oracledb.connect(
+ user=username,
+ password=password,
+ dsn=f"{host}:{port}/{service_name}"
+)
+```
+
+```javascript title="JavaScript example"
+const oracledb = require('oracledb');
+
+// Get connection properties
+const host = process.env.ORACLEDB_HOST;
+const port = process.env.ORACLEDB_PORT;
+const user = process.env.ORACLEDB_USERNAME;
+const password = process.env.ORACLEDB_PASSWORD;
+const serviceName = process.env.ORACLEDB_DATABASENAME;
+
+// Create connection
+const connection = await oracledb.getConnection({
+ user: user,
+ password: password,
+ connectString: `${host}:${port}/${serviceName}`
+});
+```
+
+## Hosting integration health checks
+
+The Oracle hosting integration automatically adds a health check for the Oracle resource. The health check verifies that the Oracle server is running and that a connection can be established to it.
+
+The hosting integration relies on the [📦 AspNetCore.HealthChecks.Oracle](https://www.nuget.org/packages/AspNetCore.HealthChecks.Oracle) NuGet package.
diff --git a/src/frontend/src/content/docs/integrations/databases/efcore/overview.mdx b/src/frontend/src/content/docs/integrations/databases/efcore/overview.mdx
index 715726fe..2400468d 100644
--- a/src/frontend/src/content/docs/integrations/databases/efcore/overview.mdx
+++ b/src/frontend/src/content/docs/integrations/databases/efcore/overview.mdx
@@ -53,7 +53,7 @@ import sqlIcon from '@assets/icons/sql-icon.png';
title="Oracle"
description="Entity Framework Core integration for Oracle Database"
icon={oracleIcon}
- href="/integrations/databases/efcore/oracle/"
+ href="/integrations/databases/efcore/oracle/oracle-client/"
/>