Skip to main content

Oracle GoldenGate Credential Store

 

🔐 Oracle GoldenGate Credential Store - Complete Guide 🔐

🤔 What is the Oracle GoldenGate Credential Store?

The Oracle GoldenGate Credential Store is a security feature that securely stores database login credentials (usernames and passwords) in an encrypted wallet file. This eliminates the security risk of hard-coding sensitive passwords in parameter files or commands.

The credential store is managed through the GoldenGate Software Command Interface (ggsci), making it easy to integrate into your data replication workflow.

✨ Benefits of Using the Credential Store

  • 🛡️ Enhanced Security: Credentials are stored in an encrypted format
  • 🧰 Simplified Management: No need to update multiple parameter files when passwords change
  • ⚠️ Reduced Risk: Eliminates plaintext passwords in configuration files
  • ⚡ Operational Efficiency: Use aliases instead of managing credentials directly

📝 Step 1: Creating the Credential Store

From the GGSCI command prompt, create your credential store:

ADD CREDENTIALSTORE

By default, GoldenGate creates the wallet in $OGG_HOME/dircrd/. You can specify a custom location by modifying the GLOBALS file:

vi $OGG_HOME/GLOBALS
CREDENTIALSTORELOCATION /your/custom/path

If you change the location, you'll need to run the CREATE CREDENTIALSTORE command again.

👤 Step 2: Adding User Credentials

To add database credentials to your store:

ALTER CREDENTIALSTORE ADD USER <username>@<tns_alias>, ALIAS <your_alias> [DOMAIN <domain_name>]

Example:

ALTER CREDENTIALSTORE ADD USER ggadmin@ggdb, ALIAS ggdb

When you run this command, GoldenGate will securely prompt you for the password.

🔄 Step 3: Using Your Stored Credentials

Once you've stored your credentials, you can use them in your DBLOGIN command:

DBLOGIN USERIDALIAS ggdb

You can also reference them in your extract or replicat parameter files:

USERIDALIAS ggdb

✅ Step 4: Testing the Connection

Verify your credentials are working correctly:

DBLOGIN USERIDALIAS ggdb

A successful connection will show:

Successfully logged into database.

⚠️ Common Errors and Troubleshooting

🚫 Error: Credential store location was not found

Solution:

  • If you haven't created the store yet: Run ADD CREDENTIALSTORE
  • If using a custom path: Verify the directory exists and has the proper permissions

🚫 ORA-12154: TNS:could not resolve the connect identifier specified

Solution:

  • Verify your tns_alias is correctly defined
  • Check that tnsnames.ora is accessible

Set your environment variables:

export TNS_ADMIN=/path/to/network/admin
export LD_LIBRARY_PATH=/opt/oracle/product/19c/lib

Test with:

tnsping ggdb

🚫 ORA-12514: TNS:listener does not currently know of service requested

Solution:

  • Your TNS alias doesn't match the actual service registered with the listener

Check the available services on the database host:

lsnrctl status

Update your tnsnames.ora accordingly.

🚫 OGG-03542: Failed to connect to the database

Solution:
Check these common issues:

  • Incorrect LD_LIBRARY_PATH
  • Incorrect TNS_ADMIN path
  • Instant client incompatibility
  • Insufficient user privileges

Ensure these variables are set:

export TNS_ADMIN=/path/to/network/admin
export LD_LIBRARY_PATH=/path/to/instantclient

🗑️ Deleting or Resetting the Credential Store

GoldenGate doesn't provide a DROP CREDENTIALSTORE command. To delete it manually:

cd $OGG_HOME/dircrd
rm -f cwallet.sso ewallet.p12

Remember to update your GLOBALS file if needed.

To recreate the credential store:

ADD CREDENTIALSTORE
ALTER CREDENTIALSTORE ADD USER ...

💻 Example Setup for GoldenGate Instant Client

Here's a complete example of setting up the credential store with an instant client:

export TNS_ADMIN=/opt/app/ogg21c/network/admin
export LD_LIBRARY_PATH=/opt/app/ogg21c/instantclient
cd /opt/app/ogg21c
./ggsci
ADD CREDENTIALSTORE
ALTER CREDENTIALSTORE ADD USER ggudb@gg_dev, ALIAS gg_dev
DBLOGIN USERIDALIAS gg_dev

🎯 Conclusion

The Oracle GoldenGate Credential Store provides an essential security layer for your data replication environment. By properly implementing the credential store, you'll eliminate plaintext passwords in your configuration files while streamlining credential management for your database connections.

✍️ Have you implemented the GoldenGate Credential Store in your environment? Share your experience in the comments below!


This guide was last updated on April 22, 2025. ⏱️

Comments

Popular posts from this blog

🚀 Automating Oracle Database Patching with Ansible: A Complete Guide

Oracle database patching has long been the bane of DBAs everywhere. It's a critical task that requires precision, expertise, and often results in extended maintenance windows. What if I told you that you could automate this entire process, reducing both risk and downtime while ensuring consistency across your Oracle estate? 💡 In this comprehensive guide, I'll walk you through a production-ready Ansible playbook that completely automates Oracle patch application using OPatch. Whether you're managing a single Oracle instance or hundreds of databases across your enterprise, this solution will transform your patch management strategy! 🎯 🔥 The Challenge: Why Oracle Patching is Complex Before diving into the solution, let's understand why Oracle patching is so challenging: 🔗 Multiple dependencies : OPatch versions, Oracle Home configurations, running processes ⚠️ Risk of corruption : Incorrect patch application can render databases unusable ⏰ Downtime requirements : Da...

🚀 DB BOT: Real-Time Oracle & GoldenGate Monitoring in Slack

In today's fast-paced DevOps environment, quick access to database metrics is essential. This blog will walk you through creating a Slack bot that provides real-time monitoring of Oracle databases and Golden Gate replication. With simple slash commands, your team can check tablespace usage, Flash Recovery Area status, and Golden Gate replication health directly in Slack. Project Overview Our "DB Bot" offers these key capabilities: Monitor tablespace usage across multiple Oracle databases Check Flash Recovery Area (FRA) status on multiple databases View GoldenGate process status across different servers List GoldenGate credential stores Monitor replication lag in GoldenGate Prerequisites Node.js v14+ Python 3.6+ Oracle client libraries (instantclient_21_19) Access to Oracle databases and GoldenGate servers A Slack workspace with permissions to add apps   Project Structure oracle-slack-bot...

Oracle Golden Gate Bi-directional Replication Implementation Guide

Oracle GoldenGate (OGG) is a comprehensive software package for real-time data integration and replication in heterogeneous IT environments. Bi-directional replication enables organizations to maintain synchronized data across multiple data centers, providing high availability, disaster recovery, and load distribution capabilities. This detailed guide provides step-by-step instructions for implementing Oracle GoldenGate bi-directional replication between two Oracle databases. Architecture Overview In this setup, we'll configure: TestDC1 : Primary data center with TestDB1 TestDC2 : Secondary data center with TestDB2 Bi-directional sync : Changes flow in both directions with conflict resolution Step 1: Software Installation ⚠️ SERVER EXECUTION: Perform these steps on BOTH TestDC1 and TestDC2 servers Step 1.1: Download and Prepare Software First, create the necessary directory structure and prepare for installation: # Create directory for the software mkdir /data01/ogg_setup cd /d...