Defining RACF user IDs for Db2-started tasks

A Db2 subsystem provides started-task address spaces.

About this task

The following are Db2 started-task address spaces:

  • ssnmDBM1 for database services
  • ssnmMSTR for system services
  • ssnmDIST for the distributed data facility
  • Names for 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

You can use one of the two ways that RACF provides to associate user IDs and groups with started tasks: the STARTED class and the started procedures table (ICHRIN03). If you use the STARTED class, the changes take effect without a subsequent IPL. If you use ICHRIN03, you must perform another IPL for the changes to take effect. You cannot start the Db2 address spaces with batch jobs.

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.

If your installation has implemented the RACF STARTED class, you can use it to associate RACF user IDs and group names with the Db2 started procedures address spaces. If you have not previously set up the STARTED class, you first need to enable generic profile checking for the class:

SETROPTS GENERIC(STARTED)

Then, you need to 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))
...

Then, you need to activate the RACLIST processing to read the profiles into a data space:

SETROPTS CLASSACT(STARTED)
SETROPTS RACLIST(STARTED)

Lastly, you need to refresh the in-storage profiles:

SETROPTS RACLIST(STARTED) REFRESH 

If you 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®. 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

The example shows the sample entries for three Db2 subsystems (DSN, DB2T, and DB2P), optional entries for CICS and IMS, and Db2 started tasks for the Db2 subsystems, CICS, the IMS control region.