Defining RACF user IDs for Db2-started tasks

A Db2 subsystem provides started-task address spaces.

About this task

Db2 uses the following started-task address spaces:

  • ssnmDBM1 for database services
  • ssnmMSTR for system services
  • ssnmDIST for the distributed data facility
  • Your WLM-established address spaces for stored procedures

You must associate each of these address spaces with a RACF® user ID. You can also assign each of them to a RACF group name. The RACF user IDs and group names that are associated with Db2 address spaces are listed in the following table:


Table 1. Db2 address spaces and associated RACF user IDs and group names
Address Space RACF User ID RACF Group Name
DSNMSTR SYSDSP DB2SYS
DSNDBM1 SYSDSP DB2SYS
DSNDIST SYSDSP DB2SYS
DSNWLM SYSDSP DB2SYS
DB2TMSTR SYSDSPT DB2TEST
DB2TDBM1 SYSDSPT DB2TEST
DB2TDIST SYSDSPT DB2TEST
DB2TSPAS SYSDSPT DB2TEST
DB2PMSTR SYSDSPD DB2PROD
DB2PDBM1 SYSDSPD DB2PROD
DB2PDIST SYSDSPD DB2PROD
CICSSYS CICS® CICSGRP
IMSCNTL IMS IMSGRP

If you have IMS or CICS applications issuing Db2 SQL requests, you must associate RACF user IDs, and can associate group names, with:

  • The IMS control region
  • The CICS address space
  • The four Db2 address spaces

If the IMS and CICS address spaces are started as batch jobs, provide their RACF IDs and group names with the USER and GROUP parameters on the JOB statement. If they are started as started-tasks, assign the IDs and group names as you do for the Db2 address spaces, by changing the RACF STARTED class or the RACF started procedures table.

The RACF user ID and group name do not need to match those that are used for the Db2 address spaces, but they must be authorized to run the Resource Recovery Services attachment facility (for WLM-established stored procedures address spaces). Note that the WLM-established stored procedures started tasks IDs require an OMVS segment.

You can use two methods that RACF provides RACF STARTED class: if you use the STARTED class, the changes take effect without a subsequent IPL; if you use the started procedures table (ICHRIN03), you must perform another IPL for the changes to take effect. You cannot start the Db2 address spaces with batch jobs.

Procedure

