16.20 - Procedure - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Release Date
April 2020
Content Type
Programming Reference
Publication ID
B035-1147-162K
Language
English (United States)
  1. Copy the archive or class for the module that you will use on demand to a well known and uniform directory on each node.

    For example, suppose you copy the archive file myclasses.jar to /java/MyClasses on each node of a Linux system.

  2. Configure the JVM class path using the cufconfig utility to include the archive or class.
    1. Create a text file that contains the following text:
      -cp <path1>

      where <path1> is the path to the archive or class.

      For example, you can create a text file called jvmenv.txt in the /tmp directory that contains the following:

      -cp /java/MyClasses/myclasses.jar
    2. Set appropriate privileges for the text file:
      chmod 666 jvmenv.txt
    3. Create another text file that contains the following text:
      JavaEnvFile:<path2>

      where <path2> is the path to and name of the text file you created previously.

      For example, you can create a text file called cuf.txt that contains the following:

      JavaEnvFile:/tmp/jvmenv.txt
    4. Use the -f option of the cufconfig utility, specifying the name of the file you created in the preceding step. For example:
      cufconfig -f cuf.txt
  3. Use the -o option of the cufconfig utility to verify your changes.
    cufconfig -o
  4. Restart the database using the following command for the changes to take effect:
    tpareset -y

For details on cufconfig and tpareset, see Teradata Vantage™ - Database Utilities , B035-1102 .