GoldenGate 12c: Initial Configuration

In our last post we have seen “GoldenGate 12c: Installation for Oracle DB” on Linux platform. Now we will do initial configuration before configuring extract and replicat on source and target databases respectively. Here are the steps:

Create tablespace for GGS operations (on both Source & Target DB)

SQL> create tablespace GGS_DATA;

Create User for extract on source database (on both Source & Target DB)

SQL> create user GGSUSER identified by GGSUSER 
     default tablespace GGS_DATA 
     temporary tablespace TEMP;

Grant required permissions (on both Source & Target DB)

SQL> grant connect, resource to ggsuser;

SQL> grant select any dictionary, select any table to ggsuser;

SQL> grant create table to ggsuser;

SQL> grant flashback any table to ggsuser;

SQL> grant execute on dbms_flashback to ggsuser;

SQL> grant execute on utl_file to ggsuser;

SQL> grant create any table to ggsuser;

SQL> grant insert any table to ggsuser;

SQL> grant update any table to ggsuser;

SQL> grant delete any table to ggsuser;

SQL> grant drop any table to ggsuser;

SQL> grant ALTER ANY TABLE to ggsuser;

SQL> grant ALTER SYSTEM to ggsuser;

SQL> grant LOCK ANY TABLE to ggsuser;
     /*Only for initial load.*/

SQL> grant SELECT ANY TRANSACTION to ggsuser; 
     /*To extract changes from redo stored on ASM for classic extract.*/

Authenticate ggsuser via DBMS_GOLDENGATE_AUTH package.

SQL> EXEC DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE('ggsuser');

Other changes on Source DB & Target DBs,

SQL> alter system set enable_goldengate_replication=TRUE;

Enable supplemental logging (only on source, not required on target)

    i. Make sure DB is archive log mode, if not convert it into archivelog mode.

        SQL> select LOG_MODE from v$database;

        O/p should be ARCHIVELOG


    ii. Enable force logging mode.

        SQL> ALTER DATABASE FORCE LOGGING;


    iii. Add supplemental logging for all columns ( if you need to replicate 
         majority of non default schemas)

        SQL> alter database add supplemental log data (ALL) columns;


    iv. Verify the suplimental logging.

        SQL> select SUPPLEMENTAL_LOG_DATA_ALL,SUPPLEMENTAL_LOG_DATA_MIN,
             FORCE_LOGGING from v$database;

        SUP SUPPLEME FOR
        --- -------- ---
        YES IMPLICIT YES

or

        SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;

and

        GGSCI> ADD Trandata .*

Edit Manager parameters on source

    go to ggs home

   ./GGSCI

    GGSCI> edit param mgr

    ================
    PORT 7809
    PurgeOldExtracts /ggs/dirdat/* UseCheckPoints, MinKeepHours 48
    ================


    GGSCI> stop mgr

    GGSCI> start mgr

    GGSCI> info mgr detail

Edit Manager parameters on Target Server

    GGSCI> info mgr


    GGSCI> edit param mgr

    ===================
    PORT 7810
    ===================

We are using 7810 port, you can use default 7809 or any port of your choice based on availability and firewall policy in your organization.

    GGSCI> stop mgr

    GGSCI> start mgr

    GGSCI> info mgr detail

Storing Credentials in Wallet (on both Source & Target Servers)

    GGSCI> create wallet

    Created wallet at location 'dirwlt'.
    Opened wallet at location 'dirwlt'.

    GGSCI> Add CredentialStore

    Credential store created in ./dircrd/.

    GGSCI> alter CredentialStore Add User ggsuser@MASKGGS Password ggsuser Alias ggsuser    
    /*On Source Server.*/

    Credential store in ./dircrd/ altered.


    GGSCI> alter CredentialStore Add User ggsuser@MASKGGT Password ggsuser Alias ggsuser    
     /*On Target Server.*/


    Credential store in ./dircrd/ altered.

    Note: maskggs is tns connection string.


    GGSCI> info CredentialStore

    Reading from ./dircrd/:
    Default domain: OracleGoldenGate
    Alias: oggs_user
    Userid: ggsuser@maskggs

Test Credentials

    GGSCI> DBLogin UserIDAlias ggsuser

At this stage our environment is ready for classic/integrated extract and replicat. We will cover initial load in our next post.

Disclaimer
The views expressed on this blog are my own and do not necessarily reflect the views of either the companies I have worked for or Oracle Corporation and its affiliates. The comments, views and opinions expressed by visitors on this blog are theirs alone and may not reflect mine. Whatever scenarios suggested under this blog were simulated only on demo environment, so it’s advisable to test those in test systems before pushing to your production environment.

Advertisements

Share Your Comment

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Pierre blog

Pierre Forstmann Oracle Database blog

flashdba

Oracle databases, storage and the high-performance world of flash memory

Future Veterans

Ramblings about Oracle

Ranjeet Srivastava

Smile! You’re at the best blog ever

Kevin Closson's Blog: Platforms, Databases and Storage

Platform, Database and Storage Topics

Real Life Database / SQL Experiences : An Oracle Blog from Vivek Sharma

Being an Oracle Professional, I like to share all my Real Life Performance Tuning Challenges and Experiences. The Content and Views on this site are my own and not necessarily those of Oracle. While, I write on my real life experiences, the resolutions mentioned are solely mine. Comments / Criticisms are always a welcome.

Frits Hoogland Weblog

IT Technology; Oracle, linux, TCP/IP and other stuff I find interesting

OraStory

Dominic Brooks on Oracle Performance, Tuning, Data Quality & Sensible Design ... (Now with added Sets Appeal)

ASM Support Guy

Just Another Crazy Oracle DBA

Exadata Certification

Just Another Crazy Oracle DBA

Carlos Sierra's Tools and Tips

Tools and Tips for Oracle Performance and SQL Tuning

Sangram keshari's Oracle Blog

The Fusion Middleware Administration & Database Administration Blog

Amit Saraswat

Just Another Crazy Oracle DBA

Oracle Scratchpad

Just another Oracle weblog

The Tom Kyte Blog

Just Another Crazy Oracle DBA

Hemant's Oracle DBA Blog

Just Another Crazy Oracle DBA

Uwe Hesse

about Database Technology

Richard Foote's Oracle Blog

Focusing Specifically On Oracle Indexes, Database Administration and Some Great Music

%d bloggers like this: