8 Managing Batch Jobs

This section includes:

The Oracle Clinical parameterized job and report submission facility (PSUB) submits jobs to execute either on the Reports Server or on the back end server. Oracle Clinical uses Oracle Reports for reports, job sets and scheduling. The back end server, also called the PSUB server, handles only jobs implemented in PL/SQL or a third-generation language (3GL).

For troubleshooting information, see "PSUB Jobs". See also "Setting Up Batch Job File Viewing".

Note:

For information on managing Oracle Reports jobs, see the Oracle Application Server Reports Queue Manager documentation.

8.1 Account Requirements for Batch Jobs

To submit batch job requests, a user must have the following:

  • a user database account

  • PSUB User? set to Y in the Oracle Accounts table (This value can be set only by the Add User or Migrate User script. It is not updateable in the user interface.) The setting indicates the user has access to the ocpsub account as a proxy user for PSUB jobs.

  • a directory for reports output

  • an additional directory for certain batch job types; see "Creating Directories for Input and Output Files of Certain Job Types".

For instructions on setting up user accounts, see "Setting Up User Accounts".

8.2 How PSUB Handles a Request

When a user issues a PSUB request to run a job or report, the ocpsub database account acts as a proxy for the user (see "Securing PSUB"). The system sends a message via Oracle Advanced Queue (AQ) to the PSUB service that includes the batch job ID and the primary key to the RXC.BATCH_JOBS table.

When the process receives the message, it:

  • Reads the job information from the RXC.BATCH_JOBS table

  • Creates a subdirectory named with the batch job ID under the user-specific subdirectory; see "Securing PSUB"

  • Submits the job on the user's behalf with the PSUB Launcher (PSLAUNCH)

  • Places the following files in the batch ID subdirectory, as required, where nnnn represents the batch job ID.:

    • lnnnn.log: Log file of a user's PSUB job. Note that the initial character is the letter L, not the number one.

    • onnnn.out: Output from a report job.

    • pnnnn.log: Log file for a print request from the Submitted Batch Jobs form.

  • Copies the files to a database table BATCH_JOBS_LOBS, in a column with the CLOB data type. You can choose to delete the files from the temporary directory or not by setting OCL_STATE reference codelist value PSUB_DEL_FILES.

8.2.1 Asynchronous PSUB Requests

The Oracle Advanced Queue (AQ) mechanism is an asynchronous protocol, so messages remain in the queue until read by the process. This means that if a user makes a PSUB request and the process is not running, the request is read when the process is started again. Also, the DBA can safely stop and restart the process in a production environment, provided the delay is not too long. All nonblocking requests are processed, and all blocking requests start when the process comes up. You may have to resubmit the blocking job if you stop the PSUB process (daemon) while the blocking job is running.

8.2.2 Blocking and Nonblocking Jobs

Blocking jobs are usually of short duration and run in a mode where the system does not allow the user to proceed before their completion. Job completion status (SUCCESS or FAILURE) can be reported to the user immediately after the job completes. Blocking jobs in Oracle Clinical include:

  • Default layout generation

  • Moving a data entry screen to production

  • Generating a Validation Procedure

Nonblocking jobs include all reports, all jobs launched from the PSUB submission screen, and randomization.

When an application server submits a blocking job, it sends information through an entry in AQ through client_send method then waits on an application server-specific AQ server_recieve method for completion (execution) information, which it receives from PSUB. The pipe is maintained by the application and is named with a unique session name.

8.2.3 Checking a Nonblocking Batch Job

Users are not notified when nonblocking batch jobs complete. To check the job's status, they can execute a query in the Submitted Batch Jobs form, accessible via:

  • the Job Status button in the Submission of module window

  • the Batch Jobs item from the Action in-form menu

  • this command, entered from the opapps or system manager account:

    $ at -l
    

8.3 Securing PSUB

