C/C++ External Stored Procedures Overview | Teradata Vantage - C/C++ External Stored Procedures - 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ā„¢

In addition to stored procedures, which use SQL control and condition-handling statements, input and output parameters, and local variables to provide applications with a server-based, precompiled procedural interface, Vantage supports external stored procedures.

You can write your own external stored procedures in the C or C++ programming language, install them on the database, and then use the SQL CALL statement to call them like other stored procedures. An external stored procedure runs on a PE.

C and C++ external stored procedures can use Call-Level Interface Version 2 (CLIv2, also referred to as CLI) to directly execute SQL statements. C and C++ external procedures that do not use CLIv2 can make a C library call to invoke a stored procedure and execute SQL statements indirectly.

This section uses the term stored procedure to refer to a stored procedure that is written using SQL statements and the term external stored procedure to refer to a stored procedure that is written using C or C++.

For more information on writing external stored procedures in the Java programming language, see Java External Stored Procedures.