Tool to generate a SQL Server CLR deployment script.
C#
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
releases/last
src
test
.gitignore
README.md
SqlClrDeployment.png
SqlClrDeployment.sln
_config.yml

README.md

SqlClrDeployment.exe - v1.3

Command line to generate a SQL Server CLR deployment script (including serialized assemblies):

  1. Reading one or multiple .NET Assemblies contains SQL Server CLR methods.
  2. Generating a SQL Script to deploy all CLR methods in your SQL Server Database.

Download the last version here: SqlClrDeployment.exe

Usage

SqlClrDeployement Assemblies [options...]

Options:

Use at least -output or -connectionstring.

  • -output=[Filename]
    SQL file name to generate.
    Ex: -output=Script.sql

  • -connectionstring=["..."]
    Connection string to execute immediately the SQL requests.
    Ex: -cs="Server=.;Database=MyDb;Trusted_Connection=True;"

  • -pre=[wildcards]
    Filename or wildcards to find SQL files to execute before the CLR deployment. These scripts will be executed in alphabetic order.
    Ex: -pre=C:\Scripts\before-*.sql

  • -post=[wildcards]
    Filename or wildcards to find SQL files to execute after the CLR deployment. These scripts will be executed in alphabetic order.
    Ex: -post=C:\Scripts\after-*.sql

  • -trustworthy=true|false
    Set the TRUSTWORTHY database property to ON or OFF.
    Ex: -trustworthy=Yes

Sample:

SqlClrDeployment MyAssembly1.dll MyAssembly2.dll -output=Script.sql
SqlClrDeployment MyAssembly.dll -cs="Server=.;Database=MyDb;Trusted_Connection=True;" -pre=..\*.sql

Command Prompt Sample

Release notes

Version 1.3

Correction of Script generation, when a C# method is included in a namespace.

Version 1.2

First stable version, including generation of SqlFunction, SqlProcedure, SqlTrigger, SqlAgregate.