Configuring the Teradata Database’s Environment
To call the Teradata PT from an XSP, configure the Teradata Database’s environment to register the necessary Teradata PT libraries. Depending on the operating system that the Teradata Database is running on, this may involve relocating specific Teradata PT libraries as well as setting runtime environment variables using the Cufconfig utility. For more information on using the Cufconfig utility, see Utilities.
Configuring the Teradata Database on Linux
Before using the CREATE PROCEDURE SQL statement to create a Teradata PT XSP, the following libraries from the Teradata PT package must be moved into the /usr/tdbms/lib directory:
If the default Teradata PT installation is used, these libraries can be found in the
After using the CREATE PROCEDURE SQL statement to create a Teradata PT XSP, configure the Teradata Database’s environment to allow the XSP to run. If it is possible to restart the Teradata Database, use the Cufconfig utility to set the CLIEnvFile variable to register a file with the following environment variable settings:
/* Default location of opermsgs.cat */
/* Default location of the driver libraries */
Add the location of the dynamic library containing the user created XSP to the LD_LIBRARY_PATH in the environment variable settings file. After setting the CLIEnvFile variable using the Cufconfig utility, the Teradata Database must be restarted to allow the database to register the new runtime environment settings.
If it is not possible to restart the Teradata Database, move the following Teradata PT libraries into the /usr/tdbms/lib directory:
If the default Teradata PT installation is used, these libraries can be found in the following directory:
Move the opermsgs.cat message catalog into the / (root) directory. If the default Teradata PT installation is used, find this catalog in the following directory:
Lastly, place the dynamic library containing the user created XSP in the /usr/tdbms/lib directory.