Database Manager Utility
The Database Manager utility (imqdbmgr) sets up the database schema for a JDBC-based
data store. You can also use it to delete Message Queue database tables
that have become corrupted, change the database, display information about the database, convert
a standalone database for use in an enhanced broker cluster, or back up
and restore a highly-available database. Table 16-13 lists the imqdbmgr subcommands.
Note - When using a cluster configuration file to simplify management of the properties for
a cluster of brokers, make sure to run imqdbmgr with the -D option
to specify the location of the cluster configuration file; for example:
imqdbmgr -Dimq.cluster.url=location-of-cluster-configuration-file ...
Table 16-13 Database Manager Subcommands
|
|
create all |
Create new database
and persistent data store schema Used on embedded database systems. The broker property
imq.persist.jdbc.vendorName.createdburl must be specified. |
create tbl |
Create persistent data store schema for existing database Used on
external database systems. For brokers belonging to an enhanced broker cluster (imq.cluster.ha
= true), the schema created is for the cluster’s shared data store, in
accordance with the database vendor identified by the broker’s imq.persist.jdbc.dbVendor property. If imq.cluster.ha
= false, the schema is for the individual broker’s standalone data store. Since
the two types of data store can coexist in the same database, they
are distinguished by appending a suffix to all table names:
|
delete tbl |
Delete Message Queue
database tables from current data store |
delete oldtbl |
Delete Message Queue database tables from earlier-version
data store Used after the data store has been automatically migrated to the
current version of Message Queue. |
recreate tbl |
Re-create persistent store schema Deletes all existing Message Queue
database tables from the current persistent store and then re-creates the schema. |
query |
Display
information about the data store |
upgrade hastore |
Upgrade standalone data store to shared data store |
backup |
Back
up JDBC-based data store to backup files |
restore |
Restore JDBC-based data store from backup
files |
remove bkr |
Remove broker from shared data store The broker must not be running. |
remove jmsbridge |
Remove
JMS bridge from the shared data store The broker hosting the JMS bridge
must not be running. |
reset lck |
Reset data store lock Resets the lock so that the
database can be used by other processes. |
Subcommands for a Cluster's Shared Configuration Change Table |
create sharecc_tbl |
Create the shared database table
for the cluster configuration change record |
delete sharecc_tbl |
Delete the shared database table for the cluster
configuration change record |
recreate sharecc_tbl |
Re-create the shared database table for the cluster configuration change record. Deletes existing
shared database table and then re-creates it. |
backup sharecc_tbl -file filePath |
Back up the shared database
table for the cluster configuration change record to a backup file |
restore sharecc_tbl -file filePath |
Restore the shared
database table for the cluster configuration change record from a backup file. The
table must already exist. |
|
Table 16-14 lists the options to the imqdbmgr command.
Table 16-14 Database Manager Options
|
|
-b instanceName |
Instance name of broker |
-Dproperty=value |
Set broker
configuration property See Persistence Properties for information about persistence-related broker configuration properties. Caution: Be careful
to check the spelling and formatting of properties set with this option. Incorrect
values will be ignored without notification or warning. |
-u userName |
User name for authentication against
the database |
-passfile filePath |
|
-n brokerID |
(Used with the
remove bkr subcommand) Broker identifier of broker to be removed from shared data store |
-n bridgeName |
(Used
with the remove jmsbridge subcommand) Bridge name of the JMS bridge to be removed
from shared data store |
-dir dirPath |
Backup directory for backing up or restoring JDBC-based data store |
-v |
Display
version information 1 |
-h |
|
|
1Any other options specified on the command line are ignored.