Invantive Data Hub is driven entirely from the command line. An argument is written as a slash, the name, a colon and the value: ``` /database:Demo\Dummy /file:c:\jobs\first-job.sql /interactive:false ``` Arguments may be given in any order, and every argument has a long and a short form. This product reads its own command line rather than the shared one of the other Invantive programs, so the separator is a colon here and an equals sign is not accepted. `/help` or `/?` prints the list below and ends with exit code 0; from release 27.0 onward it does so before the licence is loaded, so the list is also available on a device on which no licence has been registered yet. An argument in another format ends the program with `itgendhb002` and [[Invantive Data Hub/Exit Code|exit code]] 5; a leading dash instead of a slash is such a format. ## Arguments The following arguments are accepted: - `/database` (`/d`): the database, as `GROUP\NAME`. The older name `/connection` (`/c`) still works. - `/file` (`/f`): the file of Invantive UniversalSQL statements to execute. - `/statement` (`/s`): one statement to execute, instead of a file. Available from release 27.0. See below. - `/user` (`/u`): the log-on code. - `/password` (`/p`): the password in plain text. - `/encryptedpassword` (`/e`): the password encrypted with the key of the device it runs on, encoded in Base64. - `/logfile` (`/l`): the file to write all output to. An existing file is appended to. - `/logoverwrite` (`/lo`): overwrite that file instead of appending. Default `false`. - `/verbose`: print extensive progress messages. This argument has no short form. - `/interactive` (`/i`): whether questions may be asked. Questions are asked unless `/interactive:false` is given, on which the run reports `itgendhb282`, "HEADLESS MODE REQUESTED", and answers nothing. A run on a console which is not interactive, such as a scheduled task, has to say so: without `/interactive:false` it ends with `itgendhb209`, "Use of headless mode is required when using a non-interactive console". - `/results` (`/r`): whether the results of a statement are printed to the standard output. Available from release 27.0. See below. - `/timestamp` (`/t`): leave the timestamp off the messages printed. Output carries a timestamp unless this argument is given. - `/licensekey` (`/lk`): use this licence key instead of the one in the user profile. - `/variables` (`/v`): one or more `NAME=VALUE` assignments to [[Invantive Script/Invantive Script|Invantive Script]] variables. - `/attributes` (`/a`): one or more `NAME=VALUE` assignments to the attributes of a data container. `/variables` and `/attributes` switch the reading of the rest of the command line: everything after them is read as assignments until the next slash argument. Up to and including release 26.0 the reading stopped one argument later than that, at the first argument without an equals sign, so an argument such as `/statement:"select 1 where a = b"` was read as an assignment. ## One Statement on the Command Line Available from release 27.0. A job of one or two statements needs no file: `/statement` carries the statement itself, in the way `psql -c` and `bash -c` do. The value follows a colon, or is the next argument, which is the form that survives a shell without further quoting: ``` /database:Demo\Dummy /statement:"select code, description from Customers@eol" /database:Demo\Dummy /statement "select code, description from Customers@eol" ``` Four properties of the option are worth knowing: - The option may be given more than once, and the statements then run in the order they stand on the command line, so `/s:"local define X 1" /s:"select 1"` runs the definition first. - The value is one statement, whatever it holds. The rule that a blank line separates two statements applies to a file, not here, so a block of [[Invantive Script/Invantive Script|Invantive Script]] which holds a blank line of its own arrives whole. - `/file` and `/statement` together are refused with `itgendhb297` and exit code 5, because the command line does not show in which order the two would run. A file is run from a statement as well, by handing over its name preceded by an at sign, so `/statement:"@c:\jobs\first-job.sql" /statement:"select 1"` states the order the file and the statement run in. - The run is headless: questions are not asked and no log-on dialogue appears, as with `/interactive:false`. The results are printed all the same, unlike a run which asks for headless mode itself: a statement on the command line is typed by somebody who waits for the answer. `/interactive:true` next to the option asks for the interactive mode, on which the prompt appears once the statements have run. A headless run needs `/database`, and credentials for a data container which does not carry them itself. An option without its statement, such as a `/statement` which is the last argument of the command line, ends the program with `itgendhb298` and exit code 5. References to Invantive Script variables are expanded in the value exactly as in a statement from a file, so `/variables` applies to it. The expansion is a text substitution which happens before the statement is parsed: whoever composes the command line decides what the statement becomes. A value taken from elsewhere — a scheduler, a web form, another program — therefore belongs in a variable of the statement rather than in the text of it, and the same holds for the value of `/variables` itself. The shell has the first say over the text. PowerShell expands `${MY_NAME}` inside double quotes and hands over what it made of it, so a statement holding a variable reference is written in single quotes: `/statement:'select ${MY_NAME}'`. In `cmd.exe` the same reference passes through double quotes unharmed. ## Printing the Results Available from release 27.0. `/results` decides on its own whether the results of a statement are printed, apart from `/interactive`, which decides whether questions may be asked. Both were one decision until release 27.0: a headless run printed no results, so a scheduled job could not report its answers and a run at a terminal could not be kept quiet. Without `/results` the behaviour is the one every earlier release had, with one addition: - an interactive run prints its results; - a run which asks for headless mode with `/interactive:false` prints none; - a run which carries its statements in `/statement` prints them, although it is headless. `/results:true` prints the results whatever the run asked for, and `/results:false` prints none. Written without a value, `/results` means `true`. ``` /database:Demo\Dummy /file:c:\jobs\first-job.sql /interactive:false /results:true ``` The results are written to the standard output, and from release 27.0 onward to the file of `/logfile` as well, so a run which logs what it did also logs the answers it got. Up to and including release 26.0 the log file held the messages of the run alone, and results had to be kept by redirecting the standard output. In the log file the results are written one line per line of the result, each one carrying the channel `STDOUT` in front of it: ``` 2026-08-13 18:38:51.247 Information itgendhb302: STDOUT --------------------------------- 2026-08-13 18:38:51.247 Information itgendhb302: STDOUT X | 2026-08-13 18:38:51.247 Information itgendhb302: STDOUT --------------------------------- 2026-08-13 18:38:51.247 Information itgendhb302: STDOUT 1 | 2026-08-13 18:38:51.247 Information itgendhb302: STDOUT --------------------------------- ``` The channel says where the line came from, so the results of a statement can be told from what the program itself reported, and the file keeps holding one message per line. A statement whose results are not printed writes nothing to the log file either: `/results` decides for both. ## Naming a Data Container `/user`, `/password`, `/encryptedpassword` and `/attributes` may be followed by an at sign and the alias of a data container, as `/user@ecb:someone`. The value then applies to that container only. Without an alias the value applies to the container which has no alias. ## Log File Name The name of the log file may hold placeholders, which are expanded when the program starts, in the folder names as well as in the file name: - `%Y` year, `%j` day of the year (001–366), `%m` month, `%d` day of the month, `%u` day of the week (1–7); - `%H` hour, `%M` minute, `%S` second; - `%D` domain name, `%U` user name, `%h` machine name. ## Example Run a file against the database `invoicing` in group `WS203`, without interaction, with two provider attributes and one script variable: ``` /database:WS203\invoicing /file:c:\jobs\first-job.sql /interactive:false /attributes api-url=https://start2.exactonline.nl api-redirect-url=https://clientredirect.invantive.com /variables "MY_NAME=John Doe" ``` The variable is used in the statements as `${MY_NAME}`. ## Compliance `/password` puts a password on the command line, where the process list and the shell history can read it. Prefer an interactive log on, a pre-authenticated connection, or `/encryptedpassword`, which is bound to the device and useless elsewhere. `/statement` is read by the same eyes. A statement which defines a password or encrypts one is better placed in a script file, which is readable by its owner alone. The trace file leaves such a statement out: a statement holding `pwd`, `password`, `secret` or `key` is recorded by its length only, in the same way a statement of a script file is.