Documentation menu

Docs Connections: SQL Server

Set up SQL Server

Verbiqo needs one login that reads the system views, and nothing that writes. SQL Server 2016 to 2022, on Windows or Linux, is supported: which versions and platforms.

At a glance

Supported tasksAsk about blocking, waits, slow queries, deadlocks, availability groups, backups, settings and security, and explain a slow statement from its estimated plan. Questions: Ask SQL Server. Every check: SQL Server checks.
LimitationsVerbiqo reads the system views and msdb’s history, never your rows. It signs in with SQL Server authentication only. Plans of statements on your tables need SHOWPLAN and SELECT in that database (how).
Supported versionsSQL Server 2016, 2017, 2019 and 2022, on Windows or Linux, including Express. SQL Server 2025 connects but is not yet tested. 2014 and earlier, Azure SQL Database, Azure SQL Edge and Azure Synapse are not supported. Details: Supported versions.
AuthenticationA SQL Server login and password, so the server must allow SQL Server authentication (mixed mode). Windows authentication, Microsoft Entra ID and client certificates are not supported. The password is kept in the Keychain or Windows Credential Manager.
Minimum permissionsVIEW SERVER STATE and VIEW ANY DEFINITION on the server, and SHOWPLAN for its user in master. CONNECT ANY DATABASE and reads in msdb are recommended. Commands: Create the monitoring login. What each grant gives: What the login may hold.
Connection testExtensions… › SQL Server › Test Connection, or verbiqo mssql test <name>. A good test starts with Connected. and shows the product, version, edition, sessions and the encryption in use, such as encrypted. Encrypt: Mandatory, server certificate trusted.
First useful questionThe sales app is hanging, what is going on? Verbiqo samples requests and waits for 10 seconds. A blocking chain is one finding, naming the session at its head. When that session is idle, the finding gives the statement to end it.
Safety controls
  • A login in an administrative server role, such as sysadmin, or holding any permission beyond reading, is refused. sa is refused.
  • One SELECT at a time: no INTO, EXEC, SET, WAITFOR, locking hints or remote reads.
  • Each statement’s estimated plan is read first. It is refused if it touches anything but system views and the granted msdb tables, or would be costly.
  • It runs in a transaction that is always rolled back.
  • A 2-second lock timeout, low deadlock priority so your applications win, and a 15-second request timeout.
  • Sessions carry the application name verbiqo. Literals in statements and plans are hidden, and password hashes are never shown.
  • Every statement is on the access record.
Operational limitsAt most 500 rows per read. The model may add up to 6 statements per question, after Verbiqo’s own checks. Your organization can set tighter limits: Limits you can add.

Supported versions

Version or platformStatusNotes
SQL Server 2016, 2017, 2019, 2022 (13.x to 16.x), Windows or LinuxSupportedTested on 2022 on Linux. Enterprise, Standard, Developer and Web editions get every check.
Express editionSupportedExpress has no SQL Server Agent, so there is no job history to check. Everything else works.
SQL Server 2025 (17.x)Connects, not yet testedThe checks written for 2016 to 2022 run. Anything new in 2025 is not read yet.
SQL Server 2014 and earlierNot supportedVerbiqo connects and says so: some system views are missing, so some checks cannot run.
Amazon RDS for SQL ServerNot yet testedRead as SQL Server. The RDS master user can grant the permissions in step 1.
Azure SQL Managed InstanceDetected, not yet testedRead as SQL Server, and named as Managed Instance in answers.
Azure SQL Database, Azure SQL Edge, Azure SynapseNot supportedDetected and named. Their permissions and system views differ from SQL Server’s.

Verbiqo signs in with SQL Server authentication only: Windows authentication and Microsoft Entra ID sign-in are not supported yet.

1. Create the monitoring login

As an administrator. Replace the password, and run the msdb part for backup and Agent job history.

USE master;
CREATE LOGIN verbiqo_monitor WITH PASSWORD = 'choose-a-password', CHECK_POLICY = ON;

