Before you can jump into wiring everything up, there are a few configurations to make. Particularly, you want to have a properly-permissioned user for Estuary to access your database, and you need to ensure your database archives logs correctly. After all, Estuary will need to read the redo logs to extract updates.
Create a User
Besides the correct permission grants, the Estuary user will also need a watermarks table to act as a scratch pad. See a sample script below for setting these resources up. For simplicity, the script covers the use case of a non-RDS non-container database. You can see Estuary’s docs for additional use cases.
CREATE USER estuary_flow_user IDENTIFIED BY <your_password_here>;
GRANT CREATE SESSION TO estuary_flow_user;
GRANT SELECT ANY TABLE TO estuary_flow_user;
CREATE TABLE estuary_flow_user.FLOW_WATERMARKS(SLOT varchar(1000) PRIMARY KEY, WATERMARK varchar(4000));
GRANT SELECT_CATALOG_ROLE TO estuary_flow_user;
GRANT EXECUTE_CATALOG_ROLE TO estuary_flow_user;
GRANT SELECT ON V$DATABASE TO estuary_flow_user;
GRANT SELECT ON V$LOG TO estuary_flow_user;
GRANT LOGMINING TO estuary_flow_user;
GRANT INSERT, UPDATE ON estuary_flow_user.FLOW_WATERMARKS TO estuary_flow_user;
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
ALTER USER estuary_flow_user QUOTA UNLIMITED ON USERS;
Set the Retention Policy
If your database doesn’t already handle logs in a robust manner, you’ll need to make some updates. First, ensure that your database is in ARCHIVELOG mode (as opposed to NOARCHIVELOG mode).
You will also need to set the retention policy to at least 24 hours, and preferably 7 days or more. To do so, connect to your database via RMAN.
You can see your current policies with the SHOW ALL; command.
To update the retention policy, run:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
This step will assume you already have an S3 bucket in AWS and user credentials to access that bucket, as well as MotherDuck credentials. If you don’t already have these resources, see the previous article on integrating Estuary with MotherDuck for additional setup details.
To set up a MotherDuck materialization connector in the Estuary dashboard:
- Switch to the Destinations tab.
- Search for and select the MotherDuck materialization.
- Enter the required materialization configuration details:
- Name: A unique name for your materialization.
- MotherDuck Service Token: A MotherDuck access token associated with your account.
- Database: The database in MotherDuck you’d like to materialize to.
- Database Schema: The schema for bound collection tables.
- S3 Staging Bucket: The name of your AWS S3 bucket.
- Access Key ID: Credentials for an AWS IAM user.
- Secret Access Key: Credentials for an AWS IAM user.
- S3 Bucket Region: The region for your AWS bucket.

- Under the “Source Collections” section, click the Source from Capture button.
- Choose your Oracle capture and click Continue.
- Click Next at the top of the page, then Save and Publish.
Your Oracle data will start streaming to MotherDuck using low-latency, efficient CDC!