Protected Mode Execution Option | Teradata Vantage - Protected Mode Execution Option - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
qwr1571437338192.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™

The ALTER FUNCTION statement provides an option that controls whether Teradata Database invokes the function directly or runs the function indirectly as a separate process.

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

IF ALTER FUNCTION specifies … THEN Teradata Database …
EXECUTE PROTECTED runs the function indirectly as a separate process.

If the function fails during execution, the transaction fails.

EXECUTE NOT PROTECTED invokes the function directly.

If you subsequently use REPLACE FUNCTION to replace the function, the execution mode reverts back to protected mode.

If the ALTER FUNCTION statement specifies EXECUTE NOT PROTECTED, and the function fails during execution, Teradata Database software will probably restart.

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