Running the pre-upgrade DBA script (Oracle)

Applies to: On premises

Ask your database administrator to run the pre-upgrade script. Or, if you have the DBA role, you can run the script.

Before you begin

  • The Oracle database server is running. All other OpenPages® servers are stopped.
  • The JAVA_HOME system variable is defined.
  • The ORACLE_HOME system variable is defined.

About this task

Run the following script: op-database-dba-upgrade.sh|.bat. The script uses the parameters defined in the sql-wrapper.sql file.

Procedure

  1. Log on to the Oracle database server computer as a database administrator (DBA).
  2. Locate the scripts that are required.

    If you are a database administrator, get the scripts from your OpenPages team.

    Or, you can get the scripts from the /OP_<version>_Main/OP_<version>_Configuration/Database/ORACLE/UPGRADE_SCRIPTS directory.

  3. Verify that you have execute permission on the scripts in UPGRADE_SCRIPTS and its subdirectories.
  4. Open the sql-wrapper.sql file. Verify that the values are suitable for your environment.
    1. For the opx_oracle_dba_user parameter, enter a DBA user that does not have SYSDBA privileges.
    2. If you customized the table space names, update the define opx_dflt_* parameters with the custom table space names.
    3. If you want to run custom scripts during the upgrade, see Running custom scripts during the database upgrade (Oracle).
  5. Run the following command:
    • Windows:
      op-database-dba-upgrade.bat pre "<dba_password>"
    • On Linux®:
      ./op-database-dba-upgrade.sh pre '<dba_password>'
    Note: Quotation marks are required around a password only if the password contains special characters. See Special characters in passwords.
  6. Verify that the return code is 0, indicating success.

    You can also check the log file, op-database-dba-upgrade.pre.*.log.

What to do next

Validate the pre-upgrade script.