Hitachi

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


24.3.1 Procedure for exporting data to the external database

The following figure shows an overview of exporting data to the external database.

Figure 24‒2: Overview of exporting data to the external database

[Figure]

The following shows the procedure for exporting data to the 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. Back up the settings of the manager host.

    Back up the following types of information that were used in the embedded database:

    • Execution agent information

    • Definitions of units other than root job groups#

    • Root job group information#

    • Calendar information for root job groups#

    #

    If multiple scheduler services have been set up on the manager host, repeat the backup step for each scheduler service.

    For details about how to back up, see 2.2.3 Backing up the JP1/AJS3 - Manager setup information in the JP1/Automatic Job Management System 3 Administration Guide.

  3. Back up the registered execution-schedule information for jobnets.

    If multiple scheduler services have been set up on the manager host, repeat the backup step for each scheduler service.

    For details about how to back up, see 3.4 Backing up and recovering the execution registration status of jobnets by using the ajsrgexport and ajsrgimport commands in the JP1/Automatic Job Management System 3 Administration Guide.

  4. If necessary, back up the embedded database.

    Back up the embedded database because if the setup for using the external database fails, you might need to use the embedded database again. For details about how to back up and restore an embedded database, see F.1 Overview of database backups in the JP1/Automatic Job Management System 3 System Design (Configuration) Guide.

  5. Run the ajsembdbidlist command to obtain the setup identifiers (_JFn) of the embedded database instances and the names of scheduler services that are used on the physical host.

    The setup identifiers (_JFn) and scheduler service names that you obtained in this step are to be used in the subsequent steps.

    Execute the following command:

    ajsembdbidlist -a
  6. Delete the scheduler service that uses the embedded database.

    Delete all scheduler services whose names you obtained in step 5. For details about the procedure for deleting a scheduler service, see 6.1.1(2) Deleting a scheduler service that has been added (for Windows) or 15.1.1(2) Deleting a scheduler service that has been added (for UNIX).

    Important
    • For the AJSROOT1 scheduler service that is created during installation, folders (directories) having the names specified for the environment setting parameters listed in the following table are created. Delete these folders (directories) in a step for deleting the folders that were created when a scheduler service was added.

      Table 24‒2: AJSROOT1 related folders (directories) to be deleted

      Folder (directory)

      Environment setting parameter

      Database folder specified in the -d option

      [JP1_DEFAULT\JP1AJSMANAGER\AJSROOT1]"AJSDBDIRECTORY"=

      Folder for temporary files specified in the -t option

      [JP1_DEFAULT\JP1AJSMANAGER\AJSROOT1]"AJSTMPDIR"=

      Job information folder specified in the -j option

      [JP1_DEFAULT\JP1AJSMANAGER\AJSROOT1]"JOBINFDIR"=

      Backup information folder specified in the -b option

      [JP1_DEFAULT\JP1AJSMANAGER\AJSROOT1]"AJSBKUROOT"=

    • In the last step of the procedure for deleting a scheduler service, you do not need to restart the JP1/AJS3 service.

  7. Run the ajsembdbunset command to undo the setup of all instances of the embedded database that you checked in step 5.

    Execute the following command:

    ajsembdbunset -e -id embedded-database-setup-ID

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

  8. Run the ajsembdbuninstl command to uninstall all instances of the embedded database that you obtained in step 5.

    Uninstall all instances of the embedded database, including the one whose setup identifier is _JF0.

    Execute the following command:

    ajsembdbuninstl -id setup-identifier

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

  9. 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.

  10. 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 (for Windows) or 15.9.2 Changing the JP1/AJS3 database configuration to the standard configuration without ISAM (for UNIX).

  11. 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.

  12. 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.

  13. 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}]
  14. 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.

  15. Import the information that you backed up in steps 2 and 3.

    For details about how to import the information, see 2.3.4(8) Recovering the execution agent information in the JP1/Automatic Job Management System 3 Administration Guide , 2.3.4(9) Recovering the unit definition in the JP1/Automatic Job Management System 3 Administration Guide and 3.4 Backing up and recovering the execution registration status of jobnets by using the ajsrgexport and ajsrgimport commands in the JP1/Automatic Job Management System 3 Administration Guide.

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

    Skip this step if, in step 13, 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 13.

    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).