Export (0) Print
Expand All
Expand Minimize


Applies To: SQL Server 2014, SQL Server 2016 Preview

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Removes an assembly and all its associated files from the current database. Assemblies are created by using CREATE ASSEMBLY and modified by using ALTER ASSEMBLY.

Applies to: SQL Server (SQL Server 2008 through current version), SQL Database V12.

Topic link icon Transact-SQL Syntax Conventions

DROP ASSEMBLY assembly_name [ ,...n ]
[ ; ]


Is the name of the assembly you want to drop.


If specified, drops only assembly_name and none of the dependent assemblies that are referenced by the assembly. If not specified, DROP ASSEMBLY drops assembly_name and all dependent assemblies.

Dropping an assembly removes an assembly and all its associated files, such as source code and debug files, from the database.

If WITH NO DEPENDENTS is not specified, DROP ASSEMBLY drops assembly_name and all dependent assemblies. If an attempt to drop any dependent assemblies fails, DROP ASSEMBLY returns an error.

DROP ASSEMBLY returns an error if the assembly is referenced by another assembly that exists in the database or if it is used by common language runtime (CLR) functions, procedures, triggers, user-defined types or aggregates in the current database.

DROP ASSEMBLY does not interfere with any code referencing the assembly that is currently running. However, after DROP ASSEMBLY executes, any attempts to invoke the assembly code will fail.

Requires ownership of the assembly, or CONTROL permission on it.

The following example assumes the assembly HelloWorld is already created in the instance of SQL Server.

DROP ASSEMBLY Helloworld ;
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft