Transferring a UDX from one Db2 instance to another

After you create and test the UDXs of a particular project, you can package them and export the package to another user. That user can then import and deploy the package. In this way, you can transfer UDXs to different Db2® instances.

Creating a UDX package

To create a UDX package, issue the IDA CREATEPACKAGE command. Specify the name of the project that is to be packaged. This function:
  1. Copies all the files in the release subdirectory of the specified project into a compressed file in the Db2 instance. This file has the same name as the package. If a file with this name already exists in the project directory, it is overwritten.
  2. Retrieves, from the current database, the information needed to create the registration file for the package. The registration file contains the DDL for all the registered UDXs of the specified project, and is used during deployment to register the UDXs on the new system.
  3. Adds the registration file to the compressed file.
  4. Downloads the compressed file, which is now called a package, to the system from which the IDA CREATEPACKAGE command was entered, and deletes the original package from the Db2 instance.
You can then transfer the package to the client system of another user.

Deploying a UDX package

After you receive a UDX package on your client system, issue the IDA DEPLOYPACKAGE command to deploy its contents to your Db2 instance.

This:
  1. Creates a new project directory on the target system (if it does not already exist).
  2. Uploads the package to the project directory of the target system.
  3. Extracts the contents of the package to the project directory. (Shared object files are stored in the release subdirectory of the project directory.)
  4. Deletes the uploaded package file.
  5. Uses the contents of the registration file to register all the UDXs in the package.
After the package has been deployed, its UDXs are ready to be used.