installsp Stored Procedure - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
rin1593638965306.ditamap
dita:ditavalPath
rin1593638965306.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™

Use the installsp stored procedure to distribute a package to all nodes of an MPP system.

Syntax

REPLACE PROCEDURE installsp
   (IN  name      VARCHAR(250) CHARACTER SET LATIN,
    IN  version   VARCHAR(250) CHARACTER SET LATIN,
    IN  filename  VARCHAR(250) CHARACTER SET LATIN,
    IN  path      VARCHAR(250) CHARACTER SET LATIN,
    IN  source    BLOB(200000),
    IN  operation VARCHAR(250) CHARACTER SET LATIN,
    OUT pform     VARCHAR(20)  CHARACTER SET LATIN,
    OUT cfgpath   VARCHAR(200) CHARACTER SET LATIN
   )

Syntax Elements

name
Name for the package.
The name that you use here to distribute the package is the same name that you specify later in the CREATE/REPLACE statement that you use to install the package.
version
Version you assign to the package.
For example, when you initially distribute a package, you might want to assign a version of '1.0'. When you update the package and redistribute it, you might want to assign a version of '2.0' or '1.1', depending on the changes to the package.
filename
Name to use for the server-side destination file.
The filename you specify here to distribute the package is the same filename that you specify later in the CREATE/REPLACE statement to install the package.
path
Optional path to use for the server-side destination file. The path you specify is relative to the following fixed path:
teradata_installation_path/Teradata/dem
where teradata_installation_path is the path of the Teradata installation. To get the value of teradata_installation_path, enter the following on the command line:
pdepath -I
The full path to the server-side destination file is formed by appending the relative path specified by path to the fixed path. If you omit the path argument, the full path is the same as the fixed path.
The installsp stored procedure returns the full path in the cfgpath OUT argument.
source
USING variable name preceded by a COLON character.
When you call installsp to distribute a package, the CALL statement that you use must specify a USING row descriptor. During processing, installsp replaces source with the contents of the package.
operation
the operation to perform on the package. The valid values are listed below. They are case insensitive.
  • 'CREATE', which specifies to copy the contents of the package specified by source to all nodes in the location specified by path with the name specified by filename. If the file already exists, do not overwrite it.
  • 'REPLACE', which specifies to copy the contents of the package specified by source to all nodes in the location specified by path with the name specified by filename. Overwrite the target file if it exists.
  • 'DROP', which specifies to delete the file named filename in the location specified by path.
  • 'CHECK', which specifies to not perform an operation on the package, but simply return the target platform type in the pform argument.
pform
Target platform type, for example LINUX64.
cfgpath
Full path on the server where the package has been distributed, formed by appending the relative path specified by path to the fixed path for the target platform.
Later, when you use an appropriate CREATE/REPLACE statement to install the package, use the return value of cfgpath in the EXTERNAL NAME clause to specify the full path to the server-side destination file.