Returning Errors for Dynamic Load

You can configure TimesTen to return an error if a SELECT, UPDATE or DELETE statement does not meet the requirements.

See Guidelines for Dynamic Load for requirements of a dynamic load.

The DynamicLoadErrorMode connection attribute controls what happens when an application runs a SQL operation against a dynamic cache group and the SQL operation cannot use dynamic load in a particular connection.

  • When DynamicLoadErrorMode is set to a value of 0, dynamic load happens to any cache group referenced in the query that is qualified for dynamic load. Cache groups that do not qualify are not dynamically loaded and no errors are returned. When DynamicLoadEnable=1, no dynamic load occurs if the query references more than one cache group.

  • When DynamicLoadErrorMode is set to a value of 1, a query fails with an error if any dynamic cache group referenced in the query is not qualified for dynamic load. The error indicates the reason why the dynamic load cannot occur.

To set the connection attribute solely for a particular transaction, use one of the following:

  • Use the ttIsql utility set dynamicloaderrormode 1 command.

  • Call the ttOptSetFlag built-in procedure with the DynamicLoadErrorMode flag and the optimizer value set to 1.

    call ttOptSetFlag('DynamicLoadErrorMode', 1)

    Call the ttOptSetFlag built-in procedure with the DynamicLoadErrorMode flag and the optimizer value set to 0 to suppress error reporting when a statement does not comply with dynamic load requirements.