As an alternative to setting table spaces using the system
administration client, you can program your application to set table
spaces using the Java™ or C++
APIs.
DB2 only: To put index and
LOB attributes into table spaces that differ from the table's
table space, the table's table space must be database managed
rather than system managed. Because IBM® Content
Manager uses a system managed table
space (ICMLFQ32) by default, you cannot set an index or LOB attribute's
table space when the table's table space is not set. LOB attributes
must be put into a large DB2® table space.
Oracle only: Oracle
supports multiple index and LOB table spaces.
To retrieve and set table spaces, complete the following steps:
- Connect to the content server using the DKDatastoreICM.connect() method. For dynamic table spaces, use a connection string of DYNAMICTABLESPACEINFO=TRUE. The connection string
allows the getitemtype or listindexoncomp stored procedure calls to
return dynamic table space information. Otherwise, the DKDatastoreICM.connect() method assumes static table spaces and defaults to DYNAMICTABLESPACEINFO=FALSE. For static table spaces, the table space values for the component
type are stored in the following ICMSTCOMPDEFS columns: TABLETABLESPACE,
DFTINDEXTABLESPACE, and DFTLOBTABLESPACE.
Note that the library
server configuration setting can override this option. Also, the option
only affects display and XML export (not item type creation or the
XML import).
Alternatively, you can enable dynamic table spaces
by calling DKLSCfgDefICM.setRetrieveDynamicTablespaceInfoDisabled(boolean
bTurnOn). To verify whether DYNAMICTABLESPACEINFO has been
disabled or not, call DKLSCfgDefICM.isRetrieveDynamicTablespaceInfoDisabled().
- Whenever you create or update an item type to add component
type, you can call one of the following APIs to set table spaces at
the component type level (item type is considered the root component
type):
Option |
Description |
API |
Purpose |
DKComponentTypeDefICM.setTable space(String) |
Sets the table table space, which is the table space for creating
the table of the component type. |
DKComponentTypeDefICM.setIndexTable space(String) |
Sets the default index table space, which is the table space
for the database indexes of the component type. |
DKComponentTypeDefICM.setLOBTable space(String) |
Sets the default large binary object (LOB) table space, which
is the table space for the LOB attribute columns of the component
type. |
DB2 always stores the
indexes and LOB attributes according to the initial definitions of
the table spaces, and makes all three table spaces read only after
the item type or component type creation completes. Oracle allows
the default index table space and the default LOB table space to be
modified after the item type or component type creation completes
(as the indexes and LOB attributes can be put to multiple table spaces).
- To retrieve the table spaces, you can call one of the following
APIs:
Option |
Description |
API |
Purpose |
DKComponentTypeDefICM.getTable space() |
Retrieves the component type table space. |
DKComponentTypeDefICM. getIndexTableTable space() |
Retrieves the index table space. |
DKComponentTypeDefICM.getLOBTable space() |
Retrieves the large binary object (LOB) table space. |
DKComponentTypeIndexDefICM.getTable space() |
Retrieves the index table space. |
For more information about tablespace APIs, see the Application Programming Interface Reference.