Running multiple instances concurrently (Windows)

You can run multiple instances concurrently in the same Db2® copy, or in different Db2 copies.

Procedure

  1. To run multiple instances concurrently in the same Db2 copy, using the command line:
    1. Set the DB2INSTANCE variable to the name of the other instance that you want to start by entering:
         set db2instance=another_instName
    2. Start the instance by entering the db2start command.
  2. To run multiple instances concurrently in different Db2 copies, use either of the following methods:
    • Using the Db2 Command window from the Start > Programs > IBM Db2 Copy Name > Command Line Tools > Db2 Command Window: the Command window is already set up with the correct environment variables for the particular Db2 copy chosen.
    • Using db2envar.bat from a Command window:
      1. Open a Command window.
      2. Run the db2envar.bat file using the fully qualified path for the Db2 copy that you want the application to use:
        DB2_Copy_install_dir\bin\db2envar.bat

    After you switch to a particular Db2 copy, use the method specified in the preceding section, "To run multiple instances concurrently in the same Db2 copy", to start the instances.