Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2014
    Location
    India
    Posts
    18

    Unanswered: Problem related to multiple instances on DB2 V9.5

    Hi,

    Db2 version 9.5 Fixpack:0 ESE on Linux

    Instance db2inst1 exists by default

    I am trying to create a new db instance by using steps:

    useradd -u 1103 -g db2iadm1 -m -d /home/db2inst2 db2inst2 -p passw0rd

    ./db2icrt -u db2inst2 db2inst2

    Edit the /etc/services file and add the following entry:

    db2c_db2inst2 3701/tcp

    su - db2inst2
    db2 update database manager configuration using svcename db2c_db2inst2
    db2stop
    db2start

    Above steps work.

    However I observed that many parameters in dbm cfg point to /home/db2inst1 and new DB created here get created in /home/db2inst1

    db2 list db directory lists DBs from /home/db2inst1.

    Has anyone encountered this issue and have advise?

  2. #2
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18
    The db2icrt should automatically add the entries to /etc/services
    and you should not need to manually adjust it , for a non-HA instance.
    It is wise to let DB2 choose the port number (why would you chose 3701 ?)

    The $INSTHOME will be the default place to store databases
    until you tell the instance an alternate location by setting the
    DFTDBPATH dbm cfg to your preferred default location.

    Similarly the active transaction log location will be under $INSTHOME
    until you configure a database with a NEWLOGPATH value
    for your preferred location.

  3. #3
    Join Date
    Feb 2014
    Location
    India
    Posts
    18
    For the new instance, this entry is not added to /etc/services so added manually.
    For db2inst1, similar entry exits at port 3700 hence incremented the value by 1 for new instance after checking that no services running on 3701.

    Referred : Help -

    I have not set any other dbm param than svcename. But noticed that for db2inst2, most of the paths are pointing to /home/db2inst1 like JDK_PATH, DIAGPATH and DFTDBPATH. I expected these to be set correctly during instance creation.

    Is it advisable to set this manually if not pointing correctly ?

  4. #4
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18
    The V9.5 infocenter is at
    IBM DB2 9.5 Information Center for Linux, UNIX, and Windows

    db2icrt will update the local services file (/etc/services) when run as root.

    If the instance-2 is referencing paths belonging to instance-1 then you have omitted telling us some facts, it is indeed not a correct configuration.

    finger -l db2inst2 --> check Directory:

    finger -l db2inst1 --> Check Directory:

    Verify that the home directory of db2inst2 is really what you think it is, are the home directories dedicated file-systems, or just directories in a shared-file system /home, or are there symlinks etc?

    Next examine again the log files created by db2icrt (they are in /tmp ).

  5. #5
    Join Date
    Sep 2011
    Posts
    26
    you should use ./db2icrt -u db2fenc1 db2inst2
    not
    ./db2icrt -u db2inst2 db2inst2

  6. #6
    Join Date
    Feb 2014
    Location
    India
    Posts
    18
    Hi Jumshoos,

    Thanks for the suggestion however I don't think this can be a reason for the errors as we didn't mind having db2inst2 as fenced user for instance creation.

    Thanks db2mor, thanks all, we switched to a new box and didnt encounter these problems there.

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
  •