Prerequisites
- The hostname for the Oracle database server
- The username/password for the Oracle database server
- The name of the database to use within the Oracle database server
The driver uses
node-oracledb in Thin mode, which supports Oracle Database
12.1 and later. Older servers (e.g. 11g) require Thick mode, which the
driver does not currently enable — track this issue.Setup
Manual
Add the following to a.env file in your Cube project:
Environment Variables
Pre-Aggregations
By default, pre-aggregations are stored in Cube Store and need no setup in Oracle. Pre-aggregations withexternal: false are built inside
Oracle, in a schema that you create first. Cube can’t create it because an Oracle
schema is a user account.
-
Create a dedicated user for pre-aggregations. Replace
userswith the tablespace that should hold the pre-aggregation tables: -
Let
CUBEJS_DB_USERcreate, index, drop and read tables in that schema. On Oracle 23ai and later, grant this on that schema only:Earlier releases only have database-wideCREATE ANY TABLE,CREATE ANY INDEX,DROP ANY TABLEandSELECT ANY TABLEprivileges. They let the user read and drop tables in every schema. -
Set
CUBEJS_PRE_AGGREGATIONS_SCHEMAto that user, e.g.,cube_preaggs.
SSL
To enable SSL-encrypted connections between Cube and Oracle, set theCUBEJS_DB_SSL environment variable to true. For more information on how to
configure custom certificates, please check out Enable SSL Connections to the
Database.