Network Deployment (Distributed operating systems), v8.0 > Administer applications and their environment > Administer Service integration > Administer message stores > Administer data stores


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. Persistent operating information for a messaging engine is stored as persistent messages and associated information about message delivery and transmission.

To discard this information without deleting the messaging engine and its destinations from the WAS configuration, you empty the messaging engine data store.

CAUTION:


Procedure

  1. Ensure that the messaging engine and application server are stopped.
  2. Empty the data store. There are several ways to achieve this:

    1. If you are using the embedded Derby database (as the default data store does) and the database contains just the tables for the messaging engine data store, delete the files that the database uses. This deletes the database. When the messaging engine is next started, it creates an empty database to replace it.

      If you are using the same database for application data, instead empty the data store tables as described for any other RDBMS in a subsequent step.

      1. Find the database data directory in your file system. The name of the directory that 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 data store. By default, this is
         ${USER_INSTALL_ROOT}/profiles/dmgr/databases/com.ibm.ws.sib/messagingEngineName
        
        
      2. Delete the directory. If we have configured a separate log directory for your Derby database, delete this too. If you find that you cannot delete the files, confirm that the application server is also stopped (if you stop the messaging engine but not the application server, you cannot delete the files).

    2. If you are using the Derby Network Server database, use a similar procedure but also stop Derby Network Server before you delete the files. We must restart Derby Network Server before starting the messaging engine.The USER_INSTALL_ROOT for WAS Network Deployment is usually changed when installing WAS (base). You might not find your data store in ${USER_INSTALL_ROOT}/profiles/dmgr but in ${USER_INSTALL_ROOT}/profiles/profileName , where profileName is the name you gave at installation.

    3. If you are using any other RDBMS, empty the data store tables by using the administration tools of your RDBMS. You can either remove all data from the tables, or drop and recreate the tables.

      Most RDBMS support the TRUNCATE TABLE statement that removes all data from the tables. This is the preferred 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. However, if the tables contain a lot of data, this might not be practical because of resource limitations in the RDBMS. In this case, drop the tables and recreate them with the required indices and authorities.

      Tip: If we have enabled WAS to create the data store tables, you can drop the tables by using the DROP TABLE statement. When the messaging engine is next started, it creates empty tables to replace them. If we have not enabled WAS (base) to create the data store tables, recreate the tables that you drop before you start the messaging engine.

      Tip: We can use the -drop option of the sibDDLGenerator command to generate DDL to drop the tables.

      Optional: If we 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.


Remove a messaging engine from a cluster
Remove a messaging engine from a bus


Related


sibDDLGenerator command

+

Search Tips   |   Advanced Search