-- Required: requests, waits, blocking, query statistics
GRANT VIEW SERVER STATE TO verbiqo_monitor;
GRANT VIEW ANY DEFINITION TO verbiqo_monitor;
CREATE USER verbiqo_monitor FOR LOGIN verbiqo_monitor;
GRANT SHOWPLAN TO verbiqo_monitor;

-- Recommended: Query Store and statistics inside each database (metadata only)
GRANT CONNECT ANY DATABASE TO verbiqo_monitor;

-- Recommended: backup and SQL Server Agent history
USE msdb;
CREATE USER verbiqo_monitor FOR LOGIN verbiqo_monitor;
GRANT SHOWPLAN TO verbiqo_monitor;
GRANT SELECT ON dbo.backupset TO verbiqo_monitor;
GRANT SELECT ON dbo.sysjobs TO verbiqo_monitor;
GRANT SELECT ON dbo.sysjobhistory TO verbiqo_monitor;

Verbiqo signs in with a SQL login and password, so the server must allow SQL Server authentication (mixed mode).

2. Add the connection

  1. Open the form

    Extensions… › SQL Server.

  2. Fill it in

    Name, host, port (1433), user verbiqo_monitor, password. For a named instance, type its name in Instance instead of a port. Database is optional (master).

  3. Choose encryption

    The same choices as SSMS. The default, Mandatory with Trust server certificate, encrypts and works with SQL Server’s own self-signed certificate. With a certificate from your CA, untick Trust server certificate and give the CA.

  4. Test, then save

    The test shows the product, version, edition, sessions and TLS in use.

verbiqo mssql add sales --host sql01 --port 1433 --user verbiqo_monitor --password-stdin --encrypt mandatory --trust-server-certificate
verbiqo mssql test sales

A named instance: --instance REPORTING instead of --port, or --host sql01\REPORTING. The SQL Server Browser service must be running for it. In an availability group, save a connection to each replica, not the listener: through the listener every question lands on the primary.

Encryption

ChoiceWhat it doesUse when
Mandatory, Trust server certificate (default)Always encrypted. The certificate is not checked.The server has its own self-signed certificate, which most do.
MandatoryAlways encrypted. The certificate must be signed by a CA this computer trusts and name the host.The server has a certificate from your CA. Give the CA file if it is private.
StrictTDS 8.0: encrypted from the first byte, the certificate always checked.SQL Server 2022 and later, with a CA-signed certificate.
OptionalThe login is encrypted. The rest only if the server forces encryption.A lab, or a server that cannot encrypt.
  • Host name in certificate. When you connect by IP address or an alias, the name the certificate was issued for, so Mandatory and Strict can check it.
  • No client certificate. SQL Server signs logins in with a login and password, never a client certificate, so there is none to give.
  • The test says what happened. It reads the session’s encryption from the server itself, for example encrypted. Encrypt: Mandatory, server certificate trusted.

From a terminal: --encrypt optional|mandatory|strict, --trust-server-certificate, --host-name-in-certificate NAME and --ssl-ca FILE.

What the login may hold

Checked against SQL Server 2022 with a login holding exactly the grants above.

GrantVerbiqo can answer
VIEW SERVER STATERequests, sessions, waits, blocking, query statistics, memory, file latency, availability groupsRequired
VIEW ANY DEFINITIONDatabases, settings, logins and their policyRequired
SHOWPLAN in masterLets Verbiqo plan each statement before it runs itRequired
CONNECT ANY DATABASEPlan regressions from Query Store, and statistics behind their tables, in each database. No rights on any table.Recommended
msdb readsLast backups, failed Agent jobsRecommended

Refused: a login in any fixed server role that administers (sysadmin, serveradmin, securityadmin, processadmin, setupadmin, bulkadmin, diskadmin, dbcreator), or holding any permission beyond reading state and definitions, such as CONTROL SERVER, ALTER ANY LOGIN, INSERT or EXECUTE. Verbiqo names the permission. sa is refused. Create a separate login.

