Skip to main content

Oracle GoldenGate for Real Time Data and AI Pipelines

AI applications need fresh and accurate data to provide useful results.

In many organizations, important business data is stored in Oracle databases. Traditional ETL processes normally move this data to other systems in batches. This means AI and analytics platforms may sometimes work with old data.

Oracle GoldenGate helps solve this problem by moving database changes in near real time.

  

How Does It Work?

Oracle GoldenGate uses Change Data Capture (CDC) to capture changes from Oracle database redo logs.

It can capture:

  • INSERT
  • UPDATE
  • DELETE

 

The basic flow is:

Oracle Database → GoldenGate → Kafka / Streaming Platform → AI Processing → Vector Database → RAG / LLM

 

For example, imagine an order status changes:

UPDATE SALES.ORDERS

SET STATUS = 'SHIPPED'

WHERE ORDER_ID = 875423;

 

GoldenGate can capture this change and send it to a streaming platform such as Kafka.

  

 

The event could look like:

{

  "operation": "UPDATE",

  "order_id": 875423,

  "status": "SHIPPED"

}

 

The important point is that the application does not need to wait for the next large ETL job.

The change can move through the data pipeline soon after the transaction happens.

  

GoldenGate Configuration

The Oracle database needs the correct logging configuration for GoldenGate.

 

For example:

ALTER DATABASE FORCE LOGGING;

ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;

GoldenGate can then be configured to capture the required tables.

DBLOGIN USERIDALIAS oggadmin

 

ADD TRANDATA SALES.CUSTOMERS

ADD TRANDATA SALES.ORDERS

ADD TRANDATA SALES.TRANSACTIONS

A simple Extract configuration could include:

EXTRACT EXTORA

 

USERIDALIAS oggadmin

 

EXTTRAIL ./dirdat/ea

 

TABLE SALES.CUSTOMERS;

TABLE SALES.ORDERS;

TABLE SALES.TRANSACTIONS;

 

The flow is basically,

Oracle Redo Logs → GoldenGate Extract → Trail Files → Target / Kafka

Connecting GoldenGate with AI

 

Lets see how things work when GoldenGate sends changes to Kafka or another streaming platform.

A consumer application can process the events:

for message in consumer:

 

    event = message.value

 

    if event["operation"] in ["INSERT", "UPDATE"]:

 

        document = (

            f"Order {event['order_id']} "

            f"is currently {event['status']}."

        )

        process_for_ai(document)

The text can then be converted into an embedding.

An embedding is a numerical representation of the meaning of the data.

embedding = embedding_model.embed(document)

The embedding can be stored in a vector database for AI searches.

GoldenGate + Oracle AI Vector Search

 

A modern Oracle AI architecture could therefore look like:

Oracle Database → GoldenGate → Kafka → AI Processor → Embedding Model → Oracle AI Vector Search → RAG → LLM

 

For example, we can maintain an AI knowledge table:

 

CREATE TABLE AI_ORDER_KNOWLEDGE

(

    ORDER_ID       NUMBER,

    CUSTOMER_ID    NUMBER,

    CONTENT        CLOB,

    EMBEDDING      VECTOR,

    LAST_UPDATED   TIMESTAMP

);

 

A user can then ask: Which orders are having delivery problems?

 

Instead of searching only for exact words, AI Vector Search can find information that is semantically related to the question.

 

  

SELECT order_id,

       content

FROM ai_order_knowledge

ORDER BY VECTOR_DISTANCE(

    embedding,

    :query_vector,

    COSINE

)

FETCH FIRST 5 ROWS ONLY;

 

The relevant information can then be passed to an LLM using RAG.

 

UPDATE and DELETE Are Important

AI data also needs to stay synchronized.

For example, if:

Case 90021 is OPEN

changes to:

Case 90021 is RESOLVED

 

the old AI information should also be updated.

The same applies when information is deleted.

Without this, an AI assistant could provide information that is no longer correct.

 

GoldenGate CDC can help the AI pipeline identify these changes and keep the downstream data updated.

 

  

Monitoring the Pipeline

GoldenGate provides commands for monitoring replication:

INFO ALL

LAG EXTRACT EXTORA

INFO EXTRACT EXTORA, DETAIL

STATS EXTRACT EXTORA

 

