dbTalk Databases Forums  

Re: transaction protocol full

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss Re: transaction protocol full in the comp.databases.ibm-db2 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
miro flasza
 
Posts: n/a

Default Re: transaction protocol full - 08-11-2003 , 05:56 PM






Toralf Kirsten wrote:
Quote:
Hi,
in a automatic process we import data from a file to a temporary table.
From there, the data (around 550,000 rows per import) are inserted into
the 'production' table using using some joins with the statement 'insert
into ... select ...'. But the insert process terminates with the message
"transaction protocol is full". Unfortunately, we can not split the data
amount by id, date, client or something like that.
We use udb 8.1 on a win2k system. All tables have been created with the
option "not logged initially". The database uses 10 primary and 10
secondary protocol files with 5000 blocks of 4K.
Is there any possibility which dont include to increase the block amount
or number of files? May be a "dirty insert"?
Thanks Toralf

The not logged behaviour needs to be activated per transaction.
Issue ALTER TABLE ... ACTIVATE NOT LOGGED INITIALLY, then logging
will disabled until a commit is issued. After that updates against
that table will be fully logged again.

Caution: if the not logged update fails, your table will become
unavailable (rollback requires logging in DB2)

If you don't want to use NOT LOGGED, take a look at the row_number()
function, you should be able to use it to split up your insert in
smaller chunks.

Regards,
Miro



Reply With Quote
  #2  
Old   
Toralf Kirsten
 
Posts: n/a

Default Re: transaction protocol full - 08-15-2003 , 02:58 AM






Thanks Miro,
I'm not really sure what do you mean with row_number().
I know this function and have used it in some cases before.
I'm looking for a high performance solution to insert this large amount
of data.
Do you think I should split the the numbers like this:
insert into ...
select ...
from (select row_number() over() as rn, ...
from ...
where ... ) temp_view
where rn < 200000 and ...
Do you know what happens when I apply th same query but changed the
where clause w.r.t. rn "<"/">" number? Does the database engine carry
out the whole query at first time and apply then where clause conditions?
Ahoi, Tori

miro flasza wrote:
<snip>
Quote:
The not logged behaviour needs to be activated per transaction.
Issue ALTER TABLE ... ACTIVATE NOT LOGGED INITIALLY, then logging
will disabled until a commit is issued. After that updates against
that table will be fully logged again.

Caution: if the not logged update fails, your table will become
unavailable (rollback requires logging in DB2)

If you don't want to use NOT LOGGED, take a look at the row_number()
function, you should be able to use it to split up your insert in
smaller chunks.

Regards,
Miro



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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.