Performing a data group switch changes the direction of replication for a data group through the Switch Data Group (SWTDG) command. Only replication for the selected data group is switched. You may want to perform a data group switch if you are having problems with an application that only affects a specific data group or if you need to manually load balance because of heavily used applications.
To perform a data group switch, do the following:
If you will be performing a planned switch, do the following:
-
Shut down any applications that have database file or objects defined to the data group.
-
Ensure that you have addressed any critical database files that are held due to error or held for other reasons.
-
Ensure there are no pending object activity entries by entering:
WRKDGACTE STATUS(*ACTIVE)
-
-
From the Work with Data Groups display, type the option for the type of switch you want next to the data group you want to switch and press Enter.
-
Use option 15 for a planned switch
-
Use option 16 for an unplanned switch
-
-
Some of the parameter values that you may want to consider when the Switch Data Group display appears are:
-
If you specified Switch type of *PLANNED and have specified a number for the Wait time (seconds) parameter, you can specify a value for the Timeout Option parameter to specify what action you want the SWTDG command to perform if the time specified in the Wait time (seconds) parameter is exceeded. When you are performing a planned switch you may want to specify the number of seconds to wait before all the active data group processes end. If you specify *NOMAX the switch process will wait until all data group processes are ended. This could delay the switch process.
-
You can use the Conditions that end switch parameter to specify the types of errors that you want to end the switch operation. For a planned switch, the default value, *DFT, checks all possible values except *RCY and converts any new or in-progress recoveries found to replication errors. For an unplanned switch, *DFT will prevent the switch only when database apply backlogs exist.
-
Verify that the value for the Start journaling on new source prompt is what you want. If necessary, change the value.
-
-
After the confirmation screen, press
F16
to continue. -
Press Enter. Messages appear indicating the status of the switch request. When you see a message indicating that the switch is complete, users can begin processing as usual on the temporary source system.
-
If you performed an unplanned switch, perform journal analysis on the original source system as soon as it is available, to determine if any transactions were missed. Use topic Performing journal analysis.
-
Start the data group, clearing pending entries, using the procedure in Starting selected data group processes. This starts replication in the new temporary direction.