Each external library is loaded the first time a UDF that requires it is invoked. A loaded library remains loaded for the life of the server. 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 is successful only 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.
call sa_external_library_unload('library')
call sa_external_library_unload('library.so')
If a registered function uses a complete path, for example, /abc/def/library, first unregister the function.
call sa_external_library_unload('/abc/def/library')
call sa_external_library_unload('\abc\def\library.so')