Hitachi

JP1 Version 12 JP1/Service Support Configuration and Administration Guide


11.2.2 Deleting Items from the Item management database

This subsection describes how to delete multiple Items at once from the Item management database.

The procedure differs depending on the operating status of JP1/Service Support.

If you can stop JP1/Service Support operation:

See (1) Deleting Items after stopping JP1/Service Support operation. In this case, you can back up the Item management database.

If you cannot stop JP1/Service Support operation:

See (2) Deleting Items without stopping JP1/Service Support operation. In this case, you can use a CSV file to store information about the Items to be deleted.

Organization of this subsection

(1) Deleting Items after stopping JP1/Service Support operation

The following describes how to stop JP1/Service Support operation and then delete multiple Items at once from the Item management database.

If the Item management database already contains Items that are waiting to be deleted, you might not be able to distinguish the waiting Items from the Items you want to delete in a batch. Therefore, the following describes how to delete Items that are waiting to be deleted, and then delete unnecessary Items in a batch.

  1. Stop services in the following order:

    • JP1/Service Support - Task Service service

    • JP1/Service Support - Web Service service

    • JP1/Service Support service

    Do not stop the JP1/Service Support - DB Server service.

  2. From the Start menu, select Programs, JP1_Service Support, and then JP1_SS Command Prompt.

  3. Execute the jssdbbackup.bat command to back up the Item management database.

    Before you delete Items that are waiting to be deleted, back up the Item management database. Make sure that you specify the -maint option as an argument. For details, see jssdbbackup.bat (backs up databases) in Chapter 12. Commands.

  4. Execute the jssdelrec command to delete the Items that are waiting to be deleted.

    For details, see jssdelrec (deletes data from the Item management database) in Chapter 12. Commands.

  5. Execute the jssitemdeletion command to place the target Items in the Waiting to be deleted state.

    For details, see jssitemdeletion (centrally places Items into the Waiting to be deleted status) in Chapter 12. Commands.

  6. Execute the jssitemlist command.

    Execute the jssitemlist command with the -d option to confirm that the target Items are in the Waiting to be deleted state. For details, see jssitemlist (outputs a list of Items) in Chapter 12. Commands.

    If you execute the jssitemdeletion command with the wrong option, Items that you do not want to delete might be placed in the Waiting to be deleted state. In such a case, you can release the Items from the Waiting to be deleted state by executing the jssrev command. For details, see jssrev (cancels batch deletion of Items) in Chapter 12. Commands.

  7. Execute the jssdelrec command to delete the Items that are in the Waiting to be deleted state.

    For details, see jssdelrec (deletes data from the Item management database) in Chapter 12. Commands.

  8. Execute the jsscollectdata command.

    Execute the command with the -a option specified as an argument to recollect all statistics. For details, see jsscollectdata (counts Item information) in Chapter 12. Commands.

  9. From the Start menu, select Programs, JP1_Service Support, and then JP1_SS Command Prompt.

  10. Execute the jssdbreclaim.bat command.

    For details, see jssdbreclaim.bat (releases the free space in the Item management database) in Chapter 12. Commands.

  11. Restart services in the following order:

    • JP1/Service Support service

    • JP1/Service Support - Web Service service

    • JP1/Service Support - Task Service service

(2) Deleting Items without stopping JP1/Service Support operation

You can delete old, closed Items from the Item management database all at once. In this subsection, you delete Items that were registered with the system ID sys01 in the period from 2012-01-01 to 2013-01-01. To do this:

  1. Execute the jssitemexportEx command to back up the Items to be deleted (as a CSV file).

    When you execute the jssitemexportEx command, specify conditions for narrowing down the target Items. The following is an example of the command line:

    jssitemexportEx -o "c:\exportData" -s -id sys01 -ct 2012/01/01-2013/01/01

    For details, see jssitemexportEx (exports extended Item information) in Chapter 12. Commands.

  2. Execute the jssdelrec command to delete the Items that are waiting to be deleted.

    The following is an example of the command line:

    jssdelrec -a -b

    For details, see jssdelrec (deletes data from the Item management database) in Chapter 12. Commands.

  3. Execute the jssitemdeletion command by specifying the same conditions that you specified in step 1 to place the target Items in the Waiting to be deleted state.

    The following is an example of the command line:

    jssitemdeletion -s -id sys01 -ct 2012/01/01-2013/01/01

    For details, see jssitemdeletion (centrally places Items into the Waiting to be deleted status) in Chapter 12. Commands.

  4. Execute the jssitemlist command.

    Execute the jssitemlist command with the -d option to confirm that the target Items are in the Waiting to be deleted state. For details, see jssitemlist (outputs a list of Items) in Chapter 12. Commands.

    If you execute the jssitemdeletion command with the wrong option, Items that you do not want to delete might be placed in the Waiting to be deleted state. In such a case, you can release the Items from the Waiting to be deleted state by executing the jssrev command. For details, see jssrev (cancels batch deletion of Items) in Chapter 12. Commands.

  5. Execute the jssdelrec command to delete the Items that you placed in the Waiting to be deleted state in step 3.

    The following is an example of the command line:

    jssdelrec -a -b

    For details, see jssdelrec (deletes data from the Item management database) in Chapter 12. Commands.

  6. Execute the jsscollectdata command to collect Item information.

    Execute the command with the -a option specified as an argument to re-collect all statistics. For details, see jsscollectdata (counts Item information) in Chapter 12. Commands.

  7. Execute the jssdbreclaim.bat command.

    For details, see jssdbreclaim.bat (releases the free space in the Item management database) in Chapter 12. Commands.