Kbase P101298: Is there any way to compress the contents of a Cloudscape database ?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  17/02/2005 |
|
Status: Unverified
GOAL:
Is there any way to compress the contents of a Cloudscape database ?
GOAL:
How to reduce the size of a Cloudscape database ?
FACT(s) (Environment):
SonicMQ 5.x
CAUSE:
Applications using SonicMQ messaging can make the embedded Cloudscape database to grow,
there are however, mechanisms to reduce the size of the data in this database.
FIX:
To compress the contents of the Cloudscape database use the following script:
#!/bin/sh
# Compact Database
echo Compacting database, please wait...
# Set SONICMQ_HOME to your sonic installation directory
SONICMQ_HOME=<your SonicMQ instalaltion directory>
# Set common variables
. $SONICMQ_HOME/bin/setenv
SONICMQ_DBCLASS=$SONICMQ_LIB/defdb_tools.jar:$SONICMQ_LIB/defdb_server.jar
# Compress the cloudscape tables
"$SONICMQ_JRE" -cp "$SONICMQ_DBCLASS" -Dij.protocol=jdbc:db2j: \
-Dij.database="$SONICMQ_HOME/SonicMQDB;create=false" com.ibm.db2j.tools.ij compress.sql
The compress.sql file should include the following lines :
ALTER TABLE Broker1Messages COMPRESS;
ALTER TABLE Broker1BrokerInfo COMPRESS;
ALTER TABLE Broker1UndelMsgs COMPRESS;
ALTER TABLE Broker1QMessages COMPRESS;
ALTER TABLE Broker1UserIdMapping COMPRESS;
ALTER TABLE Broker1Subscriptions COMPRESS;
ALTER TABLE Broker1RouteInfo COMPRESS;
DISCONNECT;
exit;
In this case the Broker1 should correspond to the Broker name assigned during the installation of SonicMQ