16.20 - SQLJ.ALTER_JAVA_PATH External Stored 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)

Definition

REPLACE PROCEDURE SQLJ.ALTER_JAVA_PATH
   (IN jarname VARCHAR(128) CHARACTER SET UNICODE,
    IN path VARCHAR(1000))
LANGUAGE C
NO SQL
PARAMETER STYLE SQL
EXTERNAL NAME 'SL!xsplib';

where:

jarname
SQL identifier that was passed to SQLJ.INSTALL_JAR, enclosed in apostrophes.
path
Other registered JAR or ZIP files to search when resolving class references for the archive file specified by jarname.
The path string is a series of classes and archive file identifiers of the following form:
   (referenced_class, resolution_archivename)
where:
  • referenced_class specifies an asterisk ( * ), meaning that the search path is to include all classes from the JAR or ZIP file identified by resolution_archivename.
  • resolution_archivename specifies the SQL identifier of an archive file that was registered with the same database as the JAR or ZIP file specified by jarname.
The path string can include space characters.
You can also specify an empty string for path to remove all classes and JAR or ZIP file identifiers from the search path for the classes in the JAR or ZIP file specified by jarname.

Example: SQLJ.ALTER_JAVA_PATH External Stored Procedure

The following statements specify that the search path of classes in the JAR file that has an SQL identifier called Accounts_JAR include classes from the JAR file that has an SQL identifier called Orders_JAR and classes from the JAR file that has an SQL identifier called Sales_JAR:

DATABASE JXSP;
CALL SQLJ.ALTER_JAVA_PATH('Accounts_JAR',
                          '(*,Orders_JAR) (*, Sales_JAR)');

You can use any of the following statements to remove all classes from the search path of classes in the JAR file that has an SQL identifier called Accounts_JAR:

CALL SQLJ.ALTER_JAVA_PATH('Accounts_JAR', '');
CALL SQLJ.ALTER_JAVA_PATH('Accounts_JAR', ' ');
CALL SQLJ.ALTER_JAVA_PATH('Accounts_JAR', '()');
CALL SQLJ.ALTER_JAVA_PATH('Accounts_JAR', '( )');
CALL SQLJ.ALTER_JAVA_PATH('Accounts_JAR', '() ');