Exporting Entire DB Schema
The Schema Manager allows you to export entire database
schema to a SQL script file or migrate the schema to a different database or
server.
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:
- Choose Tools -> DB Schema -> Export/Copy top-level menu.
- Select the required database in the Object Explorer and choose DB Schema ->
Export/Copy from the popup menu.