This topic describes how to export a schema, an SQL query 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 navigation tree of the SQLConsole tab, right-click the table whose schema you want to export and choose Export > Export Schema.
    Note To export all schemas in the database, move the pointer over the 5SQL控制台图标 icon in the upper-right corner of the SQLConsole tab and select All Schemas in Database.
  3. 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 query result set

  1. Log on to the DMS console.
  2. Enter an SQL statement to query data.
  3. On the execution result tab, move the pointer over Export File and select Export more data.
    Export more data
  4. 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 query 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 the 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 that can be executed to export data.
    Attachments The images or files that contain other necessary information for the ticket.
  5. In the Submit ticket success message, click View.
  6. On the Data Export Ticket Details page, check the number of affected rows in the Precheck step and click Submit for Approval in the Approval step.
  7. After the ticket is approved, DMS automatically runs the export task. After the task is run, you can click 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. Move the pointer over the 5SQL控制台图标 icon in the upper-right corner of the SQLConsole tab and select Export the DB.
    Note You can also right-click a table in the navigation tree of the SQLConsole tab and choose Export > Export the DB.
  3. In the dialog box that appears, 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 the 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 types of objects that you want to export. You can select one or more object types. 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.
  4. After you set the parameters, click Submit.
    Note After you submit the ticket, you are navigated to the Data Export Ticket Details page. On this page, you can view the basic information about the ticket and the progress of the approval process.
  5. 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 page to download the file.
    Download Exported File