Sun Java System Messaging Server 6.3 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.

Syntax


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

Parameters

The parameters for this command are:

Parameter  

Description  

old-database-spec

The name of the database that is being renamed. 

new-database-spec

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.

Example

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