Results 1 to 15 of 15
  1. #1
    Join Date
    Dec 2006
    Posts
    7

    Unanswered: DB2 UDB Logretain

    hi, Everyone

    I need some answers regarding DB2 UDB v8.1 Log management. This is our
    database cfg file has recently changed to the following setting:

    LOGPRIMARY =20
    LOGSECOND =40
    LOGRETAIN = RECOVERY
    USEREXIT = NO
    LOGARCHMETH1= DISK :/db2home/DB/archive

    It seems that the old log files stays in the active log directory. Will the log files in the active log directory exceed 20? Does the old log files required manaully removal? How do I know which log file is committed and can be removed? Why DB2 has the same log files writting to active log path and the LOGARCHMETH1 location?

    Thanks
    scricket

  2. #2
    Join Date
    Jun 2006
    Posts
    471

    log

    whenever a log file is commited it should be archived and the current file is removed
    it should only be available in the logarchmeth1 location
    it used to be like that with userexit : I will check this out..
    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    It looks like "LOGARCHMETH1= DISK :/db2home/DB/archive" has an extra space after DISK. I don't know if that is a problem, but I would change it.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  4. #4
    Join Date
    Dec 2006
    Posts
    7
    It is my typo. It is LOGARCHMETH1= DISK:/db2home/DB/archive"

  5. #5
    Join Date
    Jun 2006
    Posts
    471

    log archive

    I tested this on a windows machine and the files are MOVED to archive location and removed from active location
    should be so on unix (which is being used ?) and which db2level ?
    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

  6. #6
    Join Date
    Dec 2006
    Posts
    7
    It is DB2 v8.1 FixPak 11 version.

    Thanks

  7. #7
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Archived log files are not actually deleted; they are renamed and reused by DB@ when needed, so they may actually sit there in the active log directory for quite a long time, if the activity on the database is low.

    Look for "log file allocation" in the manuals.

  8. #8
    Join Date
    Jan 2003
    Location
    Schaumburg, IL
    Posts
    79
    You should use USEREXIT to archive the logs to a different location automatically. If you want to move them manually, you might want to do the following in UNIX at command line:

    db2 "get db cfg for <dbname>" | grep "First active log file"

    You may manually archive the logs prior to the log file specified.
    Naveen Urs
    DBA Manager
    IBM Certified Solutions Expert - DB2 LUW V7, V9

  9. #9
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by urs_77
    You should use USEREXIT to archive the logs to a different location automatically.
    Starting with DB2 8.2 the following command will automatically archive the logs to the specified path without a user exit program:

    LOGARCHMETH1= DISK:/db2home/DB/archive
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  10. #10
    Join Date
    Dec 2001
    Posts
    80
    It is better to use LOGARCHMETH1 instead of userexit on v8 as userexit need to compile the C sample program.

  11. #11
    Join Date
    Dec 2006
    Posts
    7

    DB2 Admin Client

    hi,
    Thanks all for all the help.

    Now I am trying to configure the db2 admin client on my desktop (window xp)
    to access remote DB server(AIX).

    I found on the IBM site that I need to catalog tcpcp node using DB2 CLI..
    and catalog database ..

    Do I need to do the above steps in order to use Control center "Discover" mode?
    I also found that there is a instance on the remoter server, did not have node set up. When I type" db list node directory". it returns nothing.
    So, does this mean I am able to access the server using control center?

    Thanks
    scricket

  12. #12
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by scricket
    hi,
    Thanks all for all the help.

    Now I am trying to configure the db2 admin client on my desktop (window xp)
    to access remote DB server(AIX).

    I found on the IBM site that I need to catalog tcpcp node using DB2 CLI..
    and catalog database ..

    Do I need to do the above steps in order to use Control center "Discover" mode?
    I also found that there is a instance on the remoter server, did not have node set up. When I type" db list node directory". it returns nothing.
    So, does this mean I am able to access the server using control center?

    Thanks
    scricket
    You do not have to catalog local databases if you access them from the same server they reside on. But to access them remotely, you need to catalog them on your remote client.

    Yes, it is possible that using the "discover" process and walking through the wizard to set up the catalog definitions will work, or it may not work, depending on a number of factors.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  13. #13
    Join Date
    Dec 2006
    Posts
    7

    DB2 Admin Client

    hi,

    I try using CA ( Configuration Assistant) to add database using Wizard.
    But it did not work for some instances. Becuase these instances did not have node directory set up. How do I set the node directory?
    Is there a db2 command that can tell me which node does a database belog to? becuase when I try to catalog database I need to know the node-name.

    Thanks

  14. #14
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Use the "add database wizard," then select "search the network" and hit NEXT. At that point you can select "add system" and "discover" to see a list of DB2 servers on your network (this may not find all DB2 servers). If discover does not work, you will have to manually input the information for the DB2 server you are trying to reach.

    Hit the help button if you need assistance with the wizard.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  15. #15
    Join Date
    Jun 2006
    Posts
    471

    node

    the command is :
    db2 catalog tcpip node anyname remote hostname/ipaddress server port
    for anyname : choose any name
    for hostname/ipaddress : specify or the target hostname or its ip address
    for port : specify the port number the instance is listening
    see db2 get dbm cfg | grep SVCENAME
    with this name check the c:\windows\system32\drivers\etc\services file
    and find the port number
    then catalog db at node anyname (same name as used in previous command)
    or use control center : this will also catalog the admin server for this server
    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

Posting Permissions

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