Application groups can only be switched using procedures that are initiated by an application group command for a specific operation. Procedures are a highly customizable means of performing operations for application groups. Each application group has a set of default procedures to perform operations such as starting, ending, or switching replication, performing pre-checks prior to switching, and performing virtual switch testing. Each operation is performed by a procedure that consists of a sequence of steps and multiple jobs. Each step calls a predetermined step program to perform a specific sub-task of the larger operation.
What is the scope of the request? The following parameters identify the scope of the requested operation:
Application group definition (AGDFN) - Specifies the requested application group. You can either specify a name or the value *ALL.
Resource groups (TYPE) - Specifies the types of resource groups to be processed for the requested application group.
Data resource group entry (DTARSCGRP) - Specifies the data resource groups to include in the request. The default is *ALL or you can specify a name. This parameter is ignored when TYPE is *ALL or *APP.
What is the requested switch behavior? The following parameters on the SWTAG command define the expected behavior of the requested switch operation:
Switch type (SWTTYP) - This specifies the reason the application group is being switched. The procedure called to perform the switch and the actions performed during the switch differ based on whether the current primary node (data source) is available at the start of the switch procedure. The default value, *PLANNED, indicates that the primary node is still available and the switch is being performed for normal business processes (such as to perform maintenance on the current source system or as part of a standard switch procedure). The value *UNPLANNED indicates that the switch is an unplanned activity and the data source system may not be available. The value *VIRTUAL indicates that the application group environment will be modified to allow application testing to be performed on a backup node in a process known as a virtual switch.
Node roles (ROLE) - This specifies which set of node roles will be used during the switch. For a planned or unplanned switch, the specified value determines the node that becomes the new primary node as a result of the switch. The default value *CURRENT uses the current order of node roles. If the application group participates in a cluster, the current roles defined within the CRGs will be used. If *CONFIG is specified, the configured primary node will become the new primary node and the new role of other nodes in the recovery domain will be determined from their current roles. If you specify a name of a node within the recovery domain for the application group, the node will be made the new primary node and the new role of other nodes in the recovery domain will be determined from their current roles. For a virtual switch, the value of this parameter determines the node to be used for testing applications and does not cause changes to recovery domain roles. In a virtual switch, the first backup node in the recovery domain is used unless you specify the name of a backup node.
What procedure will be used? The following parameters identify the procedure to use and its starting point:
Begin at step (STEP) - Specifies where the request will start within the specified procedure. This parameter is described in detail below.
Procedure (PROC) - Specifies the name of the procedure to run to perform the requested operation when starting from its first step. The value *DFT will use the procedure designated as the default for the application group. The value *LASTRUN uses the same procedure used for the previous run of the command. You can also specify the name of a procedure that is valid the specified application group and type of request.
Where should the procedure begin? The value specified for the Begin at step (STEP) parameter on the request to run the procedure determines the step at which the procedure will start. The status of the last run of the procedure determines which values are valid.
The default value, *FIRST, will start the specified procedure at its first step. This value can be used when the procedure has never been run, when its previous run completed (*COMPLETED or *COMPERR), or when a user acknowledged the status of its previous run which failed, was canceled, or completed with errors (*ACKFAILED, *ACKCANCEL, or *ACKERR respectively).
Other values are for resolving problems with a failed or canceled procedure. When a procedure fails or is canceled, subsequent attempts to run the same procedure will fail until user action is taken. You will need to determine the best course of action for your environment based on the implications of the canceled or failed steps and any steps which completed.
The value *RESUME will start the last run of the procedure beginning with the step at which it failed, the step that was canceled in response to an error, or the step following where the procedure was canceled. The value *RESUME may be appropriate after you have investigated and resolved the problem which caused the procedure to end. Optionally, if the problem cannot be resolved and you want to resume the procedure anyway, you can override the attributes of a step before resuming the procedure.
The value *OVERRIDE will override the status of all runs of the specified procedure that did not complete. The *FAILED or *CANCELED status of these procedures are changed to acknowledged (*ACKFAILED or *ACKCANCEL) and a new run of the procedure begins at the first step.
For more information about starting a procedure with the step at which it failed, see Resuming a procedure.
For more information about customizing procedures, see the Assure MIMIX Administrator Reference book.