Prerequisite
- Establish a connection to a target VantageCloud Lake system with your credentials and an authentication token. You typically receive this information from your system administrator.
- The DBA needs to grant users the necessary privileges to create UDFs and external stored procedures in VantageCloud Lake.
- GRANT CREATE FUNCTION, DROP FUNCTION ON database_name TO username;
- GRANT CREATE PROCEDURE, DROP PROCEDURE ON database_name TO username
- GRANT LOGON ON ALL TO username WITH NULL PASSWORD;
- GRANT ALL ON SQLJ TO username;
- tdextroutine must be installed on your local system. See Installing the External Routine Installation Tool.
- XRMigrationTool must be installed on your local system. See Installing the External Routine Migration Tool.
DBC user cannot be used for creating UDFs and external stored procedures. Create a different user for this purpose.
- Create the migration tool config.yml file and put the file in the input directory. See Migration Tool Config File.
- Place the SQL script containing the DDL statements for creating the UDFs and external stored procedures in the input directory. For example, a .bteq file.
- Place your source files in the source directory.
- Run XRMigrationTool:Running XRMigrationTool modifies the SQL script and creates a backup of .bteq and .mvsjcl files placed in the input directory.
XRMigrationTool -d input_directory -o output_directory -s UDF_source_directory
XRMigrationTool creates a directory named SQLToPayload in the output directory and places the generated manifest files there. - After XRMigrationTool completes converting the SQL script, run the updated SQL script to create the UDFs and external stored procedures in VantageCloud Lake.For details about all the options of XRMigrationTool, see External Routine Migration Tool. For an example of using XRMigrationTool, see Example: Migrating Existing UDF SQL Scripts to VantageCloud Lake.