This topic describes how to export a schema, an SQL result set, or an entire database in Data Management (DMS).

Prerequisites

  • The security rule named Whether the result set supports export is enabled for a database. For more information, see SQLConsole for relational databases.
    Note By default, this rule is enabled.
  • You have the query and export permissions on the database. For more information, see Manage permissions.

Export a schema

  1. Log on to the DMS console.
  2. In the left-side navigation pane, enter the name of the target database in the search box and press Enter. From the matched result, click the instance where the target database resides and double-click the target database. The SQL Console page appears.
    Go to the SQL Console page
  3. In the navigation tree of the SQLConsole tab, right-click the table whose schema you want to export and choose Export > Export Schema.
    Export Schema
    Note To export all schemas in the database, move the pointer over the Export icon icon in the upper-right corner of the SQLConsole tab and select All Schemas in Database. Export all schemas in the database
  4. On the Export Schema tab, select a file format as needed and export the schema.
    Export the schema in different file formats

Export an SQL result set

  1. Log on to the DMS console.
  2. In the left-side navigation pane, enter the name of the target database in the search box and press Enter. From the matched result, click the instance where the target database resides and double-click the target database. The SQL Console page appears.
    Go to the SQL Console page
  3. Enter an SQL statement to query data.
  4. On the new Execution History tab, move the pointer over Export File and select Export more data (SQL).
    Export more data (SQL)
  5. In the Data Export dialog box, set the parameters that are described in the following table and click OK.
    Data Export dialog box
    Parameter Description
    Database Name The database where you want to export an SQL result set. By default, the current database is selected.
    Reason Category The reason for this export. This helps you find the ticket in subsequent operations.
    Business Background The purpose or objective of this export. This reduces unnecessary communication.
    Affected Rows The estimated number of data rows to be affected by this export.
    Skip Validation Specifies whether to skip validation. If you select this check box, you must enter a reason in the field next to the check box.
    Stakeholder The stakeholders of this export. All specified stakeholders can view the ticket details and assist in the approval process. Irrelevant users other than DMS administrators and database administrators (DBAs) are not allowed to view the ticket details.
    Export Statement The SQL statements for querying the data that you want to export.
    Attachments The images or files that contain other necessary information for the ticket.
  6. In the Submit ticket success message, click View.
  7. On the Data Export Ticket Details tab, check the number of affected rows in the Precheck step and click Submit for Approval in the Approval step.
  8. After the ticket is approved, DMS automatically runs the export task. After the task is run, you can click Data Export to select a file format and click Download Exported File.
    Download Exported File

Export an entire database

You can export an entire database, including schemas, data, stored procedures, functions, triggers, views, and events in the database.

  1. Log on to the DMS console.
  2. In the left-side navigation pane, enter the name of the target database in the search box and press Enter. From the matched result, click the instance where the target database resides and double-click the target database. The SQL Console page appears.
    Go to the SQL Console page
  3. In the navigation tree of the SQLConsole tab, right-click a table and choose Export > Export the DB.
    Export the DB
  4. In the Export The Table dialog box, set the parameters that are described in the following table.
    Export all the tables in the database
    Parameter Description
    Database Name The database that you want to export. By default, the current database is selected.
    Exported table Specifies whether to export specific tables or all tables in the database. Valid values: Partial Tables and All Tables.
    Note In this example, select All Tables.
    Reason Category The reason for this export. This helps you find the ticket in subsequent operations.
    Business Background The purpose or objective of this export. This reduces unnecessary communication.
    Stakeholder The stakeholders of this export. All specified stakeholders can view the ticket details and assist in the approval process. Irrelevant users other than DMS administrators and DBAs are not allowed to view the ticket details.
    Export content The content to be exported. Valid values: Data, Structure, and Data & Structure.
    Exported Structure Type The one or more types of objects that you want to export. Valid values:
    • Procedure
    • Function
    • Trigger
    • View
    • Event
    More Options The other objects that you want to export. You can click Big data type export options and SQL script other options to select a specific object as required.
    Attachments The images or files that contain other necessary information for the ticket.
  5. After you complete the configurations, click Submit.
    Note After you submit the ticket, you are navigated to the Data Export Ticket Details tab. On this tab, you can view the basic information about the ticket and the progress of the approval process.
  6. After the ticket is approved, DMS automatically runs the export task. After the task is run, click Download Exported File in the lower part of the tab to download the file.
    Download Exported File