Export a Result Set
<p>Perform this task to save the result set when the query result of a SQL statement contains a large amount of data.</p>
<p><strong><span style="font-size:18px">Prerequisites</span></strong></p>
<p>1. You have successfully logged in to a database in the DMS console. For more information, see <a href="http://pinganyun.com/ssr/help/database/DMS/5d5e6ce2e9ca5f712e340eb2.5d5f481e1c51aa7124c5e3f9.5d5f486b1c51aa7124c5e3fa" target="_blank">Log in to an RDS MySQL Database</a>, <a href="http://pinganyun.com/ssr/help/database/DMS/5d5e6ce2e9ca5f712e340eb2.5d5f481e1c51aa7124c5e3f9.5d5f48ed1c51aa7124c5e3fb" target="_blank">Log in to an RDS PostgreSQL Database</a>, or <a href="http://pinganyun.com/ssr/help/database/DMS/5d5e6ce2e9ca5f712e340eb2.5d5f481e1c51aa7124c5e3f9.5d5f49b5e9ca5f712e340eb7" target="_blank">Log in to a DDS Database</a>.</p>
<p>2. You have created storage space in the region where the database is located. For more information, see <a href="http://pinganyun.com/ssr/help/storage/obs/Operationguide.managespacestorage.cspace" target="_blank">Create Storage Space</a>.</p>
<p><strong><span style="font-size:18px">Usage Guidelines</span></strong></p>
<p>1. You can export the result sets of the RDS MySQL, RDS PostgreSQL, and DDS databases.</p>
<p>2. The exported files are stored in the storage space that you have created. To view the exported files, download them in the DMS console.</p>
<p><strong><span style="font-size:18px">Procedures</span></strong></p>
<p>1. Log in to the <a href="http://pinganyun.com/console/dms/login" target="_blank">DMS Console</a>.</p>
<p>2. In the left navigation pane, click <strong>Quick Database Login</strong> to enter the <strong>Quick Database Login</strong> page.</p>
<p>3. Select the target login tab, and then enter the domain name, port, database name, database username, and password.</p>
<p>4. Click <strong>Log in Database</strong> to enter the <strong>Database Management</strong> page.</p>
<p>5. Click the <strong>Export</strong> tab.</p>
<p>6. In the lower-left corner of the page, click <strong>Result set export</strong> to enter the <strong>Result set export</strong> page.</p>
<p>7. Configure the export task as described in the following table:</p>
<table border="1" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="background-color:#ededed; vertical-align:top; width:137px">
<p><strong>Configuration item</strong></p>
</td>
<td style="background-color:#ededed; vertical-align:top; width:510px">
<p><strong>Description</strong></p>
</td>
</tr>
<tr>
<td style="vertical-align:top; width:137px">
<p>Export type</p>
</td>
<td style="vertical-align:top; width:510px">
<p>Set the exported file type.</p>
<p>RDS MySQL and RDS PostgreSQL databases can be exported as CSV files.</p>
<p>DDS databases can be exported as JSON files. </p>
</td>
</tr>
<tr>
<td style="vertical-align:top; width:137px">
<p>OBS Buckets</p>
</td>
<td style="vertical-align:top; width:510px">
<p>Select the storage space that you have created.</p>
<p><img src="https://obs-cn-shanghai.yun.pingan.com/pcp-portal/20200607162318-1c58034991bf.png" style="height:17px; margin:0px; width:65px" />: The storage space and the database must be in the same region.</p>
</td>
</tr>
<tr>
<td style="vertical-align:top; width:137px">
<p>File character set</p>
</td>
<td style="vertical-align:top; width:510px">
<p>Select the file character set. Currently, only UTF-8 is supported.</p>
</td>
</tr>
<tr>
<td style="vertical-align:top; width:137px">
<p>Execute SQL</p>
</td>
<td style="vertical-align:top; width:510px">
<p>Enter the SQL statement to be queried.</p>
<p><img src="https://obs-cn-shanghai.yun.pingan.com/pcp-portal/20200607162318-1c58034991bf.png" style="height:17px; margin:0px; width:65px" />:</p>
<p>1. Do not enter a semi-colon (;) at the end of the SQL statement.</p>
<p>2. The SQL statement supports a maximum of 1024 characters.</p>
</td>
</tr>
<tr>
<td style="vertical-align:top; width:137px">
<p>Description</p>
</td>
<td style="vertical-align:top; width:510px">
<p>Enter a description for the export task. A maximum of 400 characters are supported.</p>
</td>
</tr>
</tbody>
</table>
<p><img src="https://obs-cn-shanghai.yun.pingan.com/pcp-portal/20200607162411-1ee5a24b9db3.png" style="height:639px; width:700px" /></p>
<p>8. Click <strong>Confirm</strong>.</p>
<p><strong><span style="font-size:18px">Result</span></strong></p>
<p>In the <strong>List of History Tasks</strong> area of the <strong>Export</strong> tab, the <strong>Status</strong> column of the exported task displays <strong>Task completed</strong>.</p>
<p><img src="https://obs-cn-shanghai.yun.pingan.com/pcp-portal/20200607162439-1d937aa99dd1.png" style="height:161px; width:830px" /></p>
<p><strong><span style="font-size:18px">Subsequent Procedures</span></strong></p>
<p>In the <strong>Operations</strong> column of the export task, click <strong>Download</strong> to view the exported content. For more information, see <a href="http://pinganyun.com/ssr/help/database/DMS/5d5f4c9be9ca5f712e340eb8.5d5f5d75e9ca5f712e340ebd.5d5f8100c090ec71384d4b6c" target="_blank">Download and View an Exported File</a>.</p>
Did the above content solve your problem?
Yes
No
Submitted successfully! Thank you for your feedback, we will try our best to do better and better!