Managing external libraries

External libraries are loaded by the server the first time a UDF that requires it is invoked. A loaded library remains loaded by the server for the life of the server once it has been loaded after first being needed. It is not loaded when a CREATE FUNCTION call is made, nor is it automatically unloaded when a DROP FUNCTION call is made.

If the library version must be updated, the dbo.sa_external_library_unload procedure forces the library to be unloaded without restarting the server. The call to unload the external library will only be successful if the library in question is not currently in use. The procedure takes one optional parameter, a long varchar, that specifies the name of the library to be unloaded. If no parameter is specified, all external libraries not in use are unloaded. The syntax for unloading an external function library.

Note: You must unload existing libraries from a running Sybase IQ server before replacing the dynamically linkable library. Failure to unload the library can result in a server crash. Before replacing a dynamically linkable library, either shutdown the Sybase IQ server or use the sa_external_library_unload function to unload the library.
call sa_external_library_unload('library.dll')            

If a registered function uses a complete path, for example '/abc/def/library.dll', unregister the function or the library will not be unloaded.

call sa_external_library_unload('/abc/def/library.dll')
Related concepts
External function prototypes
Controlling error checking and call tracing
Related tasks
Finance specific functions


Created November 2, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com