ssasql SQL mode enables users to execute SQL statements interactively against a particular database. Any legal Data Vault Service SQL statement may be executed in SQL mode once a database session has been established. All SQL statements must be terminated by a semicolon (
;
). There can be a single SQL statement per line. If multiple SQL statements, separated by semicolons, are included on the same line, only the first statement will be processed; the rest will be ignored.
When a connection name, database instance name, and user name are included in the ssasql invocation, the user is automatically placed in SQL mode (in the default schema associated with the specified user) upon successful connection to the database instance. If the user switches to Session mode once a database session has been established, the
.SQL
system command can be used to switch back to SQL mode.
In SQL mode, pressing <Ctrl+C> while a query is executing will halt the query. Pressing <Ctrl+C>
twice
in this situation will cause ssasql to shut down.
When connected to a Data Vault repository database, please note that only SELECT statements can be executed against an archived table, with the following additional restrictions:
Only one table can be queried
Subqueries and joins (including self-joins) are not permitted
the FETCH FIRST...ONLY clause is not supported
The WHERE clause can contain only Boolean value expressions, excluding the EXISTS predicate.
By default, the maximum number of concurrently executing SQL commands for a single client process is
128
. This limit may be changed for the connection by including a
MaxQueries
entry in the appropriate CONNECTION section of the server-side nucleus.ini file.