Sun Java System Message Queue 4.1 Administration Guide

Database Manager Utility

The Database Manager utility (imqdbmgr) sets up the database schema for a JDBC-based persistent data store. You can also use it to delete Message Queue database tables that have become corrupted, change the data store, display information about the data store, convert a standalone data store for high-availability (HA) use, or back up and restore an HA data store. Table 13–13 lists the available subcommands.

Table 13–13 Database Manager Subcommands

Subcommand 

Description 

create all

Create new database and persistent store schema 

Used on embedded database systems. The broker property imq.persist.jdbc.vendorName.createdburl must be specified.

create tbl

Create persistent store schema for existing database 

Used on external database systems.  

For brokers belonging to a high-availability cluster (imq.cluster.ha = true), the schema created is for the cluster’s shared persistent data store, according to the HA 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 store can coexist in the same database, they are distinguished by appending a suffix to all table names:

    CclusterID: Shared store


    SbrokerID: Standalone store


delete tbl

Delete Message Queue database tables from current persistent store 

delete oldtbl

Delete Message Queue database tables from earlier-version persistent store 

Used after the persistent 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 persistent store 

upgrade hastore

Upgrade standalone store to high-availability (HA) shared store

backup

Back up JDBC-based store to backup files

restore

Restore JDBC-based store from backup files

remove bkr

Remove broker from HA shared store

The broker must not be running.  

reset lck

Reset persistent store lock 

Resets the lock so that the persistent store database can be used by other processes.  

Table 13–14 lists the options to the imqdbmgr command.

Table 13–14 Database Manager Options

Option 

Description 

-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 name

User name for authentication 

-passfile filePath

Location of password file 

See Password Files for more information.

-n brokerID

Broker identifier of broker to be removed from HA shared store

-dir dirPath

Backup directory for backing up or restoring JDBC-based data store

-v

Display version information [Any other options specified on the command line are ignored. ]

-h

Display usage help