C/C++ External Stored Procedures Overview | Teradata Vantage - C/C++ External Stored Procedures - Teradata Vantage - Analytics Database

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-03-30
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
qnu1472247494689
lifecycle
latest
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.