Job Management Partner 1/Software Distribution Setup Guide

[Contents][Glossary][Index][Back][Next]

7.4.6 Reorganizing the database

Reorganizing the database is a maintenance task performed as part of regular operations. For more information about when to reorganize the database, see 5.2.1(2) Reorganizing the database in the manual Administrator's Guide Volume 2.

The two ways to reorganize Embedded RDB are by using Database Manager and by using a command. The following describes each method.

Organization of this subsection
(1) Database reorganization using Database Manager
(2) Database reorganization using a command
(3) Error handling

(1) Database reorganization using Database Manager

Notes
  • Before you reorganize the database, stop Remote Install Server service by opening Control Panel, and then choosing Administrative Tools, and Services.
  • If you are using Asset Information Manager Subset, stop the Asset Information Manager Subset services in the following order.
    1. World Wide Web Publishing Service or World Wide Web Publishing
    2. Commands and tasks of the Asset Information Synchronous Service and Asset Information Manager Subset
    3. JP1/Client Security Control - Manager (applicable if JP1/CSC is linked)
    To use Asset Information Manager Subset after you have used the Database Manager, start the services in the reverse order from which that listed above.
  • If a connection pool has been set up in the ODBC database, the connected status will not change from the time that the Asset Information Manager Subset job was stopped until the timeout time set in the connection pool elapses. Therefore, wait for the connected status to change before reorganizing the database.

This subsection describes how to use Database Manager to reorganize a database.

To reorganize a database:

  1. In the Welcome dialog box, select Reorganize the database and then click the Next button.
    The Authentication Information of Database dialog box appears.
  2. In the Authentication Information of Database dialog box, specify the password and then click the Next button.
    The Reorganize Database dialog box appears.

    Figure 7-21 Reorganize Database dialog box

    [Figure]

    Reorganize the range
    You can select the portion (range) of the database to be reorganized.
    When you select the All check box, all the other check boxes are disabled. When you clear the All check box, all check boxes are enabled.
    If you select any check box other than All, the All check box is disabled. The default is that the All check box is selected.
    The following table lists the tables that correspond to each reorganization range.

    Table 7-3 List of tables corresponding to each reorganization range

    Reorganize the range Tables
    All System configuration netmdm_nnm_management, netmdm_system, netmdm_lastupdate, netmdm_host_withoutdm, netmdm_system_delete, netmdm_systeminf, netmdm_suspend
    Package netmdm_cabinet, netmdm_package, netmdm_package_inf
    Destination netmdm_id, netmdm_id_policy, netmdm_identry, netmdm_node, netmdm_node_policy netmdm_node_policy_detail
    Job netmdm_collect, netmdm_execution, netmdm_execution_site, netmdm_execution_summary, netmdm_jobgen, netmdm_jobgen_collect, netmdm_jobgen_id, netmdm_jobgen_node, netmdm_jobgen_pack, netmdm_jobgen_soft, netmdm_jobgen_system, netmdm_jobgen_userinv, netmdm_jobsch, netmdm_jobsch_site, netmdm_jobscript, netmdm_schedule, netmdm_stscnt, netmdm_jobgen_msg, netmdm_jobgen_monitoring, netmdm_stscnt_site, netmdm_stscnt_summary, netmdm_systemjob
    Inventory netmdm_clientlist, netmdm_inspackage, netmdm_inventry, netmdm_mnglist, netmdm_registry, netmdm_reglist, netmdm_softwaredic, netmdm_softwaredel, netmdm_softwarelicence, netmdm_userinventry, netmdm_userinvlist, netmdm_oidlist, netmdm_discovery_setup, netmdm_discovery_community, netmdm_discovery_info, netmdm_discovery_options, netmdm_monitoring_filter, netmdm_monitoring_policy, netmdm_monitoring_program, netmdm_monitoring_permission, netmdm_monitoring_result, netmdm_monitoring_work, netmdm_vidlist, netmdm_activedirectory, netmdm_adproperty, netmdm_addictionary, netmdm_adupdate, netmdm_monitoring_webfilter, netmdm_adgroup
    Operation monitoring logs netmdm_monitoring_security, netmdm_monitoring_workresult
    Security update netmdm_ospatch_patchinf, netmdm_ospatch_productref, netmdm_ospatch_classref, netmdm_ospatch_xmlinf, netmdm_ospatch_script
  3. In the Reorganize Database dialog box, specify the desired reorganization range and then click the Next button.
    The Execute Reorganization of Database dialog box appears.

    Figure 7-22 Execute Reorganization of Database dialog box

    [Figure]

  4. Click the Execute button.
    Database reorganization is executed.

(2) Database reorganization using a command

This subsection describes the netmdb_reorganization.bat command that can be used to reorganize a database. This command is stored in the JP1/Software Distribution Manager Embedded RDB Edition installation directory \bin.

Before you reorganize the database, stop Remote Install Server service by opening Control Panel, and then choosing Administrative Tools, and Services.

Also, if you are using Asset Information Manager Subset, stop the Asset Information Manager Subset services in the following order.

  1. World Wide Web Publishing Service or World Wide Web Publishing
  2. Commands and tasks of the Asset Information Synchronous Service and Asset Information Manager Subset
  3. JP1/Client Security Control - Manager (applicable if JP1/CSC is linked)

