Muster-JCL-Job AOCDDL

Sie können einen Muster-JCL-Job AOCDDL verwenden, um erweiterte Abfrageoptimierungsfunktionen auf einem DB2 für z/OS-Subsystem zu aktivieren.

Die Muster-JCL-Jobs AOCDDL werden auf das DB2-Subsystem extrahiert, wenn Sie die Installation unter Verwendung des SMP/E-Bands ausführen. Sie finden diesen Musterjob auch im Unterverzeichnis \serverconfig\ZOS\z/OS-Versionsnummer_und_-Modus des Installationsverzeichnisses für den Client auf dem Clientsystem.

Es sind sechs Versionen von AOCDDL-Musterjobs verfügbar:

Subsystem JCL-Jobdatei
DB2 Version 10 für z/OS - Modus für neue Funktion AOCDDL10
DB2 Version 10 für z/OS - Konvertierungsmodus von Version 9 AOCDDLX9
DB2 Version 10 für z/OS - Konvertierungsmodus von Version 8 AOCDDLX8
DB2 Version 9.1 für z/OS AOCDDL9
DB2 für z/OS Version 8 - Modus für neue Funktion AOCDDL8N
DB2 für z/OS Version 8 - Kompatibilitätsmodus AOCDDL8C

Das folgende Beispiel zeigt den Prolog des Musterjobs AOCDDL für DB2 Version 9.1 für z/OS-Subsysteme.

