---
title: SqlPackageParams System Parameter – DacFx Encryption and Certificate Trust
description: The SqlPackageParams System Parameter sets the encryption and certificate trust options Nodinite passes to SqlPackage.exe (DacFx) when it creates or updates Log Databases. JSON format, default values, and when to change them.
---

# SqlPackageParams - System Parameter

The **SqlPackageParams** [System Parameter][System Parameters] sets the connection security options that :Nodinite: passes to `SqlPackage.exe` (DacFx) when it deploys [Log Databases][]: whether the connection is encrypted, and whether the SQL Server certificate is trusted without validation. The [Logging Service][] reads it when it creates a new Log Database; the path to `SqlPackage.exe` comes from [SqlPackageExecutable][].

## :fa-table: At a Glance {#at-a-glance}

| Property | Value |
| --- | --- |
| Key | `SqlPackageParams` |
| Data type | json |
| Default | `{"TargetTrustServerCertificate":true,"TargetEncryptConnection":true,"SourceTrustServerCertificate":false,"SourceEncryptConnection":true}` |
| Read by | [Logging Service][] |
| Takes effect | Within about 15 seconds; no restart needed |
| Status | ✅ Active |
| Since | Nodinite 5.4.1.26 |

## :fa-gears: How It Works

When the [Logging Service][] creates a new [Log Database][Log Databases], it runs `SqlPackage.exe` and adds one command-line option per property in this parameter, for example `/TargetEncryptConnection:true /TargetTrustServerCertificate:true`. The **Target** options apply to the SQL Server instance that receives the Log Database. The **Source** options apply when `SqlPackage.exe` reads from a source database connection instead of a `.dacpac` file. The [Update Log Database][] guide generates `SqlPackage.exe` commands with the same kind of options.

DacFx 161 and later (built on Microsoft.Data.SqlClient) encrypt connections by default. With a self-signed SQL Server certificate, a connection then fails unless the certificate is trusted, which is why `TargetTrustServerCertificate` defaults to `true`. Use DacFx 161 or later; see [SqlPackageExecutable][].

## :fa-code: Value Format

A JSON object; each property maps to the `SqlPackage.exe` option with the same name.

| Property | Type | Default | Meaning |
| --- | --- | --- | --- |
| `TargetTrustServerCertificate` | boolean | `true` | Trust the target SQL Server's certificate without validating it. Set `false` when the SQL Server has a certificate from a trusted CA |
| `TargetEncryptConnection` | boolean | `true` | Encrypt the connection to the target SQL Server. Keep `true` |
| `SourceTrustServerCertificate` | boolean | `false` | Trust the source SQL Server's certificate without validating it |
| `SourceEncryptConnection` | boolean | `true` | Encrypt the connection to the source SQL Server. Keep `true` |

```json
{"TargetTrustServerCertificate":true,"TargetEncryptConnection":true,"SourceTrustServerCertificate":false,"SourceEncryptConnection":true}
```

## :fa-lightbulb: Choosing a Value

* **Keep the default** unless your security policy requires certificate validation.
* **Production with a CA-signed SQL Server certificate**: set `TargetTrustServerCertificate` to `false`, so the certificate is validated. The certificate must then match the server name in [SqlServer][] and chain to a trusted root on the :Nodinite: application server.
* **Self-signed certificate** (common in test): keep `TargetTrustServerCertificate` = `true`; with `false`, Log Database creation fails with a certificate trust error.
* **Don't turn encryption off.** Setting `TargetEncryptConnection` or `SourceEncryptConnection` to `false` sends the deployment unencrypted.

## :fa-hand-point-right: Next Steps

* :fa-database: [Update Log Database][]  
* :fa-list: [Manage Log Databases][]  
* :fa-pen-to-square: [Manage System Parameters][]  

## :fa-link-horizontal: Related Topics

* :fa-pen-square: [SqlPackageExecutable][]  
* :fa-server: [SqlServer][]  
* :fa-life-ring: [LogDatabaseRecovery][]  
* :fa-hard-drive: [Logging Service][]  
* :fa-database: [Log Databases][]  
* :fa-cog: [System Parameters][]  

>[!NOTE]
>:Nodinite: v6 and its Install and Update Tool are no longer supported. Older installations needed matching versions: DacFx 161 or later requires :Nodinite: 5.4.1.26 or later (Install and Update Tool 6.0.0.5 or later); earlier :Nodinite: versions need DacFx older than 161.

[Log Databases]:{ndr}/Core%20Services/Log%20Databases/Overview.md
[LogDatabaseRecovery]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/LogDatabaseRecovery.md
[Logging Service]:{ndr}/Core%20Services/Logging%20Service/Overview.md
[Manage Log Databases]:{ndr}/Administration/5.%20Settings/2.%20Log%20Databases/Overview.md
[Manage System Parameters]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/Manage%20System%20Parameters.md
[SqlPackageExecutable]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/SqlPackageExecutable.md
[SqlServer]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/SqlServer.md
[System Parameters]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/Overview.md
[Update Log Database]:{ndr}/Administration/5.%20Settings/2.%20Log%20Databases/Update%20Log%20Database.md