Results 1 to 3 of 3

Thread: Db2 instance

  1. #1
    Join Date
    Jul 2014

    Unanswered: Db2 instance


    I am new to DB2 database . on my system I have created multiple instances,I am trying to switch between multiple instances by using the following command:


    Error which I can view is

    DB21034E The command was processed as an SQL statement because it was not a
    valid Command Line Processor command. During SQL processing it returned:
    SQL0206N "DB2INSTANCE" is not valid in the context where it is used.

    Kindly correct me if I am wrong on my syntax.

  2. #2
    Join Date
    Apr 2012
    Provided Answers: 18
    Method for Switching between db2 instances depends on your operating system, which you did not specify...

    For *nix, just dot in the relevant db2profile ( . ~$INSTANCENAME/sqllib/db2profile).

    For Windows, *only* at the DB2CMD.EXE command line *before you run any db2 application* you can use SET DB2INSTANCE=mentis (you cannot run this inside the db2 command-line-processor, or within applications, you must run it BEFORE you run any application).

  3. #3
    Join Date
    Jul 2014

    Db2 instance

    Thanks I can switch now.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts