Skip to main content

Microsoft SQL Server - Execute Query

Overview​

Execute any SQL query against a Microsoft SQL Server database, without returning any of the resulting data. This Blueprint should primarily be used for queries that perform functionality other than SELECT, like multi-step SQL jobs, or DML statements.

Variables​

NameReferenceTypeRequiredDefaultOptionsDescription
HostMSSQL_HOSTAlphanumericβœ…--The domain or the IP address of the database you want to connect to.
PortMSSQL_PORTIntegerβœ…"1433"-Number for the database port to connect to. Defaults to 1433.
UsernameMSSQL_USERNAMEAlphanumericβœ…--Name of the user to connect to the database with.
PasswordMSSQL_PASSWORDPasswordβž–--Password associated to the provided username.
DatabaseMSSQL_DATABASEAlphanumericβœ…--Name of the database in the Microsoft SQL Server to connect to.
Extra URL ParametersMSSQL_URL_PARAMETERSAlphanumericβž–--Extra parameters that will be placed at the end of the connection string, after the "?". Must be separated by "&"
QueryMSSQL_QUERYAlphanumericβœ…--Any SQL query that runs a job against the database (CREATE, DROP, INSERT, etc.). Formatting is ignored.

YAML​

Below is the YAML template for this Blueprint and can be used in the Fleet YAML Editor.

source:
blueprint: Microsoft SQL Server - Execute Query
inputs:
MSSQL_HOST: null ## REQUIRED
MSSQL_PORT: '1433' ## REQUIRED
MSSQL_USERNAME: null ## REQUIRED
MSSQL_PASSWORD: null
MSSQL_DATABASE: null ## REQUIRED
MSSQL_URL_PARAMETERS: null
MSSQL_QUERY: null ## REQUIRED
type: BLUEPRINT
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- '101'
- '102'
- '103'
- '200'
- '205'
- '249'