SQL Server (beta)

👶

Beta Feature

Beta features represent newly added features in the product, and there is a chance of incompatible changes that impact the API and functionality in subsequent releases as we approach a stable version. As such we will not provide any advanced notice of any deprecation of functionality related to beta features.

SQL Server is a relational database management platform developed by Microsoft. Integrating Validio with your SQL Server allows you to monitor your data and tables, run SQL queries on your tables and views, and analyze and validate the data in your tables.

To integrate with Microsoft SQL Server,

  1. Create a service account in SQL Server with the appropriate permissions for Validio. See Prerequisites.
  2. Create a Validio credential to connect to the service account. See Add a SQL Server Credential.
  3. Create a Validio source to monitor the tables in the SQL Server database. See Add a SQL Server Source.

Prerequisites

Create a service account in SQL Server with the appropriate permissions for Validio to read and validate your data.

❗️

Credential Permission Requirements

Validio Credentials require VIEWER access rights when connecting to sources to read and access data. Admins must ensure that they do not provide EDITOR access rights to their credentials.

The following SQL script provides steps for setting up a user with the necessary permissions for the source in Validio. Copy the script into a SQL worksheet and follow the steps.

Setup for User and Password-based Authentication

-- Add a new validio user/password account to the server
USE master;
CREATE LOGIN validio WITH PASSWORD = '<password>';

-- Add a validio user to the database, repeat for each database
USE <database>;
CREATE USER validio FOR LOGIN validio;

Setup for Microsoft Entra ID-based Authentication

-- Add a validio Microsoft Entra ID application to the database, repeat for each database
USE <database>;
CREATE USER validio FROM EXTERNAL PROVIDER;

Permissions

-- Repeat these steps for each database
USE <database>;

-- Grant access to read all tables and views
ALTER ROLE db_datareader ADD MEMBER validio;

-- Grant access to view definitions (used for lineage)
GRANT VIEW DEFINITION TO validio;

-- Grant access to query logs (used for lineage)
-- For Azure SQL Database
GRANT VIEW DATABASE PERFORMANCE STATE TO validio;

-- For Azure SQL Managed Instance or SQL Server 2022 (16.x) and later
USE master;
GRANT VIEW SERVER PERFORMANCE STATE TO validio;

-- For SQL Server 2019 (15.x) and earlier
USE master;
GRANT VIEW SERVER STATE TO validio;

Add a SQL Server Credential

To add a credential for Microsoft SQL Server,

  1. Navigate to Credentials and click + New Credential.
  2. Under Namespace, select a namespace where the resources will be created.
  3. For Credential Type, select Microsoft SQL Server Credential.
  4. Fill in the credential parameter fields. Refer to the SQL Server Credential Parameters table.
  5. Check Use for catalog and schema checks to automatically discover credentials and add them to the catalog page.
  6. Click Create.

Validio will validate the connection to the SQL Server account. If validation passes, Validio will automatically start fetching data. If validation fails, check that you provided the correct parameter values and try again.

Once the credential is created, you can add a source to monitor SQL Server data.

SQL Server Credential Parameters

ParameterDescription
NameIdentifier for the credential, referenced when configuring a source.
HostDNS hostname or IP address to the SQL server.
PortPort number of the SQL server.
Default databaseName of the default SQL server database where the table to read is included.
Authentication typeSelect User and password or Entra ID.

User and Password Authentication

ParameterDescription
UsernameUsername for the SQL Server account.
PasswordPassword for the SQL Server account.

Entra ID Authentication

ParameterDescription
Client IDApplication (client) ID which you can find in your Azure Portal.
Client secretClient secret value for your application, which you can find in your Azure Portal.

Add a SQL Server Source

To add a source for Microsoft SQL Server,

  1. Navigate to Sources and click + New source.
  2. Under Source type, select SQL Server.
  3. Under Config,
    1. Select the valid Credential or create a new credential to authenticate your connection to the data warehouse.
    2. You have two options for specifying the dataset and tables to monitor:
      1. Select an existing table -- Enter the Database, Schema, and Table to specify where the data comes from. Selecting more than one table will create a new source for each table. Refer to the SQL Server Source Configuration Parameters table.
      2. Use Custom SQL -- Write a valid SQL query to specify the tables to monitor.
    3. Set the Polling schedule, which is how frequently the validators on the source will check for changes.
  4. Under Schema, click Continue to automatically infer the schema fields from the tables you selected. If you select many tables, this operation can take a few minutes to complete.
  5. Under Source details,
    1. Add Tags to help group related sources or to use for routing notifications.
    2. Add an Owner who will be the contact for incident notifications.
  6. Click Continue to create the source.
    Source names are generated automatically and will be displayed when the source creation completes. If there are more than 5 sources, you will see the names for the first five and a count of the remaining sources.

SQL Server Source Parameters

ParameterDescription
CredentialMicrosoft SQL Server Credential.
DatabaseName of the SQL Server database.
SchemaName of the schema that contains the table.
TableName of the table to read from.
Polling schedule (cron expression)