Defining your own user-managed data sets
You can use Db2 storage groups to let Db2 manage the VSAM data sets. However, you can also define your own user-managed data sets. With user-managed data sets, Db2 checks whether you have defined your data sets correctly.
About this task
You can let Db2 manage the data sets for your database objects, and Db2 always manages the data sets for partition-by-growth table spaces. However, you might choose to define your own user-managed VSAM data sets for several reasons, including:
- You have a large nonpartitioned table space on several data sets. If you manage your own data sets, you can better control the placement of individual data sets on the volumes (although you can keep a similar type of control by using single-volume Db2 storage groups).
- You want to prevent deleting a data set within a specified time period, by using the TO and FOR options of the Access Method Services DEFINE and ALTER commands. You can create and manage the data set yourself, or you can create the data set with Db2 and use the ALTER command of Access Method Services to change the TO and FOR options.
- You are concerned about recovering dropped table spaces. Your own data set is not automatically deleted when a table space is dropped, making it easier to reclaim the data.
If you define your own user-managed data sets, you must define a data set for each of the following items:
- Table space partition
- LOB table space
- Segmented (non-UTS) or simple table space (deprecated)
- Index partition
- Non-partitioned index (NPI)
You must define the data sets before you can issue the CREATE TABLESPACE, CREATE INDEX, or ALTER TABLE ADD PARTITION statements.
When you drop indexes or table spaces that you defined user-managed data sets for, you must also delete the data sets unless you want to reuse them. To reuse a data set, first commit, and then create a new table space or index with the same name. When Db2 uses the new object, it overwrites the old information with new information, which destroys the old data.
Procedure
To define your own user-managed VSAM data sets, complete the following steps:
What to do next
- Before the current volume runs out of space, you must extend the data set. See Extending user-managed data sets.
- When you drop indexes or table spaces that you defined your data sets for, you must also delete the data sets. See Deleting user-managed data sets.