OCPSUB Proxy Database Account Users who need to submit PSUB jobs must have access to the login database using a proxy user, the ocpsub database account, to run PSUB jobs. The ocpsub account's credentials are stored in the Oracle Wallet created during the Oracle Clinical Database Server installation; the Oracle Clinical Database Installer prompted for the Wallet's location.

You must change the password for ocpsub before it expires; see "Changing the Password for the OCPSUB or RXC_DISC_REP Account" and "Setting Password Requirements for User Accounts".

File Security for Most PSUB Jobs You must create a directory to temporarily store PSUB log and output files and enter its path as the long value of the PSUB_LOGS_DIR value in the OCL_STATE local reference codelist. The first time a user runs a PSUB job in Oracle Clinical Release 5.0 or later, the system automatically creates a subdirectory under this directory for the user and places the generated log and output files there before writing them to a database table where they are stored permanently. When the user views or prints the files, the system displays or prints them directly from the database. Users have access only to files for jobs they submitted.

Although users have their own subdirectories, only the opapps account has access to the directories; the system checks the user account name against the user-specific directory name at runtime to grant access to the files. The system checks only the portion of the username that does not include OPS$ (if the username includes OPS$) because the OPS$ prefix is no longer required.

File Security for PSUB Jobs with Input Files Each type of batch job that uses input files requires that you set up a directory to contain these files; see "Creating Directories for Input and Output Files of Certain Job Types". For these you have the option to manually create user-specific subdirectories or to have users share access to a single directory. Unless you have very few PSUB users and they all have the same data access privileges, you should create individual subdirectories to ensure that users can see only files for jobs they submitted.

If the OCL_STATE reference codelist setting USERDIRS is set to Y, indicating that you have user-specific subdirectories, PSUB looks for the input or generates the output file in any directory at or below JOBTYPE_ROOT/user, where user must match the database account ID—minus the OPS$ string, if any—of the Oracle Clinical user who submitted the job.

Windows Only The Windows server that runs the PSUB service must belong to the same domain as the Windows server that runs the Oracle database.

This Oracle database security feature prevents unauthorized users from logging in over a network connection. For information on database security, see the Oracle® Database Security Guide 11g Release 2 (11.2) at http://docs.oracle.com/cd/E11882_01/network.112/e16543/title.htm.

8.4 Using PSUB in a RAC Environment

Oracle Clinical is certified on an Oracle Real Application Cluster (RAC) configuration to support multiple nodes with failover capabilities. Oracle recommends installing the Oracle Clinical Database Server, which includes the PSUB Server, on at least two RAC nodes. If PSUB goes down on one node, or if the node itself goes down, you can start PSUB on the other node with little interruption of service.

One and only one PSUB process (service) per database is required and can run on any RAC node where the Oracle Clinical database server is installed. Oracle Clinical cannot detect whether multiple PSUB services are running, so results are unpredictable if this is the case.

If the PSUB service fails, there is no notification of it. You must start PSUB manually for that database on the same or a different server and change the value of the SERVER_NAME setting in the OCL_STATE Local Codelist to the new PSUB server.

Tip:

Create the same directory structure for PSUB files on each computer where PSUB may run. That way you do not have to change the OCL_STATE reference codelist value for the five PSUB directories for jobs that use input files; see "Creating Directories for Input and Output Files of Certain Job Types".

If you use NFS to share the files, users will still be able to access files for jobs performed on the other node unless the node itself fails.

In the event of a PSUB failure, current PSUB jobs are affected differently based on their state at the time of PSUB failure:

  • SCHEDULED or ENTERED jobs are picked up by the new PSUB service when it is started

  • SUBMITTED jobs must be re-submitted

  • STARTED jobs continue to run if the server is still running, regardless of PSUB status

If the database instance on the PSUB server goes down, but its server is still active, PSUB continues to process jobs for the other database instances in the RAC environment.

