Command line to generate a SQL Server CLR deployment script (including serialized assemblies):
- Reading one or multiple .NET Assemblies contains SQL Server CLR methods.
- Generating a SQL Script to deploy all CLR methods in your SQL Server Database.
Download the last version here: SqlClrDeployment.exe
SqlClrDeployement Assemblies [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
Correction of Script generation, when a C# method is included in a namespace.
First stable version, including generation of SqlFunction, SqlProcedure, SqlTrigger, SqlAgregate.