How to start,stop Oracle Goldengate

Below article “How to start,stop Oracle Goldengate” will help you for any planned activity of golden gate. Also I have taken Oracle RAC database as an example, you can change commands if you having standalone database.

Oracle GoldenGate, databases and the CRS must be stopped properly on a node reboot for a planned maintenance activity.

Steps prior to reboot of server(Stopping OGG):

1. Login as “oracle”
2. Set the environment of GG_HOME
3. Change directory to OGG HOME [cd $GGS_HOME]
4.  Use “ggsci”, to run the following commands in BOLD

i. View the status of all GG processes and copy the output – INFO ALL
ii. Stop all extract, pump, and replicat processes – STOP ER *
iii. If a process times out on stopping, try to force stop it with – SEND <PROCESSNAME>, FORCESTOP
iv. If the above doesn’t work, kill the process with – KILL <PROCESSNAME>
v. Stop the manager process with – STOP MGR !
vi. Stop the JAGENT process with – STOP JAGENT !
vii. Verify that all processes have been stopped/killed – INFO ALL

2. Stop all running database instances

hostname:/g01/app/gg/12.1.2.0.0# srvctl stop database -d db_name –i instance1
hostname:/g01/app/gg/12.1.2.0.0# srvctl stop database -d db_name –i instance2

3. Finally Stop CRS

 

Steps after a reboot(Starting OGG):

1. Login as “oracle”
2. Verify CRS is up and running
3. Start the database instances if they are not up and running

srvctl start database -d db_name –i instance1
srvctl start database -d db_name –i instance2

4. Start OGG

 i. Set the Environment variable of OGG
 ii. Change directory to OGG HOME [cd $GGS_HOME]
 iii. Use “ggsci”, to run the following commands (BOLD) in the following order:
 iv. Start the manager process with – START MGR
 v. The manager is configured to automatically start all other GG processes, including JAGENT. It may take a while 
     for the manager to start all processes
 vi. If it is not, then start all processes with – START ER * and START JAGENT
 vii. View the status until all of GG processes are up and running – INFO ALL

Below is Example given:

rac1@test1 [~]$ source gg.env
rac1@test1 [~]$ cd $GGS_HOME

rac1@test1 [12.1.2.0.0]$ ggsci

Oracle GoldenGate Command Interpreter for Oracle
Operating system character set identified as US-ASCII.

GGSCI (rac1.test1.com) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
JAGENT      STOPPED
EXTRACT     RUNNING     EABCSU      02:56:10      00:00:01
EXTRACT     RUNNING     EABECOM     00:00:09      00:00:01
EXTRACT     RUNNING     EAUCSU      00:00:05      00:00:08
EXTRACT     RUNNING     EAUECOM     00:00:06      00:00:05
EXTRACT     RUNNING     PMBCSU      00:00:00      00:00:01
EXTRACT     RUNNING     PMBECOM     00:00:00      00:00:09
EXTRACT     RUNNING     PMUCSU      00:00:00      00:00:06
EXTRACT     RUNNING     PMUECOM     00:00:00      00:00:07
REPLICAT    RUNNING     RAUPCSU     03:11:13      00:12:09
REPLICAT    RUNNING     RAUPECOM    00:00:00      00:00:06
REPLICAT    RUNNING     RMBCSU      00:00:00      00:00:07
REPLICAT    RUNNING     RMBECOM     00:00:00      00:00:10
REPLICAT    RUNNING     RMUCSU      00:00:00      00:00:01



GGSCI (rac1.test1.com) 2> stop er *

Sending STOP request to EXTRACT EABCSU ...
Request processed.

Sending STOP request to EXTRACT EABECOM ...
Request processed.

Sending STOP request to EXTRACT EAUCSU ...
Request processed.

Sending STOP request to EXTRACT EAUECOM ...
Request processed.

Sending STOP request to EXTRACT PMBCSU ...
Request processed.

Sending STOP request to EXTRACT PMBECOM ...
Request processed.

Sending STOP request to EXTRACT PMUCSU ...
Request processed.

Sending STOP request to EXTRACT PMUECOM ...
Request processed.

Sending STOP request to REPLICAT RAUPCSU ...

ERROR: sending message to REPLICAT RAUPCSU (Timeout waiting for message).

Sending STOP request to REPLICAT RAUPECOM ...
Request processed.

Sending STOP request to REPLICAT RMBCSU ...
Request processed.

Sending STOP request to REPLICAT RMBECOM ...
Request processed.

Sending STOP request to REPLICAT RMUCSU ...
Request processed.



GGSCI (rac1.test1.com) 3> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
JAGENT      STOPPED
EXTRACT     STOPPED     EABCSU      02:56:20      00:01:21
EXTRACT     STOPPED     EABECOM     00:00:09      00:01:21
EXTRACT     STOPPED     EAUCSU      00:00:07      00:01:18
EXTRACT     STOPPED     EAUECOM     00:00:06      00:01:15
EXTRACT     STOPPED     PMBCSU      00:00:00      00:01:15
EXTRACT     STOPPED     PMBECOM     00:00:00      00:01:14
EXTRACT     STOPPED     PMUCSU      00:00:00      00:01:13
EXTRACT     STOPPED     PMUECOM     00:00:00      00:01:12
REPLICAT    STOPPED     RAUPCSU     03:11:13      00:13:39
REPLICAT    STOPPED     RAUPECOM    00:00:00      00:00:07
REPLICAT    STOPPED     RMBCSU      00:00:00      00:00:11
REPLICAT    STOPPED     RMBECOM     00:00:00      00:00:10
REPLICAT    STOPPED     RMUCSU      00:00:00      00:00:09


GGSCI (rac1.test1.com) 5> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
JAGENT      STOPPED
EXTRACT     STOPPED     EABCSU      02:56:20      00:01:28
EXTRACT     STOPPED     EABECOM     00:00:09      00:01:28
EXTRACT     STOPPED     EAUCSU      00:00:07      00:01:25
EXTRACT     STOPPED     EAUECOM     00:00:06      00:01:22
EXTRACT     STOPPED     PMBCSU      00:00:00      00:01:22
EXTRACT     STOPPED     PMBECOM     00:00:00      00:01:21
EXTRACT     STOPPED     PMUCSU      00:00:00      00:01:20
EXTRACT     STOPPED     PMUECOM     00:00:00      00:01:19
REPLICAT    ABENDED     RAUPCSU     03:11:13      00:13:46
REPLICAT    STOPPED     RAUPECOM    00:00:00      00:00:14
REPLICAT    STOPPED     RMBCSU      00:00:00      00:00:18
REPLICAT    STOPPED     RMBECOM     00:00:00      00:00:17
REPLICAT    STOPPED     RMUCSU      00:00:00      00:00:16



GGSCI (rac1.test1.com) 6> stop mgr!

Sending STOP request to MANAGER ...
Request processed.
Manager stopped.


GGSCI (rac1.test1.com) 7> exit

rac1:/u01/gg/12.1# srvctl stop instance -d database –i instance1
rac1:/u01/gg/12.1# srvctl stop instance -d database –i instance2

For starting GG only start Manager and rest all processes will be started automatically:

GGSCI (rac1.test1.com) 6> start mgr!

Sending START request to MANAGER ...
Request processed.
Manager started.
Please share If you like..Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on Yummly

Leave a Reply

Your email address will not be published. Required fields are marked *

Fariddin Shaikh's Oracle DBA Blog © 2016 Being DBA
Go Back