DBCC dllname (FREE) (Transact-SQL)

Applies to: SQL Server

Unloads the specified extended stored procedure DLL from memory.

Transact-SQL syntax conventions

Syntax

DBCC <dllname> ( FREE ) [ WITH NO_INFOMSGS ]

Arguments

<dllname>

The name of the DLL to release from memory.

WITH NO_INFOMSGS

Suppresses all informational messages.

Remarks

When an extended stored procedure is executed, the DLL remains loaded by the instance of SQL Server until the server is shut down. This statement allows for a DLL to be unloaded from memory without shutting down SQL Server. To display the DLL files currently loaded by SQL Server, execute sp_helpextendedproc.

Result sets

When a valid DLL is specified, DBCC <dllname> (FREE) returns:

DBCC execution completed. If DBCC printed error messages, contact your system administrator.

Permissions

Requires membership in the sysadmin fixed server role or the db_owner fixed database role.

Examples

The following example assumes that xp_sample is implemented as xp_sample.dll and has been executed. DBCC <dllname> (FREE) unloads the xp_sample.dll file associated with the xp_sample extended procedure.

DBCC xp_sample (FREE);

See also