But for AI systems, we should look beyond GoldenGate.

The real measurement should be:

Database Change → GoldenGate → Kafka → AI Processing → Embedding → Vector Database

This gives us the true end to end AI data freshness.

 

Security and Governance

Not everything in an Oracle database should be sent to an AI platform.

Organizations may have sensitive information such as:

  • Customer information
  • Account numbers
  • Financial information
  • Personal information
  • Confidential business data

 

Therefore, data should be filtered, masked and controlled before it reaches the AI platform.

 

A good architecture should follow:

Oracle → GoldenGate → Filtering / Transformation → Approved AI Data → Vector Store → RAG / LLM

 

This is especially important for banks, healthcare organizations, insurance companies, government institutions etc..

 

Why Is This Important?

GoldenGate has traditionally been used for:

Database Replication | Migration | Disaster Recovery | Data Integration

But AI creates another important use case.

GoldenGate can become the real time data bridge between enterprise databases and AI platforms.

 

Instead of AI working with yesterday’s or last hour’s data, organizations can build systems that work with much fresher business information.

 

The architecture becomes:

Systems of Record → GoldenGate → Real-Time Data → AI Platform → Systems of Intelligence

 

For Oracle DBAs and developers, this is also an important change.

The traditional role was mainly focused on:

Database Availability → Performance → Backup → Recovery

The modern data platform role is expanding toward:

CDC → Streaming → Data Governance → Vector Data → AI Data Pipelines

 

So as a conclusion , Oracle GoldenGate can play an important role in connecting the traditional enterprise database world with the new world of real time AI!

 

 

Comments

Popular posts from this blog

Building Continuous Data Trust with Oracle GoldenGate Veridata 26c

Today I'll discus on how we can build continuous data trust with Oracle GoldenGate Veridata 26c! As we accelerate towards hybrid and multi cloud architectures , one challenge keep coming up. That is "H ow do you trust your data across all these platforms?" With increasing data movement, replication, and transformation, even small changes can lead to major business risks. This is where Oracle GoldenGate Veridata 26c comes in handy! Rather than just validating data occasionally, the focus now is on continuous data trust . What is Veridata? It is a tool to compare data across different systems. It ensures source and target databases are in sync. It works during , Data migration, Replication setups, Ongoing operations. What’s new in Veridata 26c? 1. Support for Modern Architectures Built for hybrid, multi-cloud, and lakehouse environments with support for heterogeneous databases. 2. Continuous Data Validation Enables ongoing validation to detect data drift and inconsisten...

Top 5 Performance Tuning Tricks Every Oracle DBA Should Know!

Performance tuning in Oracle Database often focuses on obvious areas like indexes, SQL rewrites etc. But some of the most impactful improvements can come from lesser known techniques. Here are 5 such tuning tricks that can make a real difference in production environments.   Use SQL Plan Baselines to Stabilize Performance Even properly tuned queries in Oracle Database can suddenly degrade when execution plans change due to statistics refreshes or system upgrades. Using SQL Plan Baselines helps maintain stable and efficient execution plans, preventing unexpected performance regressions especially in highly changing workloads. SELECT * FROM DBA_SQL_PLAN_BASELINES; So, don’t just capture baselines, but periodically change them to allow the optimizer to adopt better plans when appropriate. Use Automatic Indexing Automatic Indexing is a useful feature in Oracle Database that can improve performance with minimal effort.  It was introduced in Oracle Database 19c and enhance...

Bring AI to Data , A Smarter Way with Oracle!

  “Bring AI to Data” is a term I recently heard during the Oracle AI World in Singapore last week and it really caught my attention. It sounded simple but the idea behind it is quite powerful. So I thought it’s worth exploring a bit more! Normally, working with data and AI meant one thing, which is, moving data around. We would extract data from databases, send it to external tools or platforms, build machine learning models and then push the results back into the database. But this approach adds complexity, increases costs and introduces security risks. But now, Oracle is changing that model by bringing AI to where the data already is ! The concept of “Bring AI to Data” is straightforward but powerful. Instead of moving large volumes of data across systems, Oracle allows you to run AI and machine learning directly inside the database. This means that data do not have to leave its secure environment. This results faster processing, reduced data duplication, improved security ...