Home > Articles > Data > DB2

This chapter is from the book

This chapter is from the book

DAS Process

The DAS process is a separate DB2 process for managing local and remote DB2 servers. The DAS process is used by the DB2 administration tools, including the Control Center and the Configuration Assistant, to satisfy requests. The db2admin commands allow you to start, stop, and configure the DAS instance and catalog nodes.

A DAS instance must be running on every DB2 UDB server that you want to administer remotely or detect using the client configuration search method. The DAS process provides remote clients with the information required to set up communications to access the DB2 UDB server instances. You can create only one DAS process for each monitored/managed machine. When the DAS process is created, the DB2 global-level Profile Registry variable DB2ADMINSERVER is set to the name of the DAS instance.

The DAS instance will:

  • Obtain the configuration of the OS

  • Obtain user and group information

  • Start/stop DB2 instances

  • Set up communications for a DB2 server instance

  • Attach to an instance to perform administration tasks for a database

  • Provide a mechanism to return information about DB2 servers to remote clients

  • Collect information results from DB2 discovery

To start administration from a remote client, the user must have SYSADM authority in the DAS instance. Once the instance and the databases are registered, the user must also hold the appropriate authorities and privileges for each administration task.

The DAS process can be created when you install the DB2 server product using the installation program (db2setup). You can also manually create a DAS instance after DB2 installation.

The db2setup installation program can also perform the following tasks related to configuring communications:

  • Detect the communication protocols installed on a machine

  • Determine protocol information required by DB2 UDB, such as the port number, if TCP/IP is detected

  • Set the properties for each communication protocol with the previously determined information

  • Allow the user to optionally customize the communication protocol's properties (in a Custom install)

  • Update the files required for each protocol (e.g., it modifies the /etc/services file).

  • Set the communication variables for the DAS process and DB2 instance using the customized properties for the protocols

  • Create the DAS process

  • Create the DB2 server instance

  • Update the database manager configuration file with the appropriate communications settings

Creating a DAS Instance

Before executing the command to create a DAS instance (dascrt), a group and a userid must be created within the OS.

To create a user, a group, or a DB2 instance in Solaris, you must be the system administrator (root authority). If you use the installation program (db2setup) to install DB2, the group, user, administration service, and instance can be created for you. If you don't use the installation program or want to create an instance later, you need to do those steps by yourself (or use the db2isetup GUI tool). To create a DAS service manually, follow the steps below:

  1. Create a group if one is not already defined: groupadd db2asgrp

  2. Create a user who will be the process owner and is a member for the group created in the previous step, with a secondary group membership to the instance: useradd -d /export/home/dasusr1 -g db2asgrp –G db2inst1 dasusr1

    The new user dasusr1 remains locked in until the passwd command is executed and the password is set: passwd dasusr1

    You can also use the Solaris GUI tool “admintool” to manage users and groups.

  3. Execute the command dascrt to create the DAS instance:

    dascrt dasusr1

    The DB2 command dascrt is located in the /opt/IBM/db2/V8.1/instance directory, and must be run as root.

You can also use the DB2 installation program (db2setup, not db2_install) to create the DAS service, user, and group.

One of the files placed in the DAS process owner's home directory under the sqllib sub-directory is a DB2 setup (profile) file. Depending on the type of shell the user is using, the file will be called db2profile (Bourne or Korn shell) or db2cshrc (C shell). This profile must be executed before using the DAS instance. It is usually added to the user's login profile to ensure that it is executed when the user enters the system. The DAS service also has a configuration file.

The DAS service is similar to a daemon, and should run continuously on all DB2 servers you wish to manage.

Managing the DAS Instance

The default DAS process name, which is created by the installation program (db2setup), is dasusr1.

The following are some of the commands used to administer the DAS instance:

  • db2admin start— Starts the DAS instance.

  • db2admin stop— Stops the DAS instance.

  • dascrt DAS_Instance_Name— Creates the DAS instance.

  • dasdrop DAS_Instance_Name— Drops the DAS instance.

  • db2 get admin cfg— Displays the database manager configuration file of the DAS (executed from the instance-owning userid). Figure 2.36 shows the output of this command.

    02fig36.jpgFigure 2.36. Output of the db2 get admin cfg Command

  • db2 update admin cfg— This command allows you to update individual entries in the administration manager configuration file for the DAS instance (executed from the instance-owning userid).

  • db2 reset admin cfg— Resets the configuration parameters to the recommended defaults. The changes become effective only after the db2admin start command is executed (executed from the process owning userid).

  • + Share This
  • 🔖 Save To Your Account