Running the Preprocessing Script

The LargeDBSchemaUpdate.tcl script performs lengthy database operations outside of the normal installation transactions. You can run this script before installing ENOVIA Business Process Services in whole or in part, depending on your system availability restrictions. The script is written in such a way that you can run upgrade commands for specific versions and commands.


Before you begin: Be sure to perform the following tasks before running the preprocessing script:
  1. As always before upgrading, make sure your database is backed up and you have a good recovery. To keep the user base off during the upgrade, change the "MATRIX" schema password to something new, create a connection (bootstrap) file with the new password, and then do the upgrade from there.
  2. Make sure that you have upgraded to the Matrix10 or higher platform, according to the instructions in the Program Directory.
  3. To get the script, run the ENOVIA Business Process Services installation in the Advanced mode and choose to copy the staging area only. The script installs to the SERVER_INSTALL\Apps\Framework\<version>\Common\ directory.
  4. In consultation with your Oracle Database Administrator and/or ENOVIA Customer Support, make temporary changes to database settings to accommodate the large transactions. Some areas that you may want to change are listed below.
    • Disable redo logs at the tablespace level, or create more and much larger logs because they will fill up quickly.
    • Disable LOG_CHECKPOINT_INTERVAL and LOG-CHECKPOINT_TIMEOUT.
    • Disable ARCHIVE LOG operations.
    • To avoid sorting to disk, increase Sort_Area_Size substantially, and increase the TEMP tablespace accordingly.
    • Set DB_BLOCK_BUFFERS (Oracle 8i), DB_CACHE_SIZE (Oracle 9i), and SHARED_POOL_SIZE (8i and 9i) high, depending on system RAM and the size of the database.
    • In Oracle 8i, set OFFLINE all production rollback segments and create a unique, large rollback segment tablespace with very large extent sizes (200m). Within that new tablespace, create at least two very large rollback segments with initial=next=200MB, min=5.
    • Make sure that this large rollback segment tablespace has several large data files.
    • In Oracle 9i, use the undo tablespace and auto undo segments as an alternative to the rollback segment concept. Set undo_retention=10800, and increase the initialization file.
  5. If you do not want to run all commands for all versions at once, you can open the LargeDBSchemaUpdate.tcl script in a text editor and use the following guidelines to comment out or remove the commands you do not want to execute during this run of the script. ENOVIA Business Process Services installs this script in SERVER_INSTALL\Apps\Framework\<version>\Common\. The only reason not to run the entire script at once would be if you have limited time to run the commands and want to run them incrementally. At some point, the commands for all versions must be run.
    • To run upgrade commands for specific ENOVIA Business Process Services versions only, comment out the line that executes the command for the versions you do not want to execute for this run of the script. You comment out a line by adding a '#' character to the beginning of the line. The lines for each version are at the end of the Tcl file and begin with "set mqlret". For example, if you do not want to run the commands for version 8-0-0-1, comment out the set mqlret line for that version line as follows:
      # executing modify commands for 8-0-0-1
      # set mqlret [emxExecCommands ${lCmd8-0-0-1}]

      Note that you don't need to comment out upgrade commands for versions that have already been run. For example, if you are installing v10.0.1.0 over a 9-5-5-0 version, the routines will detect that upgrade commands for versions prior to 9-5-5-0 have been run and they will not run again, even if they are not commented out.

    • If you do not want to run a specific modify command for a specific type or relationship, make a backup copy of the script. Then in the original version of the script, delete that type or relationship from the build list for that version. For example, suppose you don't want to run the version 10-0-0-0 modify command for the Person type. Delete the last line below:
      # building list of modify commands for 10-0-0-0
         set lCmd10-0-0-0 [list \¦
                           $type_ProjectSpace1 \
                           $type_ProjectConcept1 \
                           $type_ProjectTemplate1 \
                           $type_Person1 \ # delete this line

Note: You can run LargeDBSchemaUpdate.tcl through either MQL or the command line on UNIX and Windows. When using MQL, log messages appear in the MQL window. When using the log file, log messages can be saved to a log file. Both procedures are described below, where:

  • SUPER_USER is a user who has all access.
  • SUPER_USER_PASSWORD is the password of the super user.
  • MQL_PATH is the path where MQL exists.
  • LOG_FILE is the name of the log file including the full path.
  • ERROR_FILE is the name of the error file including the full path.

Related Topics
Database Considerations
About the Preprocessing Script
Avoid Overwriting Custom Pages during Upgrades
  1. Run the preprocessing script as follows.

    • To run the script using MQL:
    1. Start MQL.
    2. Set context to a Super User. For example,

      Set context user <SUPER_USER> password <SUPER_USER_PASSWORD>;

    3. Execute the script using the command:

      run <SCRIPT_PATH>/ LargeDBSchemaUpdate.tcl;
      All log messages display in the MQL window.

    Important: As the V6 installers use the MQL executable delivered in the ENOVIA Live Collaboration Server directory (SERVER_INSTALL) to perform their needed installation steps, they no longer require a ENOVIA Studio Modeling Platform installation to be present, and therefore do not update the studio environment. If the studio installation is to be used to perform operations that depend on server-delivered jars, those jars must be copied from the server directories to the corresponding studio directories.

    • To run the script using the command line and store log messages to the log file:

    Windows:
    Start the Command Prompt and enter:
    MQL_PATH\mql -c "set context user SUPER_USER password SUPER_USER_PASSWORD; run SCRIPT_PATH\LargeDBSchemaUpdate.tcl" -stdout:LOG_FILE -stderr:ERROR_FILE ¦
    UNIX:
    Start the Command Tool and enter:
    MQL_PATH/mql -c "set context user SUPER_USER password SUPER_USER_PASSWORD; run SCRIPT_PATH/LargeDBSchemaUpdate.tcl" 1>LOG_FILE 2>ERROR_FILE

  2. Perform the following post-requisite steps, as appropriate.

Post-requisites:
  1. If you did not run the entire script, uncomment or put back in the commands that did not run. Re-run the script until all commands for all versions are run. There is no harm in leaving in a command that has already been run. The script will skip a command if the modification has already been made.
  2. When you are finished running the script, reset any changed database settings back to the production values.
  3. After you have completed running all commands, install the new version of ENOVIA Business Process Services. Installing after running this script might generate Skipping/Syncing warning messages in the log for attributes that were added in the script.