The default SQL passthrough mode is set with the SqlPassthroughRead and SqlPassthroughWrite parameters. The parameter settings can be overridden per session or per transaction by using the SET PASSTHROUGH and SET TRANSACTION PASSTHROUGH command. Alternatively, the passthrough mode can also be defined per connection with the ODBC connection attributes or JDBC connection properties.
There are three SQL passthrough modes (levels):
▪NONE: SQL passthrough is not used; no commands are passed from the frontend to the backend
▪CONDITIONAL: SQL passthrough is activated by a missing table or a syntax error.
▪FORCE: all statements are passed from the front end to the backend
For the SET TRANSACTION PASSTHROUGH and SET PASSTHROUGH statements, there is also a fourth option, DEFAULT, which returns the passthrough mode to the current session default.
The precedence hierarchy is, from high precedence to low:
▪ODBC connection attributes and JDBC connection properties
▪Parameter settings specified by the value in solid.ini configuration file
▪solidDB® factory value for the parameter; the factory value for SqlPassthroughRead and SqlPassthroughWrite is NONE.
Setting transaction-level passthrough mode with the SET TRANSACTION PASSTHROUGH command
The SET TRANSACTION PASSTHROUGH command has effect in the beginning of a transaction, and it affects the transaction until commit or abort. If the statement is issued in the middle of a transaction, an error is returned.
<passthrough level> ::= NONE | CONDITIONAL | FORCE | DEFAULT
Setting session-level passthrough mode with the SET PASSTHROUGH command
The SET PASSTHROUGH statement takes effect immediately, starting from the next SQL statement, until it is reverted by a similar statement or SET TRANSACTION PASSTHROUGH.
The SqlPassthroughRead and SqlPassthroughWrite parameters are of type R/W; the parameter value can be changed with the ADMIN COMMAND and the change takes effect immediately.