Проекты

SQL Assembly script Plugin

The plugin allows you to create a SQL script for Microsoft SQL Server from managed assemblies. Visual Studio contains convenient way to convert and install .NET assembly to SQL server. But if administrator is far away from VS, or you want to backup SQL script, or you want to automate installation process, then this plugin will help you to create SQL script that likewise VS create similar script file.

Sample

Usage

To use it just call the plugin window from the menu Tools→SQL→Assembly Script and drop assembly that contains suitable code for integration into MSSQL. If assembly contains suitable code, then tree view below will show all methods and types suitable to import to SQL Server.

Context menu for each assembly contains following commands:

  • Add... — Add additional assembly. (Ctrl+O or first button in toolbar or Drag'n'Drop are supported to add new assembly)
  • Browse — Open folder where assembly is located.
  • Remove — Remove assembly from the list. (Delete or Backspace)
  • Copy — Copy selected node to clipboard Скопировать выделенный узел из дерева в буфер обмена.
  • Script
    • Install — Create and save SQL script to install assembly.
    • Uninstall — Create and save SQL script to uninstall assembly.
    • Binary — Create only a binary representation of the assembly understandable for MSSQL.

As a result of executing the methods for creating installation or removal scripts, the following files will be obtained:

Example

Configuration

Settings

You can change templates of generated scripts in the configuration. You will need plugin Plugin.Configuration to change this settings.

To create templates you can use these keywords. (Value can be null if this type is not relevant):

  • Type — Object type. Supported types: {Aggregate, Function, Type}.
  • AssemblyName — Assembly name.
  • NamespaceName — Namespace where supported member is located.
  • MemberName — Member name.
  • Parameters — Input arguments.
  • ReturnType — Invocation result type.

For template Show Message only on key is available: {Message} but for template Template — Install→Assembly the key {GetHexAssembly()} is also available to the above parameters.

Limitations

Plugin does not support unsafe assemblies.

Теги:

Скачать

Ссылки

Родительские файлы