SQL Server
The SQL Server connector provides an API to work with SQL databases.
This article describes the operations for the SQL Server built-in connector, which is available only for Standard workflows in single-tenant Azure Logic Apps. If you're looking for the SQL Server managed connector operations instead, see SQL Server managed connector reference.
Built-in connector settings
In a Standard logic app resource, the SQL Server built-in connector includes settings that control various thresholds for performance, throughput, capacity, and so on. For example, you can change the query timeout value for SQL operations. For more information, review Reference for app settings - local.settings.json.
Enable authentication for SQL Server
With the built-in connector, you can authenticate your connection with either a managed identity, Azure Active Directory (Azure AD), or a connection string. For managed identity authentication or Azure Active Directory authentication, you have to set up your SQL Server to work with these authentication types. For more information, see Authentication - SQL Server managed connector reference.
Connector how-to guide
For more information about connecting to SQL Server from your workflow in Azure Logic Apps, see Connect to SQL databases from workflows in Azure Logic Apps.
Authentication
Connection string
Connection string for SQL.
Parameters
| Name | Description | Type | Required | Allowed Values |
|---|---|---|---|---|
| Connection string | Connection string for SQL. | securestring | True |
Active directory OAuth
Active directory OAuth
Parameters
| Name | Description | Type | Required | Allowed Values |
|---|---|---|---|---|
| Server name | Endpoint for SQL server. | string | True | |
| Database name | Name for SQL database. | string | True | |
| Active directory OAuth | Active directory OAuth | string | True | |
| Authority | Active directory authority. | string | False | |
| Tenant | Active directory tenant. | string | True | |
| Credential type | Active directory credetnial type. | string | False | Certificate, Secret |
| Client id | Active directory client id. | string | True | |
| Client secret | Active directory client secret. | securestring | True | |
| Pfx | Active directory Pfx. | securestring | True | |
| Password | Active directory password. | securestring | True |
Managed identity
Managed identity
Parameters
| Name | Description | Type | Required | Allowed Values |
|---|---|---|---|---|
| Server name | Endpoint for SQL server. | string | True | |
| Database name | Name for SQL database. | string | True | |
| Managed identity | Managed identity | string | True |
Actions
| Delete rows (Preview) |
Deletes one or more rows based on the specified condition. |
| Execute query |
Executes a SQL query. |
| Execute stored procedure (Preview) |
Executes a stored procedure. |
| Get rows (Preview) |
Gets one or more rows based on the specified condition. |
| Get tables (Preview) |
Gets a list of tables in the SQL database. |
| Insert row (Preview) |
Inserts a row. |
| Update rows (Preview) |
Updates one or more rows based on the specified condition. |
Delete rows (Preview)
Deletes one or more rows based on the specified condition.
Parameters
| Name | Key | Required | Type | Description |
|---|---|---|---|---|
|
Table name
|
tableName | True | string |
Name for the table. |
|
Where condition
|
columnValuesForWhereCondition | True | object |
Column names and values, as key-value pairs, that identify the rows to delete. |
Returns
All the deleted rows.
- Result
- array
Execute query
Executes a SQL query.
Parameters
| Name | Key | Required | Type | Description |
|---|---|---|---|---|
|
Query
|
query | True | string |
The SQL query body to execute. |
|
Query parameters
|
queryParameters | object |
Parameters for the SQL query. |
Returns
All results returned from the SQL query.
- Result
- array
Execute stored procedure (Preview)
Executes a stored procedure.
Parameters
| Name | Key | Required | Type | Description |
|---|---|---|---|---|
|
Procedure name
|
storedProcedureName | True | string |
Name for the stored procedure. |
|
Parameters
|
storedProcedureParameters | object |
Parameters for the stored procedure. |
Returns
| Name | Path | Type | Description |
|---|---|---|---|
|
Result Sets
|
resultSets | string |
All the result sets from the stored procedure. |
|
Stored Procedure Parameters
|
outputParameters | string |
Final values for the stored procedure's output and input-output parameters. |
|
Return Code
|
returnCode | string |
Integer value representing the return code from the stored procedure. |
Get rows (Preview)
Gets one or more rows based on the specified condition.
Parameters
| Name | Key | Required | Type | Description |
|---|---|---|---|---|
|
Table name
|
tableName | True | string |
Name for the table. |
|
Where condition
|
columnValuesForWhereCondition | object |
Column names and values, as key-value pairs, that identify the rows to get. |
Returns
All the retrieved rows.
- Result
- array
Get tables (Preview)
Gets a list of tables in the SQL database.
Returns
The returned table list, including full names and display names.
- Result
- array
Insert row (Preview)
Inserts a row.
Parameters
| Name | Key | Required | Type | Description |
|---|---|---|---|---|
|
Table name
|
tableName | True | string |
Name for the table. |
|
Set columns
|
setColumns | object |
Values for the row fields. |
Returns
The inserted row.
- Result
- object
Update rows (Preview)
Updates one or more rows based on the specified condition.
Parameters
| Name | Key | Required | Type | Description |
|---|---|---|---|---|
|
Table name
|
tableName | True | string |
Name for the table. |
|
Where condition
|
columnValuesForWhereCondition | True | object |
Column names and values, as key-value pairs, that identify the rows to update. |
|
Set columns
|
setColumns | True | object |
Values to use for updating the row fields. |
Returns
All the columns for the updated rows.
- Result
- array
Triggers
| When a row is deleted (Preview) |
This operation triggers a run when a row is deleted in the table. |
| When a row is inserted (Preview) |
This operation triggers a run when a row is inserted in the table. |
| When a row is modified (Preview) |
This operation triggers a run when a row is modified (i.e., inserted or updated) in the table. |
| When a row is updated (Preview) |
This operation triggers a run when a row is updated in the table. |
When a row is deleted (Preview)
This operation triggers a run when a row is deleted in the table.
Parameters
| Name | Key | Required | Type | Description |
|---|---|---|---|---|
|
Table name
|
tableName | True | string |
Name of the table |
Returns
The row that has been deleted
- Deleted row
- array
When a row is inserted (Preview)
This operation triggers a run when a row is inserted in the table.
Parameters
| Name | Key | Required | Type | Description |
|---|---|---|---|---|
|
Table name
|
tableName | True | string |
Name of the table |
Returns
The row that has been inserted
- Inserted row
- array
When a row is modified (Preview)
This operation triggers a run when a row is modified (i.e., inserted or updated) in the table.
Parameters
| Name | Key | Required | Type | Description |
|---|---|---|---|---|
|
Table name
|
tableName | True | string |
Name of the table |
Returns
The row that has been modified
- Modified row
- array
When a row is updated (Preview)
This operation triggers a run when a row is updated in the table.
Parameters
| Name | Key | Required | Type | Description |
|---|---|---|---|---|
|
Table name
|
tableName | True | string |
Name of the table |
Returns
The row that has been updated
- Updated row
- array