Toad World® Forums

Sync & Convert: Script contains ALTER TABLE "HR"."EMP" DROP CONSTRAINT "" (constraint name missing) (Oracle)

Hallo,

I use TDM 5.1 and when I use Sync & Convert to generate an alter script based on my model (left side) and reverse engineering target Oracle Database (right side), the script contains a lot of drop constraint clauses with an empty constraint name.

So the SQL generated is not valid Oracle SQL.

Both, model and database, are Oracle 10g.

How comes and how to solve? Any idea?

Regards

Frank

Hi,

you have several possibilities:

  1. Please run Model Verification first.

  2. Check if the model is not corrupted.

www.toadworld.com/…/10548.how-to-repair-corrupted-model.aspx

  1. Reverse engineer the Oracle 10g db and create the new model. Then send the two models to modeling@quest.com and we will look into the matter.

Regards,

Vaclav

Hi,

that is a good advice, at a first glance. So I tested the model and got a lot of entries in message log.

First is one I could not solve. I do not know where to look at. It is called "Failed test TCSBaseTest.TestDuplicityOfObjectInList" with detail "Object "TUser.USER1", List "", Property "Objects",
Two objects with the same ID exists". How to find this two objects with the same ID?

Second message is also not clear: There are a lot of pairwise messages looking like that one in the posted screenshot. I have got a Domain for my PK values. It is number(19,0) and is used in all attributes, that belong to a PK (normaly an attribute named "ID") or to the referencing child table attributes. So how comes? Why does the test say, the param1 (length) and param2 (scale) should not have this values (Event3 and Event4)?

Regards

Frank

Hi,

unfortunately, the model is corrupted. The only thing you can do is to run Repair Model (the same way you tested the model). If the Repair Model doesn’t help, please send the model to modeling@quest.com and we will try to fix the issues for you (and also investigate what might cause the problems).

repair.png

Regards,

Vaclav

Let me tell: Though I did a “Test Model” and a “Repair Model” afterwards in a step I did before my last post, there were this events I described.

Now I did a Repair again, and all these duplicate events are fixed. Crazy.

But this one with the duplicate ID was still there.

I renamed that User Item, did a test and repair again but nothing fixed it. So at least I deleted the User and created a new with the same name. Now this message is gone and a test doesn’t generate any messages.

But, of course, all my entities did miss her owner. So is there a way to assign an owner to many objects in one step?

Assigning one property value to many objects in one step is always a goal. Does TDM have a generic solution for this.

And by the way: I will not post our whole model because our privacy policy does not allow.

Regards

Frank

Hi Frank,

I understand why you cannot send the model. If you wish to assign new owner to existing objects, click Tools -> Schema/Owner Assignment…

That should help,

Vaclav

Hallo Vaclav,

thx for your advice. After “repairing” the model I started another Sync & Convert and this missing constraint names are still there. I took a look into the model xml but did not now the stylesheet of it.

By the way: The model was initially designed with TDM 4.

But as you say: The model seems to be corrupt. That’s not good. A lot of work is in it. :frowning:

I go for weekend now and on monday all will be fine :slight_smile:

And in your profile you have favourites: Football (the one played with feet, not hands)

Isn’t that one called “soccer”?

Regards

Frank

Hi Frank,

if you somehow manage to get permission to send us the model then we will try to fix the problems. You might remove the majority of model items and leave there just few problematic items, this might be OK. We will use the model for testing purposes. If you rename some objects, that would be fine too.

Re Football: Not in Europe :wink:

In our country we say “Football” and “American Football”.

Have a great weekend,

Vaclav

Hallo Vaclav,

it’s some days ago that I posted here but know I would come back to your offer for repairing my model.

So it’s now allowed to me to send the Model to you. What do I have to send and how can do it in a way no one else could see the model in the forum?

How long will it take to repair the model?

Regards

Frank

Hi, please send the model to modeling@quest.com. We will do additional tests and send you result of our findings soon (I guess in two days).

Regards,

Vaclav

I just sended it and will wait.

Hi Frank.

The model you sent us is OK. No problem found. I think you made modifications that corrected the model (no object with identical ID was found etc.). If you feel the model is still corrupted, can you send me details, please? Error message or wrong functioality, conflicts etc…

And if you feel there might be problems with model/db synchronization, please connect to your database and create new model via reverse engineering. Then send us the second model and describe steps you usually do when comparing the two models (or model with database).

Thank you,

Vaclav