When building a SESAM/SQL database, users do not need to concern themselves about the volumes on which the user data and metadata for a database are created. There are, however, times when it makes sense for users to influence how the spaces are distributed across the various volumes, for instance in order to place next to each other sets of data which are often accessed together or to place the most frequently accessed data on those disks with the shortest access times. SESAM/SQL users have this flexibility as a result of being able to specify which disks are to be used for storing the spaces of a database.
To achieve this, users can create a “storage group” with the required name using the SQL statement CREATE STOGROUP.
A storage group is used to group together volumes of a particular BS2000 catalog ID under a single name. All volumes in a storage group should be of the same device type. The individual spaces of a single database can be distributed over a number of storage groups.
Once a storage group has been created with the CREATE STOGROUP statement, subsequent CREATE SPACE statements can be used to assign user spaces to this storage group. The user then uses the CREATE TABLE and CREATE INDEX statements to specify the space on which a given table or index is to be created.
The storage group for the catalog space of a database is specified in the utility statement CREATE CATALOG. The name of the catalog space is generated from the database name:
:catid:system-user-id.catalog.CATALOG
If no catalog ID is specified for CREATE STOGROUP, the catalog ID of the default pubset for the DBH session is used.
The ALTER STOGROUP statement allows you to change the definition for a storage group. This allows you to add new volumes or remove individual volumes from the storage group.
DROP STOGROUP deletes a storage group if it is no longer required by a space.