Skip to content

Creating multiple DB2 database instances on Windows

Complete these steps for each instance that you plan to create:

  1. Create a new user and add it to the Administrators group.

    Note: If you are using DB2®, also add the new user to the DB2ADMNS group.

  2. Remove the user account from the Users group.

  3. Grant rights to the new user:
    1. Click Start > Run and enter secpol.msc.
    2. Expand Local Policies and click User Rights Assignment.
    3. Open each of the following rights, click Add User or Groupand add the new user:
      • Act as part of the operating system
      • Adjust memory quotas|Increase quotas for a process
      • Create a token object
      • Debug programs
      • Lock pages in memory
      • Log on as a service
      • Replace a process level token

Tip: The new account uses the local system as the domain.

  1. Attention:

  2. For each instance that you want to create, log in as the instance owner before creating the instance.

  3. Use the DB2 Command Line Processor to enter commands.
  4. After creating the instance, add the instance to the user environment variable. The instance is then visible in the DB2 Control Center. To create DB2 database instances on Windows, follow these steps:

  5. Create an instance: db2icrt instance_name -s ese -u db2_admin_user where instance_name is the name of the instance and db2_admin_user is the user account for that instance.

  6. To set the port number of the instance, edit the C:\WINDOWS\system32\drivers\etc\services file and add the following line: db2c_instance\_name instance\_port/tcp

  7. Set the current instance parameter:set DB2INSTANCE=instance\_name

  8. Set the communication protocols for the instance:

    db2 update database manager configuration using svcename   db2c_instance_name
    db2set DB2COMM=npipe,tcpip
  9. Edit your firewall configuration to allow the new instances to communicate through their listening ports.

Parent topic:Creating multiple DB2 database instances