Case Study: Granting INSERT and DELETE on a View - 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
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
sgu1628111251052.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
dvv1472243528022
lifecycle
latest
Product Category
Teradata Vantage™

Assume that the view Bobby.ViewB references the view Allen.ViewA, which in turn references Allen.BaseTable. When Bobby enters the following statement, the system checks that the privileges in the table following the statement exist.

GRANT INSERT, DELETE
ON Bobby.ViewB TO Chuck;

The following stages explain this process:

  1. Bobby has INSERT WITH GRANT OPTION on Bobby.ViewB or on himself.
  2. Bobby has DELETE WITH GRANT OPTION on Bobby.ViewB or on himself.

Unless revoked, Bobby has these privileges on Bobby.ViewB explicitly because they were granted to him automatically when he created the view.

Bobby also had these privileges on himself because they were granted explicitly when user Bobby was created.

Because Bobby owns Bobby.ViewB, he also has these privileges implicitly.

Implicit privileges cannot be revoked. For any other type of privilege, however, the system might not find one or more of the necessary privileges. The system returns an error message to the user submitting the GRANT statement and the statement is not performed.

The breakdown of privilege types for this example is as follows:

Privilege Category THIS individual … HAS this privilege … ON this object …
Automatic Bobby INSERT WITH GRANT OPTION Bobby.ViewB
DELETE WITH GRANT OPTION
Allen INSERT WITH GRANT OPTION Allen.BaseTable
DELETE WITH GRANT OPTION
Explicit Bobby INSERT WITH GRANT OPTION Allen.ViewA
DELETE WITH GRANT OPTION