|
Description |
Connection to a SQL Server database |
|---|---|
|
Type |
sqlserver |
|
Category |
Db |
Configuration in States
The SqlServer Db Store can be configured directly in the States interface via the Data Stores module. The following configuration modes are available:
Parameters
|
Name |
Description |
Mandatory |
Default |
Comment |
|---|---|---|---|---|
|
Host |
The hostname or IP address of the SQL Server instance |
Yes |
|
|
|
Port |
The port of the SQL Server instance |
Yes |
|
|
|
Database |
The name of the target database |
Yes |
— |
|
|
Username |
The username used to authenticate |
Yes |
— |
|
|
Password |
The password used to authenticate |
Yes |
— |
Value is hidden |
|
Suffix |
Additional parameters appended to the connection string |
No |
— |
|
Connection String
A connection string can be entered manually instead of using the parameter form. For the full list of supported connection string parameters, refer to the Microsoft SqlConnection documentation.
Local Configuration
The local configuration is defined in a JSON file (stores.json) deployed directly on the Workers' server. A locally configured store takes priority over a store with the same name configured in the States interface.
|
Name |
Description |
Type |
Mandatory |
Comment |
|---|---|---|---|---|
|
ConnectionString |
The connection string to connect to the database |
string |
True |
|
{
"Name": "database",
"Type": "sqlserver",
"HealthCheck": true,
"Config": {
"ConnectionString": "Server=<ip/hostname server>,<port>;User Id=dfakto;Password=password;Database=<dbname>;TrustServerCertificate=True;Encrypt=True"
}
}