Enabling or disabling external directives for a session

HCL OneDB™ ignores external directives if the EXT_DIRECTIVES parameter is set to 0 in the configuration file or the EXTDIRECTIVES keyword in the SET ENVIRONMENT statement is set to 0, OFF, or off during a session.

In addition, the client system can disable external directives for its current session when the IFX_EXTDIRECTIVES environment variable is set to 0.

The following table shows whether external directives are disabled (OFF) or enabled (ON) for various combinations of valid IFX_EXTDIRECTIVES settings on the client system and valid EXT_DIRECTIVES configuration parameter settings on HCL OneDB:
Table 1. Combinations of IFX_DIRECTIVES settings and EXT_DIRECTIVES configuration parameter settings
IFX_EXTDIRECTIVES setting on client system EXT_DIRECTIVES = 0 EXT_DIRECTIVES = 1 EXT_DIRECTIVES = 2
IFX_EXTDIRECTIVES not set OFF OFF ON
IFX_EXTDIRECTIVES = 1 OFF ON ON
IFX_EXTDIRECTIVES = 0 OFF OFF OFF

If EXT_DIRECTIVES is set to 1 or 2 when the database server is initialized, then the server is enabled for external directives. Individual sessions can enable or disable external directives by setting IFX_EXTDIRECTIVES, as the table shows. Any settings other than 1 or 2 are interpreted as zero, disabling this feature.

When external directives are enabled, the status of individual external directives is specified by the ACTIVE, INACTIVE, or TEST ONLY keywords. (But only queries on which directives are effective can benefit from external directives.)

You can also use the EXTDIRECTIVES option of the SET ENVIRONMENT statement to enable or disable external directives during a session. What you specify using the EXTDIRECTIVES option overwrites the external directive value that is specified in the EXT_DIRECTIVES configuration parameter in the ONCONFIG file.

To overwrite the value for enabling or disabling the external directive in the ONCONFIG file and:

  • To enable the external directives during a session, specify 1, on, or ON as the value for SET ENVIRONMENT EXTDIRECTIVES.
  • To disable the external directives during a session, specify 0, off, or OFF as the value for SET ENVIRONMENT EXTDIRECTIVES.

To enable the default values specified in the EXT_DIRECTIVES configuration parameter and in the client-side IFX_EXTDIRECTIVES environment variable during a session, specify DEFAULT as the value for the EXTDIRECTIVES option of the SET ENVIRONMENT statement.

For more information on using the EXTDIRECTIVES option of the SET ENVIRONMENT statement, see SET ENVIRONMENT statement.