10.6.7 MongoDB

10.6.7.1 About MongoDB Connections

A MongoDB connection stores the information that Oracle GoldenGate uses to connect to a MongoDB deployment. A MongoDB connection stores the information that Oracle GoldenGate uses to connect to a MongoDB deployment. You can use the connection with Extract to capture data from MongoDB as a source and with Replicat to deliver data to MongoDB or other MongoDB wire protocol–compatible targets, such as Oracle Autonomous JSON Database (AJD), Autonomous Transaction Processing (ATP), and Oracle Database API for MongoDB.

The connection supports the following authentication methods:

  • PLAIN
  • TLS
  • Mutual TLS (mTLS)
  • Kerberos
  • X.509

Connection details are stored independently of the Replicat configuration so that validated connections can be reused by multiple Replicats.

10.6.7.2 Before You Begin

Before creating a MongoDB connection, ensure that you have the following:

  • Oracle GoldenGate is installed and configured.
  • Network connectivity is available between the Oracle GoldenGate deployment and the MongoDB deployment.
  • A valid MongoDB connection string. For more information, see https://www.mongodb.com/docs/manual/reference/connection-string/
  • The appropriate authentication credentials or certificates for the selected security protocol.
  • Download required MongoDB client libraries. for more information , see MongoDB Capture Client Dependencies and MongoDB Handler Client Dependencies.
  • Required MongoDB client libraries are installed if your deployment requires additional runtime dependencies.
  • Certificate, Kerberos, or truststore files are available when using secure authentication methods.

10.6.7.3 Create and Validate a MongoDB Connection

Use the Add Connection page to create a MongoDB connection.

Procedure

  1. In the navigation menu, select DB Connections.
  2. Click Add Connection.
  3. In Connection Alias, enter a unique name for the connection.
  4. From Technology Type, select MongoDB.
  5. In the Technology Settings section, provide the MongoDB connection information.

    Configure the following technology settings:

    Connection String – Specifies the connection string used to connect to the MongoDB deployment. This field is required.

  6. Configure the Security Settings section.

    Configure the following security settings.

    PLAIN Authentication

    Configure the following settings when Security Protocol is PLAIN:

    • Username – Specifies the user name used to connect to the MongoDB deployment.
    • Password – Specifies the password associated with the user name. This field is treated as sensitive information.

    Note:

    The Password property is deprecated and will be replaced by passwordSecretId. This property will be removed after February 15, 2026.

    Configure the following settings when Security Protocol is TLS:

    • Username – Specifies the user name used to connect to the MongoDB deployment.
    • Password – Specifies the password associated with the user name.
    • TLS CA Certificate – Upload the Base64-encoded CA certificate used to validate the MongoDB server certificate.
    Mutual TLS (mTLS) Settings

    Configure the following settings when Security Protocol is MTLS:

    • Username – Specifies the user name used to connect to the MongoDB deployment.
    • Password – Specifies the password associated with the user name.
    • TLS CA Certificate – Upload the Base64-encoded CA certificate used to validate the MongoDB server certificate.
    • Client Certificate and Private Key – Upload the client certificate and private key used for mutual TLS authentication.
    • Client Key Password – Specifies the password protecting the client private key, when applicable.
    Kerberos Authentication

    Configure the following settings when Security Protocol is KERBEROS:

    • KRB5 Configuration File – Upload the Kerberos krb5.conf configuration file.
    • Kerberos Credential Cache – Upload the Kerberos credential cache file.
    • JAAS Configuration File – Upload the JAAS configuration file used for Kerberos authentication.
    X.509 Authentication

    Configure the following settings when Security Protocol is X509:

    • TLS CA Certificate – Upload the Base64-encoded CA certificate used to validate the MongoDB server certificate.
    • Client Certificate and Private Key – Upload the client certificate and private key used for X.509 authentication.
    • Client Key Password – Specifies the password protecting the client private key, when applicable.

    Note: The TLS CA Certificate is required for TLS, MTLS, and X509 authentication. The Client Certificate and Private Key is required for MTLS and X509 authentication. The client certificate and private key must not be encrypted.

  7. Configure Common Settings, if additional runtime configuration is required.

    Configure the following common settings:

    Classpath – Specifies the runtime classpath used to load the required MongoDB client libraries. You can use Dependency Downloader to download client libraries.

    Note:

    • Download the supported MongoDB client libraries by using the Dependency Downloader for MongoDB.
    • Configure the runtime classpath to reference the downloaded client libraries before starting the Extract or Replicat process.
  8. (Optional) Configure Proxy Settings if the Oracle GoldenGate for Distributed Applications and Analytics deployment accesses the MongoDB deployment through an HTTP proxy.

    Configure the following proxy settings:

    • Proxy URL – Specifies the URL or host name of the proxy server used to access the MongoDB deployment.
    • Proxy Port – Specifies the port number of the proxy server.
    • Proxy Username – Specifies the user name for proxy authentication, if required.
    • Proxy Password – Specifies the password for proxy authentication. This field is treated as sensitive information.
    • Truststore – Specifies the Java truststore file that contains the certificate authority (CA) certificates used to validate the proxy server certificate, when required.
    • Truststore Password – Specifies the password associated with the truststore.
    • Keystore – Specifies the Java keystore file containing the client certificate and private key used for client authentication, when required.
    • Keystore Password – Specifies the password associated with the keystore.
    • SSL Key Password – Specifies the password protecting the private key stored in the keystore when it differs from the keystore password.

      Note:

      Configure the proxy and SSL settings only if the Oracle GoldenGate for Distributed Applications and Analytics deployment accesses the MongoDB deployment through a proxy that requires authentication or TLS. If the deployment has direct network connectivity to the MongoDB deployment, leave the Proxy Settings blank.
  9. Click Submit.
  10. On the DB Connections page, click DBLOGIN to validate the connection.

    Note:

    A successful DBLOGIN validates only the saved connection information. It does not validate the Extract or Replicat configuration or MongoDB Handler configuration. After successful validation, the connection is available for selection during Extract or Replicat creation.

10.6.7.4 Use a MongoDB Connection in Replicat

Use a MongoDB Connection in Oracle GoldenGate

After you validate the MongoDB connection, you can use it with Extract to capture data from MongoDB as a source or with Replicat to deliver data to MongoDB as a target.

Use the Connection with Extract

  1. Create or edit an Extract.
  2. Select MongoDB as the source technology.
  3. Select the validated MongoDB connection.
  4. Complete the remaining Extract configuration.
  5. Create and start the Extract.

Oracle GoldenGate uses the selected connection to establish communication with the source MongoDB deployment.

Use the Connection with Replicat

  1. Create or edit a Replicat.
  2. Select MongoDB as the target technology.
  3. Select the validated MongoDB connection.
  4. Complete the remaining Replicat configuration.
  5. Create and start the Replicat.

The selected connection supplies the generated connection reference that is used by the MongoDB Handler. Oracle GoldenGate uses the MongoDB connection URI to establish communication with the target MongoDB deployment.