DB2 data movement is expected to happen frequently. The following describes four file formats of DB2 data movement in detail. If you are interested, take a look.
The role of DB2 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, we will first introduce the file formats. There are four file formats for DB2 data movement:
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"
3. WSF -- work sheet format) is a worksheet format used for data exchange with the Lotus series software.
4. PC/IXF -- an adapted version of the integrated Exchange Format, IXF) data Exchange architecture, which consists of records with Variable Length of some columns, it includes the header record, Table Record, column descriptor record of each column in the table, and one or more data records of each row in the table. A pc/IXF file record consists of fields that contain character data.
Implementation of DB2 column-to-row
DB2 Incremental backup method
DB2 offline backup test instance
DB2 Time Functions
DB2 common table expression usage