Unloads the specified extended stored procedure dynamic-link library (DLL) from memory.
DBCC dllname (FREE)
When an extended stored procedure is executed, the .dll remains loaded by Microsoft® SQL Server™ until the server is shut down. This statement allows a .dll to be unloaded from memory without shutting down SQL Server. Execute sp_helpextendedproc to display the .dll files currently loaded by SQL Server.
DBCC (FREE) returns this result set (message) when a valid .dll is specified:
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
DBCC dllname (FREE) permissions default to members of the sysadmin fixed server role or the db_owner fixed database role, and are not transferable.
This example assumes an extended procedure xp_sample is implemented as Xp_sample.dll and has been executed. It uses the DBCC dllname (FREE) statement to unload the Xp_sample.dll file associated with the xp_sample extended procedure.
DBCC xp_sample (FREE)
Execution Characteristics of Extended Stored Procedures | sp_helpextendedproc |
sp_addextendedproc | Unloading an Extended Stored Procedure DLL |
sp_dropextendedproc | DBCC |