> ## Documentation Index
> Fetch the complete documentation index at: https://docs.genloop.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Oracle

> Connect an Oracle database to Genloop with host, port, a service name or SID, and read-only credentials, optionally through an SSH tunnel.

Genloop connects to Oracle over a direct database connection using a read-only user. You identify the target instance by either a service name or a SID.

## Before you connect

* An Oracle user with read access to the tables you want to query.
* The instance's **service name** (modern, multitenant databases) or **SID** (legacy, single-instance databases). Provide one.
* Network access from Genloop. If the database is behind a firewall, allow Genloop's regional IP address. See [Before you begin](/using-genloop/connections/connect-a-database#before-you-begin).

## Connection fields

| Field               | Description                                                             |
| ------------------- | ----------------------------------------------------------------------- |
| **Connection name** | A name to identify this connection in Genloop                           |
| **Host**            | Hostname or IP address of your Oracle server                            |
| **Port**            | The port your Oracle server listens on. Defaults to `1521`              |
| **Username**        | Oracle user Genloop connects as                                         |
| **Password**        | Password for that user                                                  |
| **Service name**    | Service name of the target instance. Provide this or a SID              |
| **SID**             | System identifier for a legacy instance. Provide this or a service name |

## Connect through an SSH tunnel

If the database is not reachable directly, reach it through a bastion or jump host. Turn on **Connect via SSH tunnel** in the connection form and complete these fields.

| Field                   | Description                                                                                 |
| ----------------------- | ------------------------------------------------------------------------------------------- |
| **SSH host**            | Public IP or DNS of the bastion. Cannot be `localhost`                                      |
| **SSH port**            | SSH port on the bastion. Default is `22`                                                    |
| **SSH username**        | User Genloop signs in to the bastion as                                                     |
| **PEM key**             | Your private key file. Sent encrypted with the rest of the credentials                      |
| **Remote bind address** | Database host as seen from the bastion. Use `127.0.0.1` if the database runs on the bastion |
| **Remote bind port**    | Database port as reached from the bastion                                                   |

## Permissions

Genloop only reads your data and never writes to your database. You can connect with any user that already has permission to sign in and read the tables you select.

If you want a dedicated read-only user for Genloop, ask your database administrator to set one up.

<Accordion title="Minimal read-only grant (for your database administrator)">
  Run this in your Oracle database:

  ```sql theme={null}
  GRANT CREATE SESSION TO genloop_user;
  GRANT SELECT ON your_schema.your_table TO genloop_user;
  ```
</Accordion>

## Next steps

<CardGroup cols={2}>
  <Card title="Connect a database" icon="database" href="/using-genloop/connections/connect-a-database">
    Back to the full connection flow.
  </Card>

  <Card title="Context Hub" icon="brain" href="/using-genloop/context-hub">
    View and edit the memory built from your connection.
  </Card>
</CardGroup>
