define another default instance

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Maryan
    New Member
    • Feb 2008
    • 15

    define another default instance

    Hi everybody,

    the db2 instance is the default-istance. I would like to change the DB2INSTANCE to another instance (for example to xxx) forever and not to set it only with set DB2INSTANCE=xxx for the current session.

    So i tried the following command:

    db2set -g db2instdef =xxx;

    then i saw through the command db2set -all that the db2instdef is set to xxx But the db2 get instance command gives me db2 as answer again!

    I know that it is possible to set the environmentvari able under system properties but i would like to know the db2 command too.

    Could anyone help me please.

    thanks in advance.

    Best Regards,
    Maryan
  • sakumar9
    Recognized Expert New Member
    • Jan 2008
    • 127

    #2
    To set the default instance, you need to change the value of DB2INSTANCE variable.

    If you don't want to change it always, then you can go in System Properties--> environment variables and change the value of this variable. This will permanently change this value, so you don't have to set it every time you logs in.

    Regards
    -- Sanjay

    Comment

    • Maryan
      New Member
      • Feb 2008
      • 15

      #3
      Hello,

      thank you for your Reply.

      >If you don't want to change it always, then you can go in System Properties--> >environment variables and change the value of this variable.

      I knew this way before, but i would like to know the DB2-Command to do like this.

      Any help would be appreciated.

      Thanks in advance.

      Maryan

      Comment

      • Parnamwulan
        New Member
        • Apr 2008
        • 16

        #4
        You can create new instance with db2ictl command or alter the system variable with
        Set DB2INSTANCE with
        <code>Set DB2INSTANCE=DB2 </code> ( valid for linux)

        there is no DB2 command for it since the instance works (in fact) on higher lvl than the database

        Comment

        Working...