When the test synchronization is successful, meaning that the test satellite can connect to the DB2 control server and validate its configuration, you are ready to set up the test batches that create and maintain both the database definition and the data for the first version of the end-user application. When these batches are set up, the test satellites will be able to execute them when they synchronize. The examples that follow are limited to scripts that execute locally on the satellite, and not against remote targets. For information about enabling script execution against targets that are remote to a satellite, see Chapter 4, Cataloging Instances and Databases. The steps that you perform are as follows:
You create authentication credentials for the DB2 instances and DB2 databases that a satellite will either attach or connect to when it synchronizes. You can create a separate authentication credential for every potential target, or you can use one authentication credential for all targets, whichever is appropriate. For each batch step that the satellite executes when it synchronizes, the satellite will authenticate with the execution target using the user ID and password of the associated authentication credential.
For example, assume that you have a DB2 instance that is called DB2, and a DB2 database that is called SALES. Assume that there is a user ID with SYSADM authority that is called SALESADM with a password of SALESPW. This is the user ID that you will associate with scripts that require SYSADM authority to execute. You could create the authentication credential associated with this user ID and password under the name SALESCRED. This is the authentication credential that you would specify when you create a target.
DB2 uses the operating system security manager to authenticate clients. Because of this, the user ID and password must exist in the security manager of the operating system of the target. In the example here, the SALESADM user ID must exist in the security manager with a password of SALESPW. To enable this user ID to be able to execute the DB2 commands and SQL statements contained in the scripts, you must give this user ID SYSADM authority. Add this user to a group, then update the value of the database manager configuration parameter sysadm_group to be the group name. For more information about this configuration parameter, refer to the Administration Guide.
To create authentication credentials, use the Create Authentication window. Enter the following values (the values follow the example above):
All scripts execute against a target, which can be a DB2 instance, a DB2 database, or the operating system on the satellite. You must create a named target for every DB2 instance or DB2 database against which a script will execute. You do not need to create a named target for scripts that execute against an operating system.
Before you can create a named target for a DB2 instance or DB2 database, you must first catalog them in Control Center. For more information, see Cataloging Systems, Instances, and Databases on the Control Center.
Note: | You must catalog the instance and the database using the same name and alias under which the instance and database is cataloged on the satellites. |
When you have cataloged all of the instances and databases against which scripts will execute, you use the Create Target window in the Satellite Administration Center to create the named targets for these instances and databases.
For example, you would have to create targets for the DB2 instance and the SALES database. To create the target for the DB2 instance:
The Type field is automatically filled based on the type of the alias. In this situation, the type is Instance.
Note: | The user ID and password must already exist at the target; otherwise, the test will fail. For more information, see Creating Authentication Credentials. |
Assuming that you want to use the same authentication credentials, follow the same procedure for the SALES database. Again, remember to select SALES in the Alias field for the target. The database alias must match the alias under which the database is cataloged at the satellites.
The next step is to create an application version for the group. An application version is associated with a set of setup, update, and cleanup batches that set up and maintain a specific database definition and data. The database definition and data applies to a specific version of the end-user application that runs on the satellites of a group. For more information about application versions, see Application Versions.
To perform this task, use the Create Application Version window:
When the Create Application Version window opens, this field is filled with the default application version (that is, if you have not already created an application version). If the default application version does not match the value that you set on the satellites, change it to match the value on the satellites.
The next step is to add the first level of batches, level 0, of the application version. You initially use level 0 to contain the set of group batches that set up and maintain the database definition and data for the end-user application. This level is created in the test state.
To perform this task, use the Edit Application Version notebook. The first time that you open this window, it is empty, as the application version does not yet have any levels associated with it:
When level 0 is first created, it is empty. No batches are associated with it. The next step is to create the batches for the application version.
The next step is to add group batches to level 0. When level 0 is in the test state, all the batches and batch steps you add are fully modifiable. For information about levels of application versions, see Levels of an Application Version.
To perform this task:
You do not have to use all three types of batches. For example, in the initial phase of developing a database definition, you may not consider it necessary to have a cleanup batch. If a particular type of batch is not present when a satellite synchronizes, that batch type will be bypassed.
The next step is to combine the scripts for the batches with the authentication credentials, execution targets, and success code sets that are required for the scripts to be executed. The combination of a script with the information that it requires for the satellite to be able to execute it is known as a batch step. For more information, see Components of a Batch Step.
To perform this task, use the Change Batch Step notebook.
Repeat the following steps for every script of every batch:
The Change Level notebook opens.
The Change Batch Step notebook opens.
Note: | The alias that you select must be the alias which is cataloged at the satellite. |
Note: | If you have already created a success code set, you can click ... to list it. |
[ Top of Page ]