dlangschied
Member
I have a report database that I place data into for view by managers. The database is a subset of the order information that drives the business (sales orders, purchase orders, work orders, etc.). The processes of loading the report database is a nightly update. However, when I have to perform a "reload" of the database I run into issues with lock file overflow. I am deleting the records and adding them back. One of the tables has over a million records in it. I could make my -L 2000000, but then in a couple of years, I have trouble again. I could also perform my build in smaller chunks, but I really prefer not to do so. Is there a way that I can do this without having to continue to jack up my -L?
[FONT=r_ansi][FONT=r_ansi][/FONT][/FONT]
[FONT=r_ansi][FONT=r_ansi]for each rpt.po_rcpt:[/FONT][/FONT]
[FONT=r_ansi] delete rpt.po_rcpt.[/FONT]
[FONT=r_ansi]end.[/FONT]
[FONT=r_ansi][/FONT]
[FONT=r_ansi][FONT=r_ansi]do i = 1 to num-entries(domain_list):
dom-domain = entry(i, domain_list).
run extract-po_rcpt-data(input dom-domain, input v-s-date,
input v-e-date).
end.
procedure extract-po_rcpt-data:
define input parameter dom-domain as char.
define input parameter v-s-date as date.
define input parameter v-e-date as date.
for each prod.po_rcpt
where prod.po_rcpt.po_dom = dom-domain
and (prod.po_rcpt.rcp_date >= v-s-date
and prod.po_rcpt.rcp_date <= v-e-date)
no-lock no-error:
create rpt.po_rcpt.
assign rpt.po_rcpt.po_dom = prod.po_rcpt.po_dom
.
.
.
rpt.po_rcpt.po_rcp_date = prod.po_rcpt.po_rcp_date.
end.
end procedure.
This is not the whole procedure. I had to condense it down, but the gist of it is here.
Any ideas?
[/FONT][/FONT]
[FONT=r_ansi][FONT=r_ansi][/FONT][/FONT]
[FONT=r_ansi][FONT=r_ansi]for each rpt.po_rcpt:[/FONT][/FONT]
[FONT=r_ansi] delete rpt.po_rcpt.[/FONT]
[FONT=r_ansi]end.[/FONT]
[FONT=r_ansi][/FONT]
[FONT=r_ansi][FONT=r_ansi]do i = 1 to num-entries(domain_list):
dom-domain = entry(i, domain_list).
run extract-po_rcpt-data(input dom-domain, input v-s-date,
input v-e-date).
end.
procedure extract-po_rcpt-data:
define input parameter dom-domain as char.
define input parameter v-s-date as date.
define input parameter v-e-date as date.
for each prod.po_rcpt
where prod.po_rcpt.po_dom = dom-domain
and (prod.po_rcpt.rcp_date >= v-s-date
and prod.po_rcpt.rcp_date <= v-e-date)
no-lock no-error:
create rpt.po_rcpt.
assign rpt.po_rcpt.po_dom = prod.po_rcpt.po_dom
.
.
.
rpt.po_rcpt.po_rcp_date = prod.po_rcpt.po_rcp_date.
end.
end procedure.
This is not the whole procedure. I had to condense it down, but the gist of it is here.
Any ideas?
[/FONT][/FONT]