473,396 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 ?

Jan 12 '06 #1
11 1419
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.

Jan 12 '06 #2
what benefit would have to be , when KEEP_FENCED is enable . and i
want to make it disabled

Jan 12 '06 #3
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.

Jan 12 '06 #4
.. . i change the keepfenced to no .
but it still does not work.

Jan 12 '06 #5
he******@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
Jan 12 '06 #6
he******@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
Jan 12 '06 #7
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

Jan 14 '06 #8
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.

Jan 17 '06 #9
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
Jan 17 '06 #10
Ah, ok, then i completely misunderstood how it works. Though, i find it
awkward, if not even scary, that a file on disk can be changed while
the database is up and will affect the functioning of the DB itself.

Could he not just use a dunmmy function with a different filename to
use for ALTER FUNCTION..EXTERNAL NAME, and then switch it back to the
same name?

B.

Jan 17 '06 #11
Brian Tkatch wrote:
Ah, ok, then i completely misunderstood how it works. Though, i find it
awkward, if not even scary, that a file on disk can be changed while
the database is up and will affect the functioning of the DB itself.

Could he not just use a dunmmy function with a different filename to
use for ALTER FUNCTION..EXTERNAL NAME, and then switch it back to the
same name?


Might work - but only when the library is unloaded.

External routines are implemented in shared libraries. (Windows calls those
DLLs.) To improve performance, DB2 will load the library once and keep it
loaded as long as it is still used. The five most recently used libraries
will be cached anyway (there is a nice description from Sean to be found
here: http://tinyurl.com/d89dx).

And this caching is what you need to deal with. The library management
unloads all libraries (except the 5 most recently used ones) every 10
minutes. So you could force 5 dummy libs to be loaded and then wait 10
minutes.

So far, this has not been a serious issue. Granted, it's rather annoying if
you do development, but in that case you can recycle the instance anyways.

Replacing the library files that is in use is (a) not an issue under Windows
because the OS doesn't allow you to do that (which I don't like a bit), and
(b) only the DBA can do that. So I don't see a problem there either. This
is just a normal operating system thing that can be done with each program
that loads stuff dynamically at run time.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Jan 17 '06 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Driesen via SQLMonster.com | last post by:
Hi guys I having trouble with this sproc. I get the following error when testing: Server: Msg 245, Level 16, State 1, Procedure UTL_CompletenessCheckLoan, Line 231 Syntax error converting the...
7
by: Együd Csaba | last post by:
Hi, I've a problem with some of my stored procs. My config is: RH7.1, Postgres 7.3.2 I had converted a few fields of a few tables from one type to another and after this I made all the...
0
by: Shanmugasundaram Doraisamy | last post by:
Dear Group, We are using Postgresql 7.3.4 on Redhat 8.0 with Java 1.4.2. We are developing our applications in Java. We call stored procedures from the java program. Order numbers are generated...
2
by: vvenk | last post by:
Hello: I wrote a test procedure on Oracle that returns a string and a value. CREATE OR REPLACE PROCEDURE EBMS.p_CSV_Upload ( P_ERROR OUT VARCHAR2, P_ERROR_NO ...
16
by: lisa.engblom | last post by:
I have two semi related questions... First, I am trying to output a list of strings to a csv file using the csv module. The output file separates each letter of the string with a comma and then...
7
by: MLH | last post by:
This was contributed by someone in this NG last year... Sub WaitFor(psngSeconds As Single) ' wait for specified number of seconds ' Copyright Trevor Best (tre...@besty.org.uk) <-OK, so I added...
0
by: Alfur | last post by:
Hi! I'm writing a shared library in C, it's a loadable package for TCL, my aim is a command procedure, that modifies it's argument a'la: set p 1 my_incr p puts $p expected is 2, of course....
2
by: Zethex | last post by:
At the moment i'm doing a piece of work for school and I'm stuck at the moment. I have a list of words, for example: Sentence = I have another list which I need to use to replace certain...
5
by: IUnknown | last post by:
Ok, we are all aware of the situation where modifying the folder structure (adding files, folders, deleting files, etc) will result in ASP.NET triggering a recompilation/restart of the application....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.