# Execute SQL Script

Source: [https://docs.virtosoftware.com/docs/virto-workflow-automation-web-part/virto-sharepoint-workflow-activities-kit-sharepoint-2010-workflow-platform/database-activities/execute-sql-script/](https://docs.virtosoftware.com/docs/virto-workflow-automation-web-part/virto-sharepoint-workflow-activities-kit-sharepoint-2010-workflow-platform/database-activities/execute-sql-script/)
Product: Virto Workflow Automation Web Part
Updated: 2026-08-12


This activity executes SQL statements within SharePoint Designer workflows.

![Execute SQL Script activity configured in a SharePoint Designer workflow](https://img-docs.virtosoftware.com/wp-content/uploads/2024/10/execute_sql_script_1.png)

***Note**: The default provider is MS SQL Server (System.Data.SqlClient). You can use other providers like ODBC or Oracle.*

The activity supports multiple batches separated by the `GO` command. `GO` is not a Transact-SQL statement; it is a command recognized by this activity. The activity interprets `GO` as a signal to send the current batch of Transact-SQL statements to an instance of SQL Server. The current batch of statements includes all statements entered since the last `GO` or since the start of the session if it is the first `GO`.

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

**Example**: SQL script

![Example SQL script with GO batch separators entered for the Execute SQL Script activity](https://img-docs.virtosoftware.com/wp-content/uploads/2024/10/execute_sql_script_2.png)

## **SharePoint Workflow Designer Phrase**

Execute **SQL Script** **this SQL script** using **this provider name** and **this connection string**.

**Parameters**


| Parameter | Description |
|---|---|
| this SQL script | SQL statements. Supports multiple batches separated by the `GO` command. |
| this provider name | The .NET ADO Provider. The default is MS SQL Server (`System.Data.SqlClient`). Other providers include:; - `System.Data.Odbc` - ODBC Data Provider; - `System.Data.OleDb` - OleDb Data Provider; - `System.Data.OracleClient` - OracleClient Data Provider; - `System.Data.SqlServerCe.3.5` - Microsoft SQL Server Compact Data Provider; Additional information about providers can be found [the Microsoft ADO.NET data providers reference](http://msdn.microsoft.com/en-us/library/dd0w4a2z.aspx). |
| this connection string | The connection string, e.g., `Data Source=localhost\SQLExpress;Initial Catalog=test;Integrated Security=SSPI`. |

