IBM Books

Administering Satellites Guide and Reference


Setting up the Development Environment

To set up the development environment, you require the following:

Setting up the Windows 32-Bit Operating System Environment

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

See the Application Building Guide for the Java environment variables that are updated by DB2.

When you install the DB2 SDK on Windows 95 or Windows 98, 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:

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

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. Refer to the Administration Guide for information about registry variables. You use the db2set command to set registry variables. Refer to the Command Reference for information about this 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 environment is implemented as an NT 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, you should always examine the NT Event Log or the DB2DIAG.LOG file for any errors that may have occurred during the running of these commands. For information about the DB2DIAG.LOG file, refer to the Troubleshooting Guide.

Enabling Communications

Communications between the DB2 control server and the satellite must be conducted using TCP/IP. To set up communications, perform the following steps on the DB2 control server:
Note:Under normal conditions, when the DB2 control server instance is created by the install on Windows NT or AIX, the instance is set up for inbound connections using TCP/IP. You may not need to perform these steps.

  1. Set the DB2COMM environment variable as follows:
      db2set DB2COMM=tcpip
    
  2. Set up the Services file to configure TCP/IP support. Refer to the Quick Beginnings for the appropriate platform for details.
  3. Set the value of the svcename database manager configuration parameter to the same value as the name in the services file.

Notes:

  1. If the satellite is remote to the DB2 control server, or is running a different version of DB2, or runs a different operating system, you need to bind the database utilities on the satellite, including the DB2 CLI, to the SATCTLDB database on the DB2 control server. See Binding Utilities for details.

  2. If the satellite is running the Windows NT operating system, you must ensure that the DB2 Remote Command Service is started. To determine whether the service is running, click Start and select Settings -> Control Panel. When the Control Panel window opens, double-click on the Services folder. Look for the DB2 Remote Command Service in the window. If this service is running, it has a status of Started.

Cataloging the Satellite Control Database

When you catalog the satellite control database, the database directory on the satellite is updated with the alias of the database that the application needs to access using a CONNECT statement. When the database manager processes requests from the application on the satellite, it uses the database alias to both find and connect to the database.

To access the satellite control database on the DB2 control server, both the DB2 control server and the satellite control database must be cataloged on the satellite. In addition, the satellite must have the correct authentication credentials to access the satellite control database. To set up the catalog and authentication information, you can use the DB2 Synchronizer application in test mode. For more information about running the DB2 Synchronizer application in test mode, see Running a Test Synchronization and Using the DB2 Synchronizer Application.

If you do not use the DB2 Synchronizer application, you can manually catalog the satellite control database and the node on which it resides by issuing the catalog node and catalog database commands on the satellite:

  db2 catalog tcpip node nodename remote hostname server service-name
  db2 catalog database satctldb at node nodename

For more information about the catalog commands, refer to the Command Reference.

You do not need to catalog the satellite control database on the DB2 control server. The database is automatically cataloged on the DB2 control server when the database is created.

Binding Utilities

If the satellite is remote to the DB2 control server, or is running a different version of DB2, or runs a different operating system, you need to bind the database utilities on the satellite, including the DB2 CLI, to the SATCTLDB database on the DB2 control server.

Binding creates the package that the database manager needs to access the database when an application is executed. Binding can be done explicitly by specifying the bind command against the bind file that is created during precompilation.

The Command Reference provides general information about binding the database utilities. This following example provides specific instructions to bind the database utilities to the SATCTLDB database.

On the satellite:

  1. Click Start and select, for example, Programs -> DB2 for Windows NT -> Command Window

    The command window opens.

  2. Connect to the SATCTLDB database. At the prompt, enter:
      db2 connect to satctldb
    
  3. Bind the utilities to the database by entering the following bind command (for formatting purposes, the command is shown here across two lines):
      db2 bind %DB2PATH%\bnd\@db2ubind.lst blocking all
      sqlerror continue messages bind.msg
    

    Where %DB2PATH% is the path where DB2 is installed.

  4. Exit the command window, and verify that the bind was successful by checking the bind message file, bind.msg. This file is in the path specified by %DB2PATH%.

The development environment is now set up.


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

[ Top of Page ]