Creating foreign keys across different tablespace

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ahk

    Creating foreign keys across different tablespace

    Hi,

    As above.
    The error I got is "ORA-00942: table or view does not exist". Any ideas?
    TIA.
  • Mark C. Stock

    #2
    Re: Creating foreign keys across different tablespace


    "ahk" <ahk@writeme.co mwrote in message
    news:eb02dbae.0 403042356.70ae9 10d@posting.goo gle.com...
    | Hi,
    |
    | As above.
    | The error I got is "ORA-00942: table or view does not exist". Any ideas?
    | TIA.

    it's not a tablespace issue, the owner of the foreign key must have
    REFERENCES privileges granted on the PK table -- directly, and not via a
    role

    check the USER_TAB_PRIVS_ RECD view

    ;-{ mcs


    Comment

    • sybrandb@yahoo.com

      #3
      Re: Creating foreign keys across different tablespace

      ahk@writeme.com (ahk) wrote in message news:<eb02dbae. 0403042356.70ae 910d@posting.go ogle.com>...
      Hi,
      >
      As above.
      The error I got is "ORA-00942: table or view does not exist". Any ideas?
      TIA.
      Either you need to qualify the table_name with the owner, or the owner
      didn't grant you reference privilege on the affected table.
      BTW: There is no relation between foreign keys and tablespaces. There
      is a relation between foreign key and schemas.

      Sybrand Bakker
      Senior Oracle DBA

      Comment

      • Mark D Powell

        #4
        Re: Creating foreign keys across different tablespace

        ahk@writeme.com (ahk) wrote in message news:<eb02dbae. 0403042356.70ae 910d@posting.go ogle.com>...
        Hi,
        >
        As above.
        The error I got is "ORA-00942: table or view does not exist". Any ideas?
        TIA.
        Yes, either you got the table name wrong in your code, or you do not
        have the REFERENCES privilege on the referenced table.

        Oracle does not care what tablespace the referenced table is in as
        long as it is local to the database and not remote (distributed
        table).

        HTH -- Mark D Powell --

        Comment

        Working...