D Routine Server Administration

This appendix covers system administration tasks that arise from changes to the system hardware or software.

D.1 Recreating Symbolic Links — UNIX Only

The symbolic links to the Oracle Clinical executables are lost when you, for example, copy the installation directory to a new drive (see also "Relocating Oracle Clinical"). To recreate the symbolic links, use the relink_rxc.sh script as follows:

% ksh
$ $RXC_TOOLS/relink_rxc.sh symbolic_links > $RXC_ROOT/relink_rxc.log 2>&1
exit%

The parameter link tells the script to re-establish symbolic links to the current Oracle Clinical executables, not to be confused with relinking the server code (see the next section).

D.2 Relinking Server Code — UNIX Only

With UNIX servers, you need to relink Oracle Clinical code files after either of the following events:

  • a patch or upgrade to your operating system

  • a patch to your Oracle RDBMS

Use the opapps userid to link all the server code from the supplied object files and set the file protections.

  1. Enter the following commands:

    % ksh 
    $ $RXC_TOOLS/relink_rxc.sh > $RXC_ROOT/relink_rxc.log 2>&1
    $ exit
    
  2. Check for errors in the log file, relink_rxc.log, using the following command:

    % grep -i error $RXC_ROOT/relink_rxc.log
    

    Or, to find out whether a relink has been successful by using a utility, enter:

    % ksh $RXC_TOOLS/rxcchkobj.sh progs relink.mk 
    

    If all executables are created successfully, the output shows a set of empty directory paths. Any executable that is not created is listed in the rxcchkobj output. For example:

    Expected progs in =====> /u01/home/oppaps/bin/52/build/tools
    gen_views: No such file or directory   
    cnvstatus: No such file or directory   
    

    This indicates that two executables, gen_views and cnvstatus, were expected but not created.You should investigate the cause of the listed executables not being created.

D.3 Relocating Oracle Clinical

If you move your Oracle Clinical installation, you must edit the location references in one or more files, according to your server platform. See "Setting Environment Variables on the Command Line."

UNIX

In the file oc/code_environment/psub/launchps.sh, modify the directory reference in this section:

p1=$1; export p1;
p2=$2; export p2;
. /pharm/home/opapps/oc/code_environment/bin/opa_setup
USERNAME=$5; export USERNAME;

In the file bin/opa_setup, modify the directory reference in this section:

if [ ${OPA_BIN:-0} = 0 ]
then
  OPA_BIN=/pharm/home/opapps/oc/code_environment/inst/bin
fi

Windows

Edit the file oc/code_environment/psub/launchps.bat.

D.4 Updating Oracle Clinical Seed Data

If you run the Installer to create or upgrade an Oracle Clinical database, the Installer places the correct seed data in that database. If, however, you upgrade an existing Oracle Clinical database manually, you must also upgrade the seed data manually.

To upgrade Oracle Clinical seed data manually:

  1. Set the environment variables as follows (for details, see Appendix A):

    opa_setup database code_environment
    
    Variable Description
    ORACLE_SID set to the name of the database
    ORACLE_HOME set to your desired Oracle home directory
    PATH make sure oracle_home/bin is in your PATH variable

  2. Collect the passwords for OPA and RXC.

  3. From the install directory,  run the script loadseed.sql:

    SQLPLUS RXC/password@database
    loadseed.sql 
    
  4. Enter responses for the loadseed.sql prompts:

    Enter the password for OPA: opa_password
    Enter the password for RXC: rxc_password
    Enter product code (OC or TMS): OC
    

D.5 Collecting Statistics for Optimization

Two scripts gather statistics required for the Oracle 11g Optimizer to be effective for accounts used internally by Oracle Clinical and RDC Onsite. Each script prompts for the password of the account(s) it processes.

If your database contains large amounts of data, the scripts may take a long time to run. You may want to edit the scripts. For information on the scripts' parameters see documentation on the Oracle DBMS_STATS package that is called by these scripts: http://docs.oracle.com/cd/B19306_01/appdev.102/b14258/d_stats.htm#i1036456.

Failure to execute these scripts can negatively impact performance.

  1. Set the database initialization parameter optimizer_features_enable to 11.2.0.4.

    Note:

    Do set the initialization parameter to 11.2.0.4 even though Oracle Clinical is installed with Oracle Database 12c.
  2. Log into SQL*Plus as system and run the scripts:

    • ocstats.sql captures new statistics in the RXC, RXA_LR, RXA_DES, RXA_DISC_REP application accounts required for the Oracle 11g optimizer to be effective and result in better performance of Oracle Clinical and RDC Onsite.

    • opastats.sql captures new statistics in the OPA application account used by Oracle Clinical, RDC Onsite, and TMS.

D.6 Using Dynamic Sampling to Improve Batch Data Load Performance

After collecting DBMS_STATS (see "Collecting Statistics for Optimization"), delete and lock statistics for the temporary tables used by Batch Data Load in order to optimize performance. When encountering tables with no statistics, Oracle RDBMS dynamically gathers the necessary statistics as part of query optimization. With volatile temporary tables, dynamic sampling contributes to better performance.

  1. Set database initialization parameter optimizer_dynamic_sampling to 2 or higher. (The default value is 2.)

  2. Log into SQL*Plus as system and run the following commands to delete statistics for Batch Data Load temporary tables:

    EXEC DBMS_STATS.DELETE_TABLE_STATS(ownname=>'RXC', TABNAME=>'TEMPORARY_BATCH_DCIS'); 
    EXEC  DBMS_STATS.LOCK_TABLE_STATS(ownname=>'RXC', TABNAME=>'TEMPORARY_BATCH_DCIS'); 
    EXEC DBMS_STATS.DELETE_TABLE_STATS(ownname=>'RXC', TABNAME=>'TEMPORARY_BATCH_DCMS'); 
     
    
  3. Lock statistics for the Batch Data Load temporary tables to enable dynamic sampling:

    EXEC  DBMS_STATS.LOCK_TABLE_STATS(ownname=>'RXC', TABNAME=>'TEMPORARY_BATCH_DCMS'); 
    EXEC DBMS_STATS.DELETE_TABLE_STATS(ownname=>'RXC', TABNAME=>'temporary_batch_data_items'); 
    EXEC  DBMS_STATS.LOCK_TABLE_STATS(ownname=>'RXC', TABNAME=>'temporary_batch_data_items');