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:
- 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.
- 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.
- Adds the registration file to the compressed file.
- 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.
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:
- Creates a new project directory on the target system (if it does not already exist).
- Uploads the package to the project directory of the target system.
- Extracts the contents of the package to the project directory. (Shared object files are stored in the release subdirectory of the project directory.)
- Deletes the uploaded package file.
- Uses the contents of the registration file to register all the UDXs in the package.