PSUB continues to work when nodes are added or removed except when the node running PSUB is removed. In that case, you can start PSUB manually on a different node.

8.5 Starting and Stopping PSUB

This section includes:

8.5.1 Starting and Stopping PSUB Manually in UNIX

This section includes:

8.5.1.1 Starting PSUB Manually in UNIX

To start the PSUB service on UNIX:

  1. Log in as the opapps user. By default, the opapps uses the C shell.

  2. Set environment variables for the database name and code environment; see "Setting Environment Variables on the Command Line."

  3. Start the PSUB service:

    start_psub database_name code_environment wallet_alias

    For example:

    start_psub prod 52 prod

    where prod is the connect string for the database instance to which the PSUB service connects;

    where 52 is the name of the code environment;

    where wallet_alias is the name of the Wallet specified during installation. By default it is the same as the database name.

  4. If there are any errors, check the following log files in the $RXC_CENTRAL_LOG directory:

    • rxcpsd_instance_environment_1.log

    • rxcpsd_instance_environment_2.log

8.5.1.2 Stopping PSUB Manually in UNIX

The preferred way to stop the PSUB service is with the following utility, from the opapps account, after setting the correct environment. You need to be sure the TNS_ADMIN environment variable is set to the location of the sqlnet.ora file. The Installer puts sqlnet.ora in the opapps Home directory; see "Setting TNS_ADMIN on UNIX".

Use the echo command to check the setting, then stop PSUB.

echo $TNS_ADMIN
setenv TNS_ADMIN $HOME
stop_psub database_name][environment Wallet_alias

8.5.2 Starting and Stopping PSUB Automatically in UNIX

On UNIX systems, you can automate the process of starting and stopping PSUB.

8.5.2.1 Starting PSUB Automatically in UNIX

The following example shell scripts for Sun Solaris show how to make the process start automatically at system startup:

# File: /etc/init.d/dbora
ORA_HOME=/u01/app/oracle/product/12.1.0.2
ORA_OWNER=oracle 
if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]
then
   echo 'Oracle startup: cannot start'
   exit
fi
case "$1" in
'start')
echo 'Starting Oracle...'
su - $ORA_OWNER -c $ORA_HOME/bin/dbstart
su - $ORA_OWNER -c "lsnrctl start"
su - opapps -c start_psub
;;
'stop')
echo 'Stopping Oracle...'
su - opapps -c stop_psub 
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut
;;
esac
# File: start_psub
# Start database 1
start_psub db_name1 code_environment wallet_alias
# Start database 2
start_psub db_name2 code_environment wallet_alias

For example:

# Start database 1
start_psub venus 52 wallet_alias
# Start database 2
start_psub pluto 52 wallet_alias

where the database names are venus and pluto and you have installed Oracle Clinical 5.2.

8.5.2.2 Stopping PSUB Automatically in UNIX

You can automate the shutdown of the PSUB service on UNIX so that it does not require the entry of a password.

The following example shell scripts for Sun Solaris show how.

# File: /etc/init.d/dbora
ORA_HOME=/u01/app/oracle/product/12.1.0.2
ORA_OWNER=oracle 
if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]
then
  echo 'Oracle startup: cannot start'
  exit
fi
case "$1" in
'start')
echo 'Starting Oracle...'
su - $ORA_OWNER -c $ORA_HOME/bin/dbstart
su - $ORA_OWNER -c "lsnrctl start"
su - opapps -c start_psub
;;
'stop')
echo 'Stopping Oracle...'
su - opapps -c stop_psub 
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut
;;
esac
# File: stop_psub
# Stop database 1
set TNS_ADMIN= opapps_home_dir
export TNS_ADMIN
stop_psub venus 52 wallet_alias
# Stop database 2
stop_psub pluto 52 wallet_alias

where the database names are venus and pluto and you have installed Oracle Clinical 5.2.

8.5.3 Starting and Stopping PSUB Manually in Windows

