Purpose
Turns encryption on or off for an SQL statement or a block of SQL statements.
Invocation
Executable.
Embedded SQL only.
Syntax
SET ENCRYPTION { ON | OFF }
ANSI Compliance
SET ENCRYPTION is a Teradata extension to the ANSI/ISO SQL:2011 standard.
Authorization
None.
Setting Encryption On and Off
SET ENCRYPTION ON enables data encryption for all embedded SQL statements across the network that are executed after it.
Encryption continues until SET ENCRYPTION OFF is executed.
Restrictions
- Because data encryption is supported by CLIv2 for workstation platforms, SET ENCRYPTION is supported in C and COBOL preprocessors for workstation platforms.
- SET ENCRYPTION is not supported for all mainframe preprocessors. All mainframe precompilers generate a compilation error message for the SET ENCRYPTION statement.
- When you run your applications with a DBS server that does not support date encryption, pp2 runtime sets the return code to 500 for any embedded SQL statement you have requested to be encrypted. Check SQLCODE and use PPRTEXT to display the error message.