Solved

ORA-01031 Error creating a foreign key

Posted on 2006-06-13
1
736 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 250 total points
ID: 16892966
Grant ALL privileges on ATABLE to BSCHEMA.

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

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines

688 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