Change Script is useful for transferring changes done to your database or another model into the model you are currently working with. You can generate change script from a modified model or from a connection to a database or to a DDL script file. For executing the resulting script you will need another application such as Toad for Oracle. See Toad for Oracle® as Default Editor for more information.
For the list of databases for which Change Script Generation is supported in Toad Data Modeler see Supported Databases. For those supported you can either generate Simple Change Script or complete change script using a Generate Change Script wizard:
To generate change script
|Schema||Select a specific schema you want to include in the target model, all tables or all selected tables.|
|Select All on All Tabs||Selects all objects on all tabs.|
|Deselect All on All Tabs||Deselects all objects on all tabs.|
Type to filter objects.
|Select All||Selects all object on the current tab.|
|Deselect All||Deselects all object on the current tab.|
|Invert Selection||Inverts selection on the current tab.|
|Select Parent Tables||Selects all parent tables of the currently selected tables.|
|Select Child Tables||Selects all child tables of the currently selected tables.|
|Select Parent and Child Tables||Selects all child and all parent tables of the currently selected tables.|
|Export Selection||Export selection as a *.wsxr file.|
|Import Selection||Imports a selection from *.wsxr file.|
|Ignore Text Case||
Toad Data Modeler will ignore all differences in text case when pairing model objects.
E.g. “Entity1”, “eNTITY1”, “ENTITY1” are treated as identical.
|Remove Trailing Whitespace||
Trailing whitespace, i.e. any whitespace characters at the end of a line including blank lines at the end of bodies of definitions, will be ignored during comparison.
E.g. If checked, the following pieces of script will be treated as identical:
"Insert Into "Test" Values("aaa");"
"Insert Into "Test" Values("aaa");
"Insert Into "Test" Values("aaa"); "
|Ignore Model Name||Ignores the name of the model. Set the name in Model Properties | Model.|
|Resolve Application Variables||
Resolves application variables during comparison. If left unchecked variables will be compared as variables.
E.g. Your name is John Doe Your user name is “jdoe”. An index is called “Index1_<%Author%>”. If you check Resolve Application Variables the index will be treated as “Index1_jdoe”. If unchecked it will be treated as “Index1_<%Author%>”.
|Ignore Empty Primary Keys||Primary keys with no attributes will be ignored during comparison.|
|Pair Primary Keys Regardless of Names||Primary keys will be mapped with no regard to their names.|
|Force Comparison by Data Type||
Objects and properties will be compared also according to their data types.
E.g. Source and target attributes in domains are named identically but they have different data types. If checked, they will be marked as different. If unchecked, they will be considered identical because their names and the names of the domains are identical.
|Log Progress to File||
Progress and errors will be logged to a file.
|Use Quotation Marks||Names of objects and properties will be generated in quotation marks (or as delimited identifers etc.).|
|Generate Database Name to Identifies||Names of objects and properties will be generated together with the name of the related database, user or schema or similar.|
|Text Case Selection||
Select the case in which the change script will be generated:
Compare Tree Overview
|Import Selection||Import selection from a saved file.|
|Export Selection||Save selection to a file.|
Runs the verification process.
The verification might return a warning . Details are available in Verification Log.
|Check All||Checks all items.|
|Uncheck All||Unchecks all items.|
|Check All to Add||Checks all items that exist in the Source model, but not in the Target model (CREATE).|
|Check All to Remove||Checks all items that do not exist in the Source model, but exist in the Target model (DROP).|
|Check All to Modify||Checks all items that exist in both models and are different (ALTER).|
|Wildcard Filter||Opens the Wildcard Dialog where you can define settings for bulk selection/deselection of the Action box of the items listed on page Select Items.|
|Refresh Necessitated Items||
Some objects are related together (e.g. entity and domain, entity and relationship). In case you uncheck an object or property in Select Object Types step and a related object or property is selected, the unchecked object or property will be automatically selected too.
E.g. You uncheck a domain in Select Object Types but you keep an attribute of the domain type checked for conversion. In the next screen the domain will be selected for conversion (and highlighted in gray). This is because of its relationship with the attribute, which cannot exist without the domain.
If you uncheck the attribute, the domain will still be checked for conversion. This is where you use this button. It inspects all checked objects and removes the domain highlighted in gray since the attribute is no longer checked. That means the domain is no longer necessary, since it has no relationships with currently checked objects and you unchecked it in Select Object Types step.
|Display options for objects||
Compare Tree will show only:
|Display options for properties||Compare Tree will show only:
|-||The updated or modified model.|
|Target||-||The model for which you want to generate change script.|
Check this checkbox to generate change script for the difference.
Uncheck this checkbox to not generate change script for the difference.
Default selection: Default selection of the Action checkboxes depend on your settings on page Settings in the Options for Default Selection of Items area. If you select all the options in this area, the Action checkboxes will be selected for all changes (CREATE, DROP and ALTER) by default.
Compare Tree Icons
Difference between original model and Target model.
This object exists in original model but does not exist in Target model.
This object is missing in original model but exists in Target model.
Right-click any item to display the following menu:
|Check All Children||Checks the Operation checkbox of all children items.|
|Uncheck All Children||Unchecks the Operation checkbox of all children items.|
|Check All Children to Add||
Checks the Operation checkbox of children items that exist in Source model but not in the Target model ( items) to generate the CREATE statement.
|Check All Children to Remove||Checks the Operation checkbox of children items that are missing Source model and exist in Target model ( items) to generate the DROP statement.|
|Check All Modified Children||Checks the Operation checkbox of children items where properties differ (items) to generate the ALTER statement.|
|Uncheck All Children to Add||Unchecks the Operation checkbox of children items that exist in Source model but not in the Target model ( items) to not generate the CREATE statement.|
|Uncheck All Children to Remove||Unchecks the Operation checkbox of children items that are missing Source model and exist in Target model ( items) to not generate the DROP statement.|
|Uncheck All Modified Children||Unchecks the Operation checkbox of children items where properties differ (items) to not generate Change Script for this change.|
|Wildcard Filter||Opens the Wildcard Dialog where you can define settings for bulk selection/deselection of the Operation box of the items listed on page Select Items.|
|Expand All Children||Expands all sub-items of the selected item.|
|Collapse All Children||Collapses all sub-items of the selected item.|
You can decide whether or not to use Temporary Tables during Change Script generation. The settings are available in Settings | Options | Physical Model | *Specific Database*| Change Script Settings.
Note: For Microsoft Azure SQL Database, Microsoft SQL Server, and PostgreSQL, if you uncheck the Use Temporary Tables to Preserve Data checkbox, temporary UDT/DictType will not be generated either. (They are created together with Temporary Tables.)
Simple Change Script is generated for one entity. You might find it useful when you want to transfer minor changes in your model to your database.
To generate Simple Change Script