Color scheme: Riviera
You are here: start » en » Documentation » Data integration and data access » WKL Database Gateway » Reference » WKL Database Update service (reference)

WKL Database Update service (reference)

The “WKL Database Update” service applies signed database update packages without the data service. It follows the same procedure as the update module of the data service: it checks the packages in a database's inbox, backs the database up, applies, announces and reports. If you run the data service, you do not need this service. For the setup steps, see Apply database updates without the data service.

Syntax

msiexec /i Wkl.Data.Update-<version>.msi [PROPERTY=value]… [/qn]
Wkl.Data.Update.exe <command> [<id>] [arguments] [--json]

Run the commands on the server from an elevated command prompt.

Parameters

Installation package

Wkl.Data.Update-<version>.msi installs the program in C:\Program Files\Wkl\Database Update (self-contained, so the server needs no .NET runtime, and with the SQL Server provider), sets up the Windows service Wkl.Data.Update with automatic start, and starts it. It is separate from the installer of the data service.

PropertyDefaultMeaning
UPD_SERVICE_ACCOUNTNT SERVICE\Wkl.Data.UpdateAccount of the service: the virtual account or a group managed service account (DOMAIN\name$). The package does not offer an account with a password. An update keeps the account
UPD_REMOVE_DATA–1 on removal: also delete %ProgramData%\WKL\Database Update with its configurations, settings and reports. Without it, the folder stays

During installation, the program (setup-host) creates the folders below with their own permissions and registers the event source WKL Database Update in the Application log. Removal deletes the event source again.

Folders

The folders are fixed below %ProgramData%\WKL\Database Update. None of them inherits the permissions of %ProgramData%.

FolderContentsPermissions
databasesThe protected configuration of each database, <id>.json, and nothing elseAdministrators and SYSTEM modify, the service account reads
settingsThe operating settings of each database, <id>.jsonAdministrators and SYSTEM modify, the service account modifies
logThe reports of the file channel, <YYYY-MM-DD>.jsonlAdministrators and SYSTEM modify, the service account modifies

Protected configuration

A file <id>.json in databases sets up a database. Its structure and fields are the same as for the update module, with three differences:

  • Sign-in. Without connection.secret, the service signs in with its own Windows account (Integrated Security=True in connection.string); that account needs the permissions in the database to change its structure and back it up. With connection.secret, it signs in with the SQL login in connection.string and takes the password from the environment variable or file (env:NAME, file:PATH).
  • gatewayAlias has no effect: applications do not reach the database through a data service. The service sees open sessions of older applications through the database itself.
  • mail names the mail server for the email channel: server, port (default 25), from, and an optional secret (env:NAME, file:PATH). Port 465 is encrypted from the first byte; any other port requires STARTTLS. The service never sends unencrypted, and the mail server's certificate must be valid. With secret, it signs in with the sender address as the user name; without it, it sends without signing in, for example through an internal relay. The data service's update module uses `Gateway:Mail` instead.
"mail": { "server": "smtp.example.com", "port": 587, "from": "updates@example.com", "secret": "file:C:\\ProgramData\\WKL\\Database Update\\mail.txt" }

A file that anyone other than Administrators and SYSTEM can change, a password in connection.string, or a file name that differs from the id leaves the database out; databases lists the file and the reason.

Operating settings

The service writes the file <id>.json in settings through the settings command. A missing key or file takes the default. The service does not replace a file that is not valid JSON or holds a value out of range with defaults: the database waits until the file is correct.

KeyDefaultMeaning
expandautomaticBackward-compatible packages: automatic at once, confirm only after confirmation
contractconfirmBreaking packages: confirm only after confirmation, automatic announced and applied at the deadline
noticeMinutes60Lead time of an announcement in minutes, 0 to 10080, when the package names none
sessionWindowMinutes151 to 1440; no effect while gatewayAlias has none
backup.keepCount10Backups that always remain, 1 to 1000
backup.keepDays30Age in days from which an older backup is deleted, 0 to 3650; 0: only the count matters
notify.channels["eventlog"]Report channels: eventlog, file, email
notify.email.to–Recipients, separated by ;; required when email is on
{
  "expand": "automatic", "contract": "confirm", "noticeMinutes": 60, "sessionWindowMinutes": 15,
  "backup": { "keepCount": 10, "keepDays": 30 },
  "notify": { "channels": ["eventlog", "file"], "email": { "to": null } }
}

