WebSphere WebSphere Application Server Network Deployment, Version 6.0.x Operating Systems: AIX, HP-UX, Linux, Solaris, Windows

Emptying the data store for a messaging engine

Emptying the data store of a messaging engine will enable you to discard persistent operating information without deleting the messaging engine.

Why and when to perform this task

Persistent operating information for a messaging engine are essentially 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 its data store .
CAUTION:

Steps for this task

  1. Ensure that the messaging engine is stopped.
  2. Empty the data store. There are several ways to achieve this:
    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 it. 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.
      You will need to 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

      Simply delete the directory. If you have configured a separate log directory for your Derby database, you must 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, you can 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 you 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 may be impractical due to resource limitations in the RDBMS. In this case, the only practical way to proceed is drop the tables and recreate them with the required indices and authorities.

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

Task topic

Terms of Use | Feedback

Last updated: 15 Mar 2007
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.pmc.nd.doc\tasks\tjm0399_.html

© Copyright IBM Corporation 2004, 2007. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)