Monday, May 5, 2025

Common issue in Golden Gate along with Solution

 Common issue in Golden Gate along with Solution


1. Processes Startup Issues
❗Problem:
GoldenGate processes (like Extract or Replicat) fail to start due to missing parameters, port issues, or environment settings.

๐Ÿงช Example:
GGSCI> start extract EXT1
ERROR: Missing required parameter: USERID
✅ Solution:
Check the parameter file:
GGSCI> edit params EXT1
Ensure you have the required lines like:
USERID ggs_admin, PASSWORD ggs_pwd
TABLE schema.table;
USERID ggs_admin, PASSWORD ggs_pwd
TABLE schema.table;
Also, make sure the GoldenGate home and environment variables (like LD_LIBRARY_PATH) are set correctly:
echo $ORACLE_HOME
echo $LD_LIBRARY_PATH
Check if the Manager process is running:
GGSCI> info mgr
GGSCI> start mgr

๐Ÿ”น 2. Data Not Getting Captured
❗Problem:
Extract is running but no data is captured in the trail files.

๐Ÿงช Example:
GGSCI> stats extract EXT1, totalsonly
Shows 0 inserts/updates/deletes even though source table has changes.

✅ Solution:
Check if the table is included in the Extract parameter file:
TABLE hr.employees;

Supplemental logging may not be enabled on the source:
ALTER TABLE hr.employees ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
Check if the database is in ARCHIVELOG mode:
ARCHIVE LOG LIST;
Ensure DDL include/exclude rules aren't filtering it out.

๐Ÿ”น 3. Data Not Getting Applied onto Target DB
❗Problem:
Replicat is running, but target database is not getting updated.

๐Ÿงช Example:
GGSCI> stats replicat REP1, totalsonly
Shows 0 operations, even though trail files exist.

✅ Solution:
Check if trail file path is correct in Replicat parameters:
EXTTRAIL ./dirdat/aa
Validate table mapping:
MAP hr.employees, TARGET hr.employees;
Check for errors in the report file:
GGSCI> view report REP1
Use logdump to inspect the trail file and confirm it contains valid data.

๐Ÿ”น 4. Data Integrity Issues
❗Problem:
Rows are missing, duplicated, or mismatched between source and target.

๐Ÿงช Example:
Target has duplicate rows or missing foreign key entries.

✅ Solution:
Use HANDLECOLLISIONS temporarily for mismatch scenarios during initial sync:
HANDLECOLLISIONS
Use Oracle GoldenGate Veridata or run SQL MINUS to compare source/target data:
SELECT * FROM source_table
MINUS
SELECT * FROM target_table;
If using bidirectional replication, enable REPERROR (default, discard) to avoid looping conflicts and use TRIGGERSUPPRESS.

Use BATCHSQL in Replicat for better performance and consistency on large updates.

Saturday, May 3, 2025

DR Drill in Oracle RAC 19c

๐Ÿš€ Successfully Completed DR Drill in Oracle RAC 19c! ๐Ÿ”ฅ
Performing a Disaster Recovery (DR) Drill is a crucial step in ensuring business continuity and validating our DR strategy. Recently, I had the opportunity to execute a DR drill in an Oracle RAC 19c environment, and I wanted to share some key steps and commands used during the process.

Key Steps in DR Drill:
✅ Check Primary Database & Standby Readiness
✅ Simulate Failover & Switchover Scenarios
✅ Perform Role Transition (Primary <-> Standby)
✅ Validate Data Integrity & Performance
✅ Reinstate Original Primary (if required)

Key Oracle Commands Used in DR Drill:

๐Ÿ”น Check Data Guard Configuration:

DGMGRL> show configuration;
DGMGRL> show database primary_db;
DGMGRL> show database standby_db;

๐Ÿ”น Perform Switchover to Standby (Planned Activity):

DGMGRL> switchover to standby_db;
๐Ÿ”น Perform Failover (Unplanned Disaster Recovery):

DGMGRL> failover to standby_db;
๐Ÿ”น Convert Standby Back to Primary (After Failover):

DGMGRL> reinstate database primary_db;
๐Ÿ”น Verify Redo Apply & Sync Status:

DGMGRL> show database standby_db status;
๐Ÿ”น Start Managed Recovery in Standby (If Required):

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
The DR drill was a great success, ensuring that the standby database can seamlessly take over in case of a failure. Regular DR drills help organizations stay prepared for high availability and disaster recovery challenges.

Monday, November 30, 2020

What makes a great DBA?


  What makes a great DBA?
Knowing how to approach and solve performance problems is one of the vital skills.
  • if you want to be a great DBA, you must learn how to solve performance problems 
  • if you want to know how to solve performance problems, you need a step by step process for it
  • if you want to understand the Oracle memory components, you need to study the Oracle memory
  • if you want to understand the workings of the Oracle cursor, you need to study the 7 stages of the Oracle cursors
  • if you want to understand Oracle statistics, you need to study all the Oracle statistics types and how to use them.
  • if you want to feel confident using the AWR, ADDM and ASH, you need to study these topics in detail.
  • if you want to be able to solve any performance problems, you need to know how to approach the performance problems.