11 Upgrade Argus Safety Database

The space requirements for the upgrade are determined by the upgrade script. This requirement is mostly for new objects created during the upgrade. It is a fair estimate of space requirements.

11.1 Prerequisites for Database Upgrade

  • The Oracle Database Server version should be upgraded as per the technology stack (see Section 1.2.2, "Oracle Components").

  • Verify that JRE 1.8 or above is installed, and JCE policy is applied.

  • Verify that the Oracle TNSNAMES have been configured.

  • To avoid errors during upgrade, do either of the following:

    • Keep datafiles AUTOEXTEND ON, or

    • Monitor free space and add more space, if required

  • Create one large rollback segment or size 20 GB for LARGE size model.

    Keep all other rollback segments, except SYSTEM, offline.

  • The source Argus Safety database must be AL32UTF8 character set.

  • The database semantics must be CHAR and not BYTE.

11.2 Argus Safety Database Upgrade

Note:

You will need to generate a key prior to the database upgrade or you can use ArgusSecureKey.ini from the existing setup.

You must also make sure that the password information specified in the database is consistent with the information provided in the ArgusSecureKey.ini file.

Note:

To execute the database creation and setup on a Linux server, copy the build folder from the <Argus Release Media>\Database\Argus Safety on the server.

You may be prompted to press Enter at screens that are not included in the procedure. This does not hinder the upgrade procedure. Where applicable, press Enter to continue with the upgrade process.

  1. Make sure the dbinstaller.properties are set up correctly. (See Section 10.1.5, "Configure the Database Setup Properties File".)

  2. Validate the existing Argus Safety using the SchemaValidation.bat file. Use the validation file of the existing installed version from the Schema Validation folder:

    <Argus Release Media>\Database\Argus Safety\SchemaValidation

  3. View the validation log file to make sure that the existing database has no errors, missing and invalid objects.

  4. To create a new DBA user and refresh the existing DBA user grants, Run Create DBA User Script.

  5. From the <Argus Release Media>\Database\Argus Safety folder, run the dbinstallerUI.bat file as an administrator, to invoke the user interface and enter the parameters.

    The Argus Safety - Database Setup screen appears.

    You cannot modify any details on this screen. In case, any of the information is incorrect, then you must re-create the schema.

    For a silent upgrade, from the <Argus Release Media>\Database\Argus Safety folder, run the dbinstaller.bat file as an administrator.

  6. In case of upgrade, all the schema details will be auto-populated based on the schema selection logic. Before proceeding further, you must confirm that all the schema details are correctly populated.

    Note:

    You must not create any Argus Safety objects in custom schema.
  7. Click Next.

  8. Enter the path for Tablespaces and click Next.

  9. Verify the Setup Parameters and click Execute.

  10. To ignore any error due to customization, check Ignore Error checkbox in the DBInstaller user interface, and analyze it later when the upgrade is done.

  11. To validate the schema, from the <Argus Release Media>\Database\Argus Safety\Schema Validation folder, run the SchemaValidation.bat file.

    See Section 10.4, "Validate Argus Safety Database".

11.3 Post Upgrade Steps

  1. Log in to ARGUS_APP schema.

  2. Verify that the common profile switch DATABASE_TIMEZONE is not empty by executing the following script:

    select key, value from cmn_profile where key = 'DATABASE_TIMEZONE';
    

11.4 Enable Local Locking in Argus Safety

Before enabling Local Locking in Argus Safety, you must make sure that you have upgraded your database to this release successfully.

  1. Execute the batch file Enable_local_lock.bat from <Argus Release Media>\Database\Argus Safety\Utilities\Enable_local_lock directory.

  2. Enter the response for Do you wish to turn on the Local Locking feature for one or more enterprises (Yes/No)?, enter Yes to continue.

  3. Enter the log file name to record the results.

    This is the execution log that is created on the client workstation under the Enable_local_lock directory mentioned above.

  4. Enter TNSNAMES Entry to Connect to the source SAFETY Database.

  5. Enter SAFETY schema owner name in source Database.

  6. Enter the password for safety schema name in source Database.

  7. Enter comma separated list of enterprises where local locking feature is to be enabled or enter ALL for all enterprises in Source safety Database.

    If no value is entered script will run for enterprise 1 by default.

  8. Enter the Agency name for PMDA reporting destination as configured in Reporting Destination codelist.

  9. To enable local locking privileges for the Argus J users, enter Yes.

    Follow the prompts for confirmation.

    Note:

    If the agency entered is invalid for any of the enterprises, the utility will abort and no changes will be committed.

    In case of a multi-tenant environment, if this utility is re-run for any of the enterprises, it will display a list of the enterprises for which it has already executed and will continue to process rest of the enterprises.

11.5 Merge a Single Enterprise Safety Database into a Multi-tenant Database

11.5.1 Prerequisites to Run the Merge Export Step

  • The end user should not use the source database during the export process.

  • Install Argus Safety 8.2.1 on a computer where Oracle database is installed. Make sure the Oracle database is installed as per the Chapter 1, "System Requirements."

  • The source databases should be schema validated at Argus Safety 8.2.1.

  • The source database should only be a single-tenant database.

  • The source database data must contain only one ENTERPRISE.

