You can configure an ODBC data source to connect to your Informix database from ArcGIS clients, or you can provide a connection string, which includes the Informix host, server, port, and database information.
If you want to configure an ODBC data source rather than use the connection string, follow the steps specific to the operating system of your ArcGIS client to set up a data source.
Set up an ODBC data source on Windows
If your ArcGIS and Informix clients are installed on a Windows computer, follow these steps to create an ODBC data source.
- Open the Windows ODBC Data Source Administrator dialog box.
- Click the System DSN tab.
- Click Add.
The Create New Data Source dialog box appears, displaying the list of ODBC drivers that are installed on your system.
- Choose the IBM INFORMIX ODBC DRIVER and click Finish.
The Informix ODBC Driver Setup dialog box opens.
- Create the administrator's data source by typing the name of the data source in the Data Source Name text box.
- Click the Connection Tab to proceed to set up the connection properties.
- Choose the name of the server and database from the Server Name and Database Name drop-down lists, respectively.
- Choose olsoctcp from the Protocol drop-down list.
- Type the host name and service in their respective text boxes.
- Type a valid user name and password in the User Id and Password text boxes.
- Click Apply & Test Connection to verify that the connection parameters are set correctly.
- Click the Environment Tab to set up the environment properties.
- Set the locale by doing one of the following:
- Type the appropriate locales in the Client Locale and Database Locale text boxes.
- Type the appropriate client locale in the Client Locale text box and check Use Server Database Locale to set the database locale.
- Cursor Behavior must be set to 1 - Preserve because ArcGIS expects Informix cursors to remain open and active following a database COMMIT operation.
Setting the Cursor Behavior to 0 - Close will have undesirable effects during data insertions and updates.
- Click Apply.
- Click OK to exit the Informix ODBC Driver Setup dialog box.
The data source you create appears in the System Data Sources list on the System DSN tab of the ODBC Data Source Administrator dialog box. You can update the data sources by clicking the Configure button on this dialog box.
Set up an ODBC data source on Linux
You can configure an ODBC data source name by creating a file named odbc.ini on the computer where ArcGIS is installed and populating the file with connection information.
When configuring for use with ArcGIS Server, place the file in a directory to which the ArcGIS Server administrator account has at least read access. You will reference this file and location in the init_user_param.sh script so ArcGIS Server can find it.
These are the values to include in the file:
[<DATASOURCENAME>] Database=<DATABASENAME> Servername=<INFORMIXSERVER> CursorBehavior=1 [ODBC] UNICODE=UCS-2
Be aware of the following:
- Replace <DATASOURCENAME> with the name you want to use. You need a data source name for each database or geodatabase to which you want to connect. Each data source name in the odbc.ini file must be unique.
- Replace <DATABASENAME> with the name of the Informix database for which you are creating the data source name. The database name can differ from the data source name.
- Replace <INFORMIXSERVER> with the name of your Informix server as specified in the INFORMIXSQLHOSTS file.
- The CursorBehavior value must be 1 so that cursors are preserved beyond transaction boundaries.
- The ODBC section of the odbc.ini file must specify UNICODE=UCS-2.
Here is an example odbc.ini file after it has been edited to define ODBC data sources for three separate geodatabases: sde_base, sde_dev, and sde_prod.
[ODBC Data Sources] [sde_myhost_base] Database=sde_base Servername=myhost_base CursorBehavior=1 [sde_myhost_dev] Database=sde_dev Servername=myhost_dev CursorBehavior=1 [sde_myhost_prod] Database=sde_prod Servername=myhost_prod CursorBehavior=1 [ODBC] UNICODE=UCS-2