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.
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).