11.5.2 Merge Export

  1. From the Start menu, navigate to the following path:

    <Argus Release Media>\Database\Argus Safety\Utilities\Merge_to_Multitenant

  2. Double-click the merge_export.bat file and follow the instructions on the sqlplus screen.

    1. Enter Log File Name to record results.

      This is the execution log that is created on the client workstation:

      Log file path: <Argus Release Media>\Database\Argus Safety\Utilities\Merge_to_Multitenant

    2. Enter TNSNAMES Entry to Connect to the Source SAFETY Database.

    3. Enter SYSTEM or DBA user name in source Database.

    4. Enter password for SYSTEM or DBA user in source Database.

    5. Enter SAFETY schema owner name in source Database.

    6. Enter password for Safety schema owner in source Database

    7. Enter Interchange schema owner name in Safety Database

    8. Enter password for Interchange schema owner in source Database.

    9. Enter the full directory Path to create the Source Safety database export dump file:

      This is the Path on the Source Database Server where the Argus Safety Database resides. The batch file will create an export dump file (SAFETY.DMP) and an export log file (SAFETY_EXPORT.LOG) in the directory.

      Make sure that SAFETY.DMP file does not exist prior to the export.

  3. Make sure that no error has occurred during the database export, by checking the following log files:

    • Log file name entered as parameter 1 during export step execution.

    • Following Oracle Export log files are created on database server. The path is the value entered on ”Enter Directory including full Path to create Source safety database export dump file” during export step:

      SAFETY_EXPORT.log

11.5.3 Export the dmp File Copy to the Target Database Server

Move the export dmp file created in Merge Export from the source database server to the target database server.

11.5.4 Prerequisites to Run the Merge Import Step

  • Create a cold backup of the target database before starting the Merge Import step.

  • The end user should not use the target database during the import process.

  • Only one Merge Import process can run on the target database at a time.

  • Auto extend should be set on for all database files in the target database.

  • Sufficient space should be available on the target database server to import the new enterprise data. The amount of space depends on the number of cases in source Argus Safety database.

  • Install the Argus 8.2.1 application. Make sure that Oracle Client version is same as the database server.

  • The target databases should be Schema Validated at Argus 8.2.1.

  • The target database must be a multi-tenant database.

  • All source database dictionaries should be available in target database. If the dictionary does not exist then install missing dictionaries on the target database.

  • All existing AG service users on the source database must exist on the target database.

  • All source database LDAP configured server names should be available in target database.

11.5.5 Merge Import

  1. From the Start menu, navigate to the following path:

    <Argus Release Media>\Database\Argus Safety\Utilities\Merge_to_Multitenant

  2. Click merge_import.bat and enter the following parameters for the target database:

    1. Log File Name to record results.

      This is the execution log that will be created on the client workstation.

      Log file path: <Argus Release Media>\Database\Argus Safety\Utilities\Merge_to_Multitenant

    2. TNSNAMES entry to connect to the target Safety database.

    3. SYSTEM or DBA user name.

    4. Password of the DBA user.

    5. VPD schema owner name.

    6. Password of the VPD schema owner.

    7. SAFETY schema owner name.

    8. Password of the Safety schema owner.

    9. Interchange schema owner name.

    10. Password of the Interchange schema owner.

    11. Directory location where the export dmp file is copied for the import process.

      This is the path on the Target Database Server where the Argus Safety database is installed. The batch file creates an import log file in this directory.

    12. Name of the new enterprise.

    13. Abbreviation of the new enterprise.

    14. SAFETY schema owner name in the source database.

    15. Interchange schema owner name in source database.

  3. This batch file imports the data from the dump file into the target database.

  4. Make sure that no error has occurred during import by checking the following log files:

    • Log file name entered as parameter 1 during Import step execution.

    • The following Oracle Import log files are created on database server. The path is the value entered in ”Enter Directory including full Path on target database server where export dmp file copied for import process” during import step.

      • SAFETY_IMPORT_safety.log

      • SAFETY_IMPORT_interchange.log

      • SAFETY_IMPORT_SAFETY_DUP_SEARCH_DATA.log

      • SAFETY_IMPORT_SAFETY_DUP_LAM_SEARCH_DATA.log

  5. Validate the schema of the database using the SchemaValidation.bat file.

11.5.6 Synchronize Dictionary Manually

The merge process synchronizes the dictionary information based on the dictionary name in the source and target database. If the source dictionary name is not available in target database, then manual synchronization is required.

To synchronize the dictionary data manually on the target database:

  1. Log in as the Safety schema owner using sqlplus on the target safety database.

  2. Locate the new ENTERPRISE_ID value created from import process using the following sql:

    SELECT VALUEFROM cmn_profile_globalWHERE section = 'DATABASE' AND KEY = 'MERGING_TO_MULTITENANT';
    
  3. Set the context value to new Enterprise_id

    Exec pkg_rls.set_context('admin',< Value of New Enterprise ID>,'ARGUS_SAFETY');
    
  4. Locate the list of Dictionaries ID's where Dictionary synchronization pending due to missing Dictionaries on Target database. If the following sql results in NO ROWS, then no further action is required.

    Select dict_idFrom cfg_dictionaries_enterpriseWhere enterprise_id = <Value of New Enterprise ID>And global_dict_id = -1;
    
  5. Log in as the Safety schema owner using sqlplus on the source safety database.

  6. Locate the dictionary name of each Dictionary ID where the dictionary does not exist on the target database using the following sql:

    Select name from cfg_dictionaries_global where dict_id in (<List of Dict ID values (comma separated) from Step 4);
    
  7. Load the missing dictionaries on the target database.

  8. Set the context to new enterprise_id using following sql on target database.

    Exec pkg_rls.set_context('admin',<Value of new ENTERPRISE_ID> ,'ARGUS_SAFETY');
    
  9. Update GLOBAL_DICT_ID data in the target database using the following SQL:

    UPDATE CFG_DICTIONARIES_ENTERPRISE
    SET GLOBAL_DICT_ID = <Dictionary Global Dict ID value from target database>
    WHERE ENTERPRISE_ID = <New ENTERPRISE_ID created in Target Database>
    AND DICT_ID = <Value of Dict ID in New ENTERPRISE with Dictionary name>
    AND GLOBAL_DICT_ID =-1;