Macros | Privileges Needed for Database Administration | Teradata Vantage - Macros - 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
2023-07-11
dita:mapPath
sgu1628111251052.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
dvv1472243528022
lifecycle
latest
Product Category
Teradata Vantageā„¢
To... the user must have the...
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 it exists, not the user who created it
  • 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.

execute 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
Once a macro has been replaced, its immediate owner is the database in which it exists, not the user who replaced it. The immediately owning database must have all the appropriate privileges for executing the macro, including WITH GRANT OPTION.
delete a macro DROP MACRO privilege on the specified macro