- 3 minutes to read

SqlPackageParams - System Parameter

The SqlPackageParams System Parameter 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.

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

How It Works

When the Logging Service creates a new Log Database, 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.

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
{"TargetTrustServerCertificate":true,"TargetEncryptConnection":true,"SourceTrustServerCertificate":false,"SourceEncryptConnection":true}

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.

Next Steps

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.