Protected Mode Execution | C/C++ UDMs | Teradata Vantage - Protected Mode Execution - 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™

Protected Mode Execution Option

The ALTER METHOD statement provides an execution option that controls whether Vantage invokes the method directly or runs the method indirectly as a separate process.

The option applies to methods that were created without specifying the EXTERNAL SECURITY clause in the CREATE METHOD or REPLACE METHOD statement. Methods that specify the EXTERNAL SECURITY clause are executed using separate secure server processes.

IF ALTER METHOD specifies … THEN Vantage
EXECUTE PROTECTED runs the method indirectly as a separate process.

If the method fails during execution, the transaction fails.

EXECUTE NOT PROTECTED invokes the method directly.
If the ALTER METHOD statement specifies EXECUTE NOT PROTECTED, and the UDM fails during execution, the database software will probably restart.

Only an administrator, or someone with sufficient privileges, can use the ALTER METHOD statement.

Choosing the Correct Execution Option

Use the following table to choose the correct execution option for UDMs.

IF … THEN use …
you are in the development phase and are debugging a UDM EXECUTE PROTECTED.
the UDM opens a file or uses another operating system resource that requires tracking by the operating system EXECUTE PROTECTED.

Running such a UDM in nonprotected mode could interfere with the proper Teradata system operation.

the UDM does not use any operating system resources EXECUTE NOT PROTECTED.

Running a UDM in nonprotected mode speeds up processing considerably.

Use this option only after thoroughly debugging the UDM and making sure it produces the correct output.

Related Information

FOR more information on … SEE …
protected mode process and server administration Protected Mode Process and Server Administration for C/C++ External Routines.
ALTER METHOD and the EXECUTE PROTECTED option Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.
the privileges associated with UDTs Teradata Vantage™ - Database Administration, B035-1093.