Skip to Main Content

Database Software

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!

adding a foreign key constraint to a versioned table?

user2555615Jan 8 2010 — edited Jan 14 2010
Can you add a foreign key constraint to a versioned table?

When I try, I do the beginddl, alter the _LTS table, and then when I try to do the commitddl, I get an unsupported constraint error. For example:

SQL> exec dbms_wm.beginddl('table_name');
SQL> alter table table_name_LTS add constraint FK_CONS foreign key (xyz) references other_table(xyz);
SQL> exec dbms_wm.commitddl('table_name');

BEGIN dbms_wm.commitddl('table_name'); END;

*
ERROR at line 1:
ORA-20200: unsupported constraint USER.FK_CONS detected
ORA-06512: at "WMSYS.LT", line 12225
ORA-06512: at line 1

Can this be done without un-versioning the table?

Thanks,

Bill Auslander
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 11 2010
Added on Jan 8 2010
6 comments
3,429 views