Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2010
    Posts
    36

    Unanswered: Changing database logging from circular to archive

    Hi folks,

    I am actually setting up a DB2 production server. I did a backup of a database on the DEV server, and then did a redirected restore on my PROD server. After that, I changed the database logging method from circular to archive.

    Here is the command I used :
    Code:
    CONNECT TO DOD015;
    QUIESCE DATABASE IMMEDIATE FORCE CONNECTIONS;
    UNQUIESCE DATABASE;
    CONNECT RESET;
    UPDATE DB CFG FOR DOD015 USING logarchmeth1 "DISK:E:\DB2D001\DOD015\LOGDIR\ARCHIVES" failarchpath "E:\DB2D001\DOD015\LOGDIR\FAIL" logprimary 13 logsecond 4 logfilsiz 1024;
    BACKUP DATABASE DOD015 TO "E:\BACKUP" WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 COMPRESS  WITHOUT PROMPTING;
    The command has been executed without errors, BUT DB2 keeps creating the full path (instance/database/node/etc....) even if I specified a custom path for my archive logs and fail logs...
    What I expected from DB2 :
    Archive logs directly in : E:\DB2D001\DOD015\LOGDIR\ARCHIVES
    Fail logs directly in : E:\DB2D001\DOD015\LOGDIR\FAIL

    What DB2 did :
    Archive logs : E:\DB2D001\DOD015\LOGDIR\ARCHIVES\DB2D001\DOD015\NODE0000\C0000000Fail logs : E:\DB2D001\DOD015\LOGDIR\FAIL\DB2D001\DOD015\NODE0000\C0000000

    I would like to know if it is possible to change it so it could work as expected?

    Regards,

    Charles

  2. #2
    Join Date
    Jan 2010
    Posts
    335
    DB2 tries to ensure that archive logfile don't get mixed up. That's why it creates the subdirectories. If you have a partitioned database with two or more partiotions on the same box and DB2 woul use your settings the archived logfiles from these partitions would end up in the same directory.

    What's the problem with the subdirectories?

  3. #3
    Join Date
    Jun 2010
    Posts
    36
    I just find it pretty weird to have a tons of single sub-directories inside my LOGDIR...

    Is it possible to alter that behavior as all our databases are stored on the same hard disk partition?

  4. #4
    Join Date
    Jan 2010
    Posts
    335
    I don't know if there's an Option to turn it off, but you could create your own user-exit to achieve it. Also you could work with links to trick DB2. But you have to change the Links after a restore, because DB2 will use a new Log-Chain (the last directory; ....\C000000).

    Cheers,
    nvk

  5. #5
    Join Date
    Jun 2010
    Posts
    36
    Allright!

    Thank you very much for assistance.

    dBForums rocks!

    C

Posting Permissions

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