Re: Logical Logs question
Posted in 1994
In article <CoM9GM.Ct4@srgenprp.sr.hp.com>, steveb@sr.hp.com (Steve Brown) says:
> We were testing the following sql code when we returned the error 458 -
> Long transaction aborted.
>
> update table1
> set div_status = (select div_stat_code from table2
> where table2.part_number = table1.part_number);
>
The best long-term fix is to do that within a cursor, like:
DECLARE CURSOR t1c FOR
SELECT * from table1;
FOREACH t1c INTO r_t1.*
UPDATE div_status = (select div_stat_code from table2
WHERE table2.part_number = r_t1.part_number)
WHERE CURRENT OF t1c
END FOREACH
This way you can update as many rows as you want, with no
log impact.
> What is the maximum number of LOGFILES I can allocate?
About 50. It depends on the PAGESIZE of your architecture.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Jim Burks jburks@promus.com ~
~ Database Administrator / Systems Engineer ~
~ The Promus Companies, Inc. Memphis, TN USA ~
~ http://stargate.promus.com/public/jbb.html ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~