Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-01555: snapshot too old: rollback segment number 2 with name "_SYSSMU2$

576937Sep 8 2008 — edited Sep 9 2008
Hello,

I have a problem in import data. i am usinig this script:

for lr_offer IN (select t.*, t.rowid as id_radku
from palap.offer t
where t.camp_id is null
or t.valid_to <= trunc(sysdate)) loop
delete from palap.offer o where o.rowid = lr_offer.id_radku;
if ll_commit_counter > cnst_commit then
commit;
ll_commit_counter := 0;
else
ll_commit_counter := ll_commit_counter + 1;
end if;
end loop;
commit;

/* these Pre-Approved Limits (PAL) will not be used since they do not join with CSV_CLIENT table */
/* also, lookup to palap_product_variant can result in some rows being thrown away */

execute immediate 'create index IDX_OFFER_PALAP_CID on OFFER (PALAP_CID) tablespace PALAP_INDEX compute statistics';


insert first --
when palap_cid is not null and prod_variant_id is not null --
then into offer (offer_id, prod_variant_id, palap_cid, offer_desc, valid_from,valid_to, limit, propensity_to_buy,priority, is_upsell, account, card_number)
values
(seq_client.nextval,prod_variant_id, palap_cid,offer_desc, valid_from,valid_to,limit,propensity_to_buy,priority,is_upsell,account,card_number) --
else --
into err_csv_pal (batch_id, err_message, pin,is_pin_cr,limit,is_upsell,account,propensity_to_buy,priority,product_variant_id,valid_from,valid_to,offer_desc)
values
(ll_BATCH_ID, err_message,pin,is_pin_cr,limit,is_upsell,account,propensity_to_buy,priority,csv_product_variant_id,valid_from,valid_to, offer_desc)
select /+ APPEND */*
ppv.product_variant_id as prod_variant_id, c.palap_cid, pal.offer_desc, pal.valid_from, pal.valid_to, pal.limit,pal.propensity_to_buy,pal.priority,pal.is_upsell,
pal.account,pal.pin,pal.is_pin_cr,pal.product_variant_id as csv_product_variant_id,
case
when c.palap_cid is null then
'LOAD PAL: Client not found in CLIENT'
when ppv.product_variant_id is null then
'LOAD PAL: Product_variant_id not found'
end as err_message,
pal.card_number
from csv_pal pal
left join client c on pal.pin = c.pin
and pal.is_pin_cr = c.is_pin_cr
left join palap_product_variant ppv on ppv.product_variant_id =
pal.product_variant_id /* lookup */
;


I am gettign error ORA-01555. i am just confused that why after i use a hint APPEND, which mean that do not insert my data to undo table space ( i think), i get this error...

Please some help or maybe some better optimalizations?

Thanks.

Samm
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 7 2008
Added on Sep 8 2008
26 comments
5,198 views