Backup retention works as in the update module. Mail on the email channel goes through the mail server in the protected configuration's mail to notify.email.to, outside the update pass: a slow or unreachable mail server delays the mail, never a package. If mail is missing, secret cannot be resolved, or the mail server does not accept the message, a warning goes to the event log, where the report itself is recorded anyway.

Commands

CommandMeaning
databasesDatabases set up, with their configuration (keys as SHA-256, the secret only as a reference) and settings; files in databases the service leaves out, with the reason
status <id>Open packages (id, file, schema version, kind, status, reason, deadline), blocking sessions, and differences from the last deployed model
history <id> [--skip n] [--take n]Finished packages, newest first, with their steps; --take 1 to 100, default 20
confirm <id> <package>Confirm a waiting package: a backward-compatible one runs at once, a breaking one is announced and runs at the deadline
move-deadline <id> <package> <time>Move the deadline of an announced package; time in ISO 8601, read as UTC without a zone (2026-11-02T18:00Z)
cancel-notice <id> <package>Withdraw an announcement; the package waits for confirmation again
retry <id> <package>Take a failed or refused package again, as a new package with all checks
dismiss <id> <package>Set a failed or refused package aside; it leaves the status
upload <id> <file>Put a package (64 MB at most) into the inbox and have it checked at once
settings <id> [options]Show or change the operating settings: --expand, --contract, --notice-minutes, --session-window-minutes, --keep-count, --keep-days, --channels eventlog,file,email, --email-to "a@example.com;b@example.com". They apply from the next pass
helpOverview of the commands

<package> is the id column of status. --json prints the data as JSON; status --json has the same format as update-status of the data service.

Exit code. 0 done; 1 wrong call, unknown database or package, package in another status, database unreachable, or service unreachable; 10 a pass is applying a package right now (try again shortly); otherwise the package's code, for example 7 waiting for confirmation.

Reports

The Application log, source WKL Database Update, holds the events of the packages with IDs 4101 to 4106 (as for the update module), plus the start of the service and every administration command with the Windows account that ran it. The file channel writes log\<YYYY-MM-DD>.jsonl per day (UTC); the service never deletes these files.

Remarks

  • Who may administer. The commands hand the request to the running service through the named pipe \\.\pipe\Wkl.Data.Update. Only Administrators and SYSTEM may open it, and it refuses every connection from the network; there is no administration from another computer. Without an elevated command prompt, Windows denies access.
  • Who acts. The service carries out every command with its own account. The administrator needs no permissions in the database. On a confirmation, the service records the caller's Windows account (DOMAIN\name) in the database as the one who confirmed.
  • Only to the service. The command line sends only when the running service Wkl.Data.Update is at the other end of the pipe.
  • No overlap. Commands and passes run one after the other. While a package is running, a command waits up to ten seconds and otherwise ends with 10.
  • Pass. Every 15 seconds; without a file in databases, the service does nothing.

Example

C:\> "C:\Program Files\Wkl\Database Update\Wkl.Data.Update.exe" status kunden
Stand von kunden.
  Kunden, Schema 13
  Paket 41  Kunden-schema-14.zip  Schema 14  contract  waiting  Grund 7
    Ein nicht abwärtsverträgliches Paket (contract) wartet auf Bestätigung.
 
C:\> "C:\Program Files\Wkl\Database Update\Wkl.Data.Update.exe" confirm kunden 41

The command line and the service answer in German.

See also

en/wiki/data-conectivity/database-gateway/reference/update-service.txt · Last modified: by Wolfgang van der Stille