If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Changing database logging from circular to archive

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-31-10, 10:10
CharleyDC5 CharleyDC5 is offline
Registered User
 
Join Date: Jun 2010
Posts: 36
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
Reply With Quote
  #2 (permalink)  
Old 08-31-10, 10:43
nvk@vhv nvk@vhv is offline
Registered User
 
Join Date: Jan 2010
Posts: 294
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?
Reply With Quote
  #3 (permalink)  
Old 08-31-10, 10:46
CharleyDC5 CharleyDC5 is offline
Registered User
 
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?
Reply With Quote
  #4 (permalink)  
Old 08-31-10, 11:00
nvk@vhv nvk@vhv is offline
Registered User
 
Join Date: Jan 2010
Posts: 294
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
Reply With Quote
  #5 (permalink)  
Old 08-31-10, 11:03
CharleyDC5 CharleyDC5 is offline
Registered User
 
Join Date: Jun 2010
Posts: 36
Allright!

Thank you very much for assistance.

dBForums rocks!

C
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On