Running the exported delete schema script manually

You run the exported delete schema script manually by entering database-specific commands.

About this task

Attention: Running the delete schema script erases all the data associated with a model.
To run the exported delete schema script manually, complete these instructions.

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. Optional: If you have installed IBM® Business Monitor in an ND environment, stop all instances of WebSphere® Application Server where all IBM Business Monitor components and the CEI server are installed.
  3. 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 DB2 for z/OS®, on Windows, in a DB2 Command Window (CLP), complete the following steps:
      1. Change directories to the path containing the exported DDL file.
      2. Enter DB2 CONNECT TO MONITOR USER dbuser USING dbpassword.
      3. Type db2 -td@ -vf DeleteSchema_<Model> where model is the name of the model.
      4. Enter DB2 TERMINATE.
    • For DB2 for z/OS running on a DB2 for z/OS server, the database script can be run using either the SPUFI or the DSNTEP2 utility.
    • For Oracle, complete the following steps:
      1. Change directories to the path containing the exported DDL file.
      2. Enter SQLPLUS dbuser/dbpassword@orcl @deleteSchema_model_name.ddl where model_name is the name of the model.
    • For Microsoft SQL Server, complete the following steps:
      1. Change directories to the path containing the exported DDL file.
      2. Enter SQLCMD -U dbuser -P dbpassword -e -i deleteSchema_model_name.ddl where model_name is the name of the model.
  4. Choose one of the following options depending on your installation topology:
    • If you installed IBM Business Monitor in an ND environment, start all instances of WebSphere Application Server.
    • If you installed IBM Business Monitor on a single server or in a distributed environment, restart WebSphere Application Server.