• Data Warehouse Service

dws
  1. Help Center
  2. Data Warehouse Service
  3. Developer Guide
  4. SQL Reference
  5. SQL Syntax
  6. ALTER APP WORKLOAD GROUP MAPPING

ALTER APP WORKLOAD GROUP MAPPING

Function

ALTER APP WORKLOAD GROUP MAPPING modifies a workload group associated with the application mapping. The current database user must have the ALTER permission in order to modify the application mapping.

Precautions

  

None.

Syntax

ALTER APP WORKLOAD GROUP MAPPING app_name
    WITH ( WORKLOAD_GPNAME = wg_name );

Parameter Description

  • app_name

    Specifies the name of application mapping. This name must be unique in the database.

    Value range: A string compliant with the identifier naming rules.

  • wg_name

    Specifies the name of the workload group.

    Value range: A string indicating an existing workload group.

Examples

-- Create a resource pool, and specify "High" Timeshare Workload under "DefaultClass" as its control group:
CREATE RESOURCE POOL pool1 WITH (CONTROL_GROUP="High");

-- Create a workload group and associate it with an existing resource pool:
CREATE WORKLOAD GROUP wg_hr1 USING RESOURCE POOL pool1;

-- Create default application mapping and associate it with the default workload group:
CREATE APP WORKLOAD GROUP MAPPING app_wg_map1;

-- Change the name of a workload group associated with the application mapping:
ALTER APP WORKLOAD GROUP MAPPING app_wg_map1 WITH(WORKLOAD_GPNAME=wg_hr1);

-- Delete the application mapping:
DROP APP WORKLOAD GROUP MAPPING app_wg_map1;

-- Delete the workload group:
DROP WORKLOAD GROUP wg_hr1;

-- Delete the resource pool:
DROP RESOURCE POOL pool1;