Application Building Guide


Setting the Windows 32-bit Operating Systems Environment

When you install the DB2 AD Client on Windows NT or Windows 2000, the install program updates the configuration registry with the environment variables INCLUDE, LIB, PATH, DB2PATH, and DB2INSTANCE. The default instance is DB2.

For the Java environment variables updated by DB2, see "Windows 32-bit Operating Systems".

When you install the DB2 AD Client on Windows 98 or Windows 95, the install program updates the autoexec.bat file.

You can override these environment variables to set the values for the machine or the currently logged-on user. To override these values, use any of the following:

Notes:

  1. Exercise caution when changing these environment variables. Do not change the DB2PATH environment variable.

  2. When using the variable %DB2PATH% in a command, put the full path in quotes, as in set LIB="%DB2PATH%\lib";%LIB%. In DB2 Version 7.1 the default installation value for this variable is \Program Files\sqllib, which contains a space, so not using quotes may cause an error.

These environment variables can be updated for running most programs on Windows 32-bit operating systems. In addition, you must take the following specific steps for running DB2 applications:

Notes:

  1. All DB2 environment variables can be defined in the user's environment or set up as registry variables. See the Administration Guide for information on registry variables. See the Command Reference for information on the db2set command.

  2. DB2INSTANCE should only be defined at the user environment level. It is not required if you make use of the DB2INSTDEF registry variable which defines the default instance name to use if DB2INSTANCE is not set.

  3. The database manager on a Windows NT or a Windows 2000 environment is implemented as a Windows NT service or Windows 2000 service, and hence does not return errors or warnings if the service is started successfully, though other problems may have occurred. This means that when you run the db2start or the NET START command, no warnings will be returned if any communication subsystem failed to start. Therefore, the user should always examine the Windows NT or Windows 2000 event logs, or the DB2DIAG.LOG, for any errors that may have occurred during the running of these commands.


[ Top of Page | Previous Page | Next Page ]