[ad_1]
Fashionable enterprise purposes depend on well timed and correct information with growing demand for real-time analytics. There’s a rising want for environment friendly and scalable information storage options. Information at instances is saved in several datasets and must be consolidated earlier than significant and full insights could be drawn from the datasets. That is the place replication instruments assist transfer the info from its supply to the goal techniques in actual time and rework it as crucial to assist companies with consolidation.
On this submit, we offer a step-by-step information for putting in and configuring Oracle GoldenGate for streaming information from relational databases to Amazon Easy Storage Service (Amazon S3) for real-time analytics utilizing the Oracle GoldenGate S3 handler.
Oracle GoldenGate for Oracle Database and Huge Information adapters
Oracle GoldenGate is a real-time information integration and replication device used for catastrophe restoration, information migrations, excessive availability. It captures and applies transactional adjustments in actual time, minimizing latency and protecting goal techniques synchronized with supply databases. It helps information transformation, permitting modifications throughout replication, and works with numerous database techniques, together with SQL Server, MySQL, and PostgreSQL. GoldenGate helps versatile replication topologies comparable to unidirectional, bidirectional, and multi-master configurations. Earlier than utilizing GoldenGate, ensure you have reviewed and cling to the license settlement.
Oracle GoldenGate for Huge Information offers adapters that facilitate real-time information integration from totally different sources to large information providers like Hadoop, Apache Kafka, and Amazon S3. You may configure the adapters to regulate the info seize, transformation, and supply course of based mostly in your particular necessities to help each batch-oriented and real-time streaming information integration patterns.
GoldenGate offers particular instruments known as S3 occasion handlers to combine with Amazon S3 for information replication. These handlers permit GoldenGate to learn from and write information to S3 buckets. This selection lets you use Amazon S3 for GoldenGate deployments throughout on-premises, cloud, and hybrid environments.
Answer overview
The next diagram illustrates our resolution structure.
On this submit, we stroll you thru the next high-level steps:
- Set up GoldenGate software program on Amazon Elastic Compute Cloud (Amazon EC2).
- Configure GoldenGate for Oracle Database and extract information from the Oracle database to path information.
- Replicate the info to Amazon S3 utilizing the GoldenGate for Huge Information S3 handler.
Stipulations
You should have the next stipulations in place:
Set up GoldenGate software program on Amazon EC2
That you must run GoldenGate on EC2 cases. The cases will need to have satisfactory CPU, reminiscence, and storage to deal with the anticipated replication quantity. For extra particulars, discuss with Working System Necessities. After you identify the CPU and reminiscence necessities, choose a present era EC2 occasion kind for GoldenGate.
Use the next method to estimate the required path house:
path disk house = transaction log quantity in 1 hour x variety of hours down x .4
When the EC2 occasion is up and working, obtain the next GoldenGate software program from the Oracle GoldenGate Downloads web page:
- GoldenGate 21.3.0.0
- GoldenGate for Huge Information 21c
Use the next steps to add and set up the file out of your native machine to the EC2 occasion. Make it possible for your IP handle is allowed within the inbound guidelines of the safety group of your EC2 occasion earlier than beginning a session. For this use case, we set up GoldenGate for Traditional Structure and Huge Information. See the next code:
Set up GoldenGate 21.3.0.0
Full the next steps to put in GoldenGate 21.3 on an EC2 occasion:
- Create a house listing to put in the GoldenGate software program and run the installer:
- Run runInstaller:
A GUI window will pop as much as set up the software program.
- Observe the directions within the GUI to finish the set up course of. Present the listing path you created as the house listing for GoldenGate.
After the GoldenGate software program set up is full, you’ll be able to create the GoldenGate processes that learn the info from the supply. First, you configure OGG EXTRACT.
- Create an extract parameter file for the supply Oracle database. The next code is the pattern file content material:
- Add the EXTRACT on the GoldenGate immediate by working the next command:
- After you add the EXTRACT, test the standing of the working applications with the information all
You will notice the EXTRACT standing is within the STOPPED state, as proven within the following screenshot; that is anticipated.
- Begin the EXTRACT course of as proven within the following determine.
The standing adjustments to RUNNING. The next are the totally different statuses:
- STARTING – The method is beginning.
- RUNNING – The method has began and is working usually.
- STOPPED – The method has stopped both usually (managed method) or as a consequence of an error.
- ABENDED – The method has been stopped in an uncontrolled method. An irregular finish is called ABEND.
This can begin the extract course of and a path file will probably be created within the location talked about within the extract parameter file.
- You may confirm this through the use of the command
stats <<group_name>>
, as proven within the following screenshot.
Set up GoldenGate for Huge Information 21c
On this step, we set up GoldenGate for Huge Information in the identical EC2 occasion the place we put in the GoldenGate Traditional Structure.
- Create a listing to put in the GoldenGate for Huge Information software program. To repeat the .zip file, observe these steps:
This can begin the MANAGER program. Now you’ll be able to set up the dependencies required for the REPLICAT to run.
- Go to
/u01/app/oracle/product/OGG_BIG_DATA/DependencyDownloader
and run the sh file with the most recent model of aws-java-sdk. This script downloads the AWS SDK, which offers shopper libraries for connectivity to the AWS Cloud.
Configure the S3 handler
To configure an GoldenGate Replicat to ship information to an S3 bucket, it’s essential arrange a Replicat parameter file and properties file that defines how information is dealt with and despatched to Amazon S3.
AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
are the entry key and secret entry key of your IAM consumer, respectively. Don’t hardcode credentials or safety keys within the parameter and properties file. There are a number of strategies obtainable to attain this, comparable to the next:
You may set these surroundings variables in your shell configuration file (e.g., .bashrc, .bash_profile, .zshrc) or use a safe methodology to set them briefly:
Configure the properties file
Create a properties file for the S3 handler. This file defines how GoldenGate will work together along with your S3 bucket. Just be sure you have added the proper parameters as proven within the properties file.
The next code is an instance of an S3 handler properties file (dirprm/reps3.properties
):
Configure GoldenGate REPLICAT
Create the parameter file in /dirprm
within the GoldenGate for Huge Information dwelling:
Now you might have efficiently began the Replicat. You may confirm this by working data and stats instructions adopted by the Replicat title, as proven within the following screenshot.
To substantiate that the file has been replicated to an S3 bucket, open the Amazon S3 console and open the bucket you created. You may see that the desk information has been replicated to Amazon S3 in JSON file format.
Greatest practices
Just be sure you are following one of the best practices on efficiency, compression, and safety.
Think about the next greatest practices for efficiency:
The next are greatest practices for compression:
- Allow compression for path information to cut back storage necessities and enhance community switch efficiency.
- Use GoldenGate’s built-in compression capabilities or use file system-level compression instruments.
- Strike a steadiness between compression degree and CPU overhead, as a result of increased compression ranges might affect efficiency.
Lastly, when implementing Oracle GoldenGate for streaming information to Amazon S3 for real-time analytics, it’s essential to deal with numerous safety issues to guard your information and infrastructure. Observe the safety greatest practices for Amazon S3 and safety choices obtainable for GoldenGate Traditional Structure.
Clear up
To keep away from ongoing costs, delete the sources that you just created as a part of this submit:
- Take away the S3 bucket and path information if not wanted and cease the GoldenGate processes on Amazon EC2.
- Revert the adjustments that you just made within the database (comparable to grants, supplemental logging, and archive log retention).
- To delete all the setup, cease your EC2 occasion.
Conclusion
On this submit, we supplied a step-by-step information for putting in and configuring GoldenGate for Oracle Traditional Structure and Huge Information for streaming information from relational databases to Amazon S3. With these directions, you’ll be able to efficiently arrange an surroundings and make the most of the real-time analytics utilizing a GoldenGate handler for Amazon S3, which we are going to discover additional in an upcoming submit.
In case you have any feedback or questions, go away them within the feedback part.
In regards to the Authors
Prasad Matkar is Database Specialist Options Architect at AWS based mostly within the EMEA area. With a concentrate on relational database engines, he offers technical help to prospects migrating and modernizing their database workloads to AWS.
Arun Sankaranarayanan is a Database Specialist Answer Architect based mostly in London, UK. With a concentrate on purpose-built database engines, he assists prospects in migrating and modernizing their database workloads to AWS.
Giorgio Bonzi is a Sr. Database Specialist Options Architect at AWS based mostly within the EMEA area. With a concentrate on relational database engines, he offers technical help to prospects migrating and modernizing their database workloads to AWS.
[ad_2]