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. Go to the DMS console V5.0.
  2. In the top navigation bar, choose SQL Console > SQL Console.
  3. In the Please select the database first dialog box, enter a keyword to search for a database, select the database from the search results, and then click Confirm.
  4. 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 Export icon icon in the upper-right corner of the SQLConsole tab and select All Schemas in Database.
  5. On the Export Schema tab, select a file format as needed and export the schema.

Export an SQL result set

Note You cannot export result sets from NoSQL databases.
  1. Go to the DMS console V5.0.
  2. In the top navigation bar, choose SQL Console > SQL Console.
  3. In the Please select the database first dialog box, enter a keyword to search for a database, select the database from the search results, and then click Confirm.
  4. Enter an SQL statement to query data.
  5. On the execution result tab, move the pointer over Export File and select Export more data.
  6. In the Data Export dialog box, set the parameters that are described in the following table and click OK.
    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 involved in this export. All the specified stakeholders can view the ticket details and take part 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.
  7. In the Submit ticket success message, click View.
  8. On the Ticket Details page, check the number of affected rows in the Precheck step and click Submit for Approval in the Approval step.
  9. 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. Then, click 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. Go to the DMS console V5.0.
  2. In the top navigation bar, choose SQL Console > SQL Console.
  3. In the Please select the database first dialog box, enter a keyword to search for a database, select the database from the search results, and then click Confirm.
  4. Move the pointer over the Export icon 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.
  5. In the Database Export dialog box, set the parameters that are described in the following table.
    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 involved in this export. All the specified stakeholders can view the ticket details and take part 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.
  6. After you set the parameters, click Submit.
    Note After you submit the ticket, you are navigated to the Ticket Details page. On this page, you can view the basic information about the ticket and the progress of the approval process.
  7. 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.