Generate Change Script

Top  Previous  Next

ModelRight 4.1 provides the ability to generate SQL DDL based on any Model changes.  This can be very useful if you want to change the database to reflect the changes you recently made to your Model.  If you know that your database hasn't changed and you just want to change it to reflect changes you just made in your Model, you can do so without having to go through the Compare with Database process/wizard.

How to Generate Model Changes

1.Select in the Database Toolbar or Database > Generate Change Script to start the Generate Changes Wizard.

2.The first step is to select the Schema Gen Options that you would like to use.  You can generate the SQL DDL script for all the changes that you made this session, the last number of changes that you made, or specify the change that you want to start from.

 

3.ModelRight then calculates the SQL DDL script that will effect the changes you want.  This wizard page displays the progress of the script calculation.  When the Next button is enabled, just click through to see your DDL.

4. Save it to file, copy/paste it to SQL/Plus, or generate it directly to the database.

The "gutter" along the left of the script editor displays the status of the script execution.  It displays a green dot to indicate the statement has executed successfully and a red dot to indicate the statement did not execute successfully.  The results control at the bottom of the editor lists the statements that executed and the result.  If you right-click on a statement in the editor, you can

Toolbar

Run Script - evaluates the specified script type and displays the results.

Edit Script - lets you view and edit the VB script source code that is evaluated

Gutter Numbers

Cut, Copy, Paste

Find, Replace

Undo, Redo

Run - execute the SQL commands.  If there isn't an active database connection, ModelRight will prompt you to login first.

Pause - pause the execution of the SQL commands.

Step Next - execute the next SQL command only.

Restart - restart executing the SQL commands - starting at the top.

Set Execution Line - set the execution point to the line where the caret is currently placed in the edit control.  The symbol is displayed in the gutter to the left of the SQL edit control to show the next command that will be executed.  You can set the execution line to any line in the control simply by first clicking on the text of the line, and then selecting this button.

Set Breakpoint -  Click in the edit control on the line that you want to set a breakpoint on and click this button.  A breakpoint will cause execution to pause when it gets to that line.  The symbol is displayed in the gutter to show where breakpoints are currently set.

- scroll to the next breakpoint

- scroll to the previous breakpoint

- remove all breakpoints