![]() |
Learn more about Toad for SQL Server Find solutions and downloads at the |
Toad for SQL Server 6.6 |
To generate DDL scripts
Select Tools | Export | Generate DDL Script.
Select one or more database from the list and click OK.
Check the object types and select the required objects in Search Results pane.
Tips:
Use to set searching options.
You can search not only by date or object type or name (or part of it), but you can also specify a name (or part of it) of the higher level object to which the search object should belong to. To perform complex name search split the object name by dots and select Search in Name (split by dots) option.
For example, you may find all columns named col1 belonging to the tables, that have "s" in their names - test.col1, sales.col1, etc.
Click at the upper right corner of the pane to open the Selected Objects pane.
The Selected Objects pane displays the list of objects selected for the DDL generation, while the Search Results pane displays your current search results.
For example, assume you search for tables and select three tables to add to the DDL generation. The tables are listed in the Selected Objects pane. When you perform another search, the previous table search disappears but the three selected tables remain in the Selected Objects pane.
If you do not enable the Selected Objects pane, you can only select objects in the current Search Results to add to the script generation. You cannot select objects from multiple searches.
To delete the object from the Selected Objects pane, click .
Select to set Export DDL options.
Complete the fields as necessary. Review the following for additional information:
Script options | Description |
Drops | Select True to add a DROP statement for any objects included in the SQL script. Caution: This drops existing objects in the database before the CREATE statement using the existing definition is generated. |
Script permissions | Select True to create all permissions for existing objects included in the script. |
Table script options | Description |
Script indexes | Select True to create indexes that currently exist for tables. |
Script triggers | Select True to create triggers that currently exist for tables. |
Script keys, defaults, check constraints | Select True to create keys, defaults, and check constraints that currently exist for tables. |
Note: You can create Profiles to store your preset options.
Select to specify Output.