Emptying the data store for a messaging engine

By emptying the data store of a messaging engine you can discard persistent operating information without deleting the messaging engine.

About this task

Persistent operating information for a messaging engine consists of persistent messages and information about message delivery and transmission. If you need to discard these without deleting the messaging engine and its destinations from the WebSphere® Application Server configuration, you can do this by emptying the messaging engine's data store .
Attention:
  • After emptying the data store all of the persistent messages that were held will be lost, although any destinations that you created will still exist.
  • If you follow this procedure, you must be very careful to completely empty the data store. Unpredictable behavior will result if the data store is only partially emptied.

Procedure

  1. Ensure that the messaging engine is stopped.
  2. Empty the data store. This procedure varies depending on your database product:
    1. If you are using an embedded Derby database, as the default data store does, the easiest way to empty the data store is to delete the files which the database uses. This deletes the database. When the messaging engine is next started, it will create an empty database to replace the one that was deleted. This procedure is safe only if the database contains just the tables for the messaging engine's data store. If you are using the same database for application data, you must instead empty the data store's tables as described below.
      Important: Ensure that the application server is also stopped. If you stop the messaging engine but not the application server, it will not be possible to delete the files.
      Find the database's data directory in your file system. The name of the directory which contains the files used by the database is the same as the name of the database in the configuration of the JDBC data source used by the messaging engine's data store. By default, this is
       ${USER_INSTALL_ROOT}/profiles/dmgr/databases/com.ibm.ws.sib/messagingEngineName

      Delete the directory. If you have configured a separate log directory for your Derby database, delete this also.

    2. If you are using the Derby Network Server, you can use a similar procedure but you must also stop the Derby Network Server before you delete the files. You must restart the Derby Network Server before starting the messaging engine.The user install route for WebSphere Application Server Network Deployment is usually changed when installing WebSphere Application Server. You might not find your data store in ${USER_INSTALL_ROOT}/profiles/dmgr but in ${USER_INSTALL_ROOT}/profiles/profileName, where profileName was given by the user at the installation.
    3. For any other RDBMS, empty the data store's tables using the administration tools of your RDBMS. You have a choice between removing all data from the tables, or dropping and recreating the tables. Most RDBMS support the TRUNCATE TABLE statement which removes all data from the tables. This is the recommended way of emptying the data store tables because it leaves the tables and their authorizations intact.

      If your RDBMS does not support the TRUNCATE TABLE statement (for example, DB2® does not), you can use the DELETE statement to delete all of the rows from all of the tables. If the tables contain a lot of data, this procedure might be impractical due to resource limitations in the RDBMS. In this case, drop the tables and recreate them with the required indices and authorities.

      Tip: If you enabled WebSphere Application Server to create the data store tables, you can drop the tables using the DROP TABLE statement. When the messaging engine is next started, it will create empty tables to replace the ones that were dropped. If you did not enable WebSphere Application Server to create the data store tables, recreate the tables that you dropped before you start the messaging engine.
      Tip: You can use the -drop option of the sibDDLGenerator command to generate DDL script to drop the tables.
      Optional: If you deleted the messaging engine by removing it from the bus, you can now recreate it.
  3. Start the messaging engine and the application server.



In this information ...


Related reference

IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 31, 2013 12:02:36 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-nd-zos&topic=tjm0399
File name: tjm0399_.html