Preparing the Informix Environment

In this section:

How to:

The Adapter for Informix minimally requires the installation of the Informix Client SDK software. The Informix Client SDK software allows you to connect to a local or remote Informix database server.

In order to support a greater range of Informix DBMS releases, the current server release uses Informix Client SDK in its Adapter for Informix. All the current Informix Client SDKs support connectivity to wide range of Informix databases. For example, SDK 2.6 will support connectivity to Informix releases 5.1 through 9.3.

Note: Always check the Informix SDK documentation for supported releases of Informix databases.

The following environment settings apply when configuring the server with the Adapter for Informix.


Top of page

x
Procedure: How to Set Up the Environment on Windows

On Windows, the Informix environment is set up during the installation of the Informix Server and Informix Client SDK.

If necessary, change the environment variable DBDATE. DBDATE determines how Informix handles conversion between character strings and relational columns of DATE type. If you want to code SQL statements containing date literals in any format other than Y4MD- you must:

  1. Ensure that the exported DBDATE value is set to the required date format. Use the Registry Editor (regedit) to search for and clear all registry keys that refer to DBDATE, and then assign the new value to DBDATE using the Informix SDK SetNet program.
  2. Specify DBDATE_OVERRIDE OFF in the server profile to ensure that the Adapter for Informix does not override the exported DBDATE value.

    By default, the adapter overrides the values of DBDATE with the value of Y4MD-.

    For more information about DBDATE_OVERRIDE, see How to Change the Way the Adapter Handles DBDATE .

For example, if you want to code an SQL statement containing a date literal formatted as mm/dd/yyyy (such as 12/31/2006) and execute it using Direct SQL Passthru, you would change the value of DBDATE to 'MDY4/'.

However, it is strongly advised that your applications use the ISO-compatible format Y4MD- for date literals (for example, '2005-12-31'). By doing so, you avoid the need to export DBDATE and to set DBDATE_OVERRIDE.


Top of page

x
Procedure: How to Set Up the Environment on UNIX
  1. Identify the Informix Client SDK using the UNIX environment variable $INFORMIXDIR. For example, to use SDK 2.9, you would assign its home directory, /rdbms4/isdk29, to INFORMIXDIR:
    INFORMIXDIR=/rdbms4/isdk29
    export INFORMIXDIR
  2. Identify the server name, as it is specified in the SDK's SQLHOSTS file, using the UNIX environment variable $INFORMIXSERVER:
    INFORMIXSERVER=server_name 
    export INFORMIXSERVER
  3. Specify the path to the Informix shared library using the UNIX environment variable $LD_LIBRARY_PATH. For example:
    LD_LIBRARY_PATH=$INFORMIXDIR/lib:$LD_LIBRARY_PATH
    export LD_LIBRARY_PATH
  4. If necessary, change the environment variable DBDATE.

    DBDATE determines how Informix handles conversion between character strings and relational columns of DATE type. If you want to code SQL statements containing date literals in any format other than Y4MD- you must:

    1. Ensure that the exported DBDATE value is set to the required date format.
    2. Specify DBDATE_OVERRIDE OFF in the server profile to ensure that the Adapter for Informix does not override the exported DBDATE value.

      By default, the adapter overrides the values of DBDATE with the value of Y4MD-.

      For more information about DBDATE_OVERRIDE, see How to Change the Way the Adapter Handles DBDATE .

    For example, if you want to code an SQL statement containing a date literal formatted as mm/dd/yyyy (such as 12/31/2006) and execute it using Direct SQL Passthru, you would change the value of DBDATE to 'MDY4/':

    DBDATE=MDY4/
    export DBDATE

    However, it is strongly advised that your applications use the ISO-compatible format Y4MD- for date literals (for example, '2005-12-31'). By doing so, you avoid the need to export DBDATE and to set DBDATE_OVERRIDE.


Top of page

x
Syntax: How to Change the Way the Adapter Handles DBDATE

It is recommended that you do not change the way the Adapter for Informix works with the DBDATE environment variable. However, if it is necessary, you can do so by issuing the following command

SQL SQLINF SET DBDATE_OVERRIDE {ON|OFF}

where:

ON

Sets the DBDATE environment variable to 'Y4MD-' at the moment that the adapter connects to an Informix database.

ON is the default value.

OFF

Ensures that the DBDATE value, at the moment that the adapter connects to an Informix database, is the same value that was in effect immediately after the adapter's environment was set up.

It is recommended that you issue SET DBDATE_OVERRIDE only in the server profile. If it is absolutely necessary to change the value of DBDATE within an individual procedure, one must understand exactly when the new value for DBDATE actually takes effect.

The current value of DBDATE is communicated to the Informix database by the Informix client at the moment that it connects to the database, and remains in effect until the Informix client disconnects from the database. The Adapter for Informix supports multiple concurrent connections. The adapter connects to the Informix database when the adapter starts executing a command that references objects that reside in that database. By default, the adapter does not disconnect until the end of the server agent's session. Setting DBDATE does not affect current connections to the database unless you force the adapter to reconnect. You can force it to reconnect by issuing the following commands:

SQL SQLINF SET AUTODISCONNECT ON COMMAND
SQL SQLINF END SESSION

Top of page

x
Accessing a Remote Informix Server

Using the standard rules for deploying the Informix Client, the server supports connections to:


Top of page

x
Informix SQL ID (for Informix SE only)

When you access Informix SE, you are identified by your UNIX login ID. The UNIX ID becomes the owner ID for any Informix objects (such as tables or indexes) created with immediate SQL commands. Immediate commands are non-parameterized SQL statements that are passed directly to the data source. The UNIX ID is also used as the sole authorization ID for Informix GRANT and REVOKE statements.

Other types of requests, such as SQL SELECTs, sponsor an Informix search for the necessary privileges to act on the particular tables and views in a data source using the UNIX ID. All Informix security rules are respected.

The following table shows the UNIX privileges required in order to specify certain SQL statements.

Statement

Requires

SELECT

Read permission for the Informix data and index files.

UNIX write and execute (search) privileges for the data source directory.

UPDATE

Write permission for the Informix data and index files.

UNIX write and execute (search) privileges for the data source directory.



x
ANSI-Compliant Data Sources

If you create a data source to be ANSI-compliant, owner naming is enforced by Informix. Therefore, to preserve any lowercase owner name, you must enclose it in double quotation marks. Otherwise, Informix will default to uppercase for the owner name. For example:

ENGINE SQLINF
SELECT * FROM "user1".test
END

For additional information, see the Informix Guide to SQL.


Top of page

x
XA Support

Read/write applications accessing Informix data sources are able to perform transactions managed in XA-compliant mode.

To activate the XA Transaction Management feature, the server has to be configured in Transaction Coordination Mode, using the Web console configuration functions. Using Transaction Coordination Mode guarantees the integrity of data modification on all of the involved DBMSs and protects part of the data modifications from being committed on one DBMS and terminated on another.

For complete documentation on XA compliance, see XA Support.


iWay Software