CA Datacom SQL RC -125 DQ093E PLAN IN USE

book

Article ID: 127781

calendar_today

Updated On:

Products

CA Datacom CA Datacom - AD CA CIS CA Common Services for z/OS CA 90s Services CA Database Management Solutions for DB2 for z/OS CA Common Product Services Component CA Common Services CA Datacom/AD CA ecoMeter Server Component FOC CA Easytrieve Report Generator for Common Services CA Infocai Maintenance CA IPC Unicenter CA-JCLCheck Common Component CA Mainframe VM Product Manager CA Chorus Software Manager CA On Demand Portal CA Service Desk Manager - Unified Self Service CA PAM Client for Linux for zSeries CA Mainframe Connector for Linux on System z CA Graphical Management Interface CA Web Administrator for Top Secret CA CA- Xpertware

Issue/Introduction

After cancelling a query run from CICS now getting SQL RC -125 and error:

DQ093E - PLAN CURRENTLY IN USE BY LOGICAL UNIT OF WORK ID X'nnnnnnnnnnnnnnnn'

How can this plan lock be cleared?
 

Cause

A plan has been left locked in the MUF by the CICS cancel.

Environment

Release:
Component: DB

Resolution

To resolve the problem try the following in sequence:

  • Do a COMM STATUS and see if there's still a MUF task active for the cancelled task. If there is, do a REQABORT command on it.

  • Do a SELECT * FROM SYSADM.SQL_STATUS_CURRENT;  
    If the cancelled CICS task is still there, the SQL task can be cancelled by doing a DELETE of the row:

    DELETE FROM SYSADM.SQL_STATUS_CURRENT 
      WHERE PLAN_AUTH = authid 
      AND PLAN_NAME = plan_name;
  • Do a SELECT * FROM SYSADM.SQL_STATUS_PLAN; 
    If the plan is still there, it can be freed by doing a DELETE on the row.

    DELETE FROM SYSADM.SQL_STATUS_PLAN
      WHERE PLAN_AUTHID = authid
      AND PLAN_NAME = plan_name;
  • If there was nothing in the previous 3 steps, use this query to free the plan by inserting a row into the STATUS_PLAN table. Only change the authid and plan_name, the rest of the query can remain as is.

    INSERT INTO SYSADM.SQL_STATUS_PLAN
    VALUES ('MUF', '2019-02-19-12.01.01.000000', 
    'authid', 'plan_name', 
    '2019-02-19', '12:01:01',
    '2019-02-19', '12:01:01',
    0,0,0,0,7,'R','C',' ', ' ');

Note: If uncertain about what to delete or cancel open a support case to be guided by one of our engineers.