Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 Configuration Guide


24.2.1 Setting up JP1/AJS3 to use an external database

The following figure shows an overview of setup for using an external database.

Figure 24‒1: Overview of the setup process for using an external database

[Figure]

The following procedure shows how to set up JP1/AJS3 to use an external database.

  1. Prepare the external database.

    For details about the preparations for using an external database, see 24.1 Preparations for using an external database.

  2. Suppress startup of the jajs_dbmd process.

    Suppress startup of the jajs_dbmd process and the ajsdbmgrd process (child process of jajs_dbmd) by editing the JP1/AJS3 startup process definition file (jp1ajs_spmd.conf) and the JP1/AJS3 extended startup process definition file (jp1ajs_service_0700.conf). If you do not specify this setting, startup of the ajsdbmgrd process fails and the JP1/AJS3 service does not start.

    For details about the procedure for suppressing startup of the jajs_dbmd process, see 24.2.2 Suppressing startup of the jajs_dbmd process.

    For details about the JP1/AJS3 extended startup process definition file, see 6.3 Changing the behavior of JP1/AJS3 if a JP1/AJS3 process terminates abnormally in the JP1/Automatic Job Management System 3 Administration Guide.

  3. Change the database configuration of JP1/AJS3 from the standard configuration to the standard configuration without ISAM.

    The external database can be used only in the standard configuration without ISAM. For details about how to change the standard configuration to the standard configuration without ISAM, see 6.8.2 Changing the JP1/AJS3 database configuration to the standard configuration without ISAM (in Windows) or 15.9.2 Changing the JP1/AJS3 database configuration to the standard configuration without ISAM (in UNIX).

  4. Run the jajs_setup command to set up the execution agent information.

    Execute the following command:

    jajs_setup -G -a
    -k SQLSVR
    -of ODBC-file-data-source-name
    -od database-name

    For details about the jajs_setup command, see jajs_setup in 2. Commands Used during Setup in the manual JP1/Automatic Job Management System 3 Command Reference.

  5. Use a program such as Windows Explorer to create the following folders:

    • Database folder

    • Folder for temporary files

    • Job information folder

    • Backup information folder

    Make sure that all of the folders other than the folder for backup information do not have the same name as any folder used by any other scheduler service that is set up on the same host. In addition, make sure that you do not create any of the folders inside a folder used by a different scheduler service.

  6. Run the jajs_setup command to set up a scheduler service that uses an external database.

    Execute the following command:

    jajs_setup
    -a
    -k SQLSVR
    -F scheduler-service-name
    -n scheduler-service-identification-number
    -p service-for-the-port-reporting-the-job-status
    -d database-folder
    -t folder-for-temporary-files
    -j job-information-folder
    -b backup-information-folder
    -of ODBC-file-data-source-name
    -od database-name
    [-E {byte | sjis}]
  7. Set the STDFILEOUTDIR environment setting parameter.

    In an environment where the external database is used, you must use the STDFILEOUTDIR environment setting parameter to specify the directory for storing standard output files and standard error output files for the job specified in the ajsshow command.

    Execute the following command:

    jajs_config -k "[JP1_DEFAULT\JP1AJSMANAGER\scheduler-service-name]" "STDFILEOUTDIR"="directory"

    For directory, specify a directory that is not used by any existing scheduler services.

    Note that the files that are output to the specified directory are not deleted automatically. Manually delete them on a regular basis if it is necessary to do so.

    For details about the ajsshow command, see ajsshow in 3. Commands Used for Normal Operations in the manual JP1/Automatic Job Management System 3 Command Reference.

    For details about the STDFILEOUTDIR environment setting parameter, see 20.4.2(125) STDFILEOUTDIR.

  8. Specify a port number for the service name of the job status notification port.

    Skip this step if, in step 6, you specified the service name (jp1ajs2report) that was created during installation.

    Open the following file in a text editor such as Notepad.

    If you are using a Windows host:

    system-folder\system32\drivers\etc\Services

    If you are using a UNIX host:

    /etc/services

    Specify a port number to correspond to the service name of the job status notification port specified in step 6.

    Example: To set the port number to 20248

    jp1ajs2report2   20248/tcp
    Important

    Make sure that the port number you specify does not duplicate any existing port number. To use JP1/AJS3 in an environment with a Windows Firewall, register the port number you specified (in the above example, service name jp1ajs2report2 and port number 20248) in the Windows Firewall rules so that data will be able to pass through the firewall.

Cautionary note

Because the external database is accessed via a network, the following problems might occur due to a temporary error such as a communication failure:

  • JP1/AJS3 fails to start.

  • JP1/AJS3 operation temporarily stops.

If a temporary error occurs, restart JP1/AJS3 so that JP1/AJS3 startup will succeed or JP1/AJS3 operation will continue.

To change the interval at which restart is attempted and the maximum number of times restart is attempted, change the relevant settings in the extended startup process definition file. For details about the extended startup process definition file, see 6.3.1 Restarting an abnormally terminated JP1/AJS3 process in the JP1/Automatic Job Management System 3 Administration Guide.

Note that the changes are applied to the host service (jajs_hstd process) and scheduler service (jajs_schd process).