Unloads a dynamic link library (DLL) that was previously loaded into XP Server memory to support the execution of an extended stored procedure (ESP).
sp_freedll dll_name
is the file name of the DLL being unloaded from XP Server memory.
Unloads the sqlsrvdll.dll DLL:
sp_freedll "sqlsrvdll.dll"
sp_freedll cannot be executed 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.
sp_freedll can be used to update an ESP function in a DLL without shutting down XP Server or Adaptive Server.
If you use sp_freedll to unload a DLL that is in use, sp_freedll will succeed, causing the ESP currently using the DLL to fail.
The permission checks for sp_freedll differ based on your granular permissions settings.
Granular permissions enabled |
With granular permissions enabled, you must be a user with manage any ESP privilege. |
Granular permissions disabled |
With granular permissions disabled, you must be a user with sa_role. |
Values in event and extrainfo columns from the sysaudits table are:
Event |
Audit option |
Command or access audited |
Information in extrainfo |
---|---|---|---|
38 |
exec_procedure |
Execution of a procedure |
|
System procedures sp_addextendedproc, sp_dropextendedproc, sp_helpextendedproc