Schema Compare Script
To synchronize the target to become the identical to the source you must generate a sync script. This script can dramatically alter the target database, as shown in the example below, by dropping tables or altering tables and this will of course affect any data contained within the table.
SQL Delta may automatically include unchecked objects that are dependent on checked objects into the script. Use No Depend in the Schema Compare Results to stop automatic inclusion of dependent objects.
Script Actions
Alerts
Any alerts discovered during the script generation are displayed in the Alerts panel. Alerts can range from critical such as dropping a column or table, adding of dependent objects needed for scripting or warnings about type changes.
Before executing the script we strongly recommend reviewing the alerts and backing up your target database.
If there are no Alerts the Alert panel is not displayed.
Script Display
The script is editable and can be change prior to execution. Normally there is no need to edit the script since SQL Delta generates a complete update script that will sync the target database however you may wish to make additions or changes.
Script Editor Actions
Undo/Redo |
Undo changes or redo changes to text |
Cut, Copy, Paste, Select All |
The same as most editors, text can be cut, copied and pasted. |
Show Special Chars |
Display paragraph marks, tabs, spaces and other control characters that are normally invisible. |
Increase, Decrease, Reset Text Size |
The size of the text can be changed to make larger, smaller or reset to the default. |
Toggle Comment |
Highlight a section of text and press Ctrl+/ to automatically toggle commenting that text selection. |
Toggle Bookmark |
Create a bookmark at a specific point in the script. Up to 10 bookmarks can be created. Repeating the Toggle Bookmark process on an existing bookmark removes the bookmark. Ctrl+Shift+Number is the shortcut. |
Goto Bookmark |
Move the cursor to the bookmark, if it exists. Ctrl+Number is the shortcut. |
Save to File |
Saves the script to a file |
Executing the Script
Once the execute script begins a message box is shown describing each action as its sent to the database server. If comments are turned off in Project Options then a minimal level of feedback will be displayed.
Generally each script item should return a success message indicated by the tick icon however from time to time a script error may occur. Errors can come from data within an object prevents a change of the object structure. For example reducing the size of a column will cause truncation and SQL Server may detect the truncation and generate an error to protect the data. While errors are not desirable if they do occur and you have transactions active (again see Options) then the changes for that object will be rolled back.
Only Errors - This button filters the messages to display only the errors returned by the database server. By double clicking the error row the script window is changed to display the SQL code that generated the error.
Search Text searches through the messages.
Use the menu to Select, Copy and Save the messages to file.
See Keyboard Shortcuts for a more detailed listing of the keyboard shortcuts.