SharePoint Workflow. SharePoint 2010 and 2019 Workflow - VirtoSoftware

Execute SQL Script

This activity executes SQL statements from within SharePoint Designer workflows.

Note: Default is MS SQL Server (System.Data.SqlClient) provider. You can use other providers like ODBC, Oracle.

Activity supports multiple batches separated by GO command. GO is not a Transact-SQL statement; it is a command recognized by the activity. The activity interpret GO as a signal that they should send the current batch of Transact-SQL statements to an instance of SQL Server. The current batch of statements is composed of all statements entered since the last GO, or since the start of the ad hoc session or script if this is the first GO.

A Transact-SQL statement cannot occupy the same line as a GO command. However, the line can contain comments.

Example: Sql script

USE AdventureWorks;



SELECT @MyMsg = 'Hello, World.'





SharePoint Workflow Designer Phrase

Execute SQL Script this sql script using this provider name , this connection string


Parameter Description
this sql script SQL statements. Supports multiple batches separated by GO command.
this provider name The .NET ADO Provider. Default is MS SQL Server (System.Data.SqlClient). You can use other providers like - “System.Data.Odbc” - Odbc Data Provider - "System.Data.OleDb"- OleDb Data Provider - “System.Data.OracleClient" - OracleClient Data Provider - "System.Data.SqlClient" - SqlClient Data Provider - "System.Data.SqlServerCe.3.5" - Microsoft SQL Server Compact Data Provider - Etc Additional information about providers you can find here
this connection string The connection string, e.g. “Data Source=localhost\SQLExpress;Initial Catalog=test;Integrated Security=SSPI”