Capture foreign key fails (Designer Editor 6.5.40.3.0)

From: Stefan Schindler <schindler_at_self.de>
Date: Wed, 31 Jan 2001 10:25:19 +0100
Message-ID: <3A77D9FF.5F424664_at_self.de>


Hi!

I cannot capture some of my foreign key neither from an existing database (Oracle 8.1.7) nor from a script. The script command reads

ALTER TABLE TAB_A ADD (CONSTRAINT
 FK_NAME FOREIGN KEY
  (COL_A) REFERENCES TAB_B
  (COL_B))
/

The resulting error message reads:


CDS-15017 Warning: Column 'COL_A' is inconsistent with foreign column 'COL_B' - in foreign key 'FK_NAME' of table 'TAB_A'

Cause:
The related object definitions are inconsistent (e.g. a foreign key column datatype differs from that of the referenced table column)

Action:
Change one of the two objects definition ___

Now let's examine the columns and the behaviour of Designer Editor 6.5.40.3.0:
* The types of the columns are identical (eg. varchar2(80) )

  • The names of the columns differ (might be the reason ? )
  • A foreign key can be created within Designer8i manually
  • Generating a DDL-script and recapturing the foreign key expression leaves me without an error message (the foreign key exists)
  • Deleting the entry from the repository and recapturing the foreign key expression from the generated script comes up with CDS-15017

"Capturing the froreign key expression" means editing the generated "sql.con" script and removing everything except the ALTER TABLE ... command shown at the beginning of this question.

Can anybody explain what's going on and point me the way how to capture / import a real bulk of such foreign keys from a productive database?

Thanks in advance

Stefan J. Schindler Received on Wed Jan 31 2001 - 10:25:19 CET

Original text of this message