Creating application scheduler tables using scripting and Java Management Extensions

Before you begin

The scheduler requires a database, a JDBC provider, and a data source.
Note: Limitations for Oracle XA databases

Oracle XA prohibits required schema operations in a global transaction environment. Local transactions are not supported. If you have schedulers that use an Oracle XA data source, either temporarily change the scheduler configuration to use a non-XA Oracle data source, or create the tables manually using the supplied DDL files. If you use the administrative console to create or drop scheduler tables for a scheduler configured to use an Oracle XA data source, then you receive a SchedulerDataStoreException error message, and the operation fails.

Note: Limitations for DB2 z/OS databases

Creating and dropping tables using the administrative console is not supported for DB2 z/OS databases. A database administrator is typically involved with defining and managing databases on DB2 z/OS systems. The administration interface is targeted for the non-database administrator or developer who does not want to know the specifics of setting up the scheduler database. The scheduler has DDL files available for the database administrator to create the required tables.

Why and when to perform this task

To create a table using scripting and JMX, follow these steps.

Steps for this task

  1. Verify that the database to be used for this Scheduler is available and accessible by the application server. Review the Creating scheduler databases and tables topic for instructions on creating a database
    Draft comment:
    place xref here
    . The remainder of these steps describe how to create scheduler tables in an existing database.
  2. Launch the wsadmin tool
    Draft comment:
    place xref here
    and connect to a Deployment Manager or Application Server. This process requires an active server to be available and fails, if you are disconnected from the server.
  3. Create a JDBC data source
    Draft comment:
    place xref here
    that refers to the scheduler database.
  4. Create a scheduler.
    Draft comment:
    place xref here
    This configuration object contains the desired table prefix and the JNDI name of the JDBC data source. Verify that you save the new Scheduler to the configuration before you proceed to the next step.
  5. Run the createTables MBean operation.
    1. Look up the SchedulerConfiguration object or use the object you created in a previous step.
    2. Locate the WASSchedulerConfiguration MBean.
    3. Run one of the createTables MBean operation on the WASSchedulerConfiguration object to create the tables for the specified SchedulerConfiguration object in its associated database. The tables and indices that you created reflect the table prefix and data source specified in the scheduler configuration.
  6. Restart the server or start the poll daemon to run scheduler tasks.

Result

Scheduler tables and schema are created.

What to do next


Copyright IBM Corp. 2003, 2005 |