Oracle RAC Setup Guide PRIVATE PREVIEWlink
Follow these instructions to replicate your Oracle RAC database to your destination using Fivetran.
Decide whether to connect to your destination directly or connect using an SSH tunnel. If your Oracle database is version 12.1 or below, you'll need to connect using an SSH tunnel.
- To connect using an SSH tunnel, follow these instructions.
- To connect directly, configure your firewall and/or other access control systems to allow incoming connections to your Oracle database host and port (usually
1521) from Fivetran's IP.
Connect to your Oracle RAC database as an admin user.
Execute the following SQL commands to create a user for Fivetran and grant it permission to connect to your database. Replace
<password>with a password of your choice:
CREATE USER FIVETRAN IDENTIFIED BY <password>; GRANT CREATE SESSION TO FIVETRAN;
Grant read-only accesslink
Once you've created the
FIVETRANuser, grant it
SELECTpermission for each schema and table you would like to sync:
GRANT SELECT ON "<schemaA>"."<tableA>" TO FIVETRAN; GRANT SELECT ON "<schemaA>"."<tableB>" TO FIVETRAN; GRANT SELECT ON "<schemaB>"."<tableC>" TO FIVETRAN;
Alternatively, you can grant access to all tables:
GRANT SELECT ANY TABLE TO FIVETRAN;
FIVETRANuser access to the
GRANT SELECT ON DBA_EXTENTS TO FIVETRAN; GRANT SELECT ON DBA_TABLESPACES TO FIVETRAN; GRANT SELECT ON DBA_SEGMENTS TO FIVETRAN;
Note: Oracle RAC defaults to using uppercase, unless values are surrounded by double quotes.
To keep your data up to date after the initial sync, we use Oracle's built-in Flashback technology. Flashback keeps a record of recent data changes, which allows Fivetran to update only the data that has changed since our last sync.
Flashback uses Automatic Undo Management to record all committed changes for each included table. To enable Flashback, follow these steps:
FIVETRANuser access to additional system views:
GRANT SELECT ON DBA_FLASHBACK_ARCHIVE TO FIVETRAN; GRANT SELECT ON DBA_FLASHBACK_ARCHIVE_TABLES TO FIVETRAN; GRANT SELECT ON V_$SYSTEM_PARAMETER TO FIVETRAN; GRANT SELECT ON V_$DATABASE TO FIVETRAN;
Create a tablespace with enough space to store about 7 days’ worth of database changes.
CREATE TABLESPACE <tablespace> DATAFILE SIZE 1G AUTOEXTEND ON MAXSIZE <maximum size>;
Create a Flashback Data Archive with at least 1 day of retention (Fivetran recommends 7 days).
CREATE FLASHBACK ARCHIVE <archive> TABLESPACE <tablespace> RETENTION 7 DAY;
Add all tables you want to sync to the archive.
ALTER TABLE "<schema>"."<table>" FLASHBACK ARCHIVE <archive>;
FIVETRANuser permission to run Flashback queries on the tables you want to sync. You can either do this per table:
GRANT FLASHBACK ON "<schema>"."<table>" TO FIVETRAN;
or for all tables:
GRANT FLASHBACK ANY TABLE TO FIVETRAN;
Add an index to FDA-generated history tables (Optional)
Flashback queries are significantly more efficient with an index on the history tables generated by Flashback Data Archive. The addition of this index can make your sync significantly faster and more resource-efficient, especially if your database is large or has a high change volume. To add indices, follow these steps:
Find the system-generated history tables for each of your Flashback-enabled tables by running the following query:
SELECT TABLE_NAME, ARCHIVE_TABLE_NAME FROM DBA_FLASHBACK_ARCHIVE_TABLES;
For each of the
ARCHIVE_TABLE_NAMEs returned in the previous query, add an index on the
CREATE INDEX <index-name> ON <archive-table-name> (STARTSCN);