This section includes:

8.5.3.1 Installing PSUB in Windows

On Windows, you must first install the PSUB process as a service:

  1. Log in to the Windows server as Administrator or as a user with administrative privileges.

  2. Open a Command Prompt window:

    • If you logged in as Administrator, click Start, then Run, then enter cmd.

    • If you logged in as a different user with administrative privileges, click Start, type cmd in the Start search box, then right-click cmd in the list and click Run as administrator.

  3. Enter the following commands:

    set p1=database-connect-string
    set p2=code-environment
    opa_setup
    cd %RXC_BIN%
    rxcpsdps -install database-connect-string database-instance-name
    
  4. Navigate to Start, then Administrative Tools, then Services.

  5. In the Services window, right-click on the PSUB service, then click Properties. The PSUB Service Properties window opens.

  6. In the General tab, set the Startup Type to Manual.

  7. In the Log On tab, select This Account, then click Browse.

  8. Enter: opapps, then click Check Names. The system enters the relative location to opapps.

  9. Click OK. The system returns to the PSUB Service Properties window.

  10. Enter and confirm the opapps password, and click OK.

  11. Log out from this Administrator session.

8.5.3.2 Starting PSUB Manually in Windows

To start the PSUB service on Windows:

  1. Log in as opapps. (You set up the PSUB service to start as the opapps user, but in Windows you can start the service when logged on as another user.)

  2. Set the PSUB service parameters:

    1. In the Start menu, navigate to Administrative Tools, then Services.

    2. From the list of services in the Services dialog box, double-click the name of the database for this service. It is in this form:

      PSUB Service database

    3. Enter values for the Log On parameters:

      database code_environment [verbose | noverbose] value-of-RXC_ROOT wallet_alias

      For example: prod 52 verbose c:\\opapps\\oc\\52 <Wallet_name>

      where prod is the connect string for the database instance to which the PSUB service connects;

      where 52 is the name of the code environment;

      where wallet_alias is the name of the Wallet specified during installation.

      Note:

      If your entry requires a backslash (\), you must enter two (\\). Alternatively, you can enter the path using single forward slashes, for example, c:/OPA_HOME/oc/52.
  3. Click Start.

  4. Exit from the Services dialog box.

  5. Check the PSUB service log file in <RXC_ROOT>/log for any warning or error messages.

8.5.3.3 Stopping PSUB Manually in Windows

Do not use Enterprise Manager to stop opapps sessions on Windows; instead, use the Control Panel on the appropriate local machines.

To stop the PSUB service:

  1. Log in as the PSUB user; in this case, opapps.

  2. Open the Services control panel.

  3. In the Services dialog box, select the PSUB service for the particular database and open the Properties window. The PSUB service for the venus database, for example, might appear as:

    psub service venus
    
  4. In the Properties window, click Stop.

8.5.4 Starting PSUB Automatically in Windows

This section includes:

You must first install PSUB; see "Installing PSUB in Windows".

The batch file is required in large databases that take so much time to come up during a server reboot so that the system tries to start PSUB before the database is fully up. In this case the PSUB service does not start and an error like the following appears in the PSUB log file (found in the drive:\opapps\oc\52\log directory):

ERROR:Daemon error while connecting:/@devoc
ORA-1033: ORACLE initialization or shutdown in progress

8.5.4.1 Creating a System Environment Variable

You can specify that the PSUB service starts automatically when the Windows PSUB server re-boots. The service parameters are read from a system environment variable whose name concatenates PSUBSERVICE with the database name.

