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.
You have the query and export permissions on the target database. For more information, see Manage permissions.
Export a schema
- Log on to the DMS console V5.0.
In the left-side Database instance list, find the database that you want to manage.
Double-click the name of the database to go to the SQLConsole tab.
Right-click the table whose schema you want to export, and choose .
NoteYou can also move the pointer over the icon in the upper-right corner of the SQLConsole tab and select All Schemas in Database.
On the Export Schema tab, select the file format as data dictionary and export the schema.
You can export schemas in the database to a Word, Excel, or PDF file.
Export an SQL result set
You cannot export result sets from NoSQL databases.
- Log on to the DMS console V5.0.
In the left-side Database instance list, find the database that you want to manage.
Double-click the name of the database to go to the SQLConsole tab.
On the execution result tab, choose .
Set the parameters that are described in the following table and click OK.
Parameter
Description
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 database administrators (DBAs) are not allowed to view the ticket details.
Export Statement
The SQL statements that can be executed to export data.
Embed Watermark
Specifies whether to embed watermarks in the exported file. For more information, see the "Embed watermarks" section in the Use data watermarks topic.
Data Watermark: embeds identification information into data. A watermark embedded by using this method is almost invisible to data users.
NoteWe recommend that you use data watermarks when you export more than 200 data entries.
For the database instances for which Sensitive Data Protection is not enabled, data watermarks are not supported.
File Watermark: embeds identification information into files. A watermark embedded by using this method is visible to data users.
In the Submit ticket success message, click View.
On the Ticket Details page, check the number of affected rows in the Precheck step and click Submit for Approval in the Approval step.
After the ticket is approved, DMS automatically runs the export task. After the task is run, you can click Export to specify the type of the exported file and the character set. Then, click Confirm Execution.
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.
- Log on to the DMS console V5.0.
In the left-side Database instance list, find the database that you want to manage.
Double-click the name of the database to go to the SQLConsole tab.
Right-click the table whose schema you want to export, and choose .
NoteYou can also move the pointer over the icon in the upper-right corner of the SQLConsole tab and select Export the DB.
Configure the parameters when you export a database. The following table describes some parameters that are displayed.
Parameter
Description
Exported table
Specifies whether to export specific tables or all tables in the database. Valid values: Partial Tables and All Tables.
If you select Partial Tables, you need to select the tables to be exported on the right side of the page.
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, and Event.
NoteThe valid values vary based on the type of database from which you want to export data.
After you set the parameters, click Submit.
NoteAfter 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.
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.
Important You must download the exported file within 24 hours after the ticket is executed. Otherwise, the export link becomes invalid and you need to submit a ticket again.