sp_freedll

Unloads a dynamic link library (DLL) that was previously loaded into XP Server memory to support the execution of an extended stored procedure (ESP).

Syntax

sp_freedll dll_name

Parameters

Examples

Usage

There are additional considerations when using sp_freedll:
  • You cannot execute from within a transaction.

  • sp_freedll cannot free the DLL of a system ESP.

  • An alternative to unloading a DLL explicitly, using sp_freedll, is to specify that DLLs always be unloaded after the ESP request that invoked them terminates. To do this, set the esp unload dll configuration parameter to 1 or start xpserver with the -u option.

  • You cannot use to update an ESP function in a DLL without shutting down XP Server or the SAP ASE server.

  • If you use sp_freedll to unload a DLL that is in use, sp_freedll succeeds, causing the ESP currently using the DLL to fail.

Permissions

The permission checks for sp_freedll differ based on your granular permissions settings.

SettingDescription
Enabled

With granular permissions enabled, you must be a user with manage any ESP privilege.

Disabled

With granular permissions disabled, you must be a user with sa_role.

Auditing

Values in event and extrainfo columns from the sysaudits table are:

InformationValues
Event

38

Audit option

exec_procedure

Command or access audited

Execution of a procedure

Information in extrainfo
  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

  • Proxy information – Original login name, if set proxy in effect

Related reference
sp_addextendedproc
sp_dropextendedproc
sp_helpextendedproc