To associate user IDs and groups with started tasks, use one of the following two methods the RACF provides:

  • Use the RACF STARTED class to associate RACF user IDs and group names with the Db2 started procedures address spaces. If you use the STARTED class, the changes take effect without a subsequent IPL.
    If your installation has not previously set up the RACF STARTED class, complete these steps:
    1. Enable generic profile checking for the class:
      SETROPTS GENERIC(STARTED)
    2. Define the RACF identities for the Db2 started tasks:
      RDEFINE STARTED DSNMSTR.**   STDATA(USER(SYSDP)   GROUP(DB2SYS)  TRUSTED(NO))
      RDEFINE STARTED DSNDBM1.**   STDATA(USER(SYSDP)   GROUP(DB2SYS)  TRUSTED(NO))
      RDEFINE STARTED DSNDIST.**   STDATA(USER(SYSDP)   GROUP(DB2SYS)  TRUSTED(NO))
      RDEFINE STARTED DSNWLM.**    STDATA(USER(SYSDP)   GROUP(DB2SYS)  TRUSTED(NO))
      RDEFINE STARTED DB2TMSTR.**  STDATA(USER(SYSDSPT) GROUP(DB2TEST) TRUSTED(NO))
      ...
      The user ID associated with the ssnmDIST started task and ssnmDBM1 started task requires an OMVS segment for DDF functions and system profile functions. For more information, see Enabling Db2 to access TCP/IP services in z/OS UNIX System Services
    3. Refresh the in-storage profiles:
      SETROPTS RACLIST(STARTED) REFRESH 
  • Use the RACF-started procedures table (ICHRIN03) to associate RACF user IDs and group names with the Db2 started procedures address spaces. You need to change, reassemble, and link edit the resulting object code to z/OS®. If you use ICHRIN03, you must perform another IPL for the changes to take effect.

    The following example shows a sample job that reassembles and link edits the RACF started-procedures table (ICHRIN03):

    //*
    //*  REASSEMBLE AND LINKEDIT THE RACF STARTED-PROCEDURES
    //*  TABLE ICHRIN03 TO INCLUDE USERIDS AND GROUP NAMES
    //*  FOR EACH DB2 CATALOGED PROCEDURE. OPTIONALLY, ENTRIES
    //*  FOR AN IMS OR CICS SYSTEM MIGHT BE INCLUDED.
    //*
    //*  AN IPL WITH A CLPA (OR AN MLPA SPECIFYING THE LOAD
    //*  MODULE) IS REQUIRED FOR THESE CHANGES TO TAKE EFFECT.
    //*
     
    ENTCOUNT DC    AL2(((ENDTABLE-BEGTABLE)/ENTLNGTH)+32768)
    *              NUMBER OF ENTRIES AND INDICATE RACF FORMAT
    *
    *  PROVIDE FOUR ENTRIES FOR EACH DB2 SUBSYSTEM NAME.
    *
    BEGTABLE DS    0H
    *        ENTRIES FOR SUBSYSTEM NAME "DSN"
             DC    CL8'DSNMSTR'        SYSTEM SERVICES PROCEDURE
             DC    CL8'SYSDSP'         USERID
             DC    CL8'DB2SYS'         GROUP NAME
             DC    X'00'               NO PRIVILEGED ATTRIBUTE
             DC    XL7'00'             RESERVED BYTES
    ENTLNGTH EQU   *-BEGTABLE     CALCULATE LENGTH OF EACH ENTRY
             DC    CL8'DSNDBM1'   DATABASE SERVICES PROCEDURE
             DC    CL8'SYSDSP'         USERID
             DC    CL8'DB2SYS'         GROUP NAME
             DC    X'00'               NO PRIVILEGED ATTRIBUTE
             DC    XL7'00'             RESERVED BYTES
             DC    CL8'DSNDIST'        DDF PROCEDURE
             DC    CL8'SYSDSP'         USERID
             DC    CL8'DB2SYS'         GROUP NAME
             DC    X'00'               NO PRIVILEGED ATTRIBUTE
             DC    XL7'00'             RESERVED BYTES
             DC    CL8'SYSDSP'         USERID
             DC    CL8'DB2SYS'         GROUP NAME
             DC    X'00'               NO PRIVILEGED ATTRIBUTE
             DC    XL7'00'             RESERVED BYTES
             DC    CL8'DSNWLM'         WLM-ESTABLISHED S.P. ADDRESS SPACE
             DC    CL8'SYSDSP'         USERID
             DC    CL8'DB2SYS'         GROUP NAME
             DC    X'00'               NO PRIVILEGED ATTRIBUTE
             DC    XL7'00'             RESERVED BYTES
    *        ENTRIES FOR SUBSYSTEM NAME "DB2T"
             DC    CL8'DB2TMSTR'       SYSTEM SERVICES PROCEDURE
             DC    CL8'SYSDSPT'        USERID
             DC    CL8'DB2TEST'        GROUP NAME
             DC    X'00'               NO PRIVILEGED ATTRIBUTE
             DC    XL7'00'             RESERVED BYTES
             DC    CL8'DB2TDBM1'       DATABASE SERVICES PROCEDURE
             DC    CL8'SYSDSPT'        USERID
             DC    CL8'DB2TEST'        GROUP NAME
             DC    X'00'               NO PRIVILEGED ATTRIBUTE    
             DC    XL7'00'             RESERVED BYTES
             DC    CL8'DB2TDIST'       DDF PROCEDURE
             DC    CL8'SYSDSPT'        USERID
             DC    CL8'DB2TEST'        GROUP NAME
             DC    X'00'               NO PRIVILEGED ATTRIBUTE
             DC    XL7'00'             RESERVED BYTES
             DC    CL8'SYSDSPT'        USERID
             DC    CL8'DB2TEST'        GROUP NAME
             DC    X'00'               NO PRIVILEGED ATTRIBUTE
             DC    XL7'00'             RESERVED BYTES
    *        ENTRIES FOR SUBSYSTEM NAME "DB2P"
             DC    CL8'DB2PMSTR'       SYSTEM SERVICES PROCEDURE
             DC    CL8'SYSDSPD'        USERID
             DC    CL8'DB2PROD'        GROUP NAME
             DC    X'00'               NO PRIVILEGED ATTRIBUTE
             DC    XL7'00'             RESERVED BYTES
             DC    CL8'DB2PDBM1'       DATABASE SERVICES PROCEDURE
             DC    CL8'SYSDSPD'        USERID
             DC    CL8'DB2PROD'        GROUP NAME
             DC    X'00'               NO PRIVILEGED ATTRIBUTE
             DC    XL7'00'             RESERVED BYTES
             DC    CL8'DB2PDIST'       DDF PROCEDURE
             DC    CL8'SYSDSPD'        USERID
             DC    CL8'DB2PROD'        GROUP NAME
             DC    X'00'               NO PRIVILEGED ATTRIBUTE
             DC    XL7'00'             RESERVED BYTES
             DC    CL8'SYSDSPD'        USERID
             DC    CL8'DB2PROD'        GROUP NAME
             DC    X'00'               NO PRIVILEGED ATTRIBUTE
             DC    XL7'00'             RESERVED BYTES
    *        OPTIONAL ENTRIES FOR CICS AND IMS CONTROL REGION
             DC    CL8'CICSSYS'        CICS PROCEDURE NAME
             DC    CL8'CICS'           USERID
             DC    CL8'CICSGRP'        GROUP NAME
             DC    X'00'               NO PRIVILEGED ATTRIBUTE
             DC    XL7'00'             RESERVED BYTES
             DC    CL8'IMSCNTL'   IMS CONTROL REGION PROCEDURE
             DC    CL8'IMS'            USERID
             DC    CL8'IMSGRP'         GROUP NAME
             DC    X'00'               NO PRIVILEGED ATTRIBUTE
             DC    XL7'00'             RESERVED BYTES
    ENDTABLE DS    0D
             END