Setting Up Compute Cluster Administrative Users - SQL Examples - 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

The following examples show granting COMPUTE GROUP and COMPUTE PROFILE privileges to a compute cluster administrator, the compute cluster administrator creating a compute profile and compute group, and giving a user access to the group. Perform the examples in the order shown.

Example: Creating the Compute Cluster Administrator

  1. From a client application, such as Teradata Studio™, log on as user DBC.
  2. Create the compute cluster administrator user:
    CREATE USER ComputeDBA FROM SYSDBA
    AS PERM = 2e5 * (hashamp() + 1)
    PASSWORD = user_password
    SPOOL = 11800E9
    STARTUP = ''
    NO BEFORE JOURNAL
    NO AFTER JOURNAL;

Example: Grant COMPUTE PROFILE and COMPUTE GROUP Privileges to an Administrator

  1. Log on as user DBC.
  2. Grant the compute cluster administrator COMPUTE GROUP privilege and allow the compute cluster DBA the ability to grant COMPUTE GROUP to other users using the WITH GRANT OPTION clause:
    GRANT CREATE COMPUTE GROUP TO ComputeDBA WITH GRANT OPTION;
  3. Grant COMPUTE PROFILE privilege to the compute cluster DBA:
    GRANT CREATE COMPUTE PROFILE TO ComputeDBA;

Example: Create a Compute Group

  1. Log on as the compute cluster administrator, for example, ComputeDBA.
  2. Create a compute group:
    CREATE COMPUTE GROUP Shipping
    USING 
        QUERY_STRATEGY('STANDARD');

Example: Create a Compute Profile in a Compute Group

  1. Log on as the compute cluster administrator, for example, ComputeDBA.
  2. Create a compute profile in the compute group:
    CREATE COMPUTE PROFILE ShippingCluster01 IN Shipping, INSTANCE = TD_COMPUTE_MEDIUM
    USING
    MIN_COMPUTE_COUNT(1)
    MAX_COMPUTE_COUNT(5)
    INITIALLY_SUSPENDED('FALSE');

Example: Give a User Access to a Compute Group

  1. Log on as the VantageCloud Lake administrator, for example, ComputeDBA.
  2. Give a user access to a compute group:
    The compute group must exist before a user can be configured to access it.
    • If the user does not exist, create it with a compute group:
      CREATE USER shippingUser AS password=shippingUser, PERM=1e8, COMPUTE GROUP=shipping;
    • If the user exists, you can modify the user compute group:
      MODIFY USER shippingUser AS COMPUTE GROUP=shippingAnalytics;