Execute SQL
Overview
This task provides a simple way to run a SQL script against an Azure SQL Server Database.
Prerequisites
- SQL Server Database with "Allow access to Azure Services" turned on
- A SQL Server authenticated user (NOT Active directory)
- Access to one of the following Agent Pools
- Hosted
- Hosted VS2017
- Private agent (Windows) *
Options
- Database Server (Mandatory) e.g. {mydatabase}.database.windows.net
- Database Name (Mandatory) e.g. AdventureWorks
- Database User (Mandatory) e.g. MyUser (Ensure you use an account with the minimum permissions required)
- Database Password (Mandatory) e.g. $(DBpasswordVariable) USE A SECRET VARIABLE! see. https://docs.microsoft.com/en-us/azure/devops/pipelines/release/variables?view=vsts&tabs=batch
- SQL Query (Mandatory)
- Advanced > Connection timeout (Mandatory, default 120)
- Advanced > Query timeout (Mandatory, default 65535)
| |