Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > DB2 locking UDF dll
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 14th July 23:16
w gemini
External User
 
Posts: 1
Default DB2 locking UDF dll


Which version of db2 are you using? For v8, try set KEEP_FENCED to no
(db2 update dbm cfg using KEEP_FENCED NO). This way, the fenced mode
process would terminate everytime you disconnect. However, you will
suffer a significant performance penalty, so this should only be done on
your development machine and once the udf is finalized, turn that flag
back on.

Another alternative is to use ALTER FUNCTION to change the external name
to point to a different library.
  Reply With Quote


  sponsored links


2 22nd July 21:38
fan ruo xin
External User
 
Posts: 1
Default DB2 locking UDF dll


That’s a good point. In V8, there are more things you should take care:

====
If keepfenced is set to no, and the routine being executed is not
threadsafe, a new fenced mode process is created and destroyed for each
fenced mode invocation. If keepfenced is set to no, and the routine being
executed is threadsafe, the fenced mode process persists, but the thread
created for the call is terminated. If keepfenced is set to yes, a fenced
mode process or thread is reused for subsequent fenced mode calls. When the
database manager is stopped, all outstanding fenced mode processes and
threads will be terminated.
=====

We can see even you set KEEPFENCED as NO, but the UDF routine is THREADSAVE
(default). That means even all the connections who called fenced UDFs are
terminated, the fenced mode process still keep alive . So you can kill this
process – db2fmp, or the better and safer way is you shutdown the db2
server.


Regards,
FRX
  Reply With Quote
3 22nd July 21:38
w gemini
External User
 
Posts: 1
Default DB2 locking UDF dll


THREADSAFE is not the default for C UDFs. But I agree, the best way is
to shutdown the db2 server which would bring down all fmp processes that
are current running.
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666