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: foreign key dependencies?

Re: foreign key dependencies?

From: Doug Cowles <dcowles_at_i84.net>
Date: 2000/04/30
Message-ID: <390caaf1.369443@news.remarq.com>#1/1

I know how to check the foreign keys.. I was just hoping there might be a script to do it recursively rather than by hand... Anyone out there have a script? I guess I could write one with some sort of a winding stack as to what tables have foreign keys...

On Sun, 30 Apr 2000 17:08:29 GMT, "Dadd" <Dadd_at_cp.com> wrote:

>Doug,
>Have a look at view USER_CONSTRAINTS where CONSTRAINT_TYPE = 'R'
>"R" for references.
>Each row is a FK constraint pointing to other PK or unique constraint.
>HTH
>
>"Doug Cowles" <dcowles_at_i84.net> wrote in message
>news:39109476.20691183_at_news.remarq.com...
>> I'm interested in analyzing a schema for foreign key dependencies for
>> the purpose of archiving..
>> In other words, if I want information in a certain table, what is the
>> chain of foreign keys to other tables that will require me to archive
>> 2 or 3 tables in order to set the dependencies for the one table I
>> want.
>>
>> In other words, I'm looking for chains of parents...
>> Like if I have a table A that I want to archive, and it has a foreign
>> key to B, and B has a foreign key to C which has a foreign key to D,
>> I'm looking for
>> A B C D
>> B C D
>> C D
>> D
>>
>> - this sort of thing...
>> any "Dependency" view or a connect by prior something that will allow
>> this sort of analysis?
>>
>> Thanks,
>> Dc.
>
>
Received on Sun Apr 30 2000 - 00:00:00 CDT

Original text of this message

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