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
sp_freedll "sqlsrvdll.dll"
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.
The permission checks for sp_freedll differ based on your granular permissions settings.
Setting | Description |
---|---|
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. |
Values in event and extrainfo columns from the sysaudits table are:
Information | Values |
---|---|
Event | 38 |
Audit option | exec_procedure |
Command or access audited | Execution of a procedure |
Information in extrainfo |
|