ALTER ASSEMBLY

Alter the SQL Server catalog properties of an assembly, add or remove files associated with the assembly.

Syntax
      ALTER ASSEMBLY assembly
        [FROM client_assembly_specifier | assembly_bits ]
           [WITH assembly_option [ ,...n ] ]
              [DROP FILE { file_name [ ,...n ] | ALL } ]
                 [ADD FILE FROM 
                  { client_file_specifier [ AS file_name ] 
                    | file_bits AS file_name 
                  } [,...n ] 
                 ] [ ; ]
Key:
   assembly
        The assembly you want to modify. (Must already exist)

   client_assembly_specifier
       The network or local location where the assembly being refreshed is located:
        '\\computer\share\[path\]manifest_file_name'
        '[local_path\]manifest_file_name'

   assembly_bits
       The binary value for the assembly:
       {varbinary_literal | varbinary_expression}

   assembly_option
       PERMISSION_SET = { SAFE | EXTERNAL_ACCESS | UNSAFE } 
      | VISIBILITY = { ON | OFF } 
      | UNCHECKED DATA

Permissions:
Visibility is required when creating CLR functions, stored procedures, triggers, user-defined types, and user-defined aggregate functions. (but not for calling by other assemblies.)

The UNCHECKED DATA option will postpone consistency checks of table rows until a later time, if any CHECK constraints are present, they are disabled and marked untrusted. Use this feature with great caution.

DROP FILE will remove one or more files associated with the assembly. DROP FILE.. ADD FILE.. will execute the drop first, this lets you replace a file with the same name.

Examples

ALTER ASSEMBLY MyClass1
ADD FILE FROM 'C:\MyProject\ClassASM1.cs'; ALTER ASSEMBLY MyClass2 FROM 'C:\MyProject\Samples\ClassASM2.dll'

"Until all the powerful are just, the weak will be secure only in the strength of this Assemblyā€¯ ~ John F. Kennedy, address to the UN General Assembly

Related commands

CREATE ASSEMBLY
DROP ASSEMBLY
CREATE FUNCTION
CREATE PROCEDURE
CREATE TRIGGER
CREATE TYPE
CREATE AGGREGATE
sys.assembly_files

Equivalent Oracle command:

CREATE PACKAGE/BODY


 
Copyright © 1999-2024 SS64.com
Some rights reserved