Macros | Privileges Needed for Database Administration | VantageCloud Lake - Macros - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530
Action Privilege Required
Create a macro CREATE MACRO privilege on the database or user in which the macro is to be created. The creator automatically gets the DROP MACRO and EXECUTE privileges WITH GRANT OPTION. The immediate owner of the macro:
  • Is the database in which the macro exists, not the user who created the macro
  • Determines the macro access privileges, not the macro
  • Must have all the appropriate privileges for executing the macro, including WITH GRANT OPTION
Drop a macro DROP MACRO privilege on the macro.
Rename a macro DROP MACRO privilege on the macro.

In addition, the user renaming a macro must have the privileges for all statements the macro performs.

Run a macro EXECUTE privilege on the macro.

In addition, the immediate owner of the macro (the database in which the macro resides) must have the necessary privileges on objects named in the request set for statements that are contained in the macro.

Replace a macro
  • Privileges for all statements the macro performs
  • Privileges that depend on whether the macro being replaced already exists.
    • If the macro already exists, the DROP MACRO privilege on the macro or its containing database or user.
    • If the macro does not already exist, the CREATE MACRO privilege on the macro or its containing database or user
After a macro has been replaced, its immediate owner is the database in which the macro exists, not the user who replaced the macro. The immediately owning database must have all the appropriate privileges for running the macro, including WITH GRANT OPTION.
Delete a macro DROP MACRO privilege on the specified macro