Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Data Archive Reference

pisqlss command-line options

  • Last UpdatedJan 13, 2023
  • 2 minute read

In general, you specify a command-line option by using an argument token, one or more spaces, and the argument value. The argument token always begins with a leading dash ( - ). For example:

pisqlss -t 60 -ts 7200 -o trace,aggrtimestart

In this example, SQL query timeout is set to 60 seconds, the default time step (for queries against the piinterp table) is set to 7200 seconds (that is, 2 hours) and the trace andaggrtimestart options have been set.

PI SQL Subsystem (pisqlss) supports the following command-line arguments:

Argument

Description

-o

Options (letter "o", not zero). The options are specified in a comma-separated list of tokens. The interpretation of the tokens is not case-sensitive. See the following table for the list of supported options.

-t

SQL query timeout, in seconds. If this time expires, PI SQL Subsystem will cause the query to return either a timeout error, or a subset of the actual results, if the SUBSET option is set. See the table of options below.

-ts

Default value of the timestep column in the PIINTERP table. This value can be overridden for any query by specifying a timestep constraint in your SELECT statement.

The -o argument is followed by a comma-separated list of option tokens with no space between the tokens. The supported options are:

Option Token

Description

AGGRTIMESTART

Causes all queries of the aggregate tables to use the time at which the interval starts to identify the aggregate; the default is to use the time at which the aggregate period ends.

EXECSAFE

If set, the query does not execute if the PI SQL determines that a query is too unspecific and would take too long to execute.

LOG

Writes a summary of every operation by pisqlss on a statement handle to the file sqltrace.log in your pi\log directory. See also the TRACE option. This file is generated in all Data Archive configurations, except while not running as a service on Windows. In this case, output is directed to standard output, which is the command window.

QEP

Causes the gateway to dump a query execution plan to a file called pisql_n.qep in the pi\log directory on the Data Archive computer, where n is the handle number.

SUBSET

If a query times out while this option is in effect, PI SQL Subsystem returns a subset of the actual results with no error. If this option is in effect, the results returned do not represent the actual final results of the query. When query development is complete, remove this option.

TRACE

Writes a summary of every Prepare, that is, query parsing and Execute operation, by PI SQL Subsystem to the file sqltrace.log in your pi\log directory. See also the LOG option.

TitleResults for “How to create a CRG?”Also Available in