Skip to Main Content

Cloud Platform

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Constraints are not created when using a cart

Jmenge-OracleOct 16 2013

Hi all,

I have created a cart in SQL Developer with all the tables from HR schema. If I apply the cart to my database cloud service the tables and data are there but most of the constraints are missing.

In log I can see error messages like:

Error starting at line 5 in command:

ALTER TABLE "EMPLOYEES" ADD CONSTRAINT "EMP_DEPT_FK" FOREIGN KEY ("DEPARTMENT_ID")

      REFERENCES "DEPARTMENTS" ("DEPARTMENT_ID") ENABLE

Error report:

SQL Error: ORA-02270: no matching unique or primary key for this column-list

02270. 00000 -  "no matching unique or primary key for this column-list"

*Cause:    A REFERENCES clause in a CREATE/ALTER TABLE statement

           gives a column-list for which there is no matching unique or primary

           key constraint in the referenced table.

*Action:   Find the correct column names using the ALL_CONS_COLUMNS

           catalog view

Primary key constraints are completely missing in the log.
I have tried it with option "Disable constraints before loading data" checked and unchecked.
How can I transfer the schema (tables, data, constraints) to my cloud service. I don't want to create the constraints manually because I have a web service which is based on the exact structure of HR schema in my local database.

Kind regards
Juergen

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 13 2013
Added on Oct 16 2013
0 comments
890 views