Modifying the UDF at Runtime

Many SAP Sybase IQ installations are in mission-critical environments, where customers require an extremely high level of availability. System Administrators must be able to install and upgrade UDFs with little or no impact to the SAP Sybase IQ server.

An application must not attempt to access an external library while the associated library file is being moved, overwritten, or deleted. Since libraries are automatically loaded whenever an associated SQL function is invoked, it is important to follow these steps in the exact order whenever performing any type of maintenance on existing UDF libraries:

  1. Ensure all users who invoke UDFs do not have any pending queries in progress
  2. Revoke the execute privilege from users, and drop the SQL functions and stored procedures which reference external UDF code modules
  3. Unload the library from the SAP Sybase IQ server, using the call sa_external_library_unload command (shutting down the IQ server also automatically unloads the library).
  4. Perform the desired maintenance on the external library files (copy, move, update, delete).
  5. Edit SQL function and stored procedure definitions in the registration scripts to reflect external library locations, if the libraries were moved.
  6. Grant the execute privilege to users, and run registration scripts to re-create the SQL functions and stored procedures which reference external UDF code modules.
  7. Invoke a SQL function or stored procedure that references the external UDF code to ensure the SAP Sybase IQ server can dynamically load the external library.