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: Help with Dictionary Views: confirming FK relationship

Re: Help with Dictionary Views: confirming FK relationship

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Mon, 1 May 2006 17:44:28 -0400
Message-ID: <85-dnaOEZdujHMvZRVn-tw@comcast.com>

"BD" <bobby_dread_at_hotmail.com> wrote in message news:1146518848.333662.23730_at_i40g2000cwc.googlegroups.com...
: Hi, all.
:
: I'm on 8.1.7.4 on AIX.
:
: I have a task to identify tables in my database that lack two specific
: columns (figured that one out), and which lack a FK relationship to any
: tables that have those columns.
:
: In any "sane" FK relationship, the column names on both sides of the
: relationship will be the same, so the first query would be all I would
: need. But, strictly speaking, it is not mandatory. I could have an FK
: relationship from TABLE1.COLUMN1 to TABLE2.SPUD if I wanted to.
:
: So I need to find out which tables have columns A and B, and which
: tables have any FK relationships against those tables, on columns A and
: B.
:
: dba_constraints and dba_cons_columns will tell me about the 'child'
: side of the FK relationship, but I need to confirm the 'parent' side of
: the FK relationship; I don't see a sys view which indicates _both_
: sides of the relationship.
:
: Does this information exist anywhere in the dictionary views?
:
: Thanks,
:
: BD
:

look a little closer

DBA_CONSTRAINTS for CONSTRAINT_TYPE = 'R' includes R_OWNER and R_CONSTRAINT_NAME which point to ... DBA_CONSTRAINTS for the PK or UK constraint the the FK is referencing

++ mcs Received on Mon May 01 2006 - 16:44:28 CDT

Original text of this message

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