Storage group is a named collection of repository path, where information can be saved. Storage groups are used to construct various classes of storage groups that are accessible inside the system of database. One can accredit a table spaces to the storage groups that out stands the information. And exclusive programmed stockpiling table spaces utilized the group of storage.
The table space can be connected with stand out storage groups, yet the group of storage can have various table space organisations. To oversee the objects inside the storage group then one can utilize and initiate the create storage group, alter storage group, renamed storage groups, comment and drop statements.At the point when characterizing the storage groups, ensuring that the aggregate group of storage paths as indicated by their aspects of administration attributes.
The normal aspects of administration attributes for information take after a maturing design where the latest information is regularly achieved and desired the rapid access time while more seasoned information is often less achieved to and can endure superior accessed frame time. The need of the information depends on:
Unpredictability of the information
Worthy access time
Application requirment
Recurrence of access
Creating a storage group
Description
Creating a storage group includes creating of path files and stored tables.
Syntax
The creating a storage group is as follows:
db2 create stogroup on ‘path’
Stogroup => Indicates the name of the storage group.
Path => Indicates the location where data is stored.
Examples
By viewing the below example,the concept of creating a stored groups can be easily understands.
[c]
db2 => create stogroup stg1 on '/data1'
DB20000I The SQL command completed successfully
[/c]
Here in the above example,the stogroup stg1 is stored on path '/data1'.
Altering a storage group
Description
Altering the storage group includes modifying the path files and stored tables.
Syntax
The altering a storage group is as follows:
db2 alter stogroup add ‘location’, ‘location’
Stogroup => Indicates the name of the storage group.
Location => Moving from one location to another location where data is stored.
Examples
By viewing the below example,the concept of altering a stored groups can be easily understands.
[c]
db2 => alter stogroup stg1 add ‘/path/data1’, ‘/path/data3’
DB20000I The SQL command completed successfully
[/c]
Here in the above example,the stogroup stg1 is moved from one location to another location i.e., from /path/data1 to path/data3.
Dropping a storage group
Description
Dropping a storage group includes dropping the path files and stored tables.
Syntax
The dropping a storage group is as follows:
db2 drop stogorup
Drop => Dropping the existing storage group.
Stogorup => Actual data stored in the stored group.
Examples
By viewing the below example,the concept of dropping a stored groups can be easily understands.
[c]
db2 => db2 drop stogroup stg1
DB20000I The SQL command completed successfully
[/c]
Here in the above example,the stogroup stg1 has be drop from the stored groups.
Renaming a storage group
Description
Renaming a storage group will rename from old storage_name to new storage_name
Syntax
The syntax for renaming a storage group is as follows:
db2 rename stogroup to
Stogroup => Indicates the name of the storage group.
Stogorup => Actual data stored in the stored group.
Examples
By viewing the below example,the concept of renaming a stored groups can be easily understands.
[c]
db2 => rename stogroup sg1 to sgroup2
DB20000I The SQL command completed successfully [/c]
Here in the above example,the stogroup stg1 has be renamed to sgroup2.
Summary
Points
DB2 Storage groups - Is a named collection of repository.
Creating a storage group - Creating path files and stored tables.
Altering a storage group - Modifing the existing storage groups.
Dropping a storage group - Dropping the existing storage groups.
Renaming a storage group - Changing the name of the storage groups.