Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2003
    Location
    United States
    Posts
    65
    Provided Answers: 1

    Unanswered: HADR & Log archival

    I have db2 9.7 (no fix packs) on AIX 6.1, db2 HADR configured database

    on primary db everything is working as expected - log archival is happening and my cleanup script does the cleanup of the path etc..

    on Secondary db I know archival does not happen so I don't see any files created/written in LOGARCHMETH1 path

    db snapshot for HADR on Primary shows following..

    HADR Status
    Role = Primary
    State = Peer
    Synchronization mode = Nearsync
    Connection status = Connected, 04/08/2012 11:15:53.052930
    Peer window end = 05/21/2012 06:00:27.000000 (1337605227)
    Peer window (seconds) = 20
    Heartbeats missed = 0
    Local host = lynp1x
    Local service = lynhap1x
    Remote host = lynp2x
    Remote service = lynhap2x
    Remote instance = db2inst1
    timeout(seconds) = 120
    Primary log position(file, page, LSN) = S0004396.LOG, 1844, 0000000A32D63A8F
    Standby log position(file, page, LSN) = S0004396.LOG, 1844, 0000000A32D63A8F
    Log gap running average(bytes) = 0

    which means there is no HADR gap.


    Question : I am seeing following value in db config for given db

    First active log file = S0004296.LOG

    I did deactivate and active the db and the value changed to

    First active log file = S0004396.LOG

    isn't this "First active log file" value supposed to change automatically and keep-up as the changes happen on the DB ?

    Thanks,

    - GP
    Last edited by gvphubli; 05-21-12 at 13:54. Reason: typo errors..

  2. #2
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18
    The oldest transaction was in that transaction log file (4296), and that was uncommitted.
    When you deactivated the database you terminated (rolled back) that transaction.
    If this happens again, try to discover which transaction was hanging around for so long uncommitted, and try to resolve that (sometimes, later fixpacks resolve problems like this ).

  3. #3
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by gvphubli View Post
    I have db2 9.7 (no fix packs)
    This is seriously wrong.

    Quote Originally Posted by gvphubli View Post
    isn't this "First active log file" value supposed to change automatically and keep-up as the changes happen on the DB ?
    Yes, and it did, didn't it? What problem are you trying to solve?

  4. #4
    Join Date
    Sep 2003
    Location
    United States
    Posts
    65
    Provided Answers: 1
    With respect to "n_i" 's reply

    the "First active log file" value changed only after I deactivated and activated the databases. Also, since my log related configurations on a database are same on Primary and Secondary database I would expect this "First active log file" value to be same on both sides, and that happened only after I did deactivate/activate the db on secondary database.
    Last edited by gvphubli; 05-21-12 at 16:15. Reason: incomplete reply

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by gvphubli View Post
    I would expect this
    Still, what problem are you trying to solve?

  6. #6
    Join Date
    Sep 2003
    Location
    United States
    Posts
    65
    Provided Answers: 1
    I am asking a question - why did "First active log file" did NOT change by itself.

    to some extent I agree with "db2mor" reply, one followup question on that though is how do I know what transaction is holding the oldest log file or what are my open transactions etc.
    >>
    >> Learn PHP/MySQL for free https://www.youtube.com/watch?v=mpQts3ezPVg
    >> Free Web Hosting with PHP, MySQL, Website Builder : http://www.000webhost.com/862861.html

  7. #7
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1

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
  •