Toad World® Forums

ALTER Script problem with oracle 9i


#1

I am trying to get to the point where I can do a round-trip with my large 9i database: reverse engineer->modify schema->generate alter script->run on database

I keep running into a problem with the DLL. After I reverse engineer the DB, the model contains named NOT NULL constraints for many tables. The names are like: SYS_C002064. This is expected, of course.
The problem is, the Alter script then tries to use this name when generating a temp table, but this results in a constraint violation because the constraint name already exists!

For example, here is a section of the Alter Script:
ALTER TABLE “CRYSTAL”.“TAG_LINKS” DROP CONSTRAINT “FK_TAG_LINKS_INSPECTID”
/
ALTER TABLE “CRYSTAL”.“TAG_LINKS” DROP CONSTRAINT “FK_TAG_LINKS_TAG_ID”
/
CREATE TABLE “CRYSTAL”.“TAG_LINKS_0DD6780012CF41F7B761”(
“TAG_LINK_ID” Integer CONSTRAINT “SYS_C002064” NOT NULL,
“FK_TAG_ID” Integer,
“FK_INSPECT_ID” Varchar2(16 ),
“CREATE_DATE” Date
)
/
INSERT INTO “CRYSTAL”.“TAG_LINKS_0DD6780012CF41F7B761” (“TAG_LINK_ID”, “FK_TAG_ID”, “FK_INSPECT_ID”, “CREATE_DATE”) SELECT “TAG_LINK_ID”, “FK_TAG_ID”, “FK_INSPECT_ID”, “CREATE_DATE” FROM “CRYSTAL”.“TAG_LINKS”
/

The problem is, the CREATE TABLE fails because the CONSTRAINT “SYS_C002064” NOT NULL already exists in the real TAG_LINKS table.

Please help, thanks.


#2

Hi,

Thanks very much for your notification. CR # of this problem is 64 291.
I’m pleased to inform you that the problem has been fixed immediately. The fix will be available in next TDM version.

Thanks again.

Regards,

Vladka + TDM Team