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 > commit data while importing

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-26-04, 08:23
treddy123 treddy123 is offline
Registered User
 
Join Date: Jan 2004
Posts: 14
commit data while importing

Hello All:

Is there an option in the db2move to commit data as the data similar to commit=y in oracle for the importing data.
I have one huge table to import, i.e around 10millions records. so if i have the option in db2 which can commit as soon as the transaction log is full, i will not be able to create a huge transaction log for 10million records.


regards

srinivas
Reply With Quote
  #2 (permalink)  
Old 05-26-04, 08:27
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Hi,

Open DB2 Command Window and write command:
db2 ? import

You will get help for the whole sintax of import command.

If I remember correctly, when no "commit" option is specified the auto commit is turned on, so log full command is not posible.

Try to consider of using load instread of import. Load is 100 times faster and does not use logs.

Hope this helps,
Grofaty
Reply With Quote
  #3 (permalink)  
Old 05-26-04, 09:33
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
There is a commitcount = x parameter on the IMPORT statement. It basically means that after x inserts, issue a commit. This prevents the logs from filling up.

Andy
Reply With Quote
  #4 (permalink)  
Old 05-26-04, 13:40
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
commitcount = 1000 should keep the logs from filling up and not hurt performance. The default log buffer size (logbufsz) is usually way to small, and should be increased if you are doing large imports (or just about any other SQL). You will need to increase the database heap size (dbheap) accordingly.

Also consider lowering the CHNGPGS_THRESH to about 15-25, which causes page cleaning (writing updated pages in the buffer pool to disk) to start sooner, which is usually advantageous with large import jobs.

If you have version 8 fixpak 4 or later, you could also try enabling the registry variable DB2_USE_ALTERNATE_PAGE_CLEANING. Setting this variable to ON provides a more proactive approach to page cleaning than the default approach (based on CHNGPGS_THRESH and LSN gap triggers).

Another important parameter is the Number of asynchronous page cleaners (NUM_IOCLEANERS). If you have multiple processors, this should definitely be set to a value of at least n-1 (where n is number of processors). It might also be advantageous to set this higher on a single processor machine, but I am not sure about that.
__________________
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
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