IBM® DB2® is a database management system that stores
information used by IBM Sametime® Advanced. A database
that has the potential to grow large requires some ongoing tuning
by a database administrator.
About this task
Periodically, as the dataset grows, the database administrator
should reorganize the objects that need attention, and update the
statistics so that the DB2 optimizer
can make optimal plans for accessing the data. Sametime Advanced provides an example script
that reorganizes the indexes that are most likely to require attention
and then updates the statistics in the catalog. The script is called stadv_reorg.sql and
is stored in the STAdvancedLaunchpad\disk1\DatabaseScripts directory
within the Sametime software
download. This script or one like it should be run periodically when
the system is lightly loaded, as it will lock the tables as it runs.
Procedure
Follow these steps to reorganize the indexes by running
a version of the stadv_stadv_reorg.sql script
that you have customized for your site.
- On the DB2 server,
log in with the database administrator account.
- Open a DB2 command
window.
- From the command line, enter
- Enter the command to connect to the Sametime Advanced database
connect to advanced_database_name
where advanced_database_name is
the name of the Sametime Advanced
database.
- Run the script with the following command:
- Enter the following commands to update relevant tables
and columns in the database:
update sysstat.tables set card=100000,npages=10000,fpages=15000 where tabname = 'USER_CONNECTION';
update sysstat.tables set card=100000,npages=10000,fpages=15000 where tabname = 'COMMUNITY_SUBSCRIPTION';
update sysstat.columns set colcard = 50000 where tabname = 'USER_CONNECTION' and colname = 'MEMBERID';
update sysstat.columns set colcard = 5 where tabname = 'USER_CONNECTION' and colname = 'NODEID';
update sysstat.columns set colcard = 50000 where tabname = 'COMMUNITY_SUBSCRIPTION' and colname = 'CLIENTID';
update sysstat.columns set colcard = 50000 where tabname = 'COMMUNITY_SUBSCRIPTION' and colname = 'TOPIC';
commit;