16.20 - File System Cleanup - 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)

Each time you create, replace, or drop a C or C++ external routine, Teradata Database creates a new dynamic linked library (DLL or SO) associated with the database in which the external routine resides and distributes it to all nodes.

Under normal circumstances, the database deletes the older version of the library, if one exists, provided that the older version of the library is not being used at the time (for example, no running transactions are executing any of the external routines in the older version of the library).

If your environment is one where you frequently create or replace external routines, and seldom execute any of the external routines, you may inadvertently accumulate libraries that the database cannot delete.

If you accumulate enough libraries to fill up the file system, an attempt to create or replace an external routine will likely result in an error message that Teradata Database is unable to create a new DLL for the UDF/external stored procedure/UDM.

If you get this message, check the subdirectories where the database saves the libraries:

<tdconfig>/udflib

where <tdconfig> is the configuration directory of the Teradata software distribution. To identify this directory, enter the following on the command line:

pdepath -c

Typically, each subdirectory, with a name such as tdbs_1053, contains one dynamic linked library.

The best practice to clean up old libraries is to restart the database. Deleting libraries manually is not recommended and may cause problems.