Session Mode Impact on DCL Requests in Procedures | Teradata Vantage - Session Mode Impact on DCL Statements in SQL Procedures - Teradata Vantage - Analytics Database

SQL Data Definition Language Detailed Topics

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2024-12-13
dita:mapPath
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
jbg1472252759029
lifecycle
latest
Product Category
Teradata Vantage™
The runtime behavior of DCL statements specified in SQL procedures depends on the session mode of the Teradata session in which the procedure is created.
  • A DCL statement specified within an explicit (user-defined) transaction in an SQL procedure in Teradata session mode must be the last statement in that transaction. Otherwise, the system raises a runtime exception.
  • When performing a procedure in ANSI session mode, each DCL statement specified in the procedure body must be followed by a COMMIT WORK request. Otherwise, the database aborts the request and raises a run time exception.