Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2013
    Posts
    80

    Unanswered: About DB2 LOG Myth

    Hi,
    Just want to confirm with you guys on the DB2 archive log as I found it very much different compare to Oracle.
    In my scenario, in archiving logging db, I have 20 X 20MB Primary logs and 30 secondary, db2 will automatically create a series of logs first from number ie. S0000001 - S0000020, each has 20MB file size, If I have a routine job that produce 16KB transaction and commited, it will write to archivelog with 16KB, and I found that there are quite a number of 16KB archivelog files generated.
    another observation

    db2 get db cfg
    First active log file = S0015186.LOG

    ls -ltr activelog dirc
    -rw------- 1 aaa db2iadm1 512 Jul 07 15:57 SQLLPATH.TAG
    -rw------- 1 aaa db2iadm1 20488192 Jul 09 12:44 S0015187.LOG
    -rw------- 1 aaa db2iadm1 20488192 Jul 09 13:30 S0015188.LOG
    -rw------- 1 aaa db2iadm1 20488192 Jul 09 14:32 S0015189.LOG
    -rw------- 1 aaa db2iadm1 20488192 Jul 09 14:33 S0015190.LOG
    -rw------- 1 aaa db2iadm1 20488192 Jul 09 14:43 S0015193.LOG
    -rw------- 1 aaa db2iadm1 20488192 Jul 09 14:43 S0015192.LOG
    -rw------- 1 aaa db2iadm1 20488192 Jul 09 14:43 S0015191.LOG
    -rw------- 1 aaa db2iadm1 20488192 Jul 09 14:43 S0015196.LOG
    -rw------- 1 aaa db2iadm1 20488192 Jul 09 14:43 S0015195.LOG
    -rw------- 1 aaa db2iadm1 20488192 Jul 09 14:43 S0015194.LOG
    -rw------- 1 aaa db2iadm1 20488192 Jul 09 14:44 S0015198.LOG
    -rw------- 1 aaa db2iadm1 20488192 Jul 09 14:44 S0015197.LOG
    -rw------- 1 aaa db2iadm1 20488192 Jul 09 14:44 S0015199.LOG
    -rw------- 1 aaa db2iadm1 20488192 Jul 09 14:46 S0015200.LOG
    -rw------- 1 aaa db2iadm1 20488192 Jul 09 14:54 S0015201.LOG
    -rw------- 1 aaa db2iadm1 20488192 Jul 09 15:02 S0015202.LOG
    -rw------- 1 aaa db2iadm1 20488192 Jul 09 15:12 S0015203.LOG
    -rw------- 1 aaa db2iadm1 20488192 Jul 09 15:19 S0015204.LOG
    -rw------- 1 aaa db2iadm1 20488192 Jul 09 15:33 S0015205.LOG
    -rw------- 1 aaa db2iadm1 20488192 Jul 09 15:33 S0015186.LOG



    ls -ltr (archivelog dir)
    -rw-r----- 1 aaa db2iadm1 20488192 Jul 09 14:40 S0015179.LOG
    -rw-r----- 1 aaa db2iadm1 20488192 Jul 09 14:43 S0015180.LOG
    -rw-r----- 1 aaa db2iadm1 20488192 Jul 09 14:50 S0015181.LOG
    -rw-r----- 1 aaa db2iadm1 20488192 Jul 09 14:58 S0015182.LOG
    -rw-r----- 1 aaa db2iadm1 20488192 Jul 09 15:08 S0015183.LOG
    -rw-r----- 1 aaa db2iadm1 20488192 Jul 09 15:16 S0015184.LOG
    -rw-r----- 1 aaa db2iadm1 20488192 Jul 09 15:29 S0015185.LOG


    Can someone explain how actually DB2 archive logging working in details ?

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    as explained in infocenter (in detail)
    logs are in active logfile directory (logprimary a/o second)
    when closed - moved to archive logpath
    they can be cutoff also by deactivate-activate db
    db2 archive log is also an available command
    logs related to backup/restore/rollforward can be found in history file (see also infocenter)
    http://www-01.ibm.com/support/knowle...6.html?lang=en
    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
    Aug 2013
    Posts
    80
    Can explain what's the distinctive different db2 and oracle archivelog ?

  4. #4
    Join Date
    Aug 2013
    Posts
    80
    In what situation archivelog file size can be smaller than activelog ? isn't it activelog file will copy to archivelog and archivelog file size should equal to activelog file size ?

  5. #5
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    as indicated - logfile can be closed for other reasons and moved to archpath
    logfile sizes active and archive are not always in same size...
    in infocenter there is a whole chapter about how logging and archiving works
    the only request is : READ....
    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

  6. #6
    Join Date
    Apr 2008
    Location
    Iasi, Romania
    Posts
    561
    Provided Answers: 2
    Quote Originally Posted by ckwan123 View Post
    Can explain what's the distinctive different db2 and oracle archivelog ?
    It's the same principle: every transaction is written into an active log file (redo log in Oracle). When the file does not contain any active transaction, a background process moves it into a separate folder and the file becomes an archive log.
    Florin Aparaschivei
    DB2 9.7, 10.5 on Windows
    Iasi, Romania

Posting Permissions

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