Specifying WLM-established server address spaces for stored procedures

You can manage access to WLM through the server resource class and specify address spaces as WLM-established server address spaces for running stored procedures.

Procedure

To specify address spaces as WLM-established server address spaces that can run stored procedures:

  1. Define a new SERVER class by using the server resource class.

    If you do not define a SERVER class, any address space that connects to WLM as a server address space can run stored procedures.

  2. Authorize a RACF® profile to associate with the SERVER class.
    For example:
    RDEFINE SERVER (DB2.ssnm.applenv)

    Start of changeIn this command, ssnm is the name of the Db2 subsystem, and applenv is the name of the application environment that is associated with the stored procedure.End of change

    For example, assume that you want to define the following profile names:
    • DB2.DB2T.TESTPROC
    • DB2.DB2P.PAYROLL
    • DB2.DB2P.QUERY

    To define these profile names, issue the following RACF command:

    RDEFINE SERVER (DB2.DB2T.TESTPROC DB2.DB2P.PAYROLL DB2.DB2P.QUERY)
  3. Activate the resource class.
    For example, you can issue the following command:
    SETROPTS RACLIST(SERVER) REFRESH
  4. Grant read access to the user IDs that are associated with the stored procedures address space.
    For example, you can issue the following commands:
    PERMIT  DB2.DB2T.TESTPROC CLASS(SERVER) ID(SYSDSP) ACCESS(READ)
    PERMIT  DB2.DB2P.PAYROLL  CLASS(SERVER) ID(SYSDSP) ACCESS(READ)
    PERMIT  DB2.DB2P.QUERY    CLASS(SERVER) ID(SYSDSP) ACCESS(READ)