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 > Load command and logging

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-01-10, 17:59
deshaipet deshaipet is offline
Registered User
 
Join Date: Aug 2008
Posts: 76
Load command and logging

Hi -

Does load command create logs? If so in which phase ? if not why does it not log?

Thanks in advance,
Panditt
Reply With Quote
  #2 (permalink)  
Old 03-01-10, 18:20
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
DB2 LOAD utility does some minimal logging of certain events that happen during the LOAD, but it does not do logging of each transaction. If you want transaction logging, use the IMPORT command (but use a COMMITCOUNT parm to do commits at least every few thousand rows). The reason LOAD does not do logging of each transaction is so it will run faster than an IMPORT (which does inserts). Also, the LOAD command will not fire triggers and skips RI checking because it bypasses the normal insert logic of DB2 in order to get its speed.

However, if you specify COPY YES on the load, DB2 will include the load file in a place that it can use for roll-forward recovery. COPY YES is slower than COPY NO, but faster than IMPORT (but I don't have any firm numbers on how much slower/faster).
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 03-01-10, 20:49
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Just to add to what Marcus said...

The delete phase, if required, is logged.
Reply With Quote
  #4 (permalink)  
Old 03-02-10, 10:40
deshaipet deshaipet is offline
Registered User
 
Join Date: Aug 2008
Posts: 76
Thanks Marcus and db2girl
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