cancel
Showing results for 
Search instead for 
Did you mean: 

how to enable archive mode in the server

Former Member
0 Kudos

hi,

in my production server db2 with hp-ux we are having an issue that in the location  db2\sid\log-dir\  log files are not automatically moving to db2\sid\log_dir\ .

i understood that archive mode is not enabled.

can any one help me with this issue...

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Navakanth,

Before enabling archive mode using parameter LOGARCHMETH1, we need to take full offline backup of database otherwise database will go in "Backup Pending" state after restart.


Regards,

Hanumant



JPReyes
Active Contributor
0 Kudos

files are not automatically moving to db2\sid\log_dir\

As explained above, you need to set LOGARCHMETH1 to point to DISK

db2 update db cfg for SID using LOGARCHMETH1 DISK:db2\sid\log_dir\


Regards, Juan

martin_mikala
Participant
0 Kudos

Hello,

log_dir is use for live transaction logs

Archive folders for logs are set here:

db2 get db cfg for $DB2DBDFT | grep LOGARCHMETH

B.R.

Martin

Former Member
0 Kudos

Hello Navakanth,

the related DB2 parameter is LOGARCHMETH1.

1-You can checkh its value with that command:

su - db2SID

db2 get db cfg for SID | grep LOGARCHMETH1

2-You can switch it on with that command:

db2 update db cfg for SID using LOGARCHMETH1 <VALUE>

Some VALUE examples:

VENDOR:/usr/tivoli/tsm/tdp_r3/db264/libtdpdb264.a

DISK:/db2/SID/log_archive/

3-You can switch off it back with that command:

db2 update db cfg for SID using LOGARCHMETH1 OFF

Regards,

Serhat

Former Member
0 Kudos

thanku serhat. can u plz exlain the value. im not clear about your example.

Former Member
0 Kudos

Hello Navakanth,

if you want DB2 logs to go to your disk (filesystem), that command makes sense:

db2 update db cfg for SID using LOGARCHMETH1 DISK:/db2/SID/log_archive/


Or up to your backup structure you can back them up immediately with an backup tool:

For example.

db2 update db cfg for SID using LOGARCHMETH1 VENDOR:/usr/tivoli/tsm/tdp_r3/db264/libtdpdb264.a

Regards,

Serhat