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 > DB2 space issue

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-09-09, 10:04
heartwork93 heartwork93 is offline
Registered User
 
Join Date: Feb 2009
Posts: 21
DB2 space issue

Hi,



I have a DB2 space issue and I don't know how to manage.
In an AIX partition of 10 GB I have 6 DB2 instances - for test purposes behind some WebSphere Process Server apps.
I am not allowed to extend the AIX partition and I have no more space - 100% used space.
It seems this is caused by archive logs.
Database server = DB2/AIX64 8.2.9
(LOGARCHMETH1) = USEREXIT
(LOGARCHMETH2) = OFF
is set for all instances.
After some tests three of them increased dramatically and I ran out of space - for each about 1.6-1.7 GB are used for the archive logs.
For 'the biggest' instance:
Number of primary log files (LOGPRIMARY) = 15
Number of secondary log files (LOGSECOND) = 113
and in the corresponding path there are exactly 113 S*.LOG files.
For a 2nd big one I have default settings:
Number of primary log files (LOGPRIMARY) = 3
Number of secondary log files (LOGSECOND) = 2
but in the corresponding path there are exactly 105 S*.LOG files. Is something wrong - can I delete them excepting the last two?
This means USEREXIT does not manage properly the archive logs - can I delete / move in other partition / compress ...



Thanks,

Last edited by heartwork93; 02-09-09 at 10:07.
Reply With Quote
  #2 (permalink)  
Old 02-09-09, 11:03
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Determine the first active log for each database:

Code:
$ db2 get snapshot for database on <yourdb> | grep "first active"
File number of first active log            = 28877
You can delete logs prior to that log but that will essentially make prior backups useless.

Alternatively, you can find what was the earliest log for the last backup and delete files prior to that:
Code:
$ db2 list history backup since 20090208 for <yourdb>

                    List History File for ???????

Number of matching file entries = 1


 Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log  Backup ID
 -- --- ------------------ ---- --- ------------ ------------ --------------
  B  D  20090208220002001   N    D  S0028871.LOG S0028872.LOG
 ----------------------------------------------------------------------------
Reply With Quote
  #3 (permalink)  
Old 02-09-09, 14:19
dr_te_z dr_te_z is offline
Registered User
 
Join Date: Jan 2009
Location: Zoetermeer, Holland
Posts: 555
Do not delete your logfiles with an O.S.command, always use "db2 prune" .
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