# DB2 Plan accessed

**URL:** <https://techcommunity.softwareag.com/t/db2-plan-accessed/93461>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [April 28, 2010, 3:26pm UTC](https://techcommunity.softwareag.com/t/db2-plan-accessed/93461 "2010-04-28T15:26:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ramya](https://avatars.discourse-cdn.com/v4/letter/r/e9c0ed/32.png) [@Ramya](https://techcommunity.softwareag.com/u/Ramya)\
**Post date:** [April 28, 2010, 3:26pm UTC](https://techcommunity.softwareag.com/t/db2-plan-accessed/93461/1 "2010-04-28T15:26:18Z")

</div>

How can i view the DB2 PLAN accessed by my NATURAL Programs of our application in the CICS region.  
( Even I have no idea of the transid used to invoke the NATURAL from the CICS region )

---

<div class="post-metadata">

**Author:** ![Brian\_Johnson1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/brian_johnson1/32/163_2.png) [@Brian\_Johnson1](https://techcommunity.softwareag.com/u/Brian_Johnson1)\
**Post date:** [April 28, 2010, 6:58pm UTC](https://techcommunity.softwareag.com/t/db2-plan-accessed/93461/2 "2010-04-28T18:58:36Z")

</div>

I am not familiar with Natural for DB2, but wouldn’t the explain plan be something DB2 would have to figure out, not Natural?

Therefore, there should be some kind of DB2 tool that will tell you for a given SQL string what the explain plan is, just as Oracle’s OEM does the same.

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [April 28, 2010, 9:55pm UTC](https://techcommunity.softwareag.com/t/db2-plan-accessed/93461/3 "2010-04-28T21:55:07Z")

</div>

Natural for DB2 provides many tools to work with DB2. There is an Explain PLAN\_TABLE function: [http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat426mf2/dbms/ndb-explain.htm#ndb-explain](http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat426mf2/dbms/ndb-explain.htm#ndb-explain).

Please see the Natural for DB2 documentation for details on what is available to support DB2: [http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat426mf2/dbms/db2-over.htm#db2-over](http://techcommunity.softwareag.com/ecosystem/documentation/natural/nat426mf2/dbms/db2-over.htm#db2-over)

---

<div class="post-metadata">

**Author:** ![Daniel\_Wilson](https://avatars.discourse-cdn.com/v4/letter/d/94ad74/32.png) [@Daniel\_Wilson](https://techcommunity.softwareag.com/u/Daniel_Wilson)\
**Post date:** [April 28, 2010, 10:02pm UTC](https://techcommunity.softwareag.com/t/db2-plan-accessed/93461/4 "2010-04-28T22:02:41Z")

</div>

Without knowing the CICS transaction, I’m not sure how you could find out the plan. The plan is set through a DB2Entry in the CICS tables (along with DB2Tran and DB2Conn) and is tied to the CICS transaction. If all of your Natural programs are using the same CICS transaction, I guess you could browse through the entries in CEMT and try to determine which is the one for Natural.

In DB2, you might try browsing the SYSIBM.SYSPLAN table for a likely candidate.

But somebody in your organization had to set this up, like your systems programmers or Natural administrators. Have you asked them?

---

<div class="post-metadata">

**Author:** ![Ramya](https://avatars.discourse-cdn.com/v4/letter/r/e9c0ed/32.png) [@Ramya](https://techcommunity.softwareag.com/u/Ramya)\
**Post date:** [April 30, 2010, 3:19pm UTC](https://techcommunity.softwareag.com/t/db2-plan-accessed/93461/5 "2010-04-30T15:19:32Z")

</div>

Hi

I tried using the EXPLAIN PLAN\_TABLE option from SYSDB2 .  
It is showing the error like :

Explanation Table QPINC.PLAN\_TABLE does not exist.

And also we checked with the Natural sytem administrator .They are telling like it is application related and they are not that helpful.

In our application , in one CICS region (cprd008) , we have Development , testing , acceptance testing , maintainance regions  
And from the SYSIBM.SYSPLAN table we can see so many plans for each region .So out of all these plans which is the one used by the programs in each region.

---

<div class="post-metadata">

**Author:** ![Ramya](https://avatars.discourse-cdn.com/v4/letter/r/e9c0ed/32.png) [@Ramya](https://techcommunity.softwareag.com/u/Ramya)\
**Post date:** [May 12, 2010, 6:18pm UTC](https://techcommunity.softwareag.com/t/db2-plan-accessed/93461/6 "2010-05-12T18:18:28Z")

</div>

Can anyone please clarify my doubt

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:58pm UTC](https://techcommunity.softwareag.com/t/db2-plan-accessed/93461/7 "2021-04-02T14:58:25Z")

</div>