//*********************************************************************
//*  Name = AOCDDL
//*
//*  Descriptive Name =
//*    DB2 Installation Job Stream
//*
//*     Licensed Materials - Property of IBM
//*     5655-V81
//*     COPYRIGHT 2010 IBM Corp.  All Rights Reserved.
//*
//*     STATUS = Version 9
//*
//*  Function = Create objects required by the IBM Optim Query
//*             Tuner (QT)
//*
//*  Pseudocode =
//*    AOCICU    Step     Drop the QT routines, database,
//*                       and stogroup (optional)
//*    AOCIAS    Step     Create the QT stogroups and databases
//*    AOCEXP    Step     Create sample explain objects for a specific
//*                       user (default is SYSADM).  To modify perform
//*                       a change all from SYSADM to desired ID.
//*                       This step has two LOB tablespaces,
//*                          AOCULTS1 and AOCULTS2
//*                        which must be unique per user.  Modify the
//*                        name to insure uniqueness.
//*    AOCAPCSA  Step     Create QT SA profile objects and
//*                       Plan Comparision objects
//*    AOCTPRO   Step     Create the OQT profile objects
//*    AOCWCC    Step     Create QT WCC objects
//*    AOCWSA    Step     Create QT WSA objects
//*    AOCWIA    Step     Create QT WIA objects
//*    AOCWQA    Step     Cretae QT WQA objects
//*    AOCBIND   Step     Bind QT packages
//*    AOCTJRT   Step     Create the LE environment options data set for
//*                       the WLM environment used to execute stored
//*                       procedure SYSPROC.OPT_EXECUTE_TASK
//*    AOCGRT    Step     Grant access on objects created by this job,
//*                       add grant package
//*
//*
//*  Dependencies =
//*
//*  Notes =
//*    PRIOR TO RUNNING THIS JOB, customize it for your system:
//*    (1) Add a valid job card
//*    (2) Locate and change all occurrences of the following strings
//*        as indicated:
//*        (A) The subsystem name '!DSN!' to the name of your DB2
//*        (B) 'DSNTIA!!' to the plan name for DSNTIAD on your DB2
//*        (C) 'DSNC!!0' to the VCAT for the QT table spaces
//*        (D) '!DSNV01!' to the volume serial id for QT database
//*        (E) 'DSN!!0' to the prefix of the target library for DB2
//*        (F) '!AOCPREFX!' to the prefix of target library for QT
//*        (G) '!USERID!' to the USER ID which grant authorization to packages.
//*    (3) Review and optionally update buffer pool settings in the
//*        CREATE DATABASE and TABLESPACE statements processed by
//*         this job.
//*    (4) Review and optionally update the WLM environment names
//*        specified in the CREATE PROCEDURE statements processed
//*        by job steps AOCBIND.
//*    (5) In job step AOCTJRT, review and optionally update the name
//*        of the data set having the LE environment options for
//*        stored procedures SYSPROC.OPT_EXECUTE_TASK and.
//*        This data set needs to be allocated
//*        by the JAVAENV DD of the address space proc for the WLM
//*        environment for executing SYSPROC.OPT_EXECUTE_TASK.
//*        See further below for an example of
//*        the address space proc and how to customize it for your site.
//*        Also in the AOCTJRT step review and optionally update the
//*        following java paths:
//*            (a) CLASSPATH is the path where the java stored
//*                procedure JAR file is located.
//*                  Example: /usr/lpp/db2910_base/classes/
//*            (b) JCC_HOME is the path where the jcc driver is
//*                located.
//*                  Example: /usr/lpp/db2910_jdbc
//*            (c) JAVA_HOME is the path where the JDK is located.
//*                  Example: /usr/lpp/java140/J1.4
//*    (6) In job step AOCGRT, review and optionally update the GRANT
//*        statements to conform to the authorization policy enforced
//*        at your site.  Special considerations:
//*        - In the the GRANT EXCECUTE statement for SYSPROC.OPT_RUNSQL,
//*          change !GRANTEE! to one or more authorization IDs that
//*          need to use stored procedures to snap all statements
//*          in the dynamic statement cache and to capture workloads
//*          from dynamic statement cache.
//*
//*    Following is an example JCL proc for the address space of the
//*    WLM environment needed to execute stored procedures
//*    SYSPROC.OPT_EXECUTE_TASK:
//*
//*    //procName PROC  DB2SSN=ssnm,NUMTCB=1,APPLENV=wlmEnvName
//*    //TCBNUM1  EXEC  PGM=DSNX9WLM,TIME=1440,
//*    //             PARM='&DB2SSN,&NUMTCB,&APPLENV', 
//*    //             REGION=0M 
//*    //STEPLIB   DD DISP=SHR,DSN=ceepre.SCEERUN   <- LE runtime lib 
//*    //          DD DISP=SHR,DSN=dsnpre.SDSNEXIT  <- DB2 exit lib 
//*    //          DD DISP=SHR,DSN=dsnpre.SDSNLOAD  <- DB2 runtime lib 
//*    //          DD DISP=SHR,DSN=dsnpre.SDSNLOD2  <- JDBC/SQLJ DLL lib 
//*    //JAVAENV   DD DISP=SHR,DSN=prefix.JSPENV    <- JSP runtime opts 
//*    //JSPDEBUG  DD SYSOUT=A                      <- debugging output 
//*    //CEEDUMP   DD SYSOUT=A                      <- LE dump output 
//*    //SYSPRINT  DD SYSOUT=A                      <- diagnostics 
//*    //JAVAOUT   DD pathname                      <- output file path 
//*    //JAVAERR   DD pathname                      <- error file path 
//* 
//*    where: 
//*    - wlmEnvName is the name of the WLM environment for executing 
//*      SYSPROC.OPT_EXECUTE_TASK 
//*    - procName is the procedure name associated with the WLM env. 
//*    - ssnm is the DB2 subsystem name 
//*    - NUMTCB must be set to 1 
//*    - ceepre is the prefix of the IBM Language Environment (LE) 
//*      runtime library. 
//*    - dsnpre is the prefix of your DB2 for z/OS runtime libraries 
//*    - prefix.JSPENV specifies the data set containing the LE runtime 
//*      options for executing stored procedures SYSPROC.OPT_EXECUTE_- 
//*      TASK. This data set is created by job 
//*      step AOCGRT.  For more information about the JAVAENV DD, see 
//*      the DB2 for z/OS Application Programming Guide and Reference 
//*      for Java manual. 
//*    - Both JAVAOUT and JAVAERR specify a path for output files for 
//*      Java stored procedures.  You can specify any location that 
//*      is available where DB2 has authority to write to the output 
//*      files and a DB2 user can read from these output files.  Use 
//*      the Unix System Services command 
//*        chmod -R +rw pathname 
//*      to add the required write privileges. 
//* 

Feedback