Create the Reveille 8 Schema and Tables

This section describes how to create the Reveille schema and tables within the Reveille database’s USER table space. To complete the creation of the table spaces, the Oracle SQL scripts need to be copied from the machine where Reveille is installed to the Oracle database server. The Oracle SQL scripts are located in the Oracle Scripts folder within the Reveille installation folder.

For example if Reveille has been installed normally, the scripts will be located in the <Reveille Installation Path>\Reveille\Oracle Scripts directory.

The Oracle scripts are also available from the Reveille Software electronic download software location – contact Reveille Support at reveille.support@reveillesoftware.com for access information.

  1. Copy the following files to the Oracle database server:
    • Oracle_Monitor.sql
    • Oracle_Monitor_BaseInstall.sql
    • Oracle_Monitor_StoredProcedures.sql
    • Oracle_Metrics.sql
    • Oracle_Metrics_StoredProcedures.sql
  2. Start the Oracle SQL*Plus utility by going to Start > Run and entering SQLPlus. The SQL*Plus utility will open as shown below.

  3. Logon to the Reveille database as the user created in the previous section by entering the username/password@connect_identifier at the Enter user-name prompt, as shown below.

  4. Once logged on as the Reveille 8 user, create the Reveille 8 tables (schema) within the Users tablespace. First, save the results of the scripts to a file for review after the script has run. Enter the following at the SQL> prompt:

    SPOOL 'c:\Results.txt' CREATE

  5. Run the Oracle_Monitor.sql script using the @ command. Type the following at the SQL> prompt:

    @’<path to scripts>\Oracle_Monitor.sql’

    An example is shown below:

  6. Save the output from the script to the results file. Type the following at the SQL> prompt:

    SPOOL 'c:\Results.txt' APPEND

  7. Repeat the above steps for the Oracle_Monitor_StoredProcedures.sql script and spool the output to a different output text file for review.
  8. If using a separate metrics database, log on to the Reveille metrics database as the correct user created in the previous section by entering the username/password@connect_identifier. Then repeat the previous steps for the Oracle_Metrics.sql script and spool the output to a different output text file for review.

  9. Repeat the above steps for the Oracle_Metrics_StoredProcedures.sql script and spool the output for review.

  10. Review the results of the script by opening each of the text log files (example - ‘c:\Results.txt’) using Windows Notepad. In the text files, there should be errors for each of the ‘drop table’ or ‘drop sequence’ statements since these objects don’t exist. These messages will be followed by a ‘Table created.’ or ‘Sequence created.’ message. For example the beginning of the results should look like the following:
    DROP TABLE AlertQueue
         *
    ERROR at line 1:
    ORA-00942: table or view does not exist
    Table created.
    DROP SEQUENCE AlertQueue_Seq
         *
    ERROR at line 1:
    ORA-00942: sequence does not exist
    Sequence created.

    And at the end it should look like:

    DROP TABLE ScheduleAssign
          *
    ERROR at line 1:
    ORA-00942: table or view does not exist
    Table created.
    Index created.
    Table altered.
  11. Run the Oracle_Monitor_BaseInstall.sql script using the @ command. This script will populate the Reveille database tables with initial data records. Type the following at the SQL> prompt:

    @’<path to scripts>\Oracle_Monitor_BaseInstall.sql’

  12. Save the output from the script to the results file. Type the following at the SQL> prompt:

    SPOOL ‘c:\BaseResults.txt’ APPEND

  13. Review the results of the script by opening the log text file c:\BaseResults.txt. In the results.txt file, there should be a series of messages indicating “0 rows deleted.” followed by a series of messages indicating “1 row created.”, then a “Commit complete.” message.

    For example:

    0 rows deleted.
    0 rows deleted.
    1 row created.
    1 row created.
    1 row created.
    …..
    Commit complete.
  14. Review the spool results for Oracle_Monitor_StoredProcedures.sql, Oracle_Metrics.sql, and Oracle_Metrics_StoredProcedures.sql scripts for no errors.