Oracle to DB2 UDB Conversion Guide2003

 < Day Day Up > 


4.7 Deploy to DB2

From the Deploy task, it is possible to perform the following actions:

Figure 4-25 shows the deployment screen.

Figure 4-25: The MTK Deploy to DB2 task screen

4.7.1 Considerations

Before you start the DB2 deployment, you should consider:

MTK database creation

If you choose to deploy to a database that is remote to the system on which the toolkit is running, then you cannot choose to create a new database during deployment. The database must first be created on the remote system and registered in the local catalog. See CATALOG DATABASE in the DB2 Command Reference for more information

If you plan on deploying to a database that MTK will create locally, then the following information is important:

Deploying Objects: Extracting and deploying data

There are a few considerations for deploying objects and data depending on your environment and requirements:

Considerations for remote database access

If you need to access database remotely during migration, please consider the following:

4.7.2 Deployment strategy

The deployment information for the objects that were just converted is as follows:

To follow the plan outlined above, we need to complete the required information on the Deployment screen:

Figure 4-26 shows the Deploy to DB2 screen completed with all of the above information.

Figure 4-26: The Deploy to DB2 screen with deployment information entered

Once the deployment options are completed, we clicked the Deploy button and the deployment begins.

Deployment of Java and SQL User-Defined Functions

During deployment, MTK will automatically install JAVA and SQL User-Defined Functions (UDF). A schema called ORA8 will be specifically created to contain these functions. These UDFs are provided to simulate Oracle functions that do not have exact DB2 equivalents. The UDFs are programmed in SQL where possible but, in some cases, it is necessary to implement them in Java.

The installation of these functions in a database involves one to two files for every MTK target:

These files can be found in the directory where MTK was installed. That directory will also contain a script to drop all of the functions created by the mtkora8.udf script, mtkora8drop.udf, should it be necessary to drop these functions.

During deployment, the following takes place with these JAR and script files:

  1. In the mtkora8.udf file

    The JAVA CREATE FUNCTION statements are altered to specify the database under which the jar will be installed, such as:

    Portion of the original file:

    CREATE FUNCTION ORA8.jversion() RETURNS varchar(15) EXTERNAL NAME 'ora8.udfjar:com.ibm.db2.tools.mtk.mtkora8udf.Ora8UDFsv2.jversion'

    After alteration:

    CREATE FUNCTION ORA8.jversion() RETURNS varchar(15) EXTERNAL NAME 'ora8.db2_emp:com.ibm.db2.tools.mtk.mtkora8udf.Ora8UDFsv2.jversion'

    The altered version of this file is then placed in the PROJECTS directory under a subdirectory corresponding to your project name, for example:

    PROJECTS/MY_MTK_PROJECT/ mtkora8.udf.

  2. The ora8UDFs.jar file is installed in the database with the following command:

    CALL SQLJ.INSTALL_JAR('file:/home/db2inst1/mtk/ora8UDFs.jar','ora8.db2_emp')

    Once the jar file is installed on UNIX, it can be found in the following directory:

    DB2INSTHOME/sqllib/function/jar/ORA8/

The DEPLOY_YourProjectName_Udf.log file will contain all the information regarding the success, or failure, of UDF deployment in your environment. It is recommended that this be examined to determine if UDF has been successfully deployed. A successful deployment will return the following message:

Creation of MTK UDFs... CALL SQLJ.INSTALL_JAR('file:/home/db2inst1/mtk/ora8UDFs.jar','ora8.db2_emp') DB20000I The CALL command completed successfully.

If any other message is returned, you should verify the suitability of your DB2 Java environment.

4.7.3 Deployment results

When the deployment process has completed the Verification report opens. This report will give a clear indication of the status of your conversion project. It shows:

Figure 4-27 shows part of the Verification report for our conversion example.

Figure 4-27: The Verification report

Additional information about the conversion may be found in the Deploy_your_file_name.log, or by choosing other reports for this conversion from the Verification report screen, or by selecting Tools ->Migration reports on the MTK menu bar. You can navigate to the reports for the current or previous migrations using the contents listing in the left frame of the browser window.

The name and information for each report is as follows:


 < Day Day Up > 

Категории