You can use the idsdbmaint command to
convert the table space type that is associated with a directory server
database.
You must understand the advantages and disadvantages of System
Managed Space (SMS) and Database Managed Space (DMS), before you choose
to convert the table space type of a database. For more information,
see the Comparison of SMS, DMS and automatic storage table
spaces section in the IBM DB2 documentation at http://pic.dhe.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.doc/welcome.html.
The conversion can be from System Managed Space (SMS) to Database
Managed Space (DMS) or from DMS to SMS. When you convert the table
space type with the idsdbmaint command, the type
of the LDAPSPACE and USERSPACE1 table
spaces are converted. You must provide the -t ts_type parameter
to the command to convert the table space type from SMS to DMS or
from DMS to SMS.
The valid values for the table space type are SMS and DMS. The idsdbmaint command
calculates the database size and determines the disk space that is
required to manage the user data.
If the required disk space is not available, then the tool generates
an appropriate error message and exits.
When you specify a container for the LDAPSPACE or USERSPACE1 table
space with the -l or -u parameter
of the idsdbmaint command, you must meet the following
requirements:
- The directory that you provide for the container must exist.
- The DB2 instance owner and the primary group of the instance owner
must contain read, write, and execute permission on the directory
that is assigned as the container.
The idsdbmaint command takes the following actions
when it converts the table space type from SMS to DMS:
- Exports all the data from the LDAPSPACE and USERSPACE1 table
spaces along with the table definitions.
- Drops the table space of type SMS.
- Creates the table space of type DMS.
- Uses a FILE container for a REGULAR table space that can run auto-resize.
- Reconstructs all the tables within the table space and loads all
the data into the database.
The idsdbmaint command takes the following actions
when it converts the table space type from DMS to SMS:
- Exports all the data from the LDAPSPACE and USERSPACE1 table
spaces along with the table definitions.
- Drops the table space of type DMS.
- Creates the table space of type SMS.
- Uses a PATH (directory) container for a REGULAR table space that
can run auto-resize.
- Reconstructs all the tables within the table space and loads all
the data into the database.
Examples
Note: You must assign the read and
write access on the directory path that is specified with the -k parameter
for the DB2® instance owner.
- Example 1:
- To convert the table space type from SMS to DMS and to export
data to a directory, run the following command:
idsdbmaint -I instance_name -t DMS -k \
instance_location/instance_name/mydata
- Example 2:
- Run the idsdbmaint command with the parameters
to achieve the following objectives:
- To convert table space type from SMS to DMS.
- To specify a file container for the LDAPSPACE table
space.
- To export data to a directory.
idsdbmaint –I instance_name -t DMS \
-l /disk/32K_ldapspace_container/ldapspace -k /disk/mydata
- Example 3:
- Run the idsdbmaint command with the parameters
to achieve the following objectives:
- To convert table space type from SMS to DMS.
- To specify a file container for the USERSPACE1 table
space.
- To export data to a directory.
idsdbmaint –I instance_name -t DMS \
-u /disk/container/userspace1 -k /disk/mydata
- Example 4:
- Run the idsdbmaint command with the parameters
to achieve the following objectives:
- To convert table space type from SMS to DMS.
- To specify file containers for the LDAPSPACE and USERSPACE1 table
spaces.
- To export data to a directory.
idsdbmaint –I instance_name -t DMS \
-l /disk/32K_ldapspace_container/ldapspace
-u /disk/container/userspace1 -k /disk/mydata
- Example 5:
- Run the idsdbmaint command with the parameters
to achieve the following objectives:
- To convert table space type from DMS to SMS.
- To export data to a directory.
idsdbmaint -I instance_name -t SMS \
-k instance_location/instance_name/mydata
- Example 6:
- Run the idsdbmaint command with the parameters
to achieve the following objectives:
- To convert table space type from DMS to SMS.
- To specify a path container for the LDAPSPACE table
space.
- To export data to a directory.
idsdbmaint –I instance_name -t SMS \
-l /disk/32K_ldapspace_container/ -k /disk/mydata
- Example 7:
- Run the idsdbmaint command with the parameters
to achieve the following objectives:
- To convert table space type from DMS to SMS.
- To specify a path container for the USERSPACE1 table
space.
- To export data to a directory.
idsdbmaint –I instance_name -t SMS \
-u /disk/userspace1_container/ –k /disk/mydata
- Example 8:
- Run the idsdbmaint command with the parameters
to achieve the following objectives:
- To convert table space type from DMS to SMS.
- To specify path containers for the LDAPSPACE and USERSPACE1 table
spaces.
- To export data to a directory.
idsdbmaint –I instance_name -t SMS \
-l /disk/32K_ldapspace_container/ \
-u /disk/userspace1_container/ -k /disk/mydata