Users want to use Ogg to synchronize data, the original use is Shareplex, as for why to change ogg,bulabula a bunch of reasons .... This is not what we want to care about, and the customer installed after the configuration of Ogg, the test, the customer proposed to have a simple start and close Ogg script, Halo,, originally they shareplex when there is such a script, in short, the customer said that it is relatively simple and easy to use, If all as I told them to operate in the Ggsci platform, too troublesome, well, the demand has been proposed, the following is to let me solve the problem is OK.
After the "crazy" degree Niang, found the following solution. Easy ...., write it first and share it ....
================== Start =============================
Both source and target startup scripts are the same, 4 files, 2 groups;
Startup script: Startogg, starting Batch command file: Startup.txt
Close script: shutogg, close Batch command file: Shutdown.txt
= = Environmental ==========
oracle:10.2.0.5 64bit
Linux:redhat 5.8 64bit
ogg:11.2.1.0.1
= = Source end: Startup script = = =
==startogg
Click ( here) to collapse or open
- #--------Start Oracle GoldenGate------------
- #! /bin/sh
- echo \ "******************************************************************* \"
- echo \ "* $WHOAMI: Starting GoldenGate on ' Date ' by USER: ' WHOAMI ' \"
- echo \ "******************************************************************* \"
- Export Gg_home=/home/oracle/ogg
- Exec_file=/home/oracle/startup.txt
- $GG _home/ggsci << EOF
- OBEY $exec _file
- Eof
- Exit
==startup.txt
Click ( here) to collapse or open
- START MGR
- START exta
- START Dpea
- INFO All
= = Source end: Close script = = =
==shutogg
Click ( here) to collapse or open
- #--------Shutdown Oracle GoldenGate------------
- #! /bin/sh
- #! /bin/sh
- echo \ "******************************************************************* \"
- echo \ "* $WHOAMI: Stop GoldenGate on ' Date ' by USER: ' WHOAMI ' \"
- echo \ "******************************************************************* \"
- Export Gg_home=/home/oracle/ogg
- Exec_file=/home/oracle/shutdown.txt
- $GG _home/ggsci << EOF
- OBEY $exec _file
- Eof
- Exit
==shutdown.txt
Click ( here) to collapse or open
- Stop Exta
- Stop Dpea
- Stop MGR!
- Info All
- Info exta
- Info Dpea
Note: If you do not bring the manager off, you will be prompted to enter "Y" or "N", the situation needs to be in stop MGR!
The relevant script on the target side is the same as the source side. Do not repeat here.
Test:
1. Start = = =
2. Close = = =
Turn:
http://blog.itpub.net/3090/viewspace-1417107/
Turn Linux under Goldengate startup close shell script (standalone)