Results 1 to 5 of 5

Thread: HADR LOG Gap

  1. #1
    Join Date
    Apr 2013
    Posts
    27

    Smile Unanswered: HADR LOG Gap

    Experts,

    Informational tokens are "DB2 v10.5.0.3", "special_32392", "IP23544_32392", and
    Fix Pack "3".
    Product is installed at "/opt/IBM/db2/V10.5spl
    AIX10.5.3
    ====

    We have a setup installed here PureScale10.5.3 on AIX Box with HADR setup.
    Can anybody explain if in any case the primary fails and standby brings up. How can we prevent from transaction loss if there is log gap.

    We have storage level replication from where we can recover logs.

    Regards,
    Nitin

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    as long as the logs are available for standby he can catchup ..
    if there are logfiles on primary that have not yet been executed on stdby, you could test
    crash primary - move logfiles to standby
    rollforward db to end of logs and complete and see if all has been executed on stdby
    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
    Apr 2013
    Posts
    27
    Thanks Przytula,

    I have few doubts about HADR replication, it would be great for me if u could clear those.

    1. Is there any transactional loss if I issue 'takeover by force'??
    2. If there is log gap due to network failure and If I issue 'takeover' post copying the non replicated logs to standby.. Whether these logs get applied to standby or not or do I need to go for rollforward recovery to prevent from loss.


    Regards.,
    Nitin

  4. #4
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    with takeover by force you don't wait fro logs to be applied on target
    you can only takeover if state=peer
    log gap can only occur if there is a delay between src and trgt due to volume
    rollforward is to get the db out of rollforward pending state (first stop hadr)
    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

  5. #5
    Join Date
    Apr 2013
    Posts
    27
    Sorry for the late reply mate,

    I would like to clear here few things, in PureScale HADR there will no PEER state comes. It is always Remote_Catchup as only two sync modes supported in this case ASYNC and SUPERSYNC.

    Pasting here is the output;

    bash-3.00$ db2pd -db prodist -hadr

    Database Member 1 -- Database PRODIST -- Active -- Up 32 days 13:15:22 -- Date 2014-09-24-09.45.20.363480



    HADR_ROLE = PRIMARY

    REPLAY_TYPE = PHYSICAL

    HADR_SYNCMODE = SUPERASYNC

    STANDBY_ID = 1

    LOG_STREAM_ID = 1

    HADR_STATE = REMOTE_CATCHUP

    HADR_FLAGS =

    PRIMARY_MEMBER_HOST = pneftswdb0q2

    PRIMARY_INSTANCE = db2ipist

    PRIMARY_MEMBER = 1

    STANDBY_MEMBER_HOST = hyeftswdb0q2

    STANDBY_INSTANCE = db2ipist

    STANDBY_MEMBER = 0

    HADR_CONNECT_STATUS = CONNECTED

    HADR_CONNECT_STATUS_TIME = 08/23/2014 05:31:03.668801 (1408752063)

    HEARTBEAT_INTERVAL(seconds) = 30

    HADR_TIMEOUT(seconds) = 600

    TIME_SINCE_LAST_RECV(seconds) = 0

    PEER_WAIT_LIMIT(seconds) = 0

    LOG_HADR_WAIT_CUR(seconds) = 0.000

    LOG_HADR_WAIT_RECENT_AVG(seconds) = 0.000000

    LOG_HADR_WAIT_ACCUMULATED(seconds) = 0.000

    LOG_HADR_WAIT_COUNT = 0

    SOCK_SEND_BUF_REQUESTED,ACTUAL(bytes) = 0, 261288

    SOCK_RECV_BUF_REQUESTED,ACTUAL(bytes) = 0, 261288

    PRIMARY_LOG_FILE,PAGE,POS = S0006072.LOG, 7724, 785791416243

    STANDBY_LOG_FILE,PAGE,POS = S0006072.LOG, 7722, 785791408357

    HADR_LOG_GAP(bytes) = 1290

    STANDBY_REPLAY_LOG_FILE,PAGE,POS = S0006072.LOG, 7722, 785791408357

    STANDBY_RECV_REPLAY_GAP(bytes) = 1047

    PRIMARY_LOG_TIME = 09/24/2014 09:45:20.000000 (1411532120)

    STANDBY_LOG_TIME = 09/24/2014 09:45:20.000000 (1411532120)

    STANDBY_REPLAY_LOG_TIME = 09/24/2014 09:45:20.000000 (1411532120)

    STANDBY_RECV_BUF_SIZE(pages) = 6144

    STANDBY_RECV_BUF_PERCENT = 0

    STANDBY_SPOOL_LIMIT(pages) = 3276800

    STANDBY_SPOOL_PERCENT = 100

    PEER_WINDOW(seconds) = 0

    READS_ON_STANDBY_ENABLED = N


    ################################################## ##
    Member1
    ################################################## ##

    $ db2pd -db prodist -hadr



    Database Member 0 -- Database PRODIST -- Active -- Up 32 days 13:16:56 -- Date 2014-09-24-09.47.14.960294



    HADR_ROLE = PRIMARY

    REPLAY_TYPE = PHYSICAL

    HADR_SYNCMODE = SUPERASYNC

    STANDBY_ID = 1

    LOG_STREAM_ID = 0

    HADR_STATE = REMOTE_CATCHUP

    HADR_FLAGS =

    PRIMARY_MEMBER_HOST = pneftswdb0p2

    PRIMARY_INSTANCE = db2ipist

    PRIMARY_MEMBER = 0

    STANDBY_MEMBER_HOST = hyeftswdb0q2

    STANDBY_INSTANCE = db2ipist

    STANDBY_MEMBER = 0

    HADR_CONNECT_STATUS = CONNECTED

    HADR_CONNECT_STATUS_TIME = 08/23/2014 05:31:03.577517 (1408752063)

    HEARTBEAT_INTERVAL(seconds) = 30

    HADR_TIMEOUT(seconds) = 600

    TIME_SINCE_LAST_RECV(seconds) = 19

    PEER_WAIT_LIMIT(seconds) = 0

    LOG_HADR_WAIT_CUR(seconds) = 0.000

    LOG_HADR_WAIT_RECENT_AVG(seconds) = 0.000000

    LOG_HADR_WAIT_ACCUMULATED(seconds) = 0.000

    LOG_HADR_WAIT_COUNT = 0

    SOCK_SEND_BUF_REQUESTED,ACTUAL(bytes) = 0, 261288

    SOCK_RECV_BUF_REQUESTED,ACTUAL(bytes) = 0, 261288

    PRIMARY_LOG_FILE,PAGE,POS = S0007742.LOG, 1071, 962115734828

    STANDBY_LOG_FILE,PAGE,POS = S0007742.LOG, 871, 962114920096

    HADR_LOG_GAP(bytes) = 2230

    STANDBY_REPLAY_LOG_FILE,PAGE,POS = S0007742.LOG, 871, 962114919797

    STANDBY_RECV_REPLAY_GAP(bytes) = 1545

    PRIMARY_LOG_TIME = 09/24/2014 09:47:14.000000 (1411532234)

    STANDBY_LOG_TIME = 09/24/2014 09:46:54.000000 (1411532214)

    STANDBY_REPLAY_LOG_TIME = 09/24/2014 09:46:54.000000 (1411532214)

    STANDBY_RECV_BUF_SIZE(pages) = 6144

    STANDBY_RECV_BUF_PERCENT = 0

    STANDBY_SPOOL_LIMIT(pages) = 3276800

    STANDBY_SPOOL_PERCENT = 2

    PEER_WINDOW(seconds) = 0

    READS_ON_STANDBY_ENABLED = N



    $

    ================================================== ========
    Standby
    ================================================== ===



    $ db2pd -db prodist -hadr



    Database Member 0 -- Database PRODIST -- Standby -- Up 32 days 04:18:32 -- Date 2014-09-24-09.48.47.095589



    HADR_ROLE = STANDBY

    REPLAY_TYPE = PHYSICAL

    HADR_SYNCMODE = SUPERASYNC

    STANDBY_ID = 0

    LOG_STREAM_ID = 0

    HADR_STATE = REMOTE_CATCHUP

    HADR_FLAGS =

    PRIMARY_MEMBER_HOST = pneftswdb0p2

    PRIMARY_INSTANCE = db2ipist

    PRIMARY_MEMBER = 0

    STANDBY_MEMBER_HOST = hyeftswdb0q2

    STANDBY_INSTANCE = db2ipist

    STANDBY_MEMBER = 0

    HADR_CONNECT_STATUS = CONNECTED

    HADR_CONNECT_STATUS_TIME = 08/23/2014 05:31:03.605782 (1408752063)

    HEARTBEAT_INTERVAL(seconds) = 30

    HADR_TIMEOUT(seconds) = 600

    TIME_SINCE_LAST_RECV(seconds) = 1

    PEER_WAIT_LIMIT(seconds) = 0

    LOG_HADR_WAIT_CUR(seconds) = 0.000

    LOG_HADR_WAIT_RECENT_AVG(seconds) = 0.000000

    LOG_HADR_WAIT_ACCUMULATED(seconds) = 0.000

    LOG_HADR_WAIT_COUNT = 0

    SOCK_SEND_BUF_REQUESTED,ACTUAL(bytes) = 0, 261288

    SOCK_RECV_BUF_REQUESTED,ACTUAL(bytes) = 0, 261288

    PRIMARY_LOG_FILE,PAGE,POS = S0007742.LOG, 2179, 962120248442

    STANDBY_LOG_FILE,PAGE,POS = S0007742.LOG, 2179, 962120248442

    HADR_LOG_GAP(bytes) = 897

    STANDBY_REPLAY_LOG_FILE,PAGE,POS = S0007742.LOG, 2179, 962120248442

    STANDBY_RECV_REPLAY_GAP(bytes) = 2

    PRIMARY_LOG_TIME = 09/24/2014 09:48:47.000000 (1411532327)

    STANDBY_LOG_TIME = 09/24/2014 09:48:47.000000 (1411532327)

    STANDBY_REPLAY_LOG_TIME = 09/24/2014 09:48:47.000000 (1411532327)

    STANDBY_RECV_BUF_SIZE(pages) = 6144

    STANDBY_RECV_BUF_PERCENT = 0

    STANDBY_SPOOL_LIMIT(pages) = 3276800

    STANDBY_SPOOL_PERCENT = 2

    PEER_WINDOW(seconds) = 0

    READS_ON_STANDBY_ENABLED = N



    HADR_ROLE = STANDBY

    REPLAY_TYPE = PHYSICAL

    HADR_SYNCMODE = SUPERASYNC

    STANDBY_ID = 0

    LOG_STREAM_ID = 1

    HADR_STATE = REMOTE_CATCHUP

    HADR_FLAGS =

    PRIMARY_MEMBER_HOST = pneftswdb0q2

    PRIMARY_INSTANCE = db2ipist

    PRIMARY_MEMBER = 1

    STANDBY_MEMBER_HOST = hyeftswdb0q2

    STANDBY_INSTANCE = db2ipist

    STANDBY_MEMBER = 0

    HADR_CONNECT_STATUS = CONNECTED

    HADR_CONNECT_STATUS_TIME = 08/23/2014 05:31:03.626469 (1408752063)

    HEARTBEAT_INTERVAL(seconds) = 30

    HADR_TIMEOUT(seconds) = 600

    TIME_SINCE_LAST_RECV(seconds) = 0

    PEER_WAIT_LIMIT(seconds) = 0

    LOG_HADR_WAIT_CUR(seconds) = 0.000

    LOG_HADR_WAIT_RECENT_AVG(seconds) = 0.000000

    LOG_HADR_WAIT_ACCUMULATED(seconds) = 0.000

    LOG_HADR_WAIT_COUNT = 0

    SOCK_SEND_BUF_REQUESTED,ACTUAL(bytes) = 0, 261288

    SOCK_RECV_BUF_REQUESTED,ACTUAL(bytes) = 0, 261288

    PRIMARY_LOG_FILE,PAGE,POS = S0006072.LOG, 9187, 785797381422

    STANDBY_LOG_FILE,PAGE,POS = S0006072.LOG, 9187, 785797381422

    HADR_LOG_GAP(bytes) = 362

    STANDBY_REPLAY_LOG_FILE,PAGE,POS = S0006072.LOG, 9187, 785797381422

    STANDBY_RECV_REPLAY_GAP(bytes) = 328

    PRIMARY_LOG_TIME = 09/24/2014 09:48:47.000000 (1411532327)

    STANDBY_LOG_TIME = 09/24/2014 09:48:47.000000 (1411532327)

    STANDBY_REPLAY_LOG_TIME = 09/24/2014 09:48:47.000000 (1411532327)

    STANDBY_RECV_BUF_SIZE(pages) = 6144

    STANDBY_RECV_BUF_PERCENT = 0

    STANDBY_SPOOL_LIMIT(pages) = 3276800

    STANDBY_SPOOL_PERCENT = 100

    PEER_WINDOW(seconds) = 0

    READS_ON_STANDBY_ENABLED = N



    Now the doubt here is can the transaction loss be prevent with takeover post copying logs manually from primary to standby.

Posting Permissions

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