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!!!

Re: foreign key!!!

From: Jonathan Gennick <gennick_at_worldnet.att.net>
Date: 21 Oct 1998 03:11:44 GMT
Message-ID: <362e502c.2271065@netnews.worldnet.att.net>


 I believe that you need to have been granted REFERENCES on a table in order to reference it in a foreign key constraint, if that table is owned by a different user. Try logging on as ADT and issueing the following command:

        grant references on przsys to lab;

Note that REFERENCES is not a system priv, so even if you have "all priviliges", it won't help. The table's owner needs to grant this one.

regards,

Jonathan



Jonathan Gennick
gennick_at_worldnet.att.net
http://home.att.net/~gennick
coauthor: Teach Yourself PL/SQL in 21 Days Brighten the corner where you are.

On Tue, 20 Oct 1998 23:35:49 +0200, Roman Nowak <robonet_at_zeus.polsl.gliwice.pl> wrote:

>The problem...
>
>I have two user LAB and ADT (both have all privileges),
>and I have to tables PRZSYS (owner is ADT), ZLEC_DOWYK(owner is LAB)
>
>In sqlplus command:
>
>ALTER TABLE LAB.ZLEC_DOWYK ADD (
> CONSTRAINT ZLEC1_PRZSYS_FK3
> FOREIGN KEY (ID_PACJENTA)
> REFERENCES ADT.PRZSYS (
> IDENTYFIKATOR)
>)
>/
>return error :
>
> id_pacjenta,constraint ala foreign key (id_pacjenta) references
>adt.przsys(identyfikator),
>
>*
>ORA-00942 table or view does not exist
>
>What does this mean??? I have all privileges.
>
>Thanks for response.
>_______________________________________________________________________
>Politechnika Slaska Technical Univeristy of Gliwice
>
>student informatyki: Roman Nowak
> Home phone: +48 (32) 67-41-614
>
>E-mail: robonet_at_zeus.polsl.gliwice.pl
> roman_at_dumb.iinf.polsl.gliwice.pl
>
>WWW: http:\\dumb.iinf.polsl.gliwice.pl\~roman
> http:\\www.zeus.polsl.gliwice.pl\~robonet
> http:\\www.roman.ondraszek.ds.polsl.gliwice.pl (czasem dziala)
>_______________________________________________________________________
>
Received on Tue Oct 20 1998 - 22:11:44 CDT

Original text of this message

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