Functions and Procedure shortcuts in workspaces?

Hi There. I’m using TDM 3.4 and I’m just getting into using workspaces.

We have a large model that we need to split into 2 physical databases when we instantiate the object in the RDMS. I want to keep the objects in the same TDM file because some entities are shared between the two. It works great, except I can’t figure out how to, when generating the DDL, have some procedures and function created only. I.E. when creating the DDL for one workspace, only script functions X, Y and Z, and when I create the DDL for another workspace, script the function A, B, C and X.

Basically, I need shortcuts to functions and procedure contained in the workspaces, just like Entities, Relationships and Views. Is there a way to do this in version 3.4? Is it planned for a future version? Thx.

Message was edited by: jason_812

Quick update… a “bug” I just noticed. Even though only one of my views is shown in a workspace, the generate DDL generates the script for all the views!

So all the workspaces really do, is filter the entities. The relations are not scripted only the parent and child are also scripted.

Hello Jason,

Thanks for your question.

In current TDM you can generate only tables by workspaces - see the DDL Script Generation dialog | Entity List | Workspaces box.

Views, functions, procedures, relationships etc. cannot be generated by WS. For functions and procedures it is because they have not graphical representatives on particular WS but objects of the model. In any case, better selection of objects for DDL script generation improvements are planned (CR 36 513). Unfortunately, it is not planned in the near future. I’m sorry.

Other options in current TDM:

  • In the Properties dialog of particular object it is possible to clear the Generate checkbox not to generate the object in DDL script.
  • TDM allows you to generate DDL by user/schema. So, you can assign some procedures etc. to a schema and generate or not to generate the DDL for it. However, the question is if you want to have objects in various schemas…

If you have any questions, please write me back. Thanks.

Regards,

Vladka

The generate flag on each object (View, Entity, Procedure and function) would work, if they are all available in one place. Or there was a method for batch updating all of them at once. I guess I could create a script to directly edit the .txp file, but that seems rather clunky.

The Database option is good… only if I could assign objects to more than one database.

How long before more workspace control is added to TDM? weeks, months, years?

Hi Jason,

Unfortunately, it is not on our ToDo list for the next TDM full version 3.5. Priorities and new features for v. 3.6 haven’t been determined yet. So, it may be in ToDo for v. 3.6, however, at the moment we’re not able to promise it. So, it can take months or even years.
Anyway, our developers will consider some satisfactory solution for you, maybe user macro. I will know more tomorrow and will let you know then.

Thanks for now.

Have a nice day.

Vladka

Macros, eh? Interesting. I have not tried to use them before now… I’ll have to experiment.

Thanks.

Hello Jason,

Here I’m with the macro.

Summary of problem description: TDM allows you to generate DDL per WS only for entities. You want to generate DDL also for other objects per WS - views, materialized views, relationships and even non-graphical objects such as procedures or functions.
One of possible solutions: Disable the Generate checkbox for the objects that you do not want to generate.

Mario has created a macro via which you can do it very comfortably. The package with the macro has been made for Toad Data Modeler 3.4.16 and TDM BETA 3.5.3.1.

You can download it from:
http://modeling.inside.quest.com/entry.jspa?externalID=3611&categoryID=34

Detailed instructions on how to use the macro are attached there too.

Please let us know how you like it.
If you have any questions, please write us back. Thanks.

NOTE: To take the full advantage of the macro, please run it in Beta. Beta has the new feature to call macros from the context menu of objects (on the WS and Model Explorer). This is what you will appreciate for the functions, procedures etc.

Regards,

Vladka + Mario

Message was edited by: vladka - added note

The Macro seems to be working as documented. Looking forward to the release of 3.5 so that the context menu macro link will be there.

One last thing, and not likely something the macro can do. Is there a way to see a complete list of the objects that have “generate” set? The best way (I think) is to have maybe a little green check on top of the graphic for each object in the explorer tree. So at a quick scan through the tree I can see all the objects that will be generated. And with 3.5, a right-click-and-select will turn on or off the check.

Thx.

Hello Jason,

Thanks for letting us know.

You can freely test the Beta too (Beta and full version can be both installed on one PC, Beta uses different config and other files than the full version. But, yes, Beta is Beta.)

Is there a way to see a complete list of the objects that have "generate" set? The best way (I think) is to have maybe a little green check on top of the graphic for each object in the explorer tree. So at a quick scan through the tree I can see all the objects that will be generated. And with 3.5, a right-click-and-select will turn on or off the check.

Thanks for your suggestion. Unfortunately, at the moment there isn't any way how to display a complete list.
For entities, you can open the DDL Script Generation dialog | Entity List, enable the Generate by Property Generate checkbox. See the checked and unchecked entities in the list.
For other objects, the only way how to find it out is to open one form (e.g. Function, General tab) and use the Object Navigator to move to another Function quickly.
Anyway, we will see what we can do about it. CR # 70 180.
Thanks!

Regards,

Vladka

Hi,
Just a quick update. CR 70 180 has been fixed for v. 3.5.10. See the enhancement in Model Explorer.

Regards,

Vladka