C/C++ External Stored Procedures Overview | Teradata Vantage - 17.10 - C/C++ External Stored Procedures - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1147-171K
Language
English (United States)

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.