Data Export (DB2 LUW)

From RapidSQL
Jump to: navigation, search

Go Up to Data, Schema, and Miscellaneous Utilities

The Export Utility lets you use the Command Line Processor EXPORT command to export data. A wizard lets you generate two CLP calls:

  • A CONNECT command to connect to the server
  • An EXPORT command

Wizard controls let you specify a full set of EXPORT parameters.

Note: Before using this utility, you must specify the location of executables used by DB2. For details, see DB2 Utilities Options.

To export data from a DB2 LUW database

  1. Connect to a DB2 LUW datasource and ensure that it is the currently selected datasource. For details, see Connected/Selected Datasource options.
  2. Select Utilities > Export to open the CLP Export WIzard.
  3. Use the following table as a guide to performing tasks as you pass through the wizard panels:
Panel Option Description

File Options

Export file type

Lets you select among DEL (delimited ASCII format), WSF (work sheet format), and IXF (Integration Exchange Format), output file formats.

Export file name

Lets you specify the name of the file to which data is to be exported.

Messages file name

Lets you specify the name of the file to which warning and error messages occurring during an export operation will be written.

IXF Specific File Options

If an Export file type of IXF was selected, this control lets you provide a Code page of the data in the out put data set (codepage=) value

DEL Specific File Options

If an Export file type of DEL was selected, this group of controls lets you specify a set of type modifiers (corresponding to modifiers such as CHARDEL, COLDEL, DECPT, DECPLUSBLANK, NODOUBLEDEL, NOCHARDEL, STRIPLZEROS and TIMESTAMPFORMAT), specifying delimiter and general character conventions.

WSF Specific File Options

If an Export file type of WSF was selected, this group of controls corresponds to valid type modifiers for worksheet (1-4) Lotus and DBCS formats.

General Options

Separate the LOB data from the data file

Selecting this check box adds a LOBSINFILE modifier and activates other LOB-related controls in the group.

LOB Paths

Lets you build a list of LOBS TO clause values, specifying one or more paths to directories where LOB files are to be stored.

LOB Filenames

Lets you build a list of LOBFILE option values, specifying one or more files where LOBs are to be stored.

Place each LOB in a separate file

Adds a LOBSINSEPFILES modifier, specifying that each LOB value is to be written to a separate file.

XML Path

Lets you build a list of XML TO clause values, specifying one or more paths to directories where XML files are to be stored.

XML Filename

Lets you build a list of XMLFILE option values, specifying one or more XML file names.

Save XML schema information for all XML columns

Selecting this check box adds a XMLSAVESCHEMA modifier, specifying that XML schema information should be saved for all XML columns.

Write each XQuery Data Model (XDM) instance to a separate file

Selecting this check box adds a XMLINSEPFILES modifier, specifying that each XDM instance is written to a separate file

Write XDM instances without an XML declaration tag

Selecting this check box adds a XMLNODECLARATION modifier, specifying that XDM instances are written with no XML declaration tag.

Encode XML documents in the UTF-16 code page

Selecting this check box adds a XMLGRAPHIC modifier, specifying that exported XML documents are encoded in the UTF-16 code page regardless of the application code page or codepage file type modifier.

Use the application/the specified code page to write XDM instances

Selecting this check box adds a XMLCHAR modifier, specifying that

Source

When exporting data from a DB2 LUW database, this panel lets you specify the data to be exported. SELECT, XQUERY, HIERARCHY, and HIERARCHY STARTING options are provided. To specify a SELECT or XQUERY statement export, select the select or xquery statement radio button. In the Specify the statement to use for export box, provide text of the SELECT or XQUERY statement. Optionally, use the Method N controls (New, Delete, Move Item Up, Move Item Down) to provide a list of column names to be used in the output files. To specify a default traverse order, select the hierarchy with the default traversal order radio button. From the Select the start table for the hierarchy list, select the table that the export hierarchy is to start from. To specify a user-provided traverse order, select the hierarchy with user specified traversal order radio button. In the Double-click on table... list, double click on each table to be included in the traversal order list. The selected tables are displayed in the Custom traversal order... list. Use the controls associated with the Custom traversal order... list (Delete, Move Item Up, Move Item Down) to order the list. In the Where clause box, provide a condition specifying which rows are exported.

4. Finally, use the Execute button to perform the backup.