To create a system environment variable in Windows:

  1. Navigate from Start to the Control Panel, then click on the System and Security link. The System and Security window opens.

  2. Click the System link. The System window opens.

  3. Click the Advanced System Settings link at the top left corner. The System Properties window opens.

  4. Select the Advanced tab, then click Environment Variables.

  5. Click New under System Variables in the lower portion of the window to define the variable.

    For the variable name, enter the string PSUBSERVICE concatenated with the database name; for example, for the database sun6x2:

    PSUBSERVICESUN6X2

    For the variable value, use the format: database_id code_environment verbose RXC_ROOT wallet_alias; for example:

    pluto 52 verbose t:\\opapps\\oc\\52 wallet_alias

    where pluto is the database ID and RXC_ROOT is t:\opapps\oc\52.

    Note that if you need a backslash (\) in the text box, you must double it (\\).

8.5.4.2 Creating a Batch File

Create a batch file called 'psub_start1.bat' in the %RXC_ROOT%/log directory (for example, D:\opapps\oc\52\log) with the following contents.

cmd /c echo Current Date/time= %DATE% %TIME% > psub_start1.log 
cmd /c echo Starting Time Delay > psub_start1.log
ping localhost -n 180 > nul 
cmd /c net start "PSUB Service database_id" > psub_start1.log 

Notes:

  • "PSUB Service database_id" is the PSUB service name that appears in the Services window (under Administrative Tools from the Control Panel).

  • You can repeat the following command for different databases if needed:

    cmd /c net start "PSUB Service database_id" > psub_start1.log 
    
  • The 'ping localhost' command introduces a time delay to ensure that the database is up before starting PSUB. You can increase this value—set to 180 seconds (3 minutes) in the example above—if required.

8.5.4.3 Scheduling the Batch File and Testing the Setup

To schedule batch file execution:

  1. Navigate to Start, then Administrative Tools, then Services. Scroll down and make sure that the Task Scheduler service is started.

  2. Navigate to Start, then Administrative Tools, then Task Scheduler. The Task Scheduler window opens.

  3. Click the Create Basic Task link on the right. The Create Basic Task wizard appears.

  4. Enter a Name and Description and click Next.

  5. In the Task Trigger window, select When the computer starts and click Next. The Action window appears.

  6. In the Action window select Start a program and click Next. The Start a Program window appears.

  7. In the Start a Program window, click Browse. The Browse window appears.

  8. In the Browse window, browse to the directory where psub_start1.bat is saved and then select psub_start1.bat. Leave the other boxes empty and click Next.

  9. Select Open the Properties dialog for this task when I click Finish and click Finish. The Properties dialog box opens.

  10. In the Properties dialog box, General tab, Security options section, click Change User or Group and select Administrator.

    To test, shut down the service if necessary (see "Stopping PSUB Manually in Windows") and double-click on file psub_start1.bat to test that it starts the PSUB service. Verify that the log file psub_start1.log is created in the same directory unless a different path was specified.

  11. In the Services window under Administrative Tools in the Control Panel, right-click the PSUB Service, click Properties, and change its Startup Type to Manual.

    To test, restart the computer and check the Services window to see if the PSUB service has started. If it has, submit a PSUB job such as Batch Validation and check if it runs.

8.5.4.4 Adding a Shortcut

For convenience add a shortcut for psub_start1.bat on the desktop to manually start PSUB by double-clicking the icon.

8.6 Managing the PSUB Process

This section includes:

8.6.1 Changing PSUB Job Number Sequencing

A sequence generator numbers Oracle Clinical submitted batch jobs. By default, at each submission the generator increments by 10 the database seed number you provide during back end installation. Change the default by running alter_psub_seq.sql, found in the INSTALL directory, which lists current settings and asks for:

  • start value – number to append to the initial job ID

  • increment – the value to add to the job ID for each subsequent job.

For example:

Start Value Increment Job ID Numbers
1 10 1, 11, 21, 31…
21 100 21, 121, 221, 321…

The value entered for the "start value" for the PSUB batch job number does not need to be the same as the database seed.

Tips: If users are accessing multiple databases, keep the batch job numbers generated by each database unique so that the log files do not collide.

Keep the increment of the batch job numbers as small as possible so that batch job numbers do not grow too large.

