Additional steps for enabling the common SQL API stored procedures

You can use the common SQL API stored procedures to retrieve information about the data server configuration, the short message text for an SQL code, and system information. These stored procedures are used primarily by tools.

Before you begin

Start of changeBefore you complete these steps, either install the DB2®-supplied routines during migration or install the DB2-supplied routines during installation. To create the GET_CONFIG stored procedure with the correct security attributes, job DSNTIJRT must be run by a user ID with SYSOPR and MONITOR1 privileges.End of change

Start of change Job DSNTIJRT installs and configures these stored procedures, but you must complete additional steps before you use them.End of change

If GET_SYSTEM_INFO will be called to return the ICF catalog information about DB2 data sets, the user who defines the stored procedure must have MONITOR1 and DISPLAY privileges. If GET_SYSTEM_INFO will be called to return catalog attributes or ICF catalog information about DB2 data sets, the user who defines the stored procedure must have READ access to the OPERCMDS resource MVS.MCSOPER.DSNADMGS. If MVS™.MCSOPER.DSNADMGS does not exist, the user must have READ access to the OPERCMDS resource MVS.MCSOPER.*. Otherwise, catalog attributes information will not be returned from GET_SYSTEM_INFO. To give the user that defines the procedures access to the RACF® OPERCMDS class, the RACF security administrator must:

  1. If the OPERCMDS class is not active, issue the following SETROPTS command to activate the OPERCMDS class:
    SETROPTS CLASSACT(OPERCMDS)
  2. If the generic profile for OPERCMDS is not active, issue the following SETROPTS command to activate it:
    SETROPTS GENERIC(OPERCMDS)
  3. Issue the RDEFINE command to establish a profile for MVS.MCSOPER.console-name. In this example, console-name=DSNADMGS:
    RDEFINE OPERCMDS MVS.MCSOPER.DSNADMGS UACC(NONE)
  4. Give the user ID access to the class. In this example, the user ID is USER001:
    PERMIT MVS.MCSOPER.DSNADMGS CLASS(OPERCMDS) ID(USER001) ACCESS(READ)
  5. Issue the SETROPTS RACLIST command to refresh the OPERCMDS reserve class:
    SETROPTS RACLIST(OPERCMDS) REFRESH

Before you complete the additional steps to enable the common SQL API stored procedures, set up WLM application environments for them to run in. These stored procedures run in WLM-established stored procedures address spaces.

The common SQL API stored procedures are:
  • SYSPROC.GET_CONFIG
  • SYSPROC.GET_MESSAGE
  • SYSPROC.GET_SYSTEM_INFO
  • Start of changeSYSPROC.SET_PLAN_HINTEnd of change

GET_SYSTEM_INFO must run in a separate WLM environment from DSNUTILS or DSNUTILU.

Procedure

To enable the common SQL API stored procedures:

In the JCL for starting the WLM-established address space for running the GET_SYSTEM_INFO stored procedure, ensure that all libraries in the STEPLIB DD concatenation are APF-authorized.

What to do next

Restriction: Start of changeTo run the GET_CONFIG and GET_SYSTEM_INFO stored procedures, DB2 must be started with subsystem parameters of LOBVALA=4096 KB or higher and LOBVALS=4096 MB or higher.End of change