Additional script objects

I’ve got a data model that I’m using for a project I’m working on that’s part of a large application. My model has the entities I’ve created, the relationships, etc. I’ve been using the before/after scripts in the entities for some data setup and in the model itself for some additional deployment-related tasks. I also need to setup a SQL Agent job as part of the project and was looking for a convenient way to incorporate the script that generates it into the TDM. If you’ve seen one of these scripts, they’re a bit unwieldy and I’d prefer not to include it in the model before/after script section. Is there any other place in the TDM where something like this could fit? I realize it’s not directly related to the model in the traditional sense, but I’ve found that keeping everything I’m doing SQL-related in one place has a number of benefits.

Thanks,

Casey

Hello Casey,

I’m not sure if you want to have this script in generated SQL file from TDM (F9 and Generate button in model) or if you want only have store on one place for better readability.

If you want only have all in one place for better readability, you can store this script in external file. After you can create Toad Data Modeler project and insert into this project your model and this script. You will have all on one place, but you can not able do some special operation on this script.

Or if you don’t want to use model you can insert this script to some Note, but it is only for review nothing else.

If you want first choice, you need use Before and After script. It is better way. But I’m not sure if you want, that same section “After and Before script in Entities” has model too. Click to Model in Model Explorer or Application View and select “Model Properties”.

Daril

Thanks Daril. Unfortunately, it’s the former and that’s why I have the script in the before/after currently. It’s just a bit unwieldy that way and I’d like to be able to compartmentalize it a bit better.

Hello,

I understand, that you imagine this feature as special type of objects “scriptlet”, that will have assigned SQL editor and that will be generated with standard code. Unfortunately this feature is missing in Toad Data Modeler.

You can add request to Idea Pond, if it will be useful for more user, it will be implemented.

Daril