Thinking Out Loud

January 16, 2013

Linux Navigation for Oracle Environment

Filed under: linux — mdinh @ 3:48 pm

I am in the process of configuring 4-way active-active bi-directional replication using GoldenGate.

Just a note to remind me what the enviroment setup looks like.

I like using alias to navigate and the downside is being loss without a GPS (using alias)

> uname -a

Linux dc1.localdomain 2.6.39-200.24.1.el6uek.x86_64 #1 SMP Sat Jun 23 02:39:07 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux

Oracle database environment not defined:

oracle@dc1::/home/oracle
> echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin
oracle@dc1::/home/oracle
> echo $LD_LIBRARY_PATH
/lib:/usr/lib

Define Oracle environment for db1:

oracle@dc1::/home/oracle
> db1
The Oracle base remains unchanged with value /u01/app/oracle

IPC Resources for ORACLE_SID “db1″ :
Shared Memory
ID KEY
No shared memory segments used
Semaphores:
ID KEY
No semaphore resources used
Oracle Instance not alive for sid “db1″

oracle@dc1:db1:/home/oracle

Notice ORACLE_SID inĀ  prompt

> echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/u01/app/oracle/product/11.2.0.3/db_1/bin:/u01/app/oracle/product/11.2.0.3/db_1/OPatch
oracle@dc1:db1:/home/oracle
> echo $LD_LIBRARY_PATH
/u01/app/ggs1:/u01/app/oracle/product/11.2.0.3/db_1/lib:/lib:/usr/lib

oracle@dc1:db1:/home/oracle
> cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi

export TEMP=/tmp
export TMPDIR=$TEMP
export BASE_PATH=$PATH
export ORACLE_TERM=xterm;
export ORACLE_BASE=/u01/app/oracle
export LD_LIBRARY_PATH=/lib:/usr/lib
export ORACLE_HOSTNAME=dc1.localdomain
export ORAENV_ASK=NO
export PS1=”\u@\h:\${ORACLE_SID}:\${PWD}\n> “
. ~/.alias

oracle@dc1:db1:/home/oracle
> cat .alias
alias db1=’. ~/.db1′
alias db3=’. ~/.db3′
alias oh=’cd $ORACLE_HOME’
alias dbs=’cd $ORACLE_HOME/dbs’
alias tns=’cd $ORACLE_HOME/network/admin’
alias base=’cd $ORACLE_BASE’
alias sysdba=’sqlplus / as sysdba’

oracle@dc1:db1:/home/oracle
> cat .db1
export PATH=$BASE_PATH
export LD_LIBRARY_PATH=/lib:/usr/lib
export ORACLE_SID=db1
. oraenv
export PATH=$PATH:$ORACLE_HOME/OPatch
export GG_HOME=/u01/app/ggs1
export LD_LIBRARY_PATH=$GG_HOME:$LD_LIBRARY_PATH
alias ggs=’cd $GG_HOME’
sysresv

oracle@dc1:db1:/home/oracle
> cat .db3
export PATH=$BASE_PATH
export LD_LIBRARY_PATH=/lib:/usr/lib
export ORACLE_SID=db3
. oraenv
export PATH=$PATH:$ORACLE_HOME/OPatch
export GG_HOME=/u01/app/ggs3
export LD_LIBRARY_PATH=$GG_HOME:$LD_LIBRARY_PATH
alias ggs=’cd $GG_HOME’
sysresv

oracle@dc1:db1:/home/oracle
> cat /etc/oratab
db1:/u01/app/oracle/product/11.2.0.3/db_1:Y
db3:/u01/app/oracle/product/11.2.0.3/db_1:Y

About these ads

2 Comments »

  1. Hi,

    after you have finished this process, could you post the entire procedure. It’s because I’am studing Oracle Golden Gate and in a active-active bi-directional test enviroment, a insert from select was stuck in loop. And a really wanna see a real, production, golden gate configuration files.

    Best Regards,
    Jorge Donato

    Comment by Jorge Donato — January 16, 2013 @ 6:44 pm | Reply

    • Hello Jorge,

      Thanks for visiting my blog. I will share my implementation as soon as I have a working model.

      -Michael.

      Comment by mdinh — January 17, 2013 @ 5:18 am | 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

The Rubric Theme. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 313 other followers

%d bloggers like this: