dbTalk Databases Forums  

Doubt in Package Invalidation, when adding a column of type DATE.

ibm.software.db2.mvs ibm.software.db2.mvs


Discuss Doubt in Package Invalidation, when adding a column of type DATE. in the ibm.software.db2.mvs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bobby.Dreamer
 
Posts: n/a

Default Doubt in Package Invalidation, when adding a column of type DATE. - 08-24-2009 , 03:53 AM






*Hello Guyz,*

As per the Manual
+"Plans and packages are not invalidated unless the new column is a TIME, TIMESTAMP, or DATE."+


And I did the following test.

SELECT NAME,COLLID,OWNER,VALID
FROM "SYSIBM".SYSPACKAGE
WHERE NAME='DB2MULSE' ;


NAME COLLID OWNER VALID
DB2MULSE BOBC BOBB Y

The package DB2MULSE is Valid 'Y'.

ALTER TABLE SHANDB.EMPLOYEE
ADD TRIAL DATE
;

The table has been altered.


SELECT NAME,COLLID,OWNER,VALID
FROM "SYSIBM".SYSPACKAGE
WHERE NAME='DB2MULSE' ;


NAME COLLID OWNER VALID
DB2MULSE BOBC BOBB A

As per the manual, the package should have been invalidated.

Am i missing, anything here.

Please let me know you thoughts.

*Thank You,*
Sushanth

Reply With Quote
  #2  
Old   
DTSDB2
 
Posts: n/a

Default Re: Doubt in Package Invalidation, when adding a column of typeDATE. - 08-24-2009 , 12:18 PM






For it to be invalidated, it appears that you also need to specify the DEFAULT keyword, and not specify a constant (not use the system default). To validate what I read as being correct, check the bottom of page 71 of V8 Admin Manual. I'm not a DB2 application programmer, thus I'm not 100% confident in this.

Reply With Quote
  #3  
Old   
Bobby.Dreamer
 
Posts: n/a

Default Re: Doubt in Package Invalidation, when adding a column of typeDATE. - 08-26-2009 , 04:56 AM



*Hi,*

I tried the following query. The check'd the catalogs before & after, Catalog still says package was 'A'ltered.

ALTER TABLE SHANDB.EMPLOYEE
ADD TRY DATE
WITH DEFAULT
'2009-08-26'

;

*Thanks DTSDB2 for your reply & sorry for the late communication,*
Sushanth

Reply With Quote
  #4  
Old   
DTSDB2
 
Posts: n/a

Default Re: Doubt in Package Invalidation, when adding a column of typeDATE. - 08-26-2009 , 09:54 AM



It appears that I mistyped. You must not specify a constant associated with the default. Please reference the manual, as I clearly can't read well.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.