Thinking Out Loud

November 3, 2017

GoldenGate Naming Convention P01

Filed under: GoldenGate — mdinh @ 10:33 pm

I had a nice discussion with teammates about standards.

It’s wrong if there are no standards or naming conventions; otherwise, let your imagination run wild.

Hence, before you embark, think about it as it will make life much easier.

For prompt: I like to know what ORACLE_SID for environment.

oracle@db-asm-1:amer:/home/oracle
oracle@db-asm-1:euro:/home/oracle

For Goldengate: I did it this way because there are 2 DBs / 2 GGs for the same host.

Why ora12c? There are 2 options when installing Goldengate: ORA11g|ORA12c

/u01/app/oracle/amer/ogg/12.3.0_ora12c
/u01/app/oracle/euro/ogg/12.3.0_ora12c

There was discussion ogg/gg/ggs – doesn’t really matter.

ogg may seem redundant if gg is installed for Oracle DB / Client.

Where should it reside? I had planned for /u02 and /u03 but Vagrant was not being nice to me.

Why different mount? There are GG directories and trails which will fill up.

I like to KISS and avoid soft links.

One thing that does annoy is using $GGHOME.

This may raise the question, “Why GG_HOME and not GGHOME?”

Why? ORACLE_BASE, ORACLE_HOME, ORACLE_SID, GRID_HOME, etc…

There’s a pattern here.

Make life simple, use aliases.

oracle@db-asm-1:+ASM:/home/oracle
$ cat .bash_profile

# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
# User specific environment and startup programs
export PATH=$PATH:$HOME/.local/bin:$HOME/bin
. ~/.alias

oracle@db-asm-1:+ASM:/home/oracle
$ cat .alias

alias amer='source ~/.amer'
alias euro='source ~/.euro'
alias ggs='cd $GG_HOME'

oracle@db-asm-1:+ASM:/home/oracle
$ cat .amer

export LD_LIBRARY_PATH=/lib:/usr/lib
export ORACLE_SID=amer
ORAENV_ASK=NO
. oraenv
unset ORAENV_ASK
export GG_HOME=/u01/app/oracle/amer/ogg/12.3.0_ora12c
export LD_LIBRARY_PATH=$GG_HOME:$LD_LIBRARY_PATH
export PS1="\u@\h:\${ORACLE_SID}:\${PWD}\n$ "

oracle@db-asm-1:+ASM:/home/oracle
$ amer

The Oracle base remains unchanged with value /u01/app/oracle
oracle@db-asm-1:amer:/home/oracle
$ env|egrep 'ORACLE|HOME'
ORACLE_SID=amer
ORACLE_BASE=/u01/app/oracle
GG_HOME=/u01/app/oracle/amer/ogg/12.3.0_ora12c
PS1=\u@\h:${ORACLE_SID}:${PWD}\n$
HOME=/home/oracle
ORACLE_HOME=/u01/app/oracle/12.2.0.1/db1

oracle@db-asm-1:amer:/home/oracle
$ cat .euro

export LD_LIBRARY_PATH=/lib:/usr/lib
export ORACLE_SID=euro
ORAENV_ASK=NO
. oraenv
unset ORAENV_ASK
export GG_HOME=/u01/app/oracle/euro/ogg/12.3.0_ora12c
export LD_LIBRARY_PATH=$GG_HOME:$LD_LIBRARY_PATH
export PS1="\u@\h:\${ORACLE_SID}:\${PWD}\n$ "

oracle@db-asm-1:amer:/home/oracle
$ euro

The Oracle base remains unchanged with value /u01/app/oracle
oracle@db-asm-1:euro:/home/oracle
$ env|egrep 'ORACLE|HOME'
ORACLE_SID=euro
ORACLE_BASE=/u01/app/oracle
GG_HOME=/u01/app/oracle/euro/ogg/12.3.0_ora12c
PS1=\u@\h:${ORACLE_SID}:${PWD}\n$
HOME=/home/oracle
ORACLE_HOME=/u01/app/oracle/12.2.0.1/db1

oracle@db-asm-1:euro:/u01/app/oracle/euro/ogg/12.3.0_ora12c
$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 12.3.0.1.0 OGGCORE_12.3.0.1.0_PLATFORMS_170721.0154_FBO
Linux, x64, 64bit (optimized), Oracle 12c on Jul 21 2017 23:31:13
Operating system character set identified as UTF-8.

Copyright (C) 1995, 2017, Oracle and/or its affiliates. All rights reserved.

GGSCI (db-asm-1) 1> exit

$ grep ORA oggcore.rsp

# Specify ORA12c for installing Oracle GoldenGate for Oracle Database 12c and
#         ORA11g for installing Oracle GoldenGate for Oracle Database 11g
Advertisements

2 Comments »

  1. […] GoldenGate Naming Convention P01 […]

    Pingback by GoldenGate Naming Convention P02 | Thinking Out Loud — November 4, 2017 @ 1:06 pm | Reply

  2. […] GoldenGate Naming Convention P01 GoldenGate Naming Convention P02 […]

    Pingback by GoldenGate Naming Convention P03 | Thinking Out Loud — November 5, 2017 @ 4:44 pm | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

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

Create a free website or blog at WordPress.com.

%d bloggers like this: