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
- From a client application, such as Teradata Studio™, log on as user DBC.
- 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
- Log on as user DBC.
- 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;
- Grant COMPUTE PROFILE privilege to the compute cluster DBA:
GRANT CREATE COMPUTE PROFILE TO ComputeDBA;
Example: Create a Compute Group
- Log on as the compute cluster administrator, for example, ComputeDBA.
- Create a compute group:
CREATE COMPUTE GROUP Shipping USING QUERY_STRATEGY('STANDARD');
Example: Create a Compute Profile in a Compute Group
- Log on as the compute cluster administrator, for example, ComputeDBA.
- 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
- Log on as the VantageCloud Lake administrator, for example, ComputeDBA.
- 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;
- If the user does not exist, create it with a compute group: