Connect to MongoDB
Learn to create a connection to MongoDB to use as a source or target for OCI GoldenGate.
Before you begin
- Review how OCI GoldenGate connects to your source and targets.
- Configure the required policies to enable secure Vault and Secrets access, such as use secrets, use vaults, and read secret-bundles. For more information, see Minimum recommended policies.
Create the connection
Known issues
OCI GoldenGate MongoDB connection doesn't support mongdb+srv connection strings.
Workaround: Use MongoDB connection strings.
- In MongoDB Atlas, click Connect.
- Select Drivers.
- Select Java.
- For Version, select 3.4 or later.
- You can use the provided mongodb string. For
example:
mongodb://<user_name>:<db_password>@cluster0-shard-00-00.abc.mongodb.net:27017,cluster0-shard-00-01.abc.mongodb.net:27017,cluster0-shard-00-02.abc.mongodb.net:27017/?ssl=true&replicaSet=atlas-3grqh1-shard-0&authSource=admin&retryWrites=true&w=majority&appName=Cluster0
Issue with MongoDB Test connection
You may encounter an error when using Test connection with MongoDB connections. You can ignore this error and test MongoDB connections in the OCI GoldenGate deployment console. In the deployment console, open the navigation menu for the Administration Service, click Configuration. Your MongoDB connection should be listed as a credential, where you can click Connect to <alias> to test the connection.