Why do we need to drop assembly for updating changes?

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]
[;]
How to see assemblies loaded in SQL SERVER?
Sys.assemblies can be used to see the assemblies loaded in SQL SERVER........
How is .NET Appdomain allocated in SQL SERVER 2005?
A separate Appdomian is created for each database in order to run the database code. The appdomain may be allocated........
Syntax for creating a new assembly in SQL Server 2005
Assemblies can be created using CREATE ASSEMBLY command. It takes the path of the DLL as the parameter........
Post your comment