GIVE Statement | SQL Data Control Language | Teradata Vantage - 17.05 - GIVE - Teradata Database

Teradata Vantage™ - SQL Data Control Language

prodname
Advanced SQL Engine
Teradata Database
vrm_release
17.00
17.05
created_date
June 2020
category
Programming Reference
featnum
B035-1149-170K

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