4.4 The Convert task

 < Day Day Up > 



4.4 The Convert task

Once the extraction files have been created we proceed to the next task - Convert. On the Convert tab (Figure 4-12), there are a few requirements that need to be completed:

  1. Select the files in left-hand pane to be converted.

  2. Enter a prefix for the generated files (i.e., enter a name for the file that will be generated from the conversion).

  3. Select the Convert button to begin the conversion.

click to expand
Figure 4-12: The Convert tab

In addition to the required fields, there are several options that may be chosen that will affect the contents of the generated conversion file:

  • Global Type Mapping

  • Advanced Options

  • Set Context

Global Type Mapping

If the Global Type Mapping button is selected, a screen opens (Figure 4-13) that allows some of the default MTK data type mappings to be changed. Only fields that have the "pad and pencil" icon are available to be edited. For example, the Date field in Oracle is typically mapped to Timestamp in DB2 UDB; in this screen it is possible to replace TIMESTAMP with DATE or TIME as the default mapping. It is important to remember that whatever data type mappings are altered, it will be applied to all objects in the entire project. It is not possible, from this screen, to set different data type for each individual object.

click to expand
Figure 4-13: The Global Type Mapping screen

Advanced options

If the Advanced Options button is selected, a screen opens (Figure 4-14), which shows several features that will affect the content of the generated conversion file. The features are grouped into three categories:

  • General converter options

  • Converter options for tables, views, indexes

  • Converter options for procedures, functions, triggers

click to expand
Figure 4-14: The Advanced Options screen

Most of the options pertain to whether the converted code will contain the Oracle source code, as comments, in the generated file. On this screen, the following options are checked by default:

  • Copy inter-statement source comments to the translated code.

  • Copy source (as comments) to the translated code.

  • Copy full source for procedures before their translation.

  • Copy source separately for statements in stored procedures.

Leaving the options checked generates a conversion file that contains all of the Oracle source code (as comments) along with the converted DB2 UDB code. When first using the tool, we recommend to leave the defaults checked. This will allow examination and comparison between the Oracle source and the DB2 target within the same file. Also, in many cases, the comparison serves as an excellent teaching tool for those who may not be familiar with the syntax of the DB2 SQL Procedure Language.

For our example, we retain all the defaults, but we also added the Translate tablespaces to DB2 option. Choosing this option causes the converter to include tablespace names that retain the names from the Oracle source code. The create tablespace statements are also added at the beginning of the script file. This is important for our sample porting project because we intend to deploy the converted objects into a DB2 UDB database that will contain tables, indexes, and blob/clob data in table spaces that have been created using these names. In the case where the table space mapping from Oracle to DB2 is different, the table space reference can be modified easily.

Once the options have been entered, we perform the following required steps:

  1. Choose the file to be converted: For our example, we choose tabs_views_seqs.src.

  2. Choose and enter a Prefix for generated files: For our example, we allowed it to default to the name of the currently selected file.

  3. Click the Convert button.

The conversion process now begins (Figure 4-15).

click to expand
Figure 4-15: Executing the conversion

During the conversion, the message Please waitConverting files is displayed along with the elapsed time . Eventually the message will change to Please waitInitializing Refine as the tool begins to automatically shift to the Refine tab.

Set Context

The context of a conversion means the source files that MTK will refer to when it begins its conversion. Choosing Set Context tab allows you specify source DDL file which contains other objects MTK needs for conversion. The detail is discussed in Section 4.9, "Converting the remaining objects" on page 122.



 < Day Day Up > 



Oracle to DB2 UDB Conversion Guide2003
Oracle to DB2 UDB Conversion Guide2003
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 132

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net