CLR SQL Assembly: Get the Bytestream?

后端 未结 2 1785
广开言路
广开言路 2020-12-09 17:51

I have a SQL CLR dll I want to deploy, but have found you can embed the byte stream/varbinary_literal/ varbinary_expression/assembly bits into a text file to get around the

2条回答
  •  时光取名叫无心
    2020-12-09 18:38

    Found here, the varbinary can be generated without custom code for generating it, only by using SQL Server Management Studio (SSMS) and a local SQL Server instance.

    1. create or alter your assembly in your database using its local path on your local SQL Server.

      use yourBase
      go
      create assembly YourAssemblySqlName from N'YourLocalPath\YourAssemblyFile.dll'
      go
      
    2. Browse to your assembly in Object Explorer.

    3. Script its creation.

    And SSMS gives you the varbinary.

提交回复
热议问题