Installing the DB2 Server

After preparing the environment, you will install the DB2 product, using the DB2 Setup Wizard. The installation includes the following:

  • Install the DB2 product.

  • Set up DB2 Administration Server.

  • Set up Administration contact and health monitor notification.

  • Set up DB2 instance and configuration.

    • The DB2COMM registry variable determines which protocols will be enabled when the database manager is started. You can use the db2set ?all command to verify or to set the DB2COMM registry to TCPIP protocol, using:

      db2set DB2COMM=TCPIP
    • You can use the db2 get dbm cfg command to verify the service name or to update SVCENAME in the database manager configuration file using:

      db2 update dbm cfg using SVCENAME db2c_db2inst1
  • You can use the db2licm ?l command to verify the existing license product

Verifying the Installation

After you have successfully installed DB2, it is recommended that you verify the installation. To verify the installation, you will:

  • Log on to the DB2 server.

  • Start the database manager by entering the db2start command.

  • Verify the correct service name (TCP/IP) that the database manager listens to:

    db2 get dbm cfg | grep ?i svcename
  • Start the DB2 Administration Server by entering the db2admin start command.

  • Verify listener port:

    netstat ?a | grep db2inst
  • Create a sample database using db2sampl.

  • Once the sample database has been created successfully, you will run SQL commands to retrieve sample data:

    db2 connect to sample
    db2 "select * from staff"
    db2 terminate