---
title: "DB2 Bind Process: Top Differences Between APCOMPARE and APREUSE"
description: "Here are the new Bind options which improve the stability of the access path in scenario migration to a new DB2 version."
url: https://srinimf.com/2023/02/06/bind-process-in-db2-how-to-decode-these-terms/
date: 2023-02-06
modified: 2023-11-09
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2023/02/pexels-photo-945453.jpeg?fit=1880%2C1251&ssl=1
categories: ["DB2"]
tags: ["DB2 new Bind Options"]
type: post
lang: en
---

# DB2 Bind Process: Top Differences Between APCOMPARE and APREUSE

The BIND process determines access path for SQL. Before moving on to the new features of BIND, here is my **[previous post](https://srinimf.com/2012/05/16/db2-bind-options/)** on DB2 BIND options.

## DB2 Bind: APCOMPARE Vs. APREUSE

**“`The access path for static SQL will not change since it is determined during the BIND process. The PLAN_TABLE stores information about the access path.`“**

![DB2 Bind](https://i0.wp.com/srinimf.com/wp-content/uploads/2023/02/pexels-photo-1029624.jpeg?resize=1880%2C1058&ssl=1)
DB2 Bind Process

## EXPLAIN PACKAGE

A newly SQL query that updates package details in PLAN_TABLE.

```
EXPLAIN PACKAGE package-scope-specification
EXPLAIN PACKAGE COLLECTION 'APCMPCOB' PACKAGE 'APCMPCOB'
```

## APCOMPARE and APREUSE

This option is now part of the BIND process. It compares the results of BIND PACKAGE and REBIND PACKAGE. The NO is the default. It means not for comparing. The scenario occurs when DB2 migrates to the new version and to decide whether REBIND is required or not, helpful to know.

The WARN option pops a warning message when the new access path differs. The ERROR option pops an error when the new access path mismatches and it will not BIND or REBIND.

**APCOMPARE **(Access path compare). APREUSE (Access path reuse).

- NO or NONE
- WARN
- ERROR

The **APREUSE** again has two options. The NO means no action. If it is the ERROR, and you set EXPLAIN(YES), then it replaces the stored access path with the new one.

- NO or NONE
- ERROR

Related

- [DB2 V11- Analytics and Big Data Features](https://srinimf.com/2014/10/28/db2-v11-analytics-and-bigdata-features/)DateOctober 28, 2014
- [DB2 Bind Options – And Their Correct Meaning](https://srinimf.com/2012/05/20/db2-bind-options-part-2/)DateMay 20, 2012
- [3 Types of HINT in DB2 to Read now](https://srinimf.com/2014/08/18/3-different-types-of-hint-in-db2/)DateAugust 18, 2014

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2023%2F02%2F06%2Fbind-process-in-db2-how-to-decode-these-terms%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2023%2F02%2Fpexels-photo-945453.jpeg%3Ffit%3D1200%252C799%26ssl%3D1&description=DB2%20Bind%20Process%3A%20Top%20Differences%20Between%20APCOMPARE%20and%20APREUSE)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2023/02/06/bind-process-in-db2-how-to-decode-these-terms/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2023/02/06/bind-process-in-db2-how-to-decode-these-terms/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2023/02/06/bind-process-in-db2-how-to-decode-these-terms/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2023/02/06/bind-process-in-db2-how-to-decode-these-terms/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20DB2%20Bind%20Process%3A%20Top%20Differences%20Between%20APCOMPARE%20and%20APREUSE&body=https%3A%2F%2Fsrinimf.com%2F2023%2F02%2F06%2Fbind-process-in-db2-how-to-decode-these-terms%2F&share=email)
-

### Like this:

Like Loading…
