Define Default Role for a User | Teradata Vantage - Defining the Default Role for a User - Analytics Database - Teradata Vantage

Database Administration

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
2024-10-04
dita:mapPath
pgf1628096104492.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
ujp1472240543947
lifecycle
latest
Product Category
Teradata Vantageā„¢

To ensure that role privileges are available to users at log on, you must define a default role for each user that is a member of one or more roles. If you do not specify a default role, the user must employ the SET ROLE statement to select the operant role. For example:

SET ROLE  role_name;

or

SET ROLE ALL;

You can also use the SET ROLE statement to change from one role to another role within a session.

To ensure that the user is operating with the appropriate role, specify the default role for a user as follows
  1. From the client program of your choice, log on to Vantage as user DBADMIN.
  2. Modify the user, for example:
    MODIFY USER "GenUser1" AS
    STARTUP = ''
    DEFAULT DATABASE = "Personnel_Views"
    NO BEFORE JOURNAL
    NO AFTER JOURNAL
    COLLATION = HOST
    DEFAULT CHARACTER SET LATIN
    DATEFORM=INTEGERDATE
    TIME ZONE=NULL
    DEFAULT ROLE="Role_GenUser_2";