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: Referencing SYS.DBA_USERS ???

Re: Referencing SYS.DBA_USERS ???

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Tue, 23 Feb 1999 13:43:40 GMT
Message-ID: <36d8aeee.87806018@192.86.155.100>


A copy of this was sent to "news.logica.com" <GoorberghJ_at_Logica.com> (if that email address didn't require changing) On Tue, 23 Feb 1999 13:32:11 +0100, you wrote:

>Hi,
>
>The following script
>
>create table test_user_ref (name varchar2(30),
> userid_ref number,
> constraint fk_userid
> foreign key (userid_ref)
> references SYS.DBA_USERS
>(USER_ID));
>results in:
>
>ERROR at line 5:
>ORA-02444: Cannot resolve referenced object in referential constraints
>
>Does anybody have a workaround for this problem?
>

not really -- the problem is a couple fold:

You could put a trigger on the test_user_ref table to check upon insert or update if the record exists but if someone drops a user -- there will be no detection of that event. In Oracle8.1, you can put a trigger on database events such as create and drop so you will be able to do this in the future.

>Thanx,
>
>Jeroen
>
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Tue Feb 23 1999 - 07:43:40 CST

Original text of this message

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