Creating Users Using SQL | Teradata VantageCloud Lake - Creating Users Using SQL - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
To create a user for VantageCloud Lake, do the following tasks:
  1. Determine what to provision for profiles, roles and users.

    See User Privileges for commonly-assigned privileges for users.

  2. Log on to VantageCloud Lake.
  3. Go to Editor.
  4. Connect as the database administrator SYSDBA.
  5. Create a profile to be used by the user, if one has not been created. Best practice is to start the profile name with P_ to make it easily identifiable as a profile.
    CREATE PROFILE P_profile_name  AS profile ;
    The following is an example with profile attributes shown in bold:
    CREATE PROFILE "P_AdminProfile" AS
    COMPUTE GROUP = compute_group
    SPOOL=spool_space,
    TEMPORARY=NULL,
    ACCOUNT=('account__strA',' account_strB'),
    DEFAULT DATABASE="database_name",
    PASSWORD =
    (EXPIRE=90,MINCHAR=NULL,MAXCHAR=NULL,MAXLOGONATTEMPTS=NULL,
    LOCKEDUSEREXPIRE=NULL,REUSE=NULL,DIGITS=NULL,
    RESTRICTWORDS=NULL,SPECCHAR=NULL);

    See CREATE PROFILE for additional information.

  6. Create a role to be used by the user, if one has not been created, as follows:
    1. Create the role. Best practice is to start the role name with R_ to make it easily identifiable as a role.
      CREATE ROLE R_role_name;
      
    2. Assign privileges to the role.
      GRANT privilege_list
      ON database_object_name
      TO R_role_name;
    3. Include privileges on Sys_Calendar to the role.
       GRANT SELECT, EXECUTE ON Sys_Calendar TO R_role_name;

    See CREATE ROLE for additional information.

  7. Create the user, and include their additional privileges and the default role.
    Include the compute group if the compute profile does not include the compute group.
    CREATE USER "user_name" FROM "SYSDBA"
    AS PERM = number_of_bytes,
    PASSWORD = "temp_password",
    STARTUP = '',
    DEFAULT DATABASE = "database_name",
    PROFILE="P_profile_name”,
    [ COMPUTE GROUP = "compute_group" ] ;
    Important: If you create users outside of the VantageCloud Lake platform, then you must grant those users the following privileges to allow them to access the platform:
    GRANT ALL ON user_name to user_name WITH GRANT OPTION
    GRANT LOGON ON ALL TO user_name WITH NULL PASSWORD

    See CREATE USER for additional information.

  8. Grant the role to the user.
    GRANT R_role_name TO user_name;
    Grant user access to the compute group if the role privileges did not include access.