DB2 for z/OS - sqlcode -196 reason code 10

kapil mathur

DB2 for z/OS - sqlcode -196 reason code 10

Hi DB2-L members,  


    Does anybody know what is the underlying reason that DB2 for z/OS will not allow you drop any existing column from a table if there is any (completely unrelated) check constraint on the table (and the check constraint refers to another column that has no apparent relationship with the column that is being dropped)?  thanks      

Anguraj Rathinasamy

DB2 for z/OS - sqlcode -196 reason code 10
(in response to kapil mathur)

Kapil - is there any unique index tide to the dropping column?

> On Sep 26, 2019, at 4:40 PM, kapil mathur <[login to unmask email]> wrote:
>
> 
> Hi DB2-L members,
>
>
> Does anybody know what is the underlying reason that DB2 for z/OS will not allow you drop any existing column from a table if there is any (completely unrelated) check constraint on the table (and the check constraint refers to another column that has no apparent relationship with the column that is being dropped)? thanks
>
>
> Site Links: View post online View mailing list online Start new thread via email Unsubscribe from this mailing list Manage your subscription
>
> This email has been sent to: [login to unmask email]
> Discover the best cloning tool on the market. Try BCV5 & the new BCV5 Masking Tool.
> ESAi also has powerful solutions for Buffer Pool Tuning, Log Analysis, TDM, & more.
> http://www.ESAIGroup.com/idug
>
>
> Use of this email content is governed by the terms of service at:
> http://www.idug.org/p/cm/ld/fid=2
>

kapil mathur

RE: DB2 for z/OS - sqlcode -196 reason code 10
(in response to Anguraj Rathinasamy)

No - there is no index of any type on the columns that I intend to drop .

James Campbell

DB2 for z/OS - sqlcode -196 reason code 10
(in response to kapil mathur)
Because constraints pre-exist the ability to drop columns, so the internal structures that might
have indicated that a column is not used in a constraint do not exist. So the sanity check
merely says "possibility that it is used", not "is not used".

Maybe.

James Campbell


On 26 Sep 2019 at 13:40, kapil mathur wrote:

>
> Hi DB2-L members,  
>
>     Does anybody know what is the underlying reason that DB2 for z/OS will not allow you drop any
> existing column from a table if there is any (completely unrelated) check constraint on the table
> (and the check constraint refers to another column that has no apparent relationship with the
> column that is being dropped)?  thanks      
>
>

---
This email has been checked for viruses by AVG.
https://www.avg.com

Gautam Sahu

DB2 for z/OS - sqlcode -196 reason code 10
(in response to kapil mathur)
Kapil,

In the manual it says you cannot use the DROP COLUMN feature if there is a
check constraint on the table. So I think it does not matter whether the
column is involved in the check constraint or not.

Regards,
Gautam

On Fri, 27 Sep 2019 at 2:10 AM, kapil mathur <[login to unmask email]> wrote:

> Hi DB2-L members,
>
>
> Does anybody know what is the underlying reason that DB2 for z/OS will
> not allow you drop any existing column from a table if there is any
> (completely unrelated) check constraint on the table (and the check
> constraint refers to another column that has no apparent relationship with
> the column that is being dropped)? thanks
>
> -----End Original Message-----
>
--
Thanks,
Gautam