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 > Avoid Transaction log full

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-10-08, 04:28
ahmedwaseem2000 ahmedwaseem2000 is offline
Registered User
 
Join Date: Jan 2005
Posts: 75
Avoid Transaction log full

I have a situation here. whenever I try to delete huge volumes of data the transaction logs are getting filled. so I cannot use plain delete from statement. what is the alternative to avoid such scenario's????
Reply With Quote
  #2 (permalink)  
Old 09-10-08, 05:48
rahul_s80 rahul_s80 is offline
Registered User
 
Join Date: Jul 2006
Location: Pune , India
Posts: 433
didnt get cant do plain delete..?
try in blocks of say 10000 and commit
or else increase logfilesz
__________________
Rahul Singh
Certified DB2 9 DBA / Application Developer
Reply With Quote
  #3 (permalink)  
Old 09-10-08, 07:00
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
or use the alter table command with notlogged initially option
and delete
see infodoc for details of alter command
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #4 (permalink)  
Old 09-10-08, 10:17
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Or import/load from an empty file with the REPLACE option (but that will truncate the whole table).
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #5 (permalink)  
Old 09-17-08, 06:59
Shubhrojyoti Shubhrojyoti is offline
Registered User
 
Join Date: Sep 2008
Posts: 6
Hi,
If you issue the command like

$db2 "load from /dev/null of del replace into schema.tableName"

it will delete all the data from the above mentioned table.

Shubhrojyoti
IBM Certified DB2 UDB DBA for LUW v8 and v9
Reply With Quote
  #6 (permalink)  
Old 09-19-08, 10:46
akratz akratz is offline
Registered User
 
Join Date: Aug 2002
Posts: 76
also can try table partitioning

didnt say what version or platform you were on, but table partitioning LUW V9 and aboveis good option for planning out deletes of large amounts of data without impact on logs. setting up ranges based on a date, you can delete specific ranges rather than the whole table like the replace into on imports.
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