8.6.2 Viewing the Status of a Submitted Batch Job

You view the status of submitted batch jobs in the Submitted Batch Jobs window, which you access by selecting: Admin, then PSUB/Reports Jobs, and Batch Jobs. This window provides information about the batch jobs, including logs, output file names, and stop jobs you have submitted. The most recently submitted jobs are listed first.

You cannot use this window to update fields. If you are viewing this form while the job is executing, requery the form periodically to see the statuses change, or press the Auto Refresh button. Press the button again to turn off the auto query.

If a particular PSUB process (service) fails, you can start another PSUB service for that database on another server. You do not receive a specific notification if a PSUB service fails.

Oracle Clinical 5.0 and later support one PSUB service per database that can run on any one of the RAC nodes or on a non-RAC server. Since Oracle Clinical cannot detect whether multiple PSUB services are running, such a situation is unpredictable.

Batch job execution statuses:

  • ENTERED = User has requested submission of the job.

  • SUBMITTED = Job has been submitted to the batch queue.

  • SUBMIT_FAILED = Job failed to be submitted to the batch queue.

  • STARTED = Job is currently executing.

  • SUCCESS = Job has completed successfully.

  • FAILURE = Job has completed unsuccessfully. Reason displayed in Failure Text field.

  • STOPPED = Job has been stopped by the Stop button.

  • STOP_FAILED = Job has not responded to the Stop button.

8.6.3 Removing the PSUB Service

On Windows, you can remove (uninstall) the PSUB service as follows:

  1. Log in to the Windows server as Administrator or as a user with administrative privileges.

  2. Open a Command Prompt window:

    • If you logged in as Administrator, click Start, then Run, then enter cmd.

    • If you logged in as a different user with administrative privileges, click Start, type cmd in the Start search box, then right-click cmd in the list and click Run as administrator.

  3. Set environment variables for the database name and code environment; see "Setting Environment Variables on the Command Line."

  4. Enter the following commands:

    cd %RXC_BIN%
    rxcpsdps -remove database-connect-string database_instance_name
    
  5. Log out from this Administrator session.

8.6.4 Viewing Log and Output Files on the Screen

This section includes:

8.6.4.1 Viewing Logs that Concern Execution of PSUB Processes

The PSUB service writes to log files pointed to by the variable RXC_CENTRAL_LOG. RXC_CENTRAL_LOG is defined as $rxc_root/log (on UNIX), or %rxc_root%\log (on Windows). Do not redefine this variable to any other values.

Note:

On UNIX systems, you must stop the PSUB service to view the contents of this log file, because it will be locked.

However, the following file can be read while the PSUB service is running:

Operating System Example Path and File Name for Log File
UNIX $RXC_CENTRAL_LOG/rxcpsd_instance_environment_1.log
Windows %RXC_CENTRAL_LOG%\rxcpsd_instance_environment_1.log

If the process is running in verbose mode more information is written to the log file. You cannot switch from non-verbose to verbose modes while the process is running; you must stop and restart the process to switch mode.

8.6.4.2 Viewing Logs for Individual PSUB Jobs

Log and output files are always placed in the log directory in your home directory on the server on which PSUB is running. You cannot update log and output file names. The names of the files are structured such that the unique batch job ID for the job is given an:

  • "l" prefix for the log file

  • "o" for the output file.

For example, a batch job ID of 12345 would have an output file name of:

  • $RXC_LOG/user/o12345.out (for UNIX)

  • %RXC_LOG%\o12345.out (for Windows)

and a log file name of:

  • $RXC_LOG/12345.log (for UNIX)

  • %RXC_LOG%\12345.log (for Windows)

To view the output or log file on the screen, click the View Output or View Log button and enter the relevant information in the window.

8.6.4.3 Printing Output or Log Files

To print the output or log file, press the Print Output or Print Log button. In the pop-up box, specify the printer.

