---
title: "SqlServer@1"
description: "SqlServer@1 — legacy MS SQL Server provider on System.Data.SqlClient; use SqlServer@2 instead"
url: "https://docs.justcat.it/reference/data-sources/providers/sqlserver-1/"
---
# SqlServer@1


> **😾:** **Deprecated.** `SqlServer@1` still works, but it is no longer maintained and gets no new features. `SqlServer@1` is built on `System.Data.SqlClient`, which Microsoft no longer develops. Use [SqlServer@2](https://docs.justcat.it/reference/data-sources/providers/sqlserver-2/ "SqlServer@2") instead — it is backward-compatible; see *How to upgrade* below.



## Connects to

MS SQL Server, on premises or in Azure, with SQL Server or Windows authentication. A legacy provider has no technology of its own — a data source keeps the technology of its replacement, `SqlServer@2`.

## Example


**Properties**



Name
: DWH

Provider
: SqlServer@1

Technology
: SqlServer

Connection string
: ```
  Data Source=localhost;
  Initial Catalog=DWH;
  Integrated Security=SSPI;
  ```





**YAML**


```yaml
Data sources:
- Name: DWH
  Provider: SqlServer@1
  Technology: SqlServer
  Connection string: >
    Data Source=localhost;
    Initial Catalog=DWH;
    Integrated Security=SSPI;
```




## Connection string

A standard `System.Data.SqlClient` connection string — `Key=Value` pairs separated by semicolons. The keys you will use most:

| Key | Meaning |
|---|---|
| `Data Source` (or `Server`) | Server name or address; add `,port` or `\instance` when needed |
| `Initial Catalog` (or `Database`) | Database to connect to |
| `Integrated Security` | `SSPI` or `true` for Windows authentication; leave out when you send a user name and password |
| `User Id`, `Password` | SQL Server credentials |
| `Encrypt`, `TrustServerCertificate` | Encrypt the connection; `TrustServerCertificate=true` accepts a certificate the client does not trust |

The full list is in the <a href="https://learn.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlconnection.connectionstring" target="_blank">System.Data.SqlClient documentation</a>.

A password, or the whole string, can come from an environment variable — `%NAME%` is replaced with the value of `NAME`; see [How every provider is used](https://docs.justcat.it/reference/data-sources/providers/introduction/#how-every-provider-is-used "How every provider is used").

### How to upgrade

[SqlServer@2](https://docs.justcat.it/reference/data-sources/providers/sqlserver-2/ "SqlServer@2") is backward-compatible with this provider: change `SqlServer@1` to `SqlServer@2` in your data source definitions and the connection string keeps working. In some cases you might need to add `;TrustServerCertificate=true` to it — the newer driver encrypts connections by default and refuses a certificate it does not trust. We are not aware of anything else needed.

## Settings

None beyond `Connection string`.

## Query

One T-SQL statement that returns a result set — a `SELECT`, or an `EXEC` of a stored procedure that returns one.

## Prerequisites

None. The driver ships with CAT. Windows; on Linux it has no extra dependencies and is expected to work, but it has not been tested there.

## Limitations

No multi-factor authentication and no service principals — `System.Data.SqlClient` does not support them. Use `SqlServer@2` for any Microsoft Entra ID authentication.

## Serving test and data source definitions

`SqlServer@1` can also serve [lists](https://docs.justcat.it/reference/project-file/lists/ "Lists") of definitions: any statement that returns the columns of a [test](https://docs.justcat.it/reference/tests/properties/ "Test properties"), [data source](https://docs.justcat.it/reference/data-sources/properties/ "Data source properties") or [query](https://docs.justcat.it/reference/queries/properties/ "Query properties") definition works. Ready-made table scripts are in [Store definitions in a database](https://docs.justcat.it/how-to-guides/organize-and-run-tests/store-definitions-in-a-database/ "Store definitions in a database").

## Related

* [SqlServer@2](https://docs.justcat.it/reference/data-sources/providers/sqlserver-2/ "SqlServer@2") — the replacement.
* [Technologies](https://docs.justcat.it/reference/data-sources/technologies/ "Technologies").
* [SQL Server output](https://docs.justcat.it/reference/outputs/sqlserver/ "SQL Server output") — the same database can also receive the test results.

