Stored Procedures | SQL Fundamentals | VantageCloud Lake - External Stored Procedures - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530

External stored procedures are written in the C, C++, or Java programming language, installed on the database, and run like stored procedures.

Usage

Here is a synopsis of the steps you take to develop, compile, install, and use external stored procedures:
  1. Write, test, and debug the C, C++, or Java code for the procedure.
  2. If you are using Java, place the class or classes for the external stored procedure in an archive file (JAR or ZIP) and call the SQLJ.INSTALL_JAR external stored procedure to register the archive file with the database.
  3. Use CREATE PROCEDURE or REPLACE PROCEDURE for external stored procedures to create a database object for the external stored procedure. See CREATE PROCEDURE and REPLACE PROCEDURE (External Form).
  4. Use GRANT to grant privileges to users who are authorized to use the external stored procedure.
  5. Invoke the procedure using the CALL statement.