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