Skip to end of metadata
Go to start of metadata

Only in DbVisualizer Pro

This feature is only available in the DbVisualizer Pro edition.

You can export all or selected objects in a schema using the Export Schema assistant.

To export a schema:

  1. Select the schema node in the Databases tab tree,
  2. Launch the Export Schema assistant from the right-click menu,
  3. Select an Output FormatOutput Destination, Objects to export and Options,
  4. Click Export.

Output Format

You can export objects in one of these formats: CSVHTMLSQLXMLXLS (Excel), or JSON.

The CSV, HTML, XSL and JSON formats are specifically for table data and are not supported for any other type of objects.

The SQL and XML formats can be used for all objects to export the DDL, and for tables you can also choose to include the table data in these formats.

You can control whether to use delimited identifiers and/or qualified names in the DDL and INSERT statements generated for the SQL format.

Output Destination

The destination can be one of:

  • a file,
  • an open or new SQL Commander tab, with options for where in an open SQL Commander to insert the result,
  • to the system clipboard.

Object Types

In the Object Types area you select what to export. You can check the checkbox for an object type to export all objects of that type, or expand a type node and select individual objects.

Options

The options depend on the selected Output Format. 

For the SQL and XML formats, you can choose to export the DDL, the DDL for indexes for a table and the table data: as INSERT statements for the SQL statement or in one of three XML formats.

For the XLS format, you can choose to export table data as either regular Binary Excel or OOXML for Excel 2007 and later. 

Most formats also let you specify other options, such as delimiters, title and descriptions. Just select an Output Format to see which options are available.

You can also adjust the Data Formats specifically for the exported table data. By default, the formats defined in Tool Properties are used, but sometimes you need to export dates and numbers in a different format because you intend to import the data into a different type of database.

In the Data Format Settings dialog you can also specify how to quote text data and how to handle quotes within the text value.

Using Variables in Fields

You can use some of the pre-defined DbVisualizer variables (${dbvis-date}$${dbvis-time}$${dbvis-timestamp}$, ${dbvis-connection}$, ${dbvis-database-type}$ and ${dbvis-object}$) in all fields that hold free text (e.g. title and description fields) and as part of the file name field.

Use the ${dbvis-object}$ variable as part of the filename if you want to export the DDL and/or data to a separate file for each object. The variable is replaced with the object type and object name, e.g. ${dbvis_object}$.sql becomes table_COUNTRIES.sql for a table named COUNTRIES.

Saving And Loading Settings

If you often use the same settings, you can save them as the default settings for this assistant. If you use a number of common settings, you can save them to individual files that you can load as needed. Use the Settings button menu to accomplish this:

  • Save as Default Settings
    Saves all format settings as default. These are then loaded automatically when open an Export Schema dialog
  • Use Default Settings
    Use this choice to initialize the settings with default values
  • Remove Default Settings
    Removes the saved defaults and restores the regular defaults
  • Load
    Use this choice to open the file chooser dialog, in which you can select a settings file
  • Save As
    Use this choice to save the settings to a file

  • Copy Settings to Clipboard
    Use this choice to copy all settings to the system clipboard. These can then be pasted into the SQL Commander to define the settings for the @export editor commands.
  • No labels