Running the exported script manually

You run an exported create schema script by editing the CreateSchema DDL file for your database and then starting the modified monitor model from the WebSphere® Application Server administrative console.

About this task

To run the exported script manually, complete the following steps:

Procedure

  1. If you are running the script from a remote server, either move the exported files to that machine or make sure you can connect to the Monitor database from the local machine.
  2. Connect to the Monitor database as a user with database privileges to create tables and users and follow one of these sets of instructions, depending upon the database you are using:
    • For DB2® Universal and for DB2 for z/OS® on Windows, in a DB2 Command Window (CLP), complete the following steps:
      1. Navigate to the path containing the exported DDL file.
      2. Open the CreateSchema_model_name.ddl file, where model_name is the name of the model, and replace the variables listed at the top of the DDL file. These instructions are also included at the top of the exported DDL file.
      3. Save the modified CreateSchema_model_name.ddl file.
      4. Enter DB2 CONNECT TO MONITOR USER dbuser USING dbpassword
      5. Type DB2 -td@ -vf CreateSchema_model_name.ddl, where model_name is the name of the model.
      6. Enter DB2 TERMINATE.
    • For DB2 for z/OS running on a DB2 for z/OS server, complete the following steps:
      1. Open the CreateSchema_model_name.ddl file, where model_name is the name of the model, and replace the variables listed at the top of the DDL file. These instructions are also included at the top of the exported DDL file.
      2. Save the modified CreateSchema_model_name.ddl file.
      3. Use the SPUFI or DSNTEP2 utility to run the script.
    • For Oracle, complete the following steps:
      1. Navigate to the path containing the exported DDL file.
      2. Enter sqlplus dbuser/dbpassword@orcl @CreateSchema_model_name.ddl, where model_name is the name of the model.
      3. Commit the changes to the database.
    • For Microsoft SQL Server, complete the following steps:
      1. Navigate to the path containing the exported DDL file.
      2. Enter sqlcmd -U dbuser -P dbpassword -e -i CreateSchema_model_name.ddl, where model_name is the name of the model.
      3. Commit the changes to the database.
    Note: Exported scripts use line feeds for end-of-line markers for consistency with Unix and Linux operating systems, which cannot use carriage returns. For Windows operating systems, you must use a text editor that supports line feeds for the end-of-line marker.
  3. In the WebSphere Application Server administrative console, click Applications > Monitor Models.
  4. In the Select column, select the model for which you just ran the script.
  5. Click Start or Stop as appropriate. The icon in the Status column is updated to reflect this action. The monitor model application can now be started to receive events.