Why do we need to drop assembly for updating changes?
- One cannot use ALTER ASSEMBLY when a SQLCLR method signature that's currently being used or executed has changed.
- In such a scenario we need to drop the Assembly and then re-create it using CREATE ASSEMBLY for updating changes.
- Assemblies are stored in the database. Because of this, when the assembly is modified and recompiled, it must be first DROPPED from the database and then reloaded using CREATE ASSEMBLY command to reflect changes on the server.
How can we drop an assembly from SQL SERVER?- An assembly can be dropped using DROP ASSEMBLY command.
Syntax:DROP ASSEMBLY assembly_name
- If no dependent assemblies need to be dropped, “WITH NO DEPENDENTS” is specified to drop an assembly.
Syntax:DROP ASSEMBLY assemblyname[,…n]
[WITH NO DEPENDENTS]
[;]