To use Asset Information Manager Subset after you have used the Database Manager, start the services in the reverse order from that listed above.

Note that if a connection pool has been set up in the ODBC database, the connected status will not change from the time that the Asset Information Manager Subset job was stopped until the timeout time set in the connection pool elapses. Therefore, wait for the connected status to change before reorganizing the database.

Function
This command reorganizes a database. It assumes All as the reorganization range.

Format
netmdb_reorganization.bat port-number
                          administrator-ID
                          password
                          /i JP1/Software-Distribution-Manager-installation-directory
                          /o execution-result-output-file-name

Options
  • port-number
    Specifies the port number used to connect the database.
  • administrator-ID
    Specifies the administrator ID used to log in to the database.
  • password
    Specifies the password used to log in to the database.
  • /i
    Specifies the full path of the JP1/Software Distribution Manager installation directory.
  • /o
    Specifies that a file containing the results of database reorganization is to be output. Specify the full path of the file to which the execution result is to be output.

Return code
The following table shows the return codes for the netmdb_reorganization.bat command:
Return code Description
0 Normal termination
-1 Abnormal termination

Notes
  • Do not change the contents of the BAT file for the netmdb_reorganization.bat command. If the contents are changed, the database can no longer be reorganized.
  • To use the netmdb_reorganization.bat command to reorganize a database, the user who executes the command must have Administrator permissions.
  • You must specify the netmdb_reorganization.bat command's options in the order shown above in Format.

Example
This example uses the netmdb_reorganization.bat command to reorganize the database.
This example specifies each directory as follows:
  • JP1/Software Distribution Manager installation directory
    C:\Program Files\Hitachi\NETMDM
  • Execution result output file name
    C:\NETMDB\reorg.txt
Before executing the command, you must create the directory for storing the execution result output file.
The following shows an example of command execution:
netmdb_reorganization.bat port-number user-ID-of-administrator password /i "C:\Program Files\Hitachi\NETMDM" /o C:\NETMDB\reorg.txt

(3) Error handling

(a) RD area of the database is shut down

If the following message is output, indicating that an error occurred while reorganizing the database, the RD area is shut down.

KFPH00306-E RDAREA "RD area name" held due to error

For details on how to open the shut-down RD area, see 6.3.2 (8) Error in the embedded RDB environment in the manual Administrator's Guide Volume 2.

(b) Insufficient work area that is required for exclusive use by the database

If the following message is output, indicating that an error occurs while reorganizing the database, there was insufficient work area for exclusive use by the database.

KFPS00443-I Insufficient memory in lock table. server=sds01, code=10, using=number, total=number, PROGRAM=pdrorg
KFPS00447-I Insufficient exclusive control table information output to datetime.mem file
KFPA11912-E Insufficient memory for DB exclusive control
KFPL15226-E Delete request failed, table=NETMDM."NETMDM_MONITORING_SECURITY", server=sds01
KFPH00306-E RDAREA "NETMDM_NETM_MONITORING" held due to error occurred in log less utility
KFPH00306-E RDAREA "NETMDM_NETM_INDEXES" held due to error occurred in log less utility
KFPL15225-E Rollback called
KFPL00719-I Pdrorg terminated, return code=8

This means that the database's exclusive control work area is insufficient in RD areas NETMDM_NETM_MONITORING and NETMDM_NETM_INDEXES.

To adjust the database's exclusive control work area: (The user who executes the command below must have Administrator permissions.)

  1. Start the command prompt.
  2. Execute the pdntcmd.bat command located in JP1/Software Distribution Manager installation target directory \NETMDB\BIN.
  3. At the command prompt, execute pddbls -r RDarea-name -a.
    The following are command execution examples:
    pddbls -r NETMDM_NETM_MONITORING -a
    pddbls -r NETMDM_NETM_INDEXES -a
    The RD area's unused segment and total segment counts are displayed. A display example is shown below.
     SEGMENT unused-segment-count / total-segment-count
  4. Calculate the number of RD area segments in use from the information displayed.
    segments-in-use = total-segment-count - unused-segment-count
    Find the total value by calculating the number of segments in use in each RD area for all RD areas in which there was insufficient exclusive control work areas.
  5. From the total number of segments in use, calculate the required number of exclusive control work area needed by the database.
    value-of-work-area-required-for-exclusive-control# = (total-number-of-segments-in-use) [Figure] 6
    #: If necessary, round up to the next whole number.
  6. Using a text editor, open the sds01 file located in JP1/Software Distribution Manager installation target directory \NETMDB\CONF.
    Notes
    If the sds01 file settings are incorrect, the database may not start. Back up the file before editing it.
  7. Change the value in the sds01 file for the exclusive control work area.
    Change number in the sds01 file as shown below to the value of the exclusive control work area calculated in step 5.
    set pd_lck_pool_size = number
  8. At the command prompt, execute pdconfchk.
    Check that command execution has resulted in a message of KFPS05007-I (return code = 0).
  9. Execute the netmdb_stop.bat command located in JP1/Software Distribution Manager installation target directory \BIN to stop the database.
  10. Execute the netmdb_start.bat command located in JP1/Software Distribution Manager installation target directory \BIN to start the database.