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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Reporting on multi-column FK / uniqueness constraints

Re: Reporting on multi-column FK / uniqueness constraints

From: DA Morgan <damorgan_at_psoug.org>
Date: Mon, 21 May 2007 08:42:25 -0700
Message-ID: <1179762140.510051@bubbleator.drizzle.com>


Tarby777 wrote:
> Hi all,
>
> I'm checking a 9iR2 schema for compatibility with Streams. Streams
> requires supplemental logging for any tables that have a foreign key
> or uniqueness constraint which references multiple columns. I Google'd
> without success for a script to report on such things, and my
> knowledge of user_constraints, user_ind_columns etc doesn't stretch to
> something like this! Can anyone help?
>
> TIA
> Tarby

desc user_cons_columns

SELECT DISTINCT owner, constraint_name, table_name FROM user_cons_columns
WHERE position > 1;

Join with a query of user_constraints WHERE constraint_type = 'R';

My preference is:
conn / as sysdba
alter database force logging;
alter database add supplemental log data;

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Mon May 21 2007 - 10:42:25 CDT

Original text of this message

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