Turn Linux under Goldengate startup close shell script (standalone)

Source: Internet
Author: User

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

    1. #--------Start Oracle GoldenGate------------
    2. #! /bin/sh
    3. echo \ "******************************************************************* \"
    4. echo \ "* $WHOAMI: Starting GoldenGate on ' Date ' by USER: ' WHOAMI ' \"
    5. echo \ "******************************************************************* \"
    6. Export Gg_home=/home/oracle/ogg
    7. Exec_file=/home/oracle/startup.txt
    8. $GG _home/ggsci << EOF
    9. OBEY $exec _file
    10. Eof
    11. Exit

==startup.txt

Click ( here) to collapse or open

    1. START MGR
    2. START exta
    3. START Dpea
    4. INFO All

= = Source end: Close script = = =
==shutogg

Click ( here) to collapse or open

    1. #--------Shutdown Oracle GoldenGate------------
    2. #! /bin/sh
    3. #! /bin/sh
    4. echo \ "******************************************************************* \"
    5. echo \ "* $WHOAMI: Stop GoldenGate on ' Date ' by USER: ' WHOAMI ' \"
    6. echo \ "******************************************************************* \"
    7. Export Gg_home=/home/oracle/ogg
    8. Exec_file=/home/oracle/shutdown.txt
    9. $GG _home/ggsci << EOF
    10. OBEY $exec _file
    11. Eof
    12. Exit

==shutdown.txt

Click ( here) to collapse or open

    1. Stop Exta
    2. Stop Dpea
    3. Stop MGR!
    4. Info All
    5. Info exta
    6. 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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.