How each statement stays read-only

  • One read. One SELECT (or WITH … SELECT): no INTO, EXEC, SET, WAITFOR, locking hints or remote reads.
  • Planned first. Verbiqo asks SQL Server for the plan without running the statement, and refuses it if the plan touches anything but system views and the msdb tables above, or would be costly.
  • Rolled back. It runs inside a transaction that is always rolled back, with a 2-second lock timeout and low deadlock priority, so Verbiqo yields to your applications.
  • Hidden values. Literals in statement text and plans are hidden, and password hashes are never shown.

Settings that help

Ask what should I enable? to see each item as ready or not.

ItemLets Verbiqo see
A monitoring login with VIEW SERVER STATE, VIEW ANY DEFINITION and SHOWPLANRequests, waits, blocking, query statistics.
CONNECT ANY DATABASE, to read Query Store and statistics inside each databasePlan regressions, and statistics behind their tables.
Backup and SQL Server Agent history from msdbWhen each database was last backed up, and the Agent jobs that failed.
Query Store in the databases that matterQuery performance over days, and plan changes.
ALTER DATABASE [YourDatabase] SET QUERY_STORE = ON;

Optional: log shipping

To see log shipping’s backups and restores against their thresholds:

USE msdb;
GRANT SELECT ON dbo.log_shipping_monitor_primary TO verbiqo_monitor;
GRANT SELECT ON dbo.log_shipping_monitor_secondary TO verbiqo_monitor;

Optional: SSIS and Reporting Services

Why it helps: Verbiqo reads SSIS’s run history and the report server’s execution log, to find failed and slow packages, slow and failing reports, and failed subscriptions.

SSIS, on SQL Server 2017 and later (the role reads the catalog and changes nothing):

USE SSISDB;
CREATE USER verbiqo_monitor FOR LOGIN verbiqo_monitor;
ALTER ROLE ssis_logreader ADD MEMBER verbiqo_monitor;

Reporting Services: only the columns Verbiqo reads, never report definitions, parameters or who ran a report. The report server database may be on another SQL Server: add that one as a connection.

USE ReportServer;
CREATE USER verbiqo_monitor FOR LOGIN verbiqo_monitor;
GRANT SELECT ON dbo.Catalog (ItemID, Path) TO verbiqo_monitor;
GRANT SELECT ON dbo.ExecutionLogStorage (ReportID, TimeStart, TimeDataRetrieval, TimeProcessing, TimeRendering, [RowCount], Status) TO verbiqo_monitor;
GRANT SELECT ON dbo.Subscriptions (Report_OID, LastStatus, LastRunTime, DeliveryExtension) TO verbiqo_monitor;
GRANT SHOWPLAN TO verbiqo_monitor;

These tables are read only by Verbiqo’s own fixed reads. A statement the model writes still reaches the system views alone.

Optional: replication

Why it helps: Verbiqo reads replication’s agents and history, to find agents that are failing (even while they retry), how far behind each subscriber is, the last day’s errors, and subscriptions that must be reinitialised.

On the server that holds the distribution database (often the publisher itself), grant only the columns Verbiqo reads. The built-in replmonitor role is not enough: it lets an account run Microsoft’s monitoring procedures, not read these tables, and Verbiqo runs no procedures. Do not use db_datareader: it would give the replicated rows (MSrepl_commands) and the agents’ stored credentials too.

