Sun GlassFish Message Queue 4.4 Administration Guide

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.

Table 16–13 Database Manager Subcommands

Subcommand 

Description 

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:

    C clusterID: Shared data store


    S brokerID: Standalone data store


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.  

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

Table 16–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 userName

User name for authentication against the database 

-passfile filePath

Location of password file 

See Password Files for more information.

-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 [Any other options specified on the command line are ignored. ]

-h

Display usage help