Easysoft Data Access

How can I avoid setting shell environment variables required by a driver?

Article:
00809
Last Reviewed:
28th October 2008
Revision:
2

Some drivers require environment variables setting before you can successfully connect (e.g. DB2 and DB2INSTANCE, Oracle® and ORACLE_HOME). If you are using the unixODBC Driver Manager you can set environment variables per DSN in the odbc.ini file using the following syntax:

DMEnvAttr = SQL_ATTR_UNIXODBC_ENVATTR={ENVVAR=value}

e.g.

DMEnvAttr = SQL_ATTR_UNIXODBC_ENVATTR={DB2INSTANCE=db2inst2}

The unixODBC driver manager will then set the environment variable before connecting to the driver. Note, this only works this way when using DSN based connections.

Applies To

Knowledge Base Feedback

* Did this content help you?
* Please select one option based on your first choice:

(* Required Fields)


Oracle is a registered trademark of Oracle Corporation and/or its affiliates.