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

    Unanswered: HADR on DB2 V9.5 Takeover doesnt work

    Hi,
    We are trying to set up HADR on 2 instances of DB2 9.5 Fix Pack 0 / Linux
    Steps of setting the primary and secondary attributes are carried out.
    and HADR is started.

    We are trying to test it using these steps:
    1. Connect to primary DB
    2. Create a table and insert data
    3. Switch roles (make secondary as primary). status is checked on secondary and it is set as Primary
    db2 takeover hadr on database <dbname> by force
    4. Now if we connect to secondary we cannot see the table and data created in step to. Basically new table and data in Primary is not getting reflected in standby

    What could be the problem? How can we check?

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    first of all : 9.5 fp 0 ?????
    have you checked hadr status after start ? was it peer/connected
    takeover by force ???? why the force ??
    diaglog.... db2pd....
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Feb 2014
    Location
    India
    Posts
    18
    Hi Guy, Thanks for your post.

    Yes, Informational tokens are "DB2 v9.5.0.0", "s071001", "LINUXAMD6495", and Fix Pack "0".

    after hadr, staus is peer on both.

    On Primary:
    HADR Information:
    Role State SyncMode HeartBeatsMissed LogGapRunAvg (bytes)
    Primary Peer Sync 0 0

    On Secondary:
    HADR Information:
    Role State SyncMode HeartBeatsMissed LogGapRunAvg (bytes)
    Standby Peer Sync 0 4

    Takeover by force because primary DB was stopped. Please correct if wrong.

  4. #4
    Join Date
    Feb 2014
    Location
    India
    Posts
    18
    Some update, I tried normal takeover.
    db2 takeover hadr ON DB testdb

    Works fine. But the logs dont get applied. Changes dont reflect.

    Following is the order:

    Standby is in roll forward pending state after restore from primary db
    Start standby
    Start primary
    connect to primary
    -modify data
    -create new table
    Switch role - takeover
    Connect to new primary
    check data, modified data is not reflected.

  5. #5
    Join Date
    Feb 2014
    Location
    India
    Posts
    18
    Thanks for the pointers. HADR seems to be working now.

    However i noticed that when I restore the backup taken from db2inst1, into db2inst2, it creates schema - db2inst1 and creates the tables there.

    Is there any way of importing it directly in db2inst2 using restore?

  6. #6
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    db2inst1/2 is the instance owner name and nothing todo with schema in db
    not possible with restore
    take db2look on primary - create new db - edit/change db2look - apply db2look
    export/import all data
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

Posting Permissions

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