SEC_SQL VARA Objects

SEC_SQL or Secure SQL VARA objects securely retrieve values from external databases. SEC_SQL VARA objects are similar to SQL VARA objects because they also run SQL statements on an external database. As opposed to SQL VARA objects, with SEC_SQL you can use all supported variables within SQL statements without putting the database at risk of an SQL injection. The variables are replaced regardless of the VAR_SECURITY_LEVEL settings in the UC_SYSTEM_SETTINGS - Systemwide Settings variable.

This page includes the following:

Defining SEC_SQL VARA Objects

A SEC_SQL VARA object definition is made up of the following pages:

Overview

You cannot directly specify the variables in the field SQL Statement, but you can include them using bind parameters. These bind parameters are maintained in the related tables and can include predefined variables, placeholders for VARA objects and PromptSet variables. In the SQL script, use the "?" character in the locations where the bind parameters will be inserted.

For technical reasons, the system cannot check whether only SELECT commands are used in the variable's SQL. To prevent that SQL commands other that SELECT are run, it is advisable to deploy a database user who has read-only access rights.

This variable type also requires a DB Service Agent that was started in DB service mode and that is version v9 SP3 or later. Older Agents do not support the variable type SQL SECURE. For more information, see Installing the Agent for Database Variables.

Important Considerations

When using SEC_SQL VARA objects take the following into account:

Variable Settings section

Bind Parameters Section

You use bind parameters to insert variable values within SQL statements. You can use script variables, object variables, predefined variables, and placeholders for VARA objects that you enter in this table. Each line represents one bind parameter. You can use variable names as bind parameters, with any values of your choice.

Supported data types and input formats:

Other field types of the database and other formats are not supported. Data types are not converted (no conversion from timestamp to date). Inserting an invalid value causes an error when the SQL commands are processed.

Important!

Preview section

To run a command, select it and click Preview. The statements are executed and their results displayed. The preview function serves to check for potential errors in the database statements (for example, it the data type of the VARA object and of the database do not match).

The database Agent sends the preview data to the Automation Engine in the form of a message. If this message exceeds the maximum message length that a server process accepts, an error occurs.

Maximum length: Set in the MaxMsgSize= parameter of the Automation Engine UCSRV.INI file. For more information see Automation Engine.

Default value: 3145 728 bytes.

See also: