Accessing Informix data sources after upgrading a federated server

To access Informix® data sources if you upgraded the instance and database or only the database, you set environment variables, run scripts, and verify the upgrade.

About this task

If you updraded only the database, follow all of the steps in this procedure.

If you upgraded the instance and database on UNIX, you might need to perform only some of the steps in this procedure:
  • Set the INFORMIXDIR environment variable.
  • Run the djxlink script or the djxlinkInformix script.
  • Recycle the Db2® instance.
  • Verify the upgrade.

To access Informix data sources after you upgrade to a federated server:

Procedure

  1. Verify the connection to the Informix server. The connection information is in the sqlhosts file:
    • UNIX: The configuration information is in the file that the INFORMIXSQLHOSTS environment variable specifies. If INFORMIXSQLHOSTS is not specified, the default path is $INFORMIXDIR/etc/sqlhosts.
    • Windows: The sqlhosts information is in the Windows registry under the key HKEY_LOCAL_MACHINE\SOFTWARE\INFORMIX\SQLHOSTS. You can set the INFORMIXSQLHOSTS environment variable to the name of the Windows computer that stores the registry. The default is the local computer.
  2. Check the settings of the Informix environment variables:
    1. Find the db2dj.ini file.
      The db2dj.ini file is located in the file that is specified by Db2 registry variable, DB2_DJ_INI. When this variable is not set, the default is as follows:
      • UNIX:
        instancehome/sqllib/cfg/db2dj.ini
        where instancehome is the home directory of the instance owner.
      • Windows:
        %DB2PATH%\cfg\db2dj.ini
        where %DB2PATH% is the directory where the Db2 database system is installed, for example,C:\Program Files\IBM\sqllib.
    2. Set the environment variables in the db2dj.ini file as necessary:
      INFORMIXDIR
      The fully-qualified directory path where the Informix Client SDK software is installed. For example:
      INFORMIXDIR=/informix/csdk
      INFORMIXSERVER
      The name of the default Informix server. For example:
      INFORMIXSERVER=inf10
      The INFORMIXSERVER setting must be a valid entry in the sqlhosts file on UNIX or the SQLHOSTS registry key on Windows. To get a value for the INFORMIXSERVER variable, look in the sqlhosts file. Select one of the values. The dbservername is the first value in each entry in the sqlhosts file. Although the Informix wrapper does not use the value of this variable, the Informix client requires that this variable be set.
      INFORMIXSQLHOSTS
      The path where the sqlhosts file resides. Set the INFORMIXSQLHOSTS environment variable only if the path that you are using for the sqlhosts file is different from the default path. The following example shows you how to set the INFORMIXSQLHOSTS variable to another path on UNIX:
      INFORMIXSQLHOSTS=/informix/csdk/etc/my_sqlhosts
      On Windows, if the SQLHOSTS registry key does not reside on the local computer, then the INFORMIXSQLHOSTS value is the name of the Windows computer that stores the registry.
    3. Optional: Set the following environment variables, if you want to change the default values for Informix code page conversion:
      • Set the CLIENT_LOCALE environment variable to the Informix locale. For example:
        CLIENT_LOCALE=informix_client_locale_value
      • Set the DB_LOCALE environment variable to the name of the Informix database locale. For example:
        DB_LOCALE=informix_db_locale_value

        Set this environment variable if the Informix database uses a different code page than your client locale, and you want Informix to perform conversions between the code pages.

      • Set the DBNLS environment variable to 1 to ensure that the Informix software verifies that the DB_LOCALE setting matches the actual locale of the Informix database. For example:
        DBNLS=1
  3. UNIX: If the djxlink script or the djxlinkInformix script did not run when you installed the federated server, run the djxlink script or the djxlinkInformix script.
  4. If you changed any environment variables in step 2 or if you ran the djxlink script or the djxlinkInformix script in step 3, recycle the Db2 instance.
    When you recycle the Db2 instance, you ensure that the environment variable changes are properly set on the federated server.
    1. Issue the db2stop command.
    2. If you ran the djxlink script or the djxlinkInformix script, issue the db2iupdt command.
    3. Issue the db2start command.
  5. Verify that the upgrade was successful:
    1. Connect to the database.
    2. Issue SELECT, INSERT, UPDATE, and DELETE statements on the nicknames to verify that you can view and modify the data.
    3. Optional: You can also open a pass-through session to the remote database and issue a SELECT statement directly on a remote table.