?
Solved

ORA-01031 Error creating a foreign key

Posted on 2006-06-13
1
Medium Priority
?
743 Views
Last Modified: 2009-07-29
Hi!

I want to create a foreign key for the table ASCHEMA.ATABLE that references de table BSCHEMA.BTABLE executing this SQL:

ALTER TABLE ASCHEMA.ATABLE ADD (
  CONSTRAINT ATABLE_BTABLE FOREIGN KEY (TABLEA_ID)
    REFERENCES BSCHEMA.BTABLE(TABLEB_ID));

Oracle says that user doesn't have enought privileges
So, i give the privileges with the following sentence

GRANT ALL PRIVILEGES TO USER;

But, it doesn't work

Any ideas?
0
Comment
Question by:roju
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 16

Accepted Solution

by:
MohanKNair earned 1000 total points
ID: 16892966
Grant ALL privileges on ATABLE to BSCHEMA.

SQL> grant all on ASCHEMA.ATABLE to BSCHEMA;
SQL>
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question