Saturday, January 9, 2016

Auto start of Golden Gate after DB server reboots


   https://docs.oracle.com/goldengate/1212/gg-winux/GIMSS/install.htm#GIMSS209
In linux : https://community.oracle.com/thread/1067491?tstart=0

1) create manager auto  :
- D:\oracle\GGS >  install addevents addservice AUTOSTART

For delete : C:\OGG_HOME>install deleteevents deleteservice

Oracle GoldenGate messages installed successfully.
Service 'GGSMGR' created.

Install program terminated normally.

check the service GGSMGR on services.msc

- Edit params mgr : 
 PORT 7809
USERID ggs_owner, PASSWORD ggs_owner
PURGEOLDEXTRACTS  D:\oracle\ggs\dirdat\ex, USECHECKPOINTS
AUTOSTART EXTRACT *
AUTORESTART EXTRACT *, RETRIES 3, WAITMINUTES 5, RESETMINUTES 60




2) 

One can use BOOTDELAYMINUTES parameter in manager parameter file,
BOOTDELAYMINUTES parameter on a Windows system is to delay the activities that Manager performs when it starts, such as executing parameters or autostart of extract and replicat processes.
For example, BOOTDELAYMINUTES can be used to delay AUTOSTART parameters until database services are started.
Specify BOOTDELAYMINUTES before other parameter entries. This parameter only supports Windows.
Example:
GGSCI (rssb) 3> view params mgr
PORT 7808
BOOTDELAYMINUTES 3
USERID gg,PASSWORD gg
AUTOSTART EXTRACT EXTLINUX
PURGEOLDEXTRACTS D:\lok\Stud_Mat\Golden_Gate\gg_sw\Source\dirdat\ex, USECHECKPOI NTS

OR,
in mgr :

AUTORESTART EXTRACT *, RETRIES 3, WAITMINUTES 5, RESETMINUTES 60

RETRIES

The maximum number of times that Manager should try to restart a
process before aborting retry efforts. The default number of tries is 2.

WAITMINUTES

The amount of time, in minutes, to pause between discovering that a
process has terminated abnormally and restarting the process. Use this
option to delay restarting until a necessary resource becomes available or
some other event occurs. The default delay is 2 minutes.

RESETMINUTES

The window of time, in minutes, during which retries are counted. The
default is 120 minutes (2 hours). After the time expires, the number of
retries reverts to zero.

In your case you have just defined WAITMINUTES as 1. SO RETRIES is 2 and RESETMINUTES is 120.
So by the time you disabled the trigger your extract had already exhausted its 2 tries within first 2 minutes and was waiting for 120 minutes to try again.

You can check with something like the below and see

AUTORESTART REPLICAT *, RETRIES 3, WAITMINUTES 5, RESETMINUTES 20

=======================

2.4.4 Installing Manager as a Windows Service

By default, Manager is not installed as a service and can be run by a local or domain account. However, when run this way, Manager will stop when the user logs out. When you install Manager as a service, you can operate it independently of user connections, and you can configure it to start manually or at system start-up.
Installing Manager as a service is required on a Windows Cluster, but optional otherwise.
To install Manager as a Windows service, do the following:
  1. (Recommended) Log on as the system administrator.
  2. Click Start then Run and type cmd in the Run dialog box.
  3. From the directory that contains the Manager program that you are installing as a service, run the install program with the following syntax:
    install option [...]
    
    Where option is one of the following:
    Table 2-1 install Options
    OptionDescription
    ADDEVENTS
    
    Adds Oracle GoldenGate events to the Windows Event Manager.
    ADDSERVICE
    
    Adds Manager as a service with the name that is specified with the MGRSERVNAME parameter in the GLOBALS file, if one exists, or by the default of GGSMGRADDSERVICE configures the service to run as the Local System account, the standard for most Windows applications because the service can be run independently of user logins and password changes. To run Manager as a specific account, use the USER and PASSWORD options.Foot 1 
    The service is installed to start at system boot time (seeAUTOSTART). To start it after installation, either reboot the system or start the service manually from the Services applet of the Control Panel.
    AUTOSTART
    
    Sets the service that is created with ADDSERVICE to start at system boot time. This is the default unless MANUALSTART is used.
    MANUALSTART
    
    Sets the service that is created with ADDSERVICE to start manually through GGSCI, a script, or the Services applet of the Control Panel. The default is AUTOSTART.
    USER name
    
    Specifies a domain user account that executes Manager. Forname, include the domain name, a backward slash, and the user name, for example HEADQT\GGSMGR.
    By default, the Manager service is installed to use the Local System account.
    PASSWORD password
    
    Specifies the password for the user that is specified with USER.
    Footnote 1  A user account can be changed by selecting the Properties action from the Services applet of the Windows Control Panel.
  4. If Windows User Account Control (UAC) is enabled, you are prompted to allow or deny the program access to the computer. Select Allowto enable the install program to run. This installs the Manager service with a local system account running with administrator privileges. No further UAC prompts will be encountered when running Manager if installed as a service.

1 comment:

Anonymous said...

I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Oracle Golden Gate, kindly contact us http://www.maxmunus.com/contact
MaxMunus Offer World Class Virtual Instructor led training on in Oracle Golden Gate. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
For Demo Contact us.
Nitesh Kumar
MaxMunus
E-mail: nitesh@maxmunus.com
Skype id: nitesh_maxmunus
Ph:(+91) 8553912023
http://www.maxmunus.com/