Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Database Server Software > DB2

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-11-2008, 08:41 PM
Kofa
 
Posts: n/a
Default Archive logs?

Hi,

we have an application which uses online backups, so archive logging
is a requirement. We have a small/moderate size database (a few
hundred megabytes isn't much by today's standards) with relatively low
insert/update activity (a few thousand per day).

How should I set up archive logging (number of primary and secondary
logs files, size of each log file)?

Also, we set log archiving to manual. What log files are safe to
archive? Currently we create an online backup every day at 2:00 AM
(the backup includes log files), keep the last 10 such backups, and
delete all log files older than the oldest backup.

The backup command is
BACKUP DB mydata TO d:\db2_backup COMPRESS UTIL_IMPACT_PRIORITY 1
INCLUDE LOGS

Logging is set up as
UPDATE DB CFG FOR mydata USING logarchmeth1 LOGRETAIN logprimary 16
logsecond 240 logfilsiz 4096 newlogpath d:\db2_logs

It is my understanding that this sets up 16 files, 16 MB each, for a
total of 256 MB, with the possibility to go up to a total of 256
files, or 4 GB, but only if needed (the application is installed at
multiple remote servers whom we cannot access every day, so I thought
this would be on the safe side). In 10 days, the logs files use up
about 20 GB. What do you recommend to keep the size lower? Is it safe
to remove all log files older than the youngest backup? Should I
change logfilesiz or logprimary/logsecond?

TIA,
Kofa
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-11-2008, 08:41 PM
Mark A
 
Posts: n/a
Default Re: Archive logs?

"Kofa" <kovacs.it@gmail.com> wrote in message
news:40bfa0a7-966c-46f9-99c6-82b9579a64db@b64g2000hsa.googlegroups.com...
> Hi,
>
> we have an application which uses online backups, so archive logging
> is a requirement. We have a small/moderate size database (a few
> hundred megabytes isn't much by today's standards) with relatively low
> insert/update activity (a few thousand per day).
>
> How should I set up archive logging (number of primary and secondary
> logs files, size of each log file)?
>
> Also, we set log archiving to manual. What log files are safe to
> archive? Currently we create an online backup every day at 2:00 AM
> (the backup includes log files), keep the last 10 such backups, and
> delete all log files older than the oldest backup.
>
> The backup command is
> BACKUP DB mydata TO d:\db2_backup COMPRESS UTIL_IMPACT_PRIORITY 1
> INCLUDE LOGS
>
> Logging is set up as
> UPDATE DB CFG FOR mydata USING logarchmeth1 LOGRETAIN logprimary 16
> logsecond 240 logfilsiz 4096 newlogpath d:\db2_logs
>
> It is my understanding that this sets up 16 files, 16 MB each, for a
> total of 256 MB, with the possibility to go up to a total of 256
> files, or 4 GB, but only if needed (the application is installed at
> multiple remote servers whom we cannot access every day, so I thought
> this would be on the safe side). In 10 days, the logs files use up
> about 20 GB. What do you recommend to keep the size lower? Is it safe
> to remove all log files older than the youngest backup? Should I
> change logfilesiz or logprimary/logsecond?
>
> TIA,
> Kofa


I would recommend that you use LOGARCHMETH1 for log archiving.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-11-2008, 08:41 PM
Kofa
 
Posts: n/a
Default Re: Archive logs?

On máj. 11, 04:31, "Mark A" <nob...@nowhere.com> wrote:

> I would recommend that you use LOGARCHMETH1 for log archiving.


Could you please elaborate on that?
According to the docs, an archived log file may be renamed and reused.
Should I use a LOGARCHMETH1 like
DISK:some-path? Would that result in unused (not active) logs files
being copied to some-path, and then reused? Or could I supply a user
exit that 'archives' log files by deleting them?

TIA,
Kofa
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-11-2008, 08:41 PM
Mark A
 
Posts: n/a
Default Re: Archive logs?

> "Kofa" <kovacs.it@gmail.com> wrote in message
> Could you please elaborate on that?
> According to the docs, an archived log file may be renamed and reused.
> Should I use a LOGARCHMETH1 like
> DISK:some-path? Would that result in unused (not active) logs files
> being copied to some-path, and then reused? Or could I supply a user
> exit that 'archives' log files by deleting them?


The syntax you would probably want to use is DISK:/path... The archive logs
will automatically be copied from the active log path to that path specified
in the LOGARCHMETH1 parm. You do not need any exit program if you use this
parm.

It is always possible that an archived log file might need to be used. For
example if you needed to restore from a backup and roll forward the logs.

You will need to manually purge the archive logs (unless you have Version
9.5) via a cron script (an exit program is not needed). You will want to
keep the archive logs at least until before the last backup (so you can roll
the logs forward from the backup time to the current time or end of logs),
and maybe longer if you need to ever restore the next-to-last backup and
then roll forward.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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

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



All times are GMT. The time now is 05:14 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145