Learn more about data movement in the IBM DB2 database

Source: Internet
Author: User
Tags ibm db2 ibm db2 database

Data movement in the DB2 databaseIt is a frequently used technology in office work. I hope that you will be able to master the data mobile technology of DB2 databases through the study in this article.

The so-called data movement in db2 includes:

1. import data)


2. export data export)


3. load data)

Both import and load use db2 commands to save data in files of a certain format to tables in the database.

Export refers to saving the data in the table of the db2 database to a file of a certain format.

The role of data movement:

To transfer data between different database management systems, data movement is usually the most practical method, because any database management system supports common file formats, this universal interface makes it easy to transfer data between different systems.

Among the three commands, export is the simplest. Because data is transferred from a table to a file, there is usually no error or illegal data.

Before explaining commands, first introduce the file format.

1. asc -- a non-bounded ascii file, which is an ascii plain stream. The rows in the data stream are separated by line delimiters, and each column in the row is defined by the start and end positions.For example:

10 head office 160 initialize ate new york

15 new england 50 eastern boston

20 mid atlantic 10 eastern washington

38 south atlantic 30 eastern atlantic

42 great lakes 100 midwest chicago

51 plains 140 midwest dallas

66 pacific 270 western san francisco

84 mountain 290 western denver

2. del -- specifies an ascii file, which is also an ascii transfer stream. The rows in the data stream are separated by line delimiters, and the column values in the rows are separated by column delimiters.File Type modifiers can be used to modify the default values of these delimiters. For example:

10, "head office", 160, "initialize ate", "new york"

15, "new england", 50, "eastern", "boston"

20, "mid atlantic", 10, "eastern", "washington"

38, "south atlantic", 30, "eastern", "atlantic"

42, "great lakes", 100, "midwest", "chicago"

51, "plains", 140, "midwest", "dallas"

66, "pacific", 270, "western", "san francisco"

84, "mountain", 290, "western", "denver"
 

Related Article

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.