The syntax for creating primary keys in the script is incorrect.
The syntax from Schema Compare is like this:
=========================
ALTER TABLE TEST.TABLE_NAME
ADD CONSTRAINT CONSTRAINT_PK
PRIMARY KEY
(ID)
USING INDEX TEST.INDEX_PK;
=========================
When you run this, it leads to the following error:
'ORA-01735: invalid ALTER TABLE option'
If you choose to create scripts for tables only, then all the remaining object types, excluding tables and constraints, and then just create scripts for constraints then everything works.
If you just choose constraints then the script for the primary key, the script is:
=========================
ALTER TABLE TEST.TABLE_NAME
ADD CONSTRAINT CONSTRAINT_PK
PRIMARY KEY
(ID);
=========================
The SQL is different.
You need to be signed in and under a current maintenance contract to view premium knowledge articles.
© ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center