?
Solved

ORA-01031 Error creating a foreign key

Posted on 2006-06-13
1
Medium Priority
?
740 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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
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…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

770 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