Sample SQL Tuning Services JCL jobs

SQL Tuning Services provides sample JCL jobs to help simplify setting up and maintaining an SQL Tuning Services environment.

After the SMP/E installation of SQL Tuning Services, the following sample jobs are available in the hlq.SDSN5TSA data set:

Sample jobs Description
Job for creating the repository database
DSN5REPO
This job creates the SQL Tuning Services repository database and its objects.

This job must be run with the functional Db2 repository database ID (sqlts_repodb_id).

Jobs for binding packages The following sample jobs bind required packages. The job or jobs that you run depend on the location of the repository database and tuning target databases in your environment.
DSN5BND
This job binds packages that are required by SQL Tuning Services to the SQL Tuning Services repository database and Db2® tuning target databases. Use this job if the repository database and tuning target database are on the same Db2 subsystem.

If the repository database and target database are on the different subsystems, use DSN5NDRP to bind packages to the repository database and use DSN5NDTG to bind packages to the target database.

DSN5NDRP
This job binds packages that are required by SQL Tuning Services to the SQL Tuning Services repository database. Use this job if the repository database and the target database are on the different Db2 subsystems.

If the repository database and target database are on the same subsystem, use DSN5NBND instead.

DSN5NDTG
This job binds packages that are required by SQL Tuning Services to the SQL Tuning Services repository database. Use this job if the repository database and the target database are on the different Db2 subsystems.

If the repository database and target database are on the same subsystem, use DSN5NBND instead.

Jobs for granting privileges The following sample jobs grant privileges. The job or jobs that you run depend on the location of the repository database and tuning target databases in your environment.
DSN5RGRT
This job grants required permissions to the functional Db2 repository database ID (sqlts_repodb_id) and target Db2 database ID (sqlts_dba_id). Use this job if the repository database and target database are on the same Db2 subsystem.

If the repository database and target database are on the different subsystems, use DSN5RTRP to grant privileges to the repository database ID and use DSN5RTTG to grant privileges to the target database ID.

DSN5RTRP
This job grants required permissions to the functional Db2 repository database ID (sqlts_repodb_id) including package permissions and permission to create the repository database and objects.

If the repository database and tuning target database are on the same Db2 subsystem, use DSN5RGRT instead.

DSN5RTTG
This job grants required permissions to the tuning target Db2 database ID (sqlts_dba_id) including package permissions and permissions to invoke specific SQL Tuning Services tuning and administrative APIs. If the target database and repository database are on the same Db2 subsystem, use DSN5RGRT instead.
Job for creating required user-defined functions
DSN5RUDF
This job creates the SQL Tuning Services CANVIEW and CANADMINSTER UDFs and grants EXECUTE privilege to the SQL Tuning Services administrator ID (sqlts_dba_id) and SQL Tuning Services user IDs (sqlts_user_id).
Job for SQL Tuning Services started task
DSN5STRT
This job starts the SQL Tuning Services server as a started task.
Jobs for upgrading SQL Tuning Services
DSN5UPR1
This job upgrades the SQL Tuning Services repository database from V1.0 to the current version.
DSN5UPR2
This job upgrades the SQL Tuning Services repository database from V2.1 to the current version.
DSN5UPR3
This job upgrades the SQL Tuning Services repository database from V2.1 at PTF level UI92499 to the current version.