USE distribution;
CREATE USER verbiqo_monitor FOR LOGIN verbiqo_monitor;
GRANT SHOWPLAN TO verbiqo_monitor;
GRANT SELECT ON dbo.MSdistribution_agents (id, name, publisher_db, publication, subscriber_db, subscriber_id, subscriber_name) TO verbiqo_monitor;
GRANT SELECT ON dbo.MSdistribution_history (agent_id, runstatus, time, delivery_latency, current_delivery_latency, comments) TO verbiqo_monitor;
GRANT SELECT ON dbo.MSlogreader_agents (id, name, publisher_db) TO verbiqo_monitor;
GRANT SELECT ON dbo.MSlogreader_history (agent_id, runstatus, time, delivery_latency, comments) TO verbiqo_monitor;
GRANT SELECT ON dbo.MSrepl_errors (time, source_name, error_code, error_text) TO verbiqo_monitor;
GRANT SELECT ON dbo.MSsubscriptions (publisher_db, subscriber_db, status) TO verbiqo_monitor;
GRANT SELECT ON dbo.MSreplservers (srvid, srvname) TO verbiqo_monitor;  -- SQL Server 2017 and later

On SQL Server 2016, leave out the last line and subscriber_name. A distribution database with another name: use that name. These tables are read only by Verbiqo’s own fixed reads. A statement the model writes still reaches the system views alone. Key values that an error message quotes are masked.

Optional: plans of statements you paste

Why it helps: Verbiqo can explain why one statement is slow from its estimated plan, without running it (Explain a slow statement).

SQL Server gives an estimated plan only to a login that may run the statement, though nothing runs. So plans of statements on application tables need SHOWPLAN and SELECT in that database. Grant it only if your policy allows the monitoring login to read those tables: Verbiqo plans statements there, it never runs them, and every other statement stays limited to the system views.

USE [YourDatabase];
CREATE USER verbiqo_monitor FOR LOGIN verbiqo_monitor;  -- if it has no user there yet
GRANT SHOWPLAN TO verbiqo_monitor;
GRANT SELECT ON SCHEMA::[dbo] TO verbiqo_monitor;

Logs and metrics

  • Splunk: send the error log (the ERRORLOG file, or the Windows Application event log), with its host. What Verbiqo finds: Log findings.
  • Prometheus: windows_exporter (Windows) or node_exporter (Linux) on the machine, for capacity forecasts and reboots on the timeline. Verbiqo finds the machine by the connection’s host.

Next: Ask SQL Server.

Common errors

The connection test and the answer say what went wrong. Find the message below, then follow the fix.

Message or symptomLikely causeWhat to doNeeds an administrator?
… can change or administer the server (…), so Verbiqo will not use it.The login is in an administrative server role, or holds a permission beyond reading. The message names it.Create a separate monitoring login with only the read grants (step 1).Yes, to create the login.
The server refused the login or password. SQL Server must allow SQL Server authentication (mixed mode).The login or password is wrong, or the server accepts Windows authentication only.Type the password again and press Test Connection. If it is right, the server needs mixed mode.Yes, to turn on mixed mode.
Nothing is listening on <host>:<port>., <host> does not resolve. or … did not answer in time.The host name or port is wrong, the server is down, or a firewall blocks this computer.Check the host and port (1433 by default) in the connection.Only if a firewall must be opened.
The SQL Server Browser on <host> (UDP 1434) did not answer for <instance>: give the port instead.A named instance needs the SQL Server Browser service, which finds its port. It did not answer.Type the instance’s port instead of its name, or start the Browser service.Only to start the Browser service.
The server’s certificate is not signed by a CA this computer trusts. … or tick Trust server certificate.Encryption checks the certificate, and it comes from a private certificate authority (CA) or is self-signed.Give the connection the CA certificate, or tick Trust server certificate. More: Certificate and TLS errors.Only to get the CA file.
This is SQL Server …. Verbiqo supports 2016 and later, so some views may be missing.The server runs SQL Server 2014 or earlier.Read the answer as partial: some checks cannot run there.Yes, to upgrade.
This login cannot see plans, so statements are not run.The login’s user has no SHOWPLAN. Verbiqo plans every statement before running it.Grant SHOWPLAN to the user in master and msdb (step 1).Yes.
The login lacks VIEW SERVER STATE, so it sees only its own session …The login was not granted VIEW SERVER STATE.Run GRANT VIEW SERVER STATE TO verbiqo_monitor; in master (step 1).Yes.

Something missing or unclear? Email hello@verbiqo.app.