SQL Server plugin

2 minute readExtensibilityDeveloper productivity

The EC-SQLServer plugin interacts with the Microsoft SQL Server command line tool called osql.exe. The osql tool allows the user to perform sql statements against the database. For example, you can execute a single sql file or execute a query from a text area. Moreover the postp feature is available.

More information about Microsoft SQL server can be found at here.

Plugin Version Revised on April 12, 2022

Integrated version

This plugin was developed and tested against version Microsoft SQL Server 2008.

Plugin procedures

For all parameter descriptions below, required parameters are shown in bold italics.

Plugin configuration

Plugin configurations are sets of parameters that apply across some or all of the plugin’s procedures. They are intended to reduce repetition of common values, create predefined sets of parameters for end users, and to securely store credentials where needed. Each configuration is given a unique name that is entered in designated parameters on procedures that use them.

Plugin configurations are created by navigating to CloudBees CD Administration  Plugins. On the right side of the line for the specific plugin, there is a "Configure" link which will open the Configuration page.

Plugin configuration parameters

Parameter Description

Configuration Name

Provide a unique name for the configuration. (Required)

User Name

Provide the user login ID. Remember that login IDs are case sensitive.


Provide the user-specified password


The RunSQLFile procedure creates and executes a command line from the parameters you provide in the procedure form, This command line will call the SQL Server’s utility called osql.exe

Parameter Description

Path to osql.exe

Absolute path to the Sql Server utility osql.exe


The name of the server you want to connect to. (This is the command-line '-S' option) (Required)

SQL Statement

Provide any sql statement to run against the database. (This is the command-line '-Q' option)

Database name

Issues a USE db_name statement when osql is started. (This is the command-line '-d' option)

Path to a sql file

Absolute path to a sql file. (This is the command-line '-i' option)

Configuration name

The name of the configuration that contains the SQL Server user and password.

Result (output property path)

Property name used to store the result of queries.

Parameter form

Examples and use cases

Creating a configuration

Stored configurations are available here

Execute a sql file containing a simple select "select * from person"

Expected result

Release notes

EC-SQLServer 2.0.13

  • Added session validation.

EC-SQLServer 2.0.12

  • The documentation has been migrated to the main documentation site.

EC-SQLServer 2.0.11

  • Renaming to "CloudBees CD".

EC-SQLServer 2.0.10

Renaming to "CloudBees"

EC-SQLServer 2.0.9

  • Configurations can be created by users with "@" sign in a name.

EC-SQLServer 2.0.8

  • The plugin icon has been updated.

EC-SQLServer 2.0.7

  • Fixed issue with configurations being cached for IE.

EC-SQLServer 2.0.6

  • Renamed ElectricCommander to ElectricFlow.

EC-SQLServer 2.0.5

  • Improved error handling.

EC-SQLServer 2.0.4

  • Result (output property path) parameter was added.

EC-SQLServer 2.0.3

  • Procedure name(s) were changed in the step picker section

EC-SQLServer 2.0.2

  • XML parameter panels

  • The parameter "Path to osql.exe" was added to the RunSQLFile procedure

  • The help page was changed