Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Delete a datafile from a tablespace

Re: Delete a datafile from a tablespace

From: Vincento Harris <wumutek_at_yahoo.com>
Date: 24 Jun 2003 07:05:37 -0700
Message-ID: <2fa13ee7.0306240605.148fdc87@posting.google.com>


traineensp_at_softcell.co.in (Divya) wrote in message news:<c343a42.0306222019.6cd519c9_at_posting.google.com>...
> Hi,
>
> I am using Oracle 8.1.4.x and have few records already stored in few
> tables that share the referential integrity property....
>
> Now there is some major error in the frontend display for which i
> want to redo the entire display for which i need to first delete those
> records....But i am unable to delete hem freom either of those
> tables...I get the error message: -
>
> Error at Line 1:
> ORA 02292: integrity constraint (NSPAPP.sys_C006184)violated -
> child record found.
>
> Pls help me out...
> If i have emailed at the wrong zone pls guide me to the oracle newbie
> groups also then....
> Thanks in advance,
>
> Divya

Hi Divya
This helped me a while ago
This should give you the names of the tables and the dependent tables

select a.owner OWNER, a.table_name TABLE, c.column_name COL, b.owner POWNER, b.table_name PTABLE, d.column_name PCOL from dba_constraints a, dba_constraints b, dba_cons_columns c, dba_cons_columns d where a.r_constraint_name = b.constraint_name and a.constraint_type = 'R' and b.constraint_type = 'P' and a.r_owner=b.owner and

a.constraint_name = c.constraint_name  and   
b.constraint_name=d.constraint_name  and    a.owner = c.owner  and   
a.table_name=c.table_name  and    b.owner = d.owner  and   
b.table_name=d.table_name

In the dependent tables alter table disable constraints; You should no longer have the errors.You may need to enable the constraints after you replace your table else Oracle may not have any record of the constraints you deleted

Vince Received on Tue Jun 24 2003 - 09:05:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US