IBM Books

Quick Beginnings for DB2 Extended Enterprise Edition for UNIX


Setting Your Environment on Windows 95 and Windows NT

It is strongly recommended that all DB2 specific registry values be defined in the DB2 profile registry. If DB2 variables are set outside of the registry, remote administration of those variables will not be possible, and the workstation will have to be rebooted in order for the variable values to take effect.

Windows 95 and Windows NT have one system environment variable, DB2INSTANCE, that can only be set outside the profile registry; however, you are not required to set DB2INSTANCE. The DB2 profile registry variable db2instdef may be set in the global level profile to specify the instance name to use if DB2INSTANCE is not defined.

To determine the setting of an environment variable, enter:

   echo %variable-name%

To set system environment variables, do the following:

On Windows 95:
Edit the autoexec.bat file and reboot to make the change take effect.

On Windows NT:
Set environment variables as follows:

  1. Click on Start and select Settings->Control Panel.

  2. Double-click on the System icon.

  3. In the System Properties window, select the Environment tab and do the following:

    1. If the variable does not exist:

      1. Select any environment variable in the System Variables window.

      2. Change the name in the Variable field to the name of the environment variable you want to set, for example DB2INSTANCE.

      3. Change the Value field to the instance name, for example, db2inst.

    2. If the variable already exists in the System Variables window, you can set a new value:

      1. Select the environment variable you want to append, for example DB2INSTANCE.

      2. Change the Value field to the instance name, for example, db2inst.

    3. Click on the Set push button.

    4. Click on OK.

    5. You may have to reboot your system for these changes to take effect.
Note:The environment variable DB2INSTANCE can also be set at the session (process) level. For example, if you want to start a second DB2 instance called TEST, issue the following commands in a command window.
    set db2instance=TEST
    db2start


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]