> For the complete documentation index, see [llms.txt](https://docs.bindplane.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bindplane.com/integrations/sources/oracle-database.md).

# Oracle Database

The Oracle Database source collects telemetry from Oracle Database in two ways. It scrapes metrics from a database endpoint (host and port) using a monitoring user with read access to Oracle's dynamic performance views, and it tails Oracle's audit, alert, and listener log files from disk. Choose Metrics, Logs, or both.

### Supported Telemetry

| Platform | Metrics | Logs | Traces |
| -------- | ------- | ---- | ------ |
| Linux    | ✓       | ✓    |        |
| Windows  | ✓       | ✓    |        |
| macOS    | ✓       | ✓    |        |

### Prerequisites

#### Metrics

* A reachable Oracle Database endpoint (host and port, default `1521`) from the collector host.
* A way to identify the target database: a SID, a Service Name, or both.
* A monitoring user with the minimum read privileges the metric queries require. Use a dedicated least-privilege account, not an administrative one. Only the SYS user (or a user with the SYSDBA role) has access to the dynamic performance views by default, so the grants must be issued explicitly. Connect as a user with SYSDBA or SYSOPER and create the user, for example:

  ```sql
  -- Create the monitoring user "bindplane"
  CREATE USER bindplane IDENTIFIED BY <password>;

  -- Grant the required read permissions
  GRANT CONNECT TO bindplane;
  GRANT SELECT ON SYS.GV_$DATABASE to bindplane;
  GRANT SELECT ON SYS.GV_$INSTANCE to bindplane;
  GRANT SELECT ON SYS.GV_$PROCESS to bindplane;
  GRANT SELECT ON SYS.GV_$RESOURCE_LIMIT to bindplane;
  GRANT SELECT ON SYS.GV_$SYSMETRIC to bindplane;
  GRANT SELECT ON SYS.GV_$SYSSTAT to bindplane;
  GRANT SELECT ON SYS.GV_$SYSTEM_EVENT to bindplane;
  GRANT SELECT ON SYS.V_$RMAN_BACKUP_JOB_DETAILS to bindplane;
  GRANT SELECT ON SYS.V_$SORT_SEGMENT to bindplane;
  GRANT SELECT ON SYS.V_$TABLESPACE to bindplane;
  GRANT SELECT ON SYS.V_$TEMPFILE to bindplane;
  GRANT SELECT ON SYS.DBA_DATA_FILES to bindplane;
  GRANT SELECT ON SYS.DBA_FREE_SPACE to bindplane;
  GRANT SELECT ON SYS.DBA_TABLESPACE_USAGE_METRICS to bindplane;
  GRANT SELECT ON SYS.DBA_TABLESPACES to bindplane;
  GRANT SELECT ON SYS.GLOBAL_NAME to bindplane;
  ```
* If your database requires TLS through an Oracle Wallet, the wallet file must be present on the collector host. Provide its URL-encoded location with the Wallet parameter.

#### Logs

* The collector must run on a host with read access to the Oracle log files.
* The relevant logging must be enabled. Audit, alert, and listener logs are read from the file paths configured below. The defaults assume a standard `/u01/app/oracle` install layout; adjust them to match your Oracle home and diagnostic destination.

### Configuration

<figure><img src="/files/BmcyTTmRh040I0sv8tSA" alt="Bindplane docs - Oracle Database - image 1"><figcaption></figcaption></figure>

**General**

| Parameter             | Type               | Required | Default               | Description                                       |
| --------------------- | ------------------ | -------- | --------------------- | ------------------------------------------------- |
| Choose Telemetry Type | Telemetry Selector | No       | `["Logs", "Metrics"]` | Which signals to collect: Logs, Metrics, or both. |

**Logs**

| Parameter            | Type    | Required | Default                                                                    | Description                                                          |
| -------------------- | ------- | -------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| Audit Logs           | Boolean | No       | `true`                                                                     | Collect Oracle audit logs.                                           |
| Audit Log Path(s)    | Strings | Yes      | `/u01/app/oracle/product/*/dbhome_1/admin/*/adump/*.aud`                   | File paths to audit logs. Relevant when Audit Logs is enabled.       |
| Alert Logs           | Boolean | No       | `true`                                                                     | Collect Oracle alert logs.                                           |
| Alert Log Path(s)    | Strings | Yes      | `/u01/app/oracle/product/*/dbhome_1/diag/rdbms/*/*/trace/alert_*.log`      | File paths to alert logs. Relevant when Alert Logs is enabled.       |
| Listener Logs        | Boolean | No       | `true`                                                                     | Collect Oracle listener logs.                                        |
| Listener Log Path(s) | Strings | Yes      | `/u01/app/oracle/product/*/dbhome_1/diag/tnslsnr/*/listener/alert/log.xml` | File paths to listener logs. Relevant when Listener Logs is enabled. |

**Metrics**

| Parameter               | Type                    | Required | Default     | Description                                                                         |
| ----------------------- | ----------------------- | -------- | ----------- | ----------------------------------------------------------------------------------- |
| Host                    | String                  | No       | `localhost` | Host to scrape metrics from.                                                        |
| Port                    | Integer                 | No       | `1521`      | Port of host to scrape metrics from.                                                |
| Username                | String                  | Yes      | *(empty)*   | Database user to run metric queries with.                                           |
| Password                | String                  | No       | *(empty)*   | Password for the user. Stored as a secret.                                          |
| Database Identification | Enum: SID, Service Name | No       | `["SID"]`   | Use Site Identifier and/or Service Name to identify the database to scrape.         |
| SID                     | String                  | Yes      | *(empty)*   | OracleDB Site Identifier. Relevant when Database Identification includes SID.       |
| Service Name            | String                  | Yes      | *(empty)*   | OracleDB Service Name. Relevant when Database Identification includes Service Name. |

**Advanced**

| Parameter           | Type                 | Required | Default   | Description                                                              |
| ------------------- | -------------------- | -------- | --------- | ------------------------------------------------------------------------ |
| Start At            | Enum: beginning, end | No       | `end`     | Start reading logs from the beginning or the end of the file. Logs only. |
| Parse               | Boolean              | No       | `true`    | Parse the log fields into structured data. Logs only.                    |
| Collection Interval | Integer              | No       | `60`      | How often (seconds) to scrape for metrics. Metrics only.                 |
| Wallet              | String               | No       | *(empty)* | OracleDB Wallet file location, URL encoded. Metrics only.                |

### Examples

#### Collect metrics from a single instance by SID

Scrape metrics from a local Oracle instance identified by SID, using a dedicated monitoring user, leaving log collection off.

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Source
metadata:
  name: oracle-database
spec:
  type: oracledb
  parameters:
    - name: telemetry_types
      value: ["Metrics"]
    - name: host
      value: oracle.example.com
    - name: port
      value: 1521
    - name: username
      value: bindplane
    - name: password
      value: "<password>"
    - name: database_identification
      value: ["SID"]
    - name: sid
      value: ORCL
    - name: collection_interval
      value: 60
```

#### Collect audit, alert, and listener logs

Tail the three Oracle log types from their default paths and start reading at the end of each file.

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Source
metadata:
  name: oracle-database
spec:
  type: oracledb
  parameters:
    - name: telemetry_types
      value: ["Logs"]
    - name: enable_audit_log
      value: true
    - name: enable_alert_log
      value: true
    - name: enable_listener_log
      value: true
    - name: start_at
      value: end
```

### Configuration Tips

* Database Identification controls which identity parameter is required. Selecting SID requires the SID parameter; selecting Service Name requires the Service Name parameter. You can select both.
* Grant only the V$ and DBA view permissions for the metrics you actually collect. The dynamic performance views are SYS-owned, so each grant must be issued explicitly to the monitoring user.
* The default log paths assume a standard `/u01/app/oracle` install. If your Oracle home or diagnostic destination differs, update the audit, alert, and listener path globs to match.

### Troubleshooting

#### Cannot connect to the database

Symptoms: metrics are absent and the collector logs connection refused or timeout errors against the Oracle endpoint.

Solutions:

1. Confirm the host and port are correct and reachable from the collector host (default port `1521`).
2. Verify the Oracle listener is running and accepting connections, and that no firewall blocks the port.

#### Authentication or permission errors

Symptoms: the collector connects but metric queries fail with login or insufficient-privilege errors.

Solutions:

1. Verify the Username and Password, and that the SID or Service Name matches the target database.
2. Confirm the monitoring user holds SELECT on the required SYS-owned V$ and DBA views listed in Prerequisites.

#### No logs are collected

Symptoms: log telemetry is empty even though log collection is enabled.

Solutions:

1. Confirm the configured audit, alert, and listener log paths exist and resolve to real files on the collector host.
2. Verify the collector's user has read access to those files, and set Start At to `beginning` to read existing content.

### Standalone Source

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Source
metadata:
  name: oracle-database
spec:
  type: oracledb
  parameters:
    - name: telemetry_types
      value: ["Logs", "Metrics"]
    - name: host
      value: oracle.example.com
    - name: port
      value: 1521
    - name: username
      value: bindplane
    - name: password
      value: "<password>"
    - name: database_identification
      value: ["SID"]
    - name: sid
      value: ORCL
    - name: collection_interval
      value: 60
    - name: enable_audit_log
      value: true
    - name: audit_log_path
      value:
        - /u01/app/oracle/product/*/dbhome_1/admin/*/adump/*.aud
    - name: enable_alert_log
      value: true
    - name: alert_log_path
      value:
        - /u01/app/oracle/product/*/dbhome_1/diag/rdbms/*/*/trace/alert_*.log
    - name: enable_listener_log
      value: true
    - name: listener_log_path
      value:
        - /u01/app/oracle/product/*/dbhome_1/diag/tnslsnr/*/listener/alert/log.xml
    - name: start_at
      value: end
    - name: parse
      value: true
```

### Related Resources

* [Oracle Database: Data Dictionary and Dynamic Performance Views](https://docs.oracle.com/en/database/oracle/oracle-database/19/cncpt/data-dictionary-and-dynamic-performance-views.html)
* [OpenTelemetry Oracle DB Receiver (oracledbreceiver)](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/oracledbreceiver)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.bindplane.com/integrations/sources/oracle-database.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
