Test System maintenance-different versions of SQL data import and export, SQL Import and Export

Source: Internet
Author: User

Test System maintenance-different versions of SQL data import and export, SQL Import and Export

During the maintenance of the examination system, the examination system (Backup) needs to be built on multiple servers to ensure the smooth conduct of the examination. At this time, the database needs to be migrated back and forth, previously, our commonly used database backup and restoration methods were indeed simple and convenient. However, when different SQL versions were installed on different servers, we had to take a break. Although at that time it was convenient for future operations, we unified the database versions of the servers we used this time, but in the maintenance of the examination system, Mr Mi made me feel the deepest point ----- "think more about everything!" I have carefully studied several SQL data import and export methods to improve my understanding.

I. Use SQLServer Import and Export Tool

Right-click the source database and choose task> export data.


Select the source database and target database respectively


Then follow the default steps to complete the process.

Ii. Generate scripts

Right-click the source database and select task to generate a script.



Select the corresponding database version and Data Option (change to True), and select another option based on your actual requirements.



Run the script file generated by default on the target database.

Iii. Use BCP for Import and Export

BCP is a tool specifically used by SQL for database table-level data backup. You need to learn more about the powerful parameters. The following describes how to import and export BCP data.


The Bcp command can be executed on both the console and sqlserver, and the data export format can be customized, and the data import and export speed is much higher than the above method (big data is relatively obvious ), the understanding of BCP is still one-sided. I hope you will give me more advice.

 

 

When we encounter problems, what we lack is to think more than one step. Many times, we feel that we are no different from others, and we think that we are also the people who are diligent in thinking, thinking over and over again is lazy, and we are bound by ourselves. You always think that you are good. Sometimes it is really naive.

I want to do more!

 

There are still many ways to import and export SQL data of different versions. Please stay tuned to my blog and share more methods.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.