Generic Oracle Setup Guide
Follow these instructions to replicate your generic Oracle database to your destination using Fivetran.
Prerequisites
To connect your Oracle database to Fivetran, you need:
- A Fivetran account with an Enterprise or Business Critical plan
- Oracle 11g or above
IMPORTANT:
- If you have Oracle 12.1 or below, you must connect to Fivetran using an SSH tunnel, private networking, or Proxy Agent. Learn more in the Choose connection method section.
- You must have Oracle 19 to use BFILE remote capture.
- Your database host's IP (e.g.,
1.2.3.4
) or domain (e.g.,your.server.com
) - Your database's port (usually
1521
for unencrypted connections and2484
for encrypted connections using SSL/TLS) - Your database's system identifier (SID)/service name
Setup instructions
Choose connection method
IMPORTANT: Do not perform this step if you want to use the Hybrid Deployment model for your data pipeline.
Decide how you want to connect your Oracle database to Fivetran:
Connect directly (TLS required)
Fivetran connects directly to your Oracle database. This is the simplest method.
IMPORTANT: You must have TLS enabled on your Oracle database to connect directly to Fivetran. Follow Oracle's instructions to enable TLS on your database either with a client wallet or without a client wallet.
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 IPs for your database's region. How you do this will vary based on how your Oracle database is hosted (cloud platform, on-premises, etc.).
Connect via SSH (TLS optional)
Fivetran connects to a separate server in your network that provides an SSH tunnel to your database. You must connect through SSH if your database is in an inaccessible subnet.
IMPORTANT: You must connect using an SSH tunnel if your Oracle RAC database is version 12.1 or below.
To connect using SSH tunnel, follow our SSH connection instructions. If you want Fivetran to use end-to-end encryption using TLS, follow Oracle's TLS setup instructions either with a client wallet or without a client wallet.
Connect using private networking
Private networking enables communication between private networks and services without exposing traffic to the public internet. Private networking is the most secure connection method.
IMPORTANT: You must have a Business Critical plan to use private networking.
We support the following providers:
AWS PrivateLink – used for VPCs and AWS-hosted or on-premises services. See our AWS PrivateLink setup guide for details.
Azure PrivateLink – used for Virtual Networks (VNets) and Azure-hosted or on-premises services. See our Azure PrivateLink setup guide for details.
Google Cloud Private Service Connect – used for VPCs and Google-hosted or on-premises services. See our Google Cloud Private Service Connect setup guide for details.
Connect using Proxy Agent Beta
Fivetran connects to your database through the Proxy Agent, providing secure communication between Fivetran processes and your database host. The Proxy Agent is installed in your network and creates an outbound network connection to the Fivetran-managed SaaS.
To learn more about the Proxy Agent, how to install it, and how to configure it, see our Proxy Agent documentation.
Create user
Create a database user for Fivetran's exclusive use.
Connect to your Oracle database as an Admin user.
Execute the following SQL command to create a user for Fivetran and grant it permission to connect to your database. Replace
<username>
and<password>
with a username and password of your choice. Follow the instructions below for your database type:NOTE: Names in Oracle are case-sensitive. For example,
fivetran
is not the same user asFIVETRAN
.
Multitenant container database usernames must start withC##
because they are common users.For standalone databases
CREATE USER <username> IDENTIFIED BY <password>; GRANT CREATE SESSION TO <username>;
ALTER PROFILE DEFAULT LIMIT SESSIONS_PER_USER 10;
NOTE: Use the above command if the profile name of the FIVETRAN user is set to DEFAULT. Otherwise, replace DEFAULT with your chosen profile name.
Check your profile name with the following query:
SELECT USERNAME, PROFILE FROM DBA_USERS where USERNAME='FIVETRANUSER'
IMPORTANT: You must have at least 10 sessions for your FIVETRAN user
For multitenant container databases
If your incremental sync method is LogMiner or Fivetran Teleport Sync, you must create a common user at the container level.
Create the user with the container as the active session and grant the following permissions:
NOTE: Your FIVETRAN user must have at least 10 sessions per user in both a constant database and a pluggable database.
ALTER SESSION SET CONTAINER=CDB$ROOT; CREATE USER <username> IDENTIFIED BY <password> CONTAINER=ALL; GRANT CREATE SESSION, ALTER SESSION, SET CONTAINER TO <username> CONTAINER=ALL; ALTER USER <username> SET CONTAINER_DATA=ALL CONTAINER=CURRENT;
Run the following command at the container level and the pluggable level to check the parameter:
col username for a12 col profile for a19 col limit for a12 set lines 299 select a.username,b.PROFILE,b.RESOURCE_NAME,b.limit from dba_users a , dba_profiles b where a.profile=b.profile and b.RESOURCE_NAME='SESSIONS_PER_USER' and a.username='FIVETRANUSER';
If your incremental sync method is BFILE remote capture, you must create the user in the pluggable database (PDB) and grant the following permissions:
CREATE USER <username> IDENTIFIED BY <password>; GRANT CREATE SESSION TO <username>;
ALTER PROFILE DEFAULT LIMIT SESSIONS_PER_USER 10;
NOTE: Use the above command if the profile name of the FIVETRAN user is set to DEFAULT. Otherwise, replace DEFAULT with your chosen profile name.
IMPORTANT: You must have at least 10 sessions for your FIVETRAN user
Grant read-only access
Grant the Fivetran user read-only access to the data you want to sync.
NOTE: Oracle database defaults to using upper case letters, unless the values are surrounded by double quotes.
Grant the Fivetran user
SELECT
permission for each schema and table you want to sync. Follow the instructions below for your database type:For standalone databases
GRANT SELECT ON "<schemaA>"."<tableA>" TO <username>; GRANT SELECT ON "<schemaA>"."<tableB>" TO <username>; GRANT SELECT ON "<schemaB>"."<tableC>" TO <username>;
Alternatively, you can grant access to all tables.
GRANT SELECT ANY TABLE TO <username>;
For multitenant container databases
Execute the following command before granting permissions. Replace
<PDB>
with the name of the pluggable database (PDB) that you want to connect to Fivetran.ALTER SESSION SET CONTAINER=<PDB>;
GRANT SELECT ON "<schemaA>"."<tableA>" TO <username>; GRANT SELECT ON "<schemaA>"."<tableB>" TO <username>; GRANT SELECT ON "<schemaB>"."<tableC>" TO <username>;
Alternatively, you can grant access to all tables.
GRANT SELECT ANY TABLE TO <username>;
Grant the Fivetran user access to system views. We use these views to optimize our initial import queries. Which system views you grant access to depend on the incremental sync method you want to use.
LogMiner or Fivetran Teleport Sync:
Grant the Fivetran user access to the
DBA_EXTENTS
,DBA_TABLESPACES
, andDBA_SEGMENTS
system views.GRANT SELECT ON DBA_EXTENTS TO <username>; GRANT SELECT ON DBA_TABLESPACES TO <username>; GRANT SELECT ON DBA_SEGMENTS TO <username>;
BFILE remote capture
Grant the Fivetran user access to the
DBA_SEGMENTS
system view.GRANT SELECT ON DBA_SEGMENTS TO <username>;
Configure incremental sync method
To keep your data up to date after the initial sync, we use one of the following incremental sync methods. Each of these methods keeps a record of recent data changes, which allows Fivetran to update only the data that has changed since our last sync. To learn the differences between these methods, see our Updating data documentation.
Follow the instructions below for your incremental sync method:
LogMiner
To enable LogMiner, do the following:
If ARCHIVELOG mode is not enabled on your database, enable ARCHIVELOG mode.
NOTE: Enabling ARCHIVELOG mode requires the Oracle instance to be briefly taken offline. To learn more, see Oracle's archived redo log file documentation.
SHUTDOWN IMMEDIATE; STARTUP MOUNT; ALTER DATABASE ARCHIVELOG; ALTER DATABASE OPEN;
NOTE: We recommend that you set ARCHIVE_LAG_TARGET to a non-zero value. This setting reduces the lag in changes being synced.
Configure Oracle RMAN to retain backups and archive logs for at least 24 hours. We recommend retaining data for seven days.
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
(Recommended) Set the
DB_RECOVERY_FILE_DEST_SIZE
parameter to a value that matches your available disk space, because expired and obsolete log and backup files can quickly fill your disk. For more information, see Oracle's DB_RECOVERY_FILE_DEST_SIZE documentation.Enable supplemental logging. Choose one of the logging options below and follow the corresponding instructions:
Database-level minimal supplemental logging with table-level identification key logging
NOTE: We recommend using this option because it minimizes the overhead on your source database.
i. Enable minimal supplemental logging by executing the following SQL statement. Minimal supplemental logging ensures that LogMiner has sufficient information to process the redo operations associated with DML changes.
NOTE: Per Oracle's database-level supplemental logging documentation, "minimal supplemental logging does not impose significant overhead on the database that generates the redo log files."
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
ii. Once minimal supplemental logging has been enabled at the database level, you must enable either primary key identification logging or all supplemental logging.
NOTE: You need to enable all supplemental logging only for:
- tables without a primary key
- tables whose primary key or composite primary key values are expected to change
To enable primary key supplemental logging only for specific tables, run the following SQL statement for each table:
ALTER TABLE "<schema>"."<table>" ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;
To enable all supplemental logging only for specific tables, run the following SQL statement for each table:
ALTER TABLE "<schema>"."<table>" ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS
NOTE: With all supplemental logging, if a row is updated, all of the columns associated with that row are placed in the redo log file.
Database-level identification key logging
Enable either primary key identification key logging or all supplemental logging at the database level if you want to enable logging for the entire database.
NOTE: You need to enable all supplemental logging only for:
- tables without a primary key
- tables whose primary key or composite primary key values are expected to change
To enable primary key supplemental logging at the database level, run the following SQL statement:
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;
To enable all supplemental logging at the database level, run the following SQL statement:
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
NOTE: If you don't configure the logging data correctly, you will receive a warning when Fivetran encounters a primary key change. The warning will give you customized instructions on how to fix the problem.
Grant the Fivetran user permission to run LogMiner. Follow the instructions below for your database type:
For standalone databases
GRANT SELECT ON SYS.V_$PARAMETER TO <username>; GRANT SELECT ON SYS.V_$ARCHIVED_LOG TO <username>; GRANT SELECT ON SYS.V_$LOGMNR_CONTENTS TO <username>; GRANT EXECUTE ON DBMS_LOGMNR TO <username>; GRANT EXECUTE ON DBMS_LOGMNR_D TO <username>; GRANT SELECT ANY TRANSACTION TO <username>; GRANT EXECUTE_CATALOG_ROLE TO <username>;
For multitenant container databases
Execute the following command before granting access to LogMiner.
ALTER SESSION SET CONTAINER=CDB$ROOT;
GRANT SELECT ON SYS.V_$PARAMETER TO <username>; GRANT SELECT ON SYS.V_$ARCHIVED_LOG TO <username>; GRANT SELECT ON SYS.V_$ARCHIVE_DEST TO <username>; GRANT SELECT ON SYS.V_$LOGMNR_CONTENTS TO <username>; GRANT EXECUTE ON DBMS_LOGMNR TO <username>; GRANT EXECUTE ON DBMS_LOGMNR_D TO <username>; GRANT SELECT ANY TRANSACTION TO <username>; GRANT EXECUTE_CATALOG_ROLE TO <username>;
(Oracle version 12 and above) Grant logmining permissions to the Fivetran user.
GRANT LOGMINING TO <username>;
(Optional) Grant permissions to additional system tables.
NOTE: We recommend granting these permissions to optimize the connector's performance and reliability.
For standalone databases
GRANT SELECT ON DBA_FREE_SPACE TO <username>; GRANT SELECT ON SYS.V_$LOG TO <username>; GRANT SELECT ON SYS.V_$TEMPFILE TO <username>; GRANT SELECT ON SYS.V_$DATAFILE TO <username>;
For multitenant container databases
Execute the following command before granting access.
ALTER SESSION SET CONTAINER=CDB$ROOT;
GRANT SELECT ON DBA_FREE_SPACE TO <username>; GRANT SELECT ON SYS.V_$LOG TO <username>; GRANT SELECT ON SYS.V_$TEMPFILE TO <username>; GRANT SELECT ON SYS.V_$DATAFILE TO <username>;
Grant the Fivetran user access to the
SYS.V_$DATABASE
view:GRANT SELECT ON SYS.V_$DATABASE TO <username>;
We use this view to determine whether the database is a container database (CDB).
Fivetran Teleport Sync Beta
You do not need to do any further setup to use Fivetran Teleport Sync. However, we recommend that you read our recommendations for Fivetran Teleport Sync before using it.
BFILE remote capture Private Preview
To enable BFILE remote capture, do the following:
Connect to your Oracle database as an admin user.
If ARCHIVELOG mode is not enabled on your database, enable ARCHIVELOG mode.
NOTE: Enabling ARCHIVELOG mode requires the Oracle instance to be briefly taken offline. To learn more, see Oracle's archived redo log file documentation.
SHUTDOWN IMMEDIATE; STARTUP MOUNT; ALTER DATABASE ARCHIVELOG; ALTER DATABASE OPEN;
NOTE: We recommend that you set ARCHIVE_LAG_TARGET to a non-zero value. This setting reduces the lag in changes being synced.
Configure Oracle RMAN to retain backups and archive logs for at least 24 hours. We recommend retaining data for seven days.
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
(Recommended) Set the
DB_RECOVERY_FILE_DEST_SIZE
parameter to a value that matches your available disk space, because expired and obsolete log and backup files can quickly fill your disk. For more information, see Oracle's DB_RECOVERY_FILE_DEST_SIZE documentation.Enable database-level minimal supplemental logging:
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
Grant the Fivetran user the following
SELECT
permissions:GRANT SELECT ON SYS.V_$PDBS TO <username>; GRANT SELECT ON SYS.COL$ TO <username>; GRANT SELECT ON SYS.V_$DATABASE TO <username>; GRANT SELECT ON SYS.V_$ARCHIVED_LOG TO <username>; GRANT SELECT ON SYS.V_$TRANSACTION TO <username>;
(Optional) Grant the Fivetran user permission to capture from partitioned tables:
GRANT SELECT ON SYS.TABPART$ to <username>; GRANT SELECT ON SYS.TABCOMPART$ to <username>; GRANT SELECT ON SYS.TABSUBPART$ to <username>;
Configure the archive redo log file access based on how your Oracle database stores logs:
Fixed archive log directory
If your Oracle database is not configured with the fast recovery area, the archive log directory may remain constant (e.g.,
/u01/app/oracle/product/19c/dbhome_1
). If your archive log directory remains constant, you must manually create a DIRECTORY object so Fivetran can access log files without requiring dynamic directory management. Run the following command to create theDIRECTORY
object:CREATE DIRECTORY “FIVETRAN_LOGDIR” AS ‘<your-archive-log-directory-full-path>’;
Dynamic archive log directories
If your Oracle database is configured with the fast recovery area, the archive log directory changes dynamically each day (e.g.,
/u01/app/oracle/fast_recovery_area/ORCLCDB/archivelog/2025_01_25
). To avoid the manual work of creatingDIRECTORY
objects ahead of time, grant the Fivetran user permission to create and dropDIRECTORY
objects. This allows Fivetran to dynamically create and drop them for each sync.Method 1: Grant direct privileges
Grant the Fivetran user permission to create and drop
DIRECTORY
objects:GRANT CREATE ANY DIRECTORY TO <username>; GRANT DROP ANY DIRECTORY TO <username>;
Method 2: Install a predefined package
If you prefer not to grant direct privileges, you can use the following stored procedure package (
FIVETRAN_BFILE
) to controlDIRECTORY
object creation and deletion. Ensure to replace<username>
with your Fivetran username:CREATE OR REPLACE PACKAGE FIVETRAN_BFILE AUTHID DEFINER AS PROCEDURE dir_create(dirobj_name VARCHAR2, directory_name VARCHAR2); PROCEDURE dir_remove(dirobj_name VARCHAR2); END FIVETRAN_BFILE; / CREATE OR REPLACE PACKAGE BODY FIVETRAN_BFILE AS PROCEDURE dir_create(dirobj_name VARCHAR2, directory_name VARCHAR2) IS user_id VARCHAR2(256); BEGIN EXECUTE IMMEDIATE 'CREATE OR REPLACE DIRECTORY ' || dirobj_name || ' AS ''' || directory_name || ''''; user_id := USER; EXECUTE IMMEDIATE 'GRANT READ ON DIRECTORY ' || dirobj_name || ' TO ' || user_id; END; PROCEDURE dir_remove(dirobj_name VARCHAR2) IS BEGIN EXECUTE IMMEDIATE 'DROP DIRECTORY ' || dirobj_name; END; END FIVETRAN_BFILE; / CREATE OR REPLACE PUBLIC SYNONYM PKG_FIVETRAN_BFILE FOR SYS.FIVETRAN_BFILE; GRANT EXECUTE ON PKG_FIVETRAN_BFILE TO <username>;
Finish Fivetran configuration
In your connector setup form, enter a Destination schema prefix. This prefix applies to each replicated schema and cannot be changed once your connector is created.
In the Host field, enter your database host's IP (for example,
1.2.3.4
) or URL (for example,your.server.com
).Enter your database's Port number. The port number is usually
1521
for unencrypted connections and2484
for encrypted connections using SSL/TLS.Enter the Fivetran-specific User that you created in Step 2.
TIP: In Oracle, usernames are case-sensitive. Make sure to enter the exact username.
Enter the Password for the Fivetran-specific user that you created in Step 2.
Select the Update Method: Read Changes via LogMiner or Detect Changes via Fivetran Teleport Sync or Read Changes via BFILE Remote Capture.
Enter your database's SID/Service Name.
(Multitenant container databases only, not applicable to BFILE remote capture) Enter your database's PDB Name.
(Hybrid Deployment only) If your destination is configured for Hybrid Deployment, the Hybrid Deployment Agent associated with your destination is pre-selected in the Select an existing agent drop-down menu. To use a different agent, select the agent of your choice, and then select the same agent for your destination.
(Not applicable to Hybrid Deployment) Choose your Connection method. If you selected Connect via an SSH tunnel, provide the following information:
- SSH hostname (do not use a load balancer's IP address/hostname)
- SSH port
- SSH user
- If you enabled TLS on your database in Step 1, make sure to keep the Require TLS through Tunnel toggle turned ON.
(Not applicable to Hybrid Deployment) Copy the Fivetran's IP addresses (or CIDR) that you must safelist in your firewall.
Click Save & Test. Fivetran tests and validates our connection to your Oracle database. Upon successful completion of the setup tests, you can sync your data using Fivetran.
Setup tests
Fivetran performs the following tests to ensure that we can connect to your generic Oracle database and that it is properly configured:
- The Connecting to SSH Tunnel Test validates the SSH tunnel details you provided in the setup form. It then checks that we can connect to your database using the SSH tunnel. (We skip this test if you aren't connecting using an SSH tunnel.)
- The Connecting to Host Test validates the database credentials you provided in the setup form. It then verifies that the database host is not private and checks that we can connect to the host.
- The Validating Certificate Test generates a pop-up window where you must choose which certificate you want Fivetran to use. It then validates that certificate and checks that we can connect to your database using TLS. (We skip this test if you selected an indirect connection method and then disabled the Require TLS through Tunnel toggle or if the incremental sync method is BFILE remote capture.)
- The Validating Database Version Test checks your database version. The test passes if your database version is 12.2 or above, or 12.1 or below with an SSH tunnel connection, or 19.0 if the incremental sync method is BFILE remote capture.
- The Validating Access to PDB Test checks that we have access to your pluggable database. We skip this test if your database is not a multitenant container database. (We skip this test if the incremental sync method is BFILE remote capture.)
- The Validating System View Permission Test checks that we have permission to access the required system views.
- The Validating Archive Log Access Test checks that we can access your archive log.
- The Validating Archive Log Retention Period Test verifies that your archive log is set to retain at least 24 hours' worth of changes.
- The Access to Database-Level Supplemental Logging Test verifies that supplemental logging is enabled on your database. If supplemental logging is not enabled, the test passes but generates a warning message in your dashboard.
NOTE: The tests may take a few minutes to finish running.
Related articles
description Connector Overview
account_tree Schema Information
settings API Connector Configuration