Toad World® Forums

Sync & convert generate alter script, create index missing


#1

Hello,

I’m not sure if this is an error already covered in my other posts, but to be sure I’ll send you this case.
I have been doing my sync & convert, generate alter script and reverse engeneered directly from my database. ( At the end of the task I stored the rev eng model before closing modeler ).

For the tables AKTIVITAETSLOG and AKTLOG_HIST he is not generating the Foreign Key Index. Statement

CREATE INDEX “AKTIVITAETSL_MGLID_FK_IDX” ON “HM”.“AKTIVITAETSLOG” (“MGLID_ID”)
TABLESPACE “MGL_AKTLOG”

could be seen at SQL Preview, but is not generated. Same for AKTLOG_HIST.
But he is genarating statement
ALTER TABLE “HM”.“AKTIVITAETSLOG” ADD CONSTRAINT “AKTIVITAETSL_MGLID_FK” FOREIGN KEY (“MGLID_ID”) REFERENCES “HM”.“MITGLIEDER” (“MGLID”)
/
( also seen in preview ), but this statement leads to error ORA-02298

Seee attached modells.

I use the additional sended scripts for generating FK and Triggers. See error case 773601.

Best regards

Linus

HalloMarie8.1.txp (2.53 MB)

HalloMarieRE_HAMAA_Fehler_mit_fehlendem_index_aktlog.txp (2.53 MB)


#2

Hello Linus,

Thanks a lot.
We will check it out on Monday and let you know then.

Thanks for your patience.

Regards,

Vladka


#3

Hello Linus,

I’m bringing some information on the problem.

Settings defined in the DDL Script Generation dialog | Detail Settings tab are also taken for the alter script generation (quotations, schema prefix, primary key inside or outside statements). It is recommended to set up the same DDL script generation settings for both models that are being compared.

To generate foreign key indexes, it is necessary to check out checkbox “Create Indexes to Foreign Keys…” in the DDL Script Generation dialog | Detail Settings tab. As mentioned in the first paragraph, this checkbox should be selected for both models.

Now I suppose you use BETA, Sync & Convert Wizard and the Reverse Engineering Alias on page Select Right Side. It means that you connect to the database directly (without prior reversing it). However, in this case you don’t know if the checkbox “Create Indexes to Foreign Keys…” in the DDL Script Generation dialog is also selected for this model.

Solution: Change default value of the checkbox in the DDL Script Generation dialog.
Steps:

  1. Enable Expert mode: Settings | Options | General tab | select the Expert Mode checkbox.
  2. Open the DDL Script Generation dialog in your open model (the model that will be the Left Model).
  3. Right-click the DDL Script Generation | select Default Values for Class.
  4. Find property “CreateIndexesToFKs” and in column Default Value, change its value to True.
  5. Click somewhere else in the dialog to confirm it and finally confirm OK.

Now feel free to open the Sync & Convert Wizard and do the alter script generation.

Please let us know the result. (Please do not forget to use the package we sent you yesterday. The package fixes some problems during RE.)

Thanks in advance.

Regards,

Vladka + TDM Team