Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How do you do this w/o a DBA?
create "purge" tables of parent/child/grandchild table rows to be deleted.
this way you can recover in case you delete too much. (create table
purge_parent as select * from parent where .........) do the same for each
child and grandchild table. Once made delete from original tables using
primary key column values in purge tables. Always work up from the bottom.
So start with the grandchild table, then the child, and last the parent.
clockwise_at_att.net wrote:
> Hello,
>
> I'm in a situation that I need to delete a huge amount of data without a
> DBA. Any advice would be appreciated.
>
> Suppose you have a table whose associated with 6 other tables shown as
> below:
>
> tbl_parent(parent_id, parent)
> tbl_child1(child1_id, child1)
> tbl_grandchild1(grandchild1_id, child1, grandchild1)
> tbl_child2(child2_id, child2)
> tbl_child3(child3_id, child3)
> tbl_child4(child4_id, child4)
> tbl_grandchild4(grandchild1_id4, child4, grandchild4)
>
> There are about 80000 records in tbl_parent that need to be deleted.
> There are about 4 times as many records in each child table.
>
> Is there any other way to delete all of them other than using cursor for
> loops
> using PL/SQL?
> The problem I encounter is that when it reaches the memory limit, oracle
> will
> rollback everything.
>
> Thanks in advance for any advice.
>
> Veronica
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Wed Jan 12 2000 - 02:13:33 CST
![]() |
![]() |