Re: Background processes inside the database.
Posted in 2003
Topics: General Discussion
Well, I did find some information on a method to execute background sessions in the database server. I was informed of an undocumented function which will create a new session and execute another undocumented function in the new session. /* ******************************************************************************** * mi_execute_background_session(mi_am_td *td, mi_string *udrname) * * Arguments: * * Td: Index descriptor that was passed in to the blade function by vii. * This is used to extract the Fragment identifier for the index, * servername, database name, owner and the name of the index. * These are passed as arguments to the entry routine of the * background session. This information is needed to build a * new index descriptor, which will be passed in to the blade routine. * * udrname: Name of blade routine which will be executed in the background * session. This routine has a fixed signature with a single * argument: the index descriptor. * * * Description: * * mi_execute_background_session() will create a new session * and execute function sq_background_session() in the new session. * * Arguments passed in to sq_background_session() via the newly created * scb are: fragment identifier, indexname, servername, owner, name of * blade udr to be executed in the background session and the * version number. * * Return value: MI_OK on success, MI_ERROR on failure. * *********************************************************************************/ Frankly, I would not be willing to use these two undocumented functions in a UDR. I will stick with the workarounds. Still, it is nice to know it is possible. Maybe IBM will document them someday. Sincerely (His and hers), Topher B| None of this would be necessary if I had not inherited the world's worst database design.
Topher TheRead wrote: > None of this would be necessary if I had not inherited the world's > worst database design. Oh no, you haven't! -- Ciao, The Obnoxious One "Ogni uomo mi guarda come se fossi una testa di cazzo"