DB2 Version 10.1 for Linux, UNIX, and Windows

ALTER STOGROUP statement

The ALTER STOGROUP statement is used to alter the definition of a storage group.

Invocation

This statement can be embedded in an application program or issued interactively. It is an executable statement that can be dynamically prepared only if DYNAMICRULES run behavior is in effect for the package (SQLSTATE 42509).

Authorization

The privileges held by the authorization ID of the statement must include SYSCTRL or SYSADM authority.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-ALTER--STOGROUP--storagegroup-name--------------------------->

   .-------------------------------------------------------.   
   |       .-,--------------.                              |   
   V       V                |                          (1) |   
>----+-ADD---'storage-path'-+------------------------+-----+---><
     |      .-,--------------.                       |         
     |      V                |                       |         
     +-DROP---'storage-path'-+-----------------------+         
     +-OVERHEAD--number-of-milliseconds--------------+         
     +-DEVICE READ RATE--number-megabytes-per-second-+         
     +-DATA TAG--+-integer-constant-+----------------+         
     |           '-NONE-------------'                |         
     '-SET AS DEFAULT--------------------------------'         

Notes:
  1. Each clause can be specified only once.

Description

storagegroup-name
Identifies the storage group to be altered; storagegroup-name must identify a storage group that exists at the current server (SQLSTATE 42704). This is a one-part name.
ADD
Specifies that one or more new storage paths are to be added to the specified storage group.
storage-path
A string constant that specifies either an absolute path or the letter name of a drive (Windows operating systems only) on which containers for automatic storage table spaces are to be created. The string can include database partition expressions to specify database partition number information in the storage path. For predictable performance, ensure the storage paths added to a storage group have similar media characteristics.

The maximum length of a storage path is 175 characters (SQLSTATE 54036).

A storage path being added must be valid according to the naming rules for paths, and must be accessible (SQLSTATE 57019). Similarly, in a partitioned database environment, the storage path must exist and be accessible on every database partition (SQLSTATE 57019).
DROP
Specifies that one or more storage paths are to be removed from the given storage group. If table spaces are actively using a storage path being dropped, then the state of the storage path is changed from "In Use" to "Drop Pending" and future use of the storage path will be prevented.

The DROP storage-path clause is not supported in a DB2® pureScale® environment (SQLSTATE 56038).

storage-path
A string constant that specifies either an absolute path or the letter name of a drive (Windows operating systems only). The string can include database partition expressions to specify database partition number information in the storage path.

A storage path being dropped must currently exist in the storage group (SQLSTATE 57019) and cannot already be in the "Drop Pending" state (SQLSTATE 55073).

OVERHEAD number-of-milliseconds
Specifies the I/O controller usage and disk seek and latency time. This value is used to determine the cost of I/O during query optimization. The value of number-of-milliseconds is any numeric literal (integer, decimal, or floating point). If this value is not the same for all storage paths, set the value to a numeric literal which represents the average for all storage paths that belong to the storage group.
DEVICE READ RATE number-megabytes-per-second
Represents the device specification for the read transfer rate in megabytes per second. This value is used to determine the cost of I/O during query optimization. The value of number-megabytes-per-second is any numeric literal (integer, decimal, or floating point). If this value is not the same for all storage paths, set the value to a numeric literal which represents the average for all storage paths that belong to the storage group.
DATA TAG integer-constant or DATA TAG NONE
Specifies a tag for the data in a given storage group. This value can be used as part of a WLM configuration in a work class definition or referenced within a threshold definition. For more information, see the CREATE WORK CLASS SET, ALTER WORK CLASS SET, CREATE THRESHOLD, and ALTER THRESHOLD statements.
integer-constant
Valid values for integer-constant are integers from 1 to 9.
NONE
If NONE is specified, there is no data tag.
SET AS DEFAULT
Specifies that the storage group being altered is designated as the default storage group. There can be only one storage group designated as the default storage group. There is no affect to the existing table spaces using that storage group. The designated default storage group is used by automatic storage table spaces when no storage group is specified at table space creation and a database managed table space is converted to automatic storage managed during redirected restore.

Rules

Notes

Examples