That’s Me

Gavin Soorma
  • Oracle Certified Professional
  • 7.3, 8i, 9i,10g, 11g
  • 11i Apps DBA OCP
  • 10g RAC OCE
  • Certified GoldenGate Implementation Specialist
  • 10g OCM
  • 11g OCM

  • Feedback

    1,650,000 hits

    Thanks A MILLION for your support!

    Please send me your valuable feedback and suggestions






    Using the GoldgenGate column conversion functions - STRCAT and STREXT

    In one of my earlier posts, I had showed some examples of using the CASE and EVAL column conversion functions available in GoldenGate.

    Let us today take a look at two other functions STRCAT and STREXT.

    STRCAT basically enables us to concatenate two strings or two character columns.

    The STREXT function on the other hand is used to extract a portion of a string.

    For example in our source database we have a table MYPHONE with the following structure:

    SQL> desc myphone
    Name Null? Type
    —————————————– ——– —————————-
    AREA_CODE

    Continue reading Using the GoldgenGate column conversion functions – STRCAT and STREXT

    Using the GoldenGate column conversion functions - CASE and EVAL

    Let us have a look at some GoldenGate column conversion functions – CASE and EVAL

    To illustrate this example, we have a source and target table called EMPSAL and the structure of the tables in both databases is slightly different.

    In the source table we have the JOB column and in the target database we have a TAX_BRACKET column.

    In the first example, we will use CASE function to populate the target database TAX_BRACKET column based on the value for the JOB column in the source database.

    In the second example, we will use the EVAL function to populate the target database TAX_BRACKET column based on a particular range of values for the SAL column in the source table.

    Remember that since the table structure in source and target are different, we need to run the DEFGEN utility to generate a definitions file which we will then copy to the target GoldenGate

    Continue reading Using the GoldenGate column conversion functions – CASE and EVAL

    Passed the 1Z0-539 Exam - am now an Oracle Certified GoldenGate Implementation Specialist

    I have recently passed the Oracle GoldenGate 10 Essentials exam which recognizes you as a Oracle GoldenGate 10 Certified Implementation Specialist.

    Note that the exam is currently based on GoldenGate 10.4 and not the 11g version of GoldenGate which has been out now for quite some time.

    I must point out that while there are a number of ‘brain dumps’ like Pass4Sure and Test King to ‘help’ you pass the exam, I have seen the questions and answers that are provided by them and in most cases I found the answers to be provided to be grossly incorrect and wrong. So beware!

    The best preparation for the exam is to go through the following sets of documentation:

    Oracle Installation and Setup Guide
    Reference Guide
    Administration Guide

    These and other 10.4 GoldenGate documentation can be obtained online here …

    I am now available to provide my services in any GoldenGate implementation project around the world as well

    Continue reading Passed the 1Z0-539 Exam – am now an Oracle Certified GoldenGate Implementation Specialist

    Does GoldenGate support Oracle Flashback?

    There is an Oracle Metalink Note (Does Goldengate Support The New Oracle 10g Flashback Feature? [ID 966212.1]) which discusses this aspect, but I thought that I would like to see for myself how does the Extract and Replicat processes behave if we issue any FLASHBACK command on the source database.

    The Metalink note states that GoldenGate supports the following Flashback operations:

    Flashback Table to SCN
    Flashback Table to timestamp
    Flashback Table to restore point

    and does not support operations like:

    Flashback Table to before drop
    Flashback database

    I have tested both the Flashback Table To Timestamp as well as the Flashback Table To Before Drop operations and find that both seem to be supported by GoldenGate and replication continues inspite of these commands being issued on the source database.

    Let us see the examples of the same.

    I have an Oracle 11g Goldengate (11.1.1) environment configured with the source and target databases of version 11.2.0.2.

    Extract and Replicat processes are running

    Continue reading Does GoldenGate support Oracle Flashback?

    GoldenGate replication with source and target on the same physical host

    I have been asked this question several times about using GoldenGate to replicate between source and target Oracle databases located on the same physical server. Do we need two manager processes, or do we need two separate Goldengate environments or what happens if one database is a version 11g database and the other is 10g – do we need to install two versions of GoldenGate and so on and so forth.

    To answer these common questions:

    1) You do not need two manager processes configured. In fact, I am not sure if we can have multiple manager processes on the same GoldenGate environment.
    2) You do not need to install two GoldenGate environments in this particular case– one for source and one for target
    3) You can replicate data from 11g to 10g and vice versa as well.
    4) Both extract and replicat processes can run on the same host with one manager process for both

    Let us test

    Continue reading GoldenGate replication with source and target on the same physical host

    GoldenGate replication using a data definition file and DEFGEN utility

    Some time back I had written a post on GoldenGate column mapping and transformations.

    I have been asked the question several times regarding how can we replicate data between tables which are not similar in structure or where the target table has columns which are just a subset of the columns present in the source table.

    Let us look at a simple example to see how this can be done using the DEFGEN utility of GoldenGate.

    In this example we have a source table MYOBJECTS2 (based on DBA_TABLES) and the target table structure is different as it has only three columns – OWNER, OBJECT_NAME and OBJECT_TYPE as shown below.

    The table has 113238 rows which we need to replicate to the target database.

    Source table

    SQL> desc myobjects2
    Name

    Continue reading GoldenGate replication using a data definition file and DEFGEN utility

    Capturing GoldenGate Before Images Using GETUPDATEBEFORES

    Oracle Goldengate provides a mechanism for capturing the before images of the row before any modifications were made to the row. Something very similar to the undo segment concept of the Oracle database.

    This can be done using the GETUPDATEBEFORES parameter in either the Extract or Replicat parameter file which will essentially control whether or not the before images of updated columns are included in the records which are processed by GoldenGate.

    We can use this not only for conflict resolution purposes but more importantly by comparing before and after images, we can identify net results of transactions, perform some delta calculations and also to maintain a transaction history.

    Let us for example see a case where we are storing some currency exchange data in a table which is naturally subject to changes on a continuous basis because the currency rates naturally fluctuate over time.

    We would like to maintain a history of

    Continue reading Capturing GoldenGate Before Images Using GETUPDATEBEFORES

    Handling GoldenGate Exceptions and Errors with REPERROR

    We can use the REPERROR parameter in the Replicat parameter file to control the way that the replication process responds to or handles any errors encountered in any of the DML statements which it is trying to process.

    We can use the keyword DEFAULT to set a global response for all errors except those for which explicit REPERROR statements have been specified.

    In the example we will see how we are handling the ORA-00001: unique constraint violated error using an exception handler specified via the REPERROR (-1, EXCEPTION) clause of the Replicat parameter file.

    By default, if the replicat process encounters any error condition it will abend.

    The example shows how by using an exception handler, replicat process does not abend, but handles the exceptions appropriately and continues processing.

    If we have a primary key defined on both the source and target tables and if a unique key violation does happen, then neither the

    Continue reading Handling GoldenGate Exceptions and Errors with REPERROR

    Customizing GoldenGate processing using SQLEXEC and GETVAL

    Let us see how we can use the SQLEXEC parameter of GoldenGate to execute both an SQL query as well as a stored procedure and then using the @GETVAL function, we can populate a column in the target database which is not present on the source table.

    Using a simple example to illustrate this, let us suppose we have two tables – one a lookup table called COUNTRY_CODES which has the country_name and country_id columns and another table called CUSTOMERS which only has the country_id column.

    We would like to customize the GoldenGate processing and also display the country_name along with the country_id in the CUSTOMERS table itself on the target database.

    Let us look at two ways of doing this – one using a SQL query and the other case where we use a stored procedure and pass a parameter to the stored procedure.

    Case 1 – using SQL Query

    Here we

    Continue reading Customizing GoldenGate processing using SQLEXEC and GETVAL

    Using GoldenGate EVENTACTIONS to customize processing

    Oracle Goldengate has an event marker system which enables the GoldenGate processes to perform some defined action when a specific event occurs which is recorded in the trail file.

    The event record is a record will trigger the event action and this is specified using the FILTER or WHERE clause in the TABLE statement of an Extract parameter file or the MAP statement of a Replicat parameter file. It can also be specified using an SQLEXEC query or a stored procedure.

    In the same Extract or Parameter file in which we specified the event record, we will use the EVENTACTIONS keyword to specify what action is to be taken by the process.

    EVENTACTIONS could be specified via the keywords like IGNORE, DISCARD, ABORT, STOP, SHELL, TRACE, LOG which denote what actions should be taken now that the specified record criteria has been met.

    Please refer to the Chapter ‘Customizing Oracle GoldenGate Processing” (page 276)

    Continue reading Using GoldenGate EVENTACTIONS to customize processing