Sun Java System Messaging Server 6 2005Q4 Administration Reference

imsimta renamedb

The imsimta renamedb command renames an MTA database. Since the MTA may optionally reference several “live” databases, that is, databases whose presence triggers their use by the MTA, it is important, first, to ensure that the MTA does not see such a database while it is in a mixed state, and second, to minimize any period of time during which the database is inaccessible. The imsimta crdb command locks the database it is creating to avoid having it accessed in a mixed state.

It is therefore recommended that the MTA databases be created or updated in a two-step process:

  1. Create or update a temporary database.

  2. Rename the temporary database to the “live” name using the imsimta renamedb command.

The imsimta renamedb command, which must delete any old database files and rename the new database files, locks the database during the renaming process to avoid presenting the database in a mixed state. In this way the database is never accessible while it is in a mixed state, yet any window of time during which the database is inaccessible is minimized. Renaming is generally quicker than database generation.


imsimta renamedb old-database-spec new-database-spec


The parameters for this command are:




The name of the database that is being renamed. 


The new name of the database. This may either be an actual pathname, or one of the special names such as IMTA_ALIAS_DATABASE, IMTA_REVERSE_DATABASE, IMTA_GENERAL_DATABASE, or IMTA_DOMAIN_DATABASE, listed in the MTA tailor file and pointing to actual pathnames.


The following command renames the database tmpdb to be the actual MTA alias database (usually msg_svr_base/data/db/aliasesdb).

imsimta renamedb tmpdb IMTA_ALIAS_DATABASE