For printing, PSUB uses the standard lp command (on UNIX) or print functions (on Windows). No other environment variables control printing.

Printing from PSUB jobs on a UNIX server to a Windows spooler is not supported.

8.6.5 Using Job Sets to Control Execution Order

You can create a job set to control the execution order when you want jobs that depend on other jobs to execute only if the jobs on which they depend have successfully executed. If any of the jobs in a job set exits with a status of SUBMIT-FAILED or STOPPED, the whole job set aborts with a status of FAILURE. The basic steps are:

  1. Create a Job Set

  2. Submit a Job Set

Note:

All jobs included in a job set must have a saved parameter set. No job included in a job set can have a LOCAL_IMMEDIATE mode of execution

8.6.5.1 Create a Job Set

  1. Save a parameter set for each job to be included in the job set, if that has not been done already.

  2. Select Admin, then PSUB Jobs, and Job Sets.

  3. Enter a name for the job set (alphabetic characters only).

  4. In the Job Label field, enter a short name for the first job in the sequence. You use this name in the fields under JOB LABEL to the right.

    Note:

    No jobs included in a job set can have a LOCAL_IMMEDIATE mode of execution
  5. Enter the name of the saved parameter set for the job. list of values available.

  6. Set the timeout limit for the job in minutes. Default: 720 (12 hours).

  7. The next three fields set the execution order and conditional branching. Enter the job label for the job you want to run next if the current job runs successfully, fails, or times out. If you leave one of these fields blank, the entire job set will stop executing if the current job has the corresponding result. For example, if you leave the Failure field blank and the current job fails, Oracle Clinical stops executing the entire job set.

Oracle Clinical enters the task name for the parameter set you entered.

Repeat this process for each job in the job set.

8.6.5.2 Submit a Job Set

  1. Select Admin, then PSUB Jobs, and Submit Job Set.

  2. Enter a job set name. An list of values is available.

  3. Click Submit Job.

A job set controls the execution order for a specified set of jobs, so that jobs that depend on other jobs will execute only if the jobs on which they depend have been successfully executed. If any of the jobs in a job set exits with a status of SUBMIT-FAILED or STOPPED, the whole job set aborts with a status of FAILURE. You create job sets by selecting Admin, then PSUB, and Job Set.

Note:

It is not necessary to wait until Oracle Clinical has executed one job before you submit another job.

8.6.6 Tracking PSUB Processes

Before starting a PSUB service, you may want to know the answer to such questions as, "Where was PSUB last running?", or "Where was PSUB running on such-and-such a date?" You can query the table RXC.PSUB_PROCESS_LOG to find out, for a given database, the instance, the environment, and the time a PSUB service was started and the time it was stopped.

Table 8-1 Description of Table RXC.PSUB_PROCESS_LOG

Column Name Type Description

PSUB_PROCESS_LOG_ID

NUMBER

ID

HOST

VARCHAR2(64)

Host name

SERVER_OS

VARCHAR2(8)

The type of operating system on the server where PSUB runs

START_TS

DATE

The time stamp when the PSUB service started

CODE_ENVIRONMENT

VARCHAR2(20)

Code environment

VERBOSE

VARCHAR2(1)

Y or N

STOP_TS

DATE

The time stamp when the PSUB service stopped


For example, this query will give you the host and code environment of the last time PSUB was started against the database:

SQL> select start_ts, host, code_environment
  2  from psub_process_log
  3  where start_ts = (
  4  select max(start_ts) from psub_process_log);

This query will list all starts and stops, in time order:

SQL> select start_ts, stop_ts, host, code_environment
  2  from psub_process_log
  3  order by 1;

8.7 Required Reference Codelist Settings for Batch Jobs

Oracle Clinical manages batch jobs through entries in these reference codelists. See Chapter 7, "Reference Codelists" for additional information:

For more information on the OCL_STATE settings, see "Entering Reference Codelist Values".