16.20 - user_name - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-24
dita:mapPath
wkf1512081455740.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval

Name of the user being created.

For information about naming database objects, see Teradata Vantage™ SQL Fundamentals, B035-1141.

database_name
Name of the immediate owner database.
The default is the current creator of this user.
user_name
Name of the immediate owner user.
The default is the current creator of this user.

Example: Creating an Administrative User

Assume that a Teradata system has just been installed. The DBA has logged on as user DBC and has submitted a CREATE USER request to create the administrative user called SYSADMIN. As user SYSADMIN, the DBA submits CREATE DATABASE requests to create such required databases as finance, executive, engineering, manufacturing, and marketing.

Still logged on as user SYSADMIN , the DBA then adds a new user to the finance database using a CREATE USER request, as follows:

     CREATE USER marks
     FROM finance AS
     PERMANENT = 1000000,
     PASSWORD = finan1,
     SPOOL = 1200000,
     FALLBACK PROTECTION,
     DUAL AFTER JOURNAL,
     DEFAULT JOURNAL TABLE = finance.journals,
     DEFAULT DATABASE = finance,
     STARTUP = 'EXEC setpf;'
     ACCOUNT = '$mfinance','$hfinance';

After user marks is created, the DBA submits the following request to grant finance privileges WITH GRANT OPTION to marks .

     GRANT ALL ON finance 
     TO marks 
     WITH GRANT OPTION;