Unix Technical Forum

a trouble of modifying procedure

This is a discussion on a trouble of modifying procedure within the DB2 forums, part of the Database Server Software category; --> i replace the program file in $db2path/sqllib/function with a new one , and call the procedure . it turns ...


Go Back   Unix Technical Forum > Database Server Software > DB2

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 05:48 AM
heming_g@hotmail.com
 
Posts: n/a
Default a trouble of modifying procedure

i replace the program file in $db2path/sqllib/function with a new one
,
and call the procedure . it turns out to be the old one , since i
print a massage for notice .
so , now . i have to change my program file name , every time i
modified the procedures .
what's wrong ?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 05:48 AM
Shyam Peri
 
Posts: n/a
Default Re: a trouble of modifying procedure

The behavior which you have been observing, could be valid if the
database manager keeps the fenced processes thread safe.
And if the KEEP_FENCED is enabled, the the fenced mode
processes/threads would be resued for subsequenced calls, and
termination of such processes/threads happens only when database
manager is stopped.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 05:48 AM
heming_g@hotmail.com
 
Posts: n/a
Default Re: a trouble of modifying procedure

what benefit would have to be , when KEEP_FENCED is enable . and i
want to make it disabled

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2008, 05:48 AM
Shyam Peri
 
Posts: n/a
Default Re: a trouble of modifying procedure

The benefit u would have is by enabling the caching fenced mode
processes is, u would not incorporate the over head of creating &
destroying the processes at every transaction.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-27-2008, 05:48 AM
heming_g@hotmail.com
 
Posts: n/a
Default Re: a trouble of modifying procedure

.. . i change the keepfenced to no .
but it still does not work.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-27-2008, 05:48 AM
Serge Rielau
 
Posts: n/a
Default Re: a trouble of modifying procedure

heming_g@hotmail.com wrote:
> . . i change the keepfenced to no .
> but it still does not work.
>

http://www-1.ibm.com/support/docview...id=swg21006542

It appears you may need to DROP the object from DB2...

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
DB2 UDB for Linux, Unix, Windows
IBM Toronto Lab
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-27-2008, 05:48 AM
Knut Stolze
 
Posts: n/a
Default Re: a trouble of modifying procedure

heming_g@hotmail.com wrote:

> . . i change the keepfenced to no .
> but it still does not work.


Is this a trusted (not fenced) or a fenced procedure? KEEP_FENCED=YES only
helps with fenced routines. In the other case, DB2 caches the libraries
for external routines in the hope that it will be needed soon again. This
caching is interfering here.

In such cases, I usually restart DB2. But life might not be that simple for
you. You should try to force the respective agent to get it destroyed and,
thus, the library unloaded.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-27-2008, 05:49 AM
heming_g@hotmail.com
 
Posts: n/a
Default Re: a trouble of modifying procedure

ye ,.. finally i finished the debug by changing the filename ..
it's awful, from ~00 to ~09 ..
but it's more faster than restart . in my situation

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-27-2008, 05:50 AM
Brian Tkatch
 
Posts: n/a
Default Re: a trouble of modifying procedure

You need to DROP and CREATE the function, or at least, GET/PUT. Just
changing the file on disk will not tell the database that new code is
there.

B.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-27-2008, 05:50 AM
Knut Stolze
 
Posts: n/a
Default Re: a trouble of modifying procedure

Brian Tkatch wrote:

> You need to DROP and CREATE the function, or at least, GET/PUT. Just
> changing the file on disk will not tell the database that new code is
> there.


This is not true!! You don't need to drop/create the function as this is a
particular troublesome issues if other objects (views, triggers, functions,
procedures, packages) depend on the function. The only thing you have to
ensure is that the cached version of the library is not used any longer,
and ways to accomplish that were already discussed.

I'm not quite sure if changing the external name via ALTER FUNCTION ...
EXTERNAL NAME '...' and using the same library as before would help as
well. I rather doubt it, however, and using a different library name as
the OP did would be the safest way.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:12 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com