Exporting Partial Schema
The Schema Manager allows you to
export selected database objects to SQL script file or migrate
these objects to a different database or server.
You can select different types of database objects
into the same batch, such as tables and stored procedures, and also specify to
include all objects, on which the selected objects depend on. For example, you
can select a several stored procedures and specify to include all tables, views,
nested stored procedures and other objects, these stored procedures use directly
or indirectly. The full tree of dependencies is included to make sure
that the selected application will properly work on the target
environment.
You can specify a number of options for the SQL script generation. These
options include:
- Ability to generate DROP SQL statement for each
created object.
- Ability to include or skip table indexes,
primary/foreign key relational integrity constraints and check constraints.
- Ability to preserve or ignore physical layout
including spaces and fragmentation for tables and indexes. If you choose to
preserve the physical layout, it also allows you to re-map space's names to
match your target platform.
- Ability to include user permission schema, with all user and object
privileges.
If you choose to deploy the generated script directly to the target
platform, you can specify how to handle runtime errors and if to run the script
within a transaction so that you could rollback all changes if the deployment
operation fails.
There are multiple ways to invoke the schema export operation for selected
objects:
- Choose Tools -> Export DB Schema top-level menu and
select Selected Objects radiobutton in the source selection panel of the
Schema Wizard.
- Select the required database in the Object Explorer.
Choose Export DB Schema from the popup menu and select Selected Objects
radiobutton in the source selection panel of the Schema Wizard.
- Highlight multiple objects using CTRL+Click or SHIFT+Click mouse
operation in the Properties View of the Object Explorer when the object
folder, such as Tables or Routines, is expanded. Choose Export SQL from
the popup menu in the Properties View panel. You also will be able to add
other objects to the selection after the Schema Wizard panel is
opened.