Supported versions
Bytebase supports Oracle Database 11g and later. It connects through a built-in driver, so there is no Oracle Client, Instant Client, or JDBC driver to install.Create a user for Bytebase
Create the user in the database Bytebase connects to, which is the pluggable database you enter as Service name. Grant it broad privileges so that Bytebase can manage the schemas there. The examples name the userbytebase.
ORA-00988: missing or invalid passwords.
On Amazon RDS for Oracle, the master user can’t grant ALL PRIVILEGES, because RDS withholds GRANT ANY PRIVILEGE from it. Grant the DBA role instead:
Connection details
Hostname
The host name or IP address of the Oracle listener, such asdb.example.com. For a RAC cluster, enter the SCAN name, as described in Connect to RAC and Data Guard. For a TCPS connection, it must also be one of the names in the server’s certificate, as described in Step 1.
Port
The listener port. Oracle’s default is1521. A TCPS listener has its own port, often 2484.
Username
The Oracle account Bytebase connects as. Leave it empty only for certificate login.Password
The account’s password. You can also read it from a secret manager. With a wallet that stores the password, you can leave this field empty.Connect using
Choose how the listener identifies the database:- Service name: the database service, such as a pluggable database (
FREEPDB1) or a service your DBA created (sales.example.com). Use a service name to reach a pluggable database. - SID: the instance’s system identifier, such as
ORCL.
TLS
Bytebase does not use the TLS settings for Oracle, so leave TLS mode at Disabled. To encrypt the connection, use an Oracle wallet as described in Connect over TCPS with an Oracle wallet.Extra Parameters
Options that Bytebase passes to its built-in driver, go-ora, as key-value pairs. Click Add parameter to add one. Keys aren’t case-sensitive, except forCONNECTION TIMEOUT. The wallet keys are listed in Step 3. The keys for a second address and a connection timeout are listed in Data Guard.
Connect over TCPS with an Oracle wallet
Requires self-hosted Bytebase 3.5.1 or later. Bytebase reads the wallet from its own file system, which Bytebase Cloud doesn’t provide.
How wallets work
An Oracle wallet is a directory of certificate files. The client wallet you give Bytebase can hold three kinds of entries:- Trusted certificates: the server’s certificate, or the certificate authority (CA) that signed it. Every wallet needs one so that Bytebase can verify the server. A wallet with only trusted certificates gives you one-way TLS.
- A client certificate and its private key: needed when the listener requires client certificates, which is called mutual TLS (mTLS). Bytebase presents the certificate automatically. Autonomous Database wallets include one.
- Stored passwords: database logins saved with
mkstore, which Bytebase can use instead of the Password field.
cwallet.sso, the auto-login file, or ewallet.p12 when you give it the wallet password. It doesn’t read tnsnames.ora, sqlnet.ora, the TNS_ADMIN environment variable, or the .jks and .pem files that some wallets include.
Step 1: Copy the connection values from tnsnames.ora
Bytebase doesn’t readtnsnames.ora, so copy the values from your entry into the form. For example:
Bytebase checks Hostname against the Subject Alternative Names (SANs) in the server’s certificate and ignores the certificate’s Common Name. Use a host name listed there, or an IP address listed as an IP entry. If Bytebase reaches the database through another name, such as a load balancer or
host.docker.internal, ask your DBA to add that name to the certificate.
Step 2: Make the wallet readable by Bytebase
The wallet must be a directory on the machine or container that runs Bytebase, readable by the user that runs it. On a host. Copy the wallet to a local directory and use that directory’s path. In Docker. Mount the wallet directory read-only by adding one--volume line to the Docker command. The wallet path is then /etc/oracle-wallet.
~/.bytebase/data/oracle-wallet, and use /var/opt/bytebase/oracle-wallet. This works only when the data directory is a directory on the host, not a named Docker volume.
On Kubernetes. Mount the wallet into the Bytebase pod, for example from a Secret, and use the mount path.
The Bytebase container runs as root by default. If you run it as the image’s bytebase user (--user bytebase, uid 113), make the wallet readable by that user, for example with chmod -R a+rX <wallet_directory>.
Step 3: Add the extra parameters
In Extra Parameters, click Add parameter for each key:
Leave the TLS section at Disabled.
Step 4: Choose how Bytebase signs in
Password. Fill in Username and Password. Bytebase always uses a filled-in password, even when the wallet stores a different one. Password stored in the wallet. Fill in Username and leave Password empty. Bytebase uses the wallet entry for that user whose connect descriptor has the same host, port, and service name as the form. Entries can’t match a connection that uses a SID. To add an entry, run the following command;mkstore prompts for the wallet password:
AUTH TYPE with the value TCPS to Extra Parameters, and leave Username and Password empty. Oracle signs Bytebase in as the database user identified by the wallet’s client certificate. This needs:
- A wallet with a client certificate, and a listener that requires client certificates.
- A database user created with
IDENTIFIED EXTERNALLY AS '<certificate_dn>', such as'CN=bytebase'. TCPSinSQLNET.AUTHENTICATION_SERVICESin the server’ssqlnet.ora.
Step 5: Test the connection
Click Test Connection, then Create. To confirm that the session is encrypted, open one of the instance’s databases in SQL Editor and run:tcps.
Autonomous Database
By default, Autonomous Database accepts only mutual TLS connections, so Bytebase connects with the database’s wallet. To connect, follow these steps:- Download the wallet as described in Oracle’s instructions, and unzip it. Bytebase opens the auto-login
cwallet.sso, so it doesn’t need the password you set during the download. - Make the unzipped directory readable by Bytebase, as described in Step 2.
- Copy the host, port, and service name from the wallet’s
tnsnames.oraentry you want to use, such as<database_name>_low. The host is the regional endpoint, such asadb.us-ashburn-1.oraclecloud.com, and the port is usually1522. The regional endpoint is one of the names in the database’s certificate, so leaveSSL VERIFYunset. - In Extra Parameters, set
SSLtoTRUEandWALLETto the wallet directory. - Sign in as
ADMINor another database user, with its password.
Troubleshooting
Test Connection shows the error from the driver:Connect to RAC and Data Guard
Oracle Real Application Clusters (RAC) runs one database on several servers. Oracle Data Guard keeps a standby copy of the database, usually at another site, and can move the primary role to it. To keep Bytebase connected when the database moves to another server or site, enter a cluster or site address and a service name instead of a single server and a SID:
Add each database to Bytebase as one instance. Don’t add an instance for each RAC node. Don’t add a Data Guard standby as another instance to deploy changes to, because Data Guard copies every change from the primary.
RAC
To connect to a RAC database, follow these steps:- In Hostname, enter the cluster’s Single Client Access Name (SCAN), such as
sales-scan.example.com. - In Port, enter the SCAN listener port. Oracle’s default is
1521. - In Connect using, choose Service name and enter a service that your DBA created for the cluster, such as
sales_rw.
SERVER, as described in Data Guard.
Data Guard
Requires Bytebase 3.5.1 or later.
-
Ask your DBA for a service that Oracle starts only on the database in the primary role, such as
sales_rw. Oracle’s documentation describes this as setting the database role for a service. Don’t use the default service named after the pluggable database. Every database in the configuration can offer it, so it doesn’t lead Bytebase to the primary. - In Hostname and Port, enter the primary site’s listener address. For a RAC primary, enter its SCAN name.
- In Connect using, choose Service name and enter that service.
-
In Extra Parameters, add the following keys:
- Click Test Connection.
CONNECTION TIMEOUT in uppercase, exactly as shown. Bytebase sets this key itself, and a key spelled differently doesn’t reliably replace its value.
Each time Bytebase connects, it tries the Hostname address first and then each SERVER address in order. It moves to the next address when an address refuses the connection, can’t be reached, or has a listener that doesn’t offer the service. After a role change, the former primary stops offering the service, so Bytebase reaches the new primary without any change to the instance.
Other configurations
- Cold failover cluster. With RAC One Node, Standard Edition High Availability, or a third-party cluster, one instance runs at a time and its address moves with it. Enter that address and a service name. You don’t need extra parameters.
- Amazon RDS Multi-AZ. Enter the DB instance endpoint. Amazon RDS points the endpoint at the standby during a failover.
- Two writable sites with Oracle GoldenGate. Add each site as its own instance. A schema change reaches the other site only if GoldenGate replicates DDL between them. Otherwise, deploy the change to both instances.
Troubleshoot RAC and Data Guard connections
Test Connection shows the error from the driver. When Bytebase tries several addresses, it shows the error from the last one.Read-only connection
A read-only connection has its own Extra Parameters. To use one with a TCPS listener, add the sameSSL and WALLET entries to it.
With Oracle Active Data Guard, a standby stays open for queries while it applies changes from the primary. To run SQL Editor queries on the standby, enter the standby site’s address in the read-only connection, with a service that runs only on a standby, such as sales_ro. Add the primary site’s address in SERVER, so that the connection still finds the standby after a role change. Bytebase can sync and query a database that is open only for queries.
