GIVE Statement | SQL Data Control Language | Teradata Vantage - GIVE - Advanced SQL Engine - Teradata Database

SQL Data Control Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
lmb1556233084626.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1149
lifecycle
previous
Product Category
Teradata® Vantage™ NewSQLEngine

Transfers ownership of a database or user space to another user. Also transfers all databases and users owned by the transferred database or user.

Required Privileges

You must have the DROP DATABASE privilege on the given object, and the CREATE DATABASE privilege on the recipient.

The GIVE statement does not revoke any explicit privileges on the given database or user. No explicit privileges on the given database or user are granted to the new ownership hierarchy as a result of the GIVE statement, nor does the database or user being given receive any explicit privileges.

The recipient of a GIVE statement cannot be owned by the given object; if A owns B, A cannot be given to B.

Syntax

GIVE { database_name | user_name } TO recipient_name [;]

Syntax Elements

database_name
user_name
Name of the database or user whose ownership is being transferred.
TO
Introduction to the name of the recipient.
recipient_name
Name of the new immediate owner for the transferred database or user.
For more information about using Teradata Secure Zones with GIVE, see Using GIVE with Teradata Secure Zones.
See “Implementing Teradata Secure Zones” in Teradata Vantage™ - Advanced SQL Engine Security Administration, B035-1100.

Example of Transferring the Ownership of a Database

The following statement transfers ownership of the finance database from user administrator to user Chin.

     GIVE Finance TO Chin;

ANSI Compliance

This statement is a Teradata extension to the ANSI SQL:2011 standard.

Other SQL dialects support similar non-ANSI standard statements with names such as the following:

TRANSFER OWNERSHIP