bea.com | products | dev2dev | support | askBEA |
![]() |
![]() |
|
![]() |
e-docs > WebLogic Server > Programming WebLogic JMS > JDBC Database Utility |
Programming WebLogic JMS
|
The following sections describe JDBC database stores for WebLogic JMS, and how to use the JDBC database utility to regenerate existing JDBC database stores:
The JDBC utils.Schema utility allows you to regenerate new JDBC database stores by deleting the existing versions. Running this utility is usually not necessary, since JMS automatically creates these stores for you. However, if your existing JDBC database stores somehow become corrupted, you can regenerate them using the utils.Schema utility.
Caution: Use caution when running the utils.Schema command as it will delete all existing database tables and then recreate new ones.
The JMS database contains two system tables that are generated automatically and are used internally by JMS, as follows:
The prefix name uniquely identifies JMS tables in the backing store. Specifying unique prefixes allows multiple stores to exist in the same database. The prefix is configured via the Administration Console when configuring the JDBC store. A prefix is prepended to table names when:
The prefix should be specified using the following format, which will result in a valid table name when prepended to the JMS table name:
[[catalog.]schema.]prefix
Note: No two JMS stores should be allowed to use the same database tables, as this will result in data corruption.
For more information on configuring JDBC database stores for WebLogic JMS, see "JMS JDBC Store Tasks" in the Administration Console Online Help.
Regenerating JDBC Database Stores
The utils.Schema utility is a Java program that takes command line arguments to specify the following:
By convention, the DDL file has a .ddl extension. DDL files are provided for Pointbase, Cloudscape, Informix, Sybase, Oracle, MS SQL Server, IBM DB2, and Times Ten databases.
To execute utils.Schema, your CLASSPATH must contain the weblogic.jar file.
Enter the utils.Schema command, as follows:
java utils.Schema url JDBC_driver [options] DDL_file
The following table lists the utils.Schema command-line arguments.
For example, the following command recreates the JMS tables in an Oracle server named DEMO, with the username user1 and password foobar:
java utils.Schema jdbc:weblogic:oracle:DEMO \
weblogic.jdbc.oci.Driver -u user1 -p foobar -verbose \
weblogic/jms/ddl/jms_oracle.ddl
With the Pointbase demo database that is shipped with WebLogic Server, no username or password is required. However, you must follow this procedure to create the JMS tables in a Pointbase server:
java utils.Schema jdbc:pointbase:server://localhost/demo
com.pointbase.jdbc.jdbcUniversalDriver
-u examples -p examples -verbose jms_pointbase.ddl
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |