Replicate data from MongoDB to Autonomous JSON Database
Learn to replicate data from MongoDB to Autonomous JSON Database using OCI GoldenGate.
Oracle Autonomous JSON Database is a cloud document database service that makes it simple to develop JSON-centric applications. It features NoSQL-style document APIs (Oracle SODA and Oracle Database API for MongoDB), serverless scaling, high performance ACID transactions, comprehensive security, and low pay-per-use pricing. Learn more about Autonomous JSON Database.
The OCI GoldenGate Big Data deployment type supports no down-time migrations from MongoDB to Autonomous JSON Database. OCI GoldenGate supports both Initial Load Extract and Change Data Capture (CDC) extract from MongoDB.
This quickstart details the process to configure OCI GoldenGate for no down-time migrations from MongoDB to Autonomous JSON Database.
Before you begin
To successfully complete this quicktart, you must have the following:
- MongoDB replica set configured.
- OCI GoldenGate Big Data capture uses operations log (oplog) to read the CDC records. The oplog is a capped collection that keeps a rolling record of all operations that modify the data stored in your databases. Oplog files are created in MongoDB when Replicat set is enabled. MongoDB Atlas comes with a preconfigured Replicat set configuration. For on premises MongoDB, you need to deploy a replica set.
- MongoDB 3.6 & later.
- OCI GoldenGate support for capture of following operations:
INSERT
,UPDATE
,DELETE
.
To learn more, see Using Oracle GoldenGate Capture for MongoDB.
Task 1: Create the OCI GoldenGate resources
- Create an Oracle Autonomous JSON Database.
- Create a Big Data deployment for the source MongoDB and target Oracle Autonomous JSON Database.
- Create a MongoDB connection.
- Create connection for target Create an Autononous JSON Database connection.
- (Optional) If your Big Data deployment doesn't have a public endpoint, then create a connection to GoldenGate, and then assign this connection to the Big Data deployment.
- Assign MongoDB and Autonomous JSON connections to the Big Data deployment.
Task 2: Create and run the Change Data Capture Extract for MongoDB
- In the OCI GoldenGate deployment console, ensure that you're on the Administration Service Overview page, and then click Add Extract (plus icon).
- For Source, select MongoDB from the dropdown and select the Extract Type as Change Data Capture Extract.
- On the Extract Options page, complete the following fields, and then click
Next:
- For Process name, enter
MCDC
. - For Connection Alias, select the name of your MongoDB connection from the dropdown.
- For Trail Name, enter
M1
.
- For Process name, enter
- On the Parameter File page, ensure the source mapping includes
TABLE source.*;
- Click Create and Run.