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

Prerequisites

You have the permissions to query, modify, and export data in a 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 on the left of the SQL editor, right-click the target table and choose Export > Export Schema.
    Export Schema
    Note To export all schemas in the database, move the pointer over Export icon in the upper-right corner of the SQL Console page and select All Schemas in Database.SQL Console page
  4. On the Export Schema page, select a file format and export the schema.
    Export Schema page

Export an SQL query result

  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. Query data.
  4. A query result appears on a new Execution History tab below the SQL editor. Click Create Export Ticket for more query result.
    Export more data (SQL)
  5. In the Data Export dialog box, set the parameters as required and click Submit, as shown in the following figure.
    Data Export dialog box
    Parameter Description
    Database Name The target database of this export operation. By default, this parameter is set to the current database.
    Reason Category The reason for this export operation, which helps you find the ticket in subsequent operations.
    Business Background The purpose or objective of this export operation. This helps reduce communication costs and accelerate the approval process.
    Affected Rows The estimated number of rows of data to be affected by this export operation.
    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 operation. All stakeholders can view the ticket details and assist R&D engineers in advancing the approval process. Except for the DMS administrator and database administrator (DBA), users irrelevant to the ticket are not allowed to view the ticket details.
    Export Statement The SQL statements for querying other data that you want to export.
    Attachments The one or more images or files that contain other necessary information for the ticket.
  6. In the Submit ticket success message, click View. You are navigated to the Data Export Ticket Details page.
  7. 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.
  8. After the ticket is approved, the system automatically generates a task as configured and runs the task. After the task is run, you can click Data Export to select a file format or click Download Exported File.
    Data Export Ticket Details page

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 on the left of the SQL editor, right-click the target table and choose Export > Export the DB.
    Export the DB
  4. In the Export The Table dialog box, set the parameters as required and click Submit, as shown in the following figure.
    Export The Table dialog box
    Parameter Description
    Database Name The target database of this export operation. By default, this parameter is set to the current database.
    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 operation, which helps you find the ticket in subsequent operations.
    Business Background The purpose or objective of this export operation. This helps reduce communication costs and accelerate the approval process.
    Stakeholder The stakeholders of this export operation. All stakeholders can view the ticket details and assist R&D engineers in advancing the approval process. Except for the DMS administrator and DBA, users irrelevant to the ticket 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 More options that you can select for this export operation, including data types and SQL script options.
    Attachments The one or more images or files that contain other necessary information for the ticket.
  5. Click Submit.
    Note After you submit the ticket, you are navigated to the Data Export Ticket Details page. On this page, you can view basic information about the ticket and the progress of the approval process.
  6. After the ticket is approved, the system automatically generates a task as configured and runs the task. After the task is run, click Download Exported File to download the file.
    Data Export Ticket Details page