Data Management (DMS) provides the database export feature. You can use this feature to export an entire database or specific tables in the database for data analysis.

Prerequisites

One of the following types of databases is used:
  • MySQL: self-managed MySQL, ApsaraDB RDS for MySQL, PolarDB for MySQL, PolarDB-X, AnalyticDB for MySQL, and ApsaraDB OceanBase for MySQL
  • SQL Server: self-managed SQL Server and ApsaraDB RDS for SQL Server
  • PostgreSQL: self-managed PostgreSQL, ApsaraDB RDS for PostgreSQL, PolarDB for PostgreSQL, and AnalyticDB for PostgreSQL
  • PolarDB for Oracle
  • MariaDB
Note For more information, see Supported database types and features.

Procedure

  1. Log on to the DMS console V5.0.
  2. In the top navigation bar, click Database Development. In the left-side navigation pane, choose Data Export > Database Export.
    Note You can also choose SQL Console > SQL Console in the top navigation bar. On the left-side pane of the page that appears, right-click the table that you want to export and choose Export > Export the DB.
  3. On the Data Export Ticket Application page, set the parameters that are described in the following table.
    shujukudaochu
    Parameter Description
    Database Name The database that you want to export.
    Note You must have the export permissions on this database. For more information, see View owned permissions.
    Exported table Specifies whether to export specific tables or all tables in the database. Valid values: Partial Tables and All Tables.
    Note If you set this parameter to Partial Tables, you must select one or more tables in the Tables & Filters section and configure the filter condition for each table.
    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 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 content The type of data that you want to export. Valid values: Data, Structure, and Data & Structure.
    File Format The format in which the database is exported. Valid values:
    • SQL
    • CSV
    • EXCEL
    Exported Structure Type The type of schema that you want to export. Valid values:
    • Procedure
    • Function
    • Trigger
    • View
    • Event
    Note The valid values vary based on the type of database that you want to export.
    More Options The other objects that you want to export. Click Big data type export options or SQL script other options and select the required options.
    Attachments The images or files that are uploaded to add more information about this export.
  4. After you complete the configurations, click Submit and wait for approval.
    Note On the Ticket Details page, you can view the approval progress in the Approval step.
  5. After the ticket is approved, click Download Exported File in the Download step.

Usage notes

  • After you submit a data export ticket for approval, you can close the ticket regardless of whether the ticket is approved or rejected. This reduces data exposure.
  • Approval rules are configured by DMS administrators and DBAs. If you are a DMS administrator or DBA, click Security and Specifications in the top navigation bar of the DMS console. Then, click Security Rules in the left-side navigation pane to configure approval rules for data export tickets. We recommend that you submit tickets to export data in the test environment. This way, affected rows can be checked and a backup file can be created for each data export. This also allows you to restore data when the data export does not work as expected. To ensure high R&D efficiency, you can specify that no approval is required for data export tickets in the test environment.