Help Center/
GaussDB/
Developer Guide(Centralized_V2.0-8.x)/
Best Practices/
Best Practices for Import and Export Using COPY/
Typical Scenarios
Updated on 2025-05-29 GMT+08:00
Typical Scenarios
Preparations
During import or export using COPY, the database requires file read/write permissions on the server. To grant these permissions, enable the GUC parameter enable_copy_server_files.
gs_guc reload -I all -N all -Z datanode -c "enable_copy_server_files=on"

- Parameters in the COPY command must match the actual data in files, including the format, delimiter, newline character, and character set.
- If the specified client-side encoding matches the server-side encoding, the COPY command preserves the binary form of data during import and export, preventing any structural damage that may result from transcoding. This mechanism guarantees the integrity and originality of data migration, making it suitable for scenarios that demand absolute fidelity.
- Using the Recommended CSV Format
- Importing and Exporting Data with Extreme Performance
- Exporting Files for Manual Parsing
- Importing and Exporting Data When Only the TEXT Format Is Available
- Importing and Exporting Data Files on a GSQL Client
- Importing and Exporting Data Through the JDBC Driver
- Importing Erroneous Data Through Error Tolerance
Parent topic: Best Practices for Import and Export Using COPY
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot