Granting Privileges on UDFs - Analytics Database - Teradata Vantage

SQL Data Control Language

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-03-29
dita:mapPath
sgu1628111251052.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
dvv1472243528022
lifecycle
latest
Product Category
Teradata Vantageā„¢

The rules for granting privileges on UDFs are identical to those for macros except for the CREATE FUNCTION and EXECUTE FUNCTION privileges, as documented in the following table, which explains which UDF-related privileges are granted explicitly or not:

Privilege Usage Notes
ALTER FUNCTION
  • Not granted automatically to the creator when it creates a database or user.
  • Not granted automatically to a database or user when it creates a database or user.
  • Held implicitly only by user DBC.
  • Cannot be granted on a UDF.
CREATE FUNCTION
  • Not granted automatically to the creator when it creates a database or user.
  • Held implicitly only by user DBC.
DROP FUNCTION
  • Granted automatically WITH GRANT OPTION to the creator of a user, database, function, or function mapping.
  • Granted automatically without grant option to a created database or user on itself.
  • Held implicitly on a database or user for an owner of that database or user.
EXECUTE FUNCTION
  • Granted automatically WITH GRANT OPTION to the creator of a function or function mapping.
  • Not granted automatically to the creator when it creates database or user.
  • Held implicitly only by user DBC.

All newly created external UDFs are performed in protected mode by default. This is also true for all newly created methods and external procedures. UDFs do not run in modes.

Restrict the ALTER FUNCTION privilege to DBAs. The privilege allows a user to perform the ALTER FUNCTION statement, which can change the run mode of a UDF (from PROTECTED to NOT PROTECTED, for example).

For more information see the information about ALTER FUNCTION, ALTER METHOD, and ALTER PROCEDURE in Teradata Vantageā„¢ - SQL Data Definition Language Syntax and Examples, B035-1144.