jssdbrecovery.bat (recovers a database)
- Organization of this page
Description
This command recovers data in the database of JP1/Service Support. To run this command, go to the Start menu and click Programs, JP1_Service Support, and JP1_SS Command Prompt. Then execute the command.
Format
jssdbrecovery.bat {-f backup-file-name | -i name-of-the-folder-to-output-the-backup-file-to {-ALL | -mdb | -sdb}} {-maint | -expand}
Required execution permission
Administrator permissions
Storage folder
JP1/SS-path\tools\
Arguments
-f backup-file-name
Use an absolute path to specify the name of the backup file to be used to recover the data in the database of JP1/Service Support. When JP1/Service Support uses the Item storage database, the data is recovered in both the Item management database and the Item storage database.
Note the following when you specify a backup file:
-
Make sure that the folder that was used for backup is specified for the storage folder for the JP1/Service Support database.
-
The backup file must exist on a local drive. You cannot use a backup file on a network drive.
-
You cannot use a UNC path to specify the backup file.
-
The path for the backup file must be an absolute path consisting of 259 bytes or less. The backup file name itself must be 255 bytes or less. Count full-width characters for 2-byte characters in the file name.
-
The backup file name must not contain multi-byte characters. In addition, you cannot use character strings that are not recognized by the OS.
-
The backup file created by the jssdbbackup.bat command with the -o option cannot be specified for the -f option in the jssdbrecovery.bat command.
-i name-of-the-folder-to-output-the-backup-file-to
Use an absolute path to specify the name of the folder to which to output a backup of the database of JP1/Service Support. Specify this option when you recover the backup file created by the jssdbbackup.bat command with the -o option.
Note the following when you specify name-of-the-folder-to-output-the-backup-file-to:
-
For name-of-the-folder-to-output-the-backup-file-to, specify the folder to which the backup file created by the jssdbbackup command with the -o option has been output. Do not rename the files and folders in this folder.
-
Make sure that you specify a local drive for the drive to output the backup file to. You cannot specify a network drive.
-
You cannot specify a UNC path.
-ALL
Recovers the backup files for the Item management database and Item storage database, which are stored in the folder (specified by the -i option) to output the backup files to.
-mdb
Recovers the backup file for the Item management database, which is stored in the folder (specified by the -i option) to output the backup files to.
-sdb
Recovers the backup file for the Item storage database, which is stored in the folder (specified by the -i option) to output the backup files to.
-maint
Recovers a backup file that was created by using the jssdbbackup.bat command with the -maint option.
-expand
Restores a backup file that was created by using the jssdbbackup.bat command with the -expand option.
Return values
Return value |
Meaning |
---|---|
0 |
Normal end |
1 |
Abnormal end |
Prerequisites for executing the command
-
For details about which services need to be active or inactive when this command is executed, see Status of services when commands are executed in Chapter 12. Commands.
-
While the jssdbrecovery.bat command is being executed, do not execute other JP1/Service Support commands.
-
The name of the backup file specified with the -f option is not case sensitive.
-
Depending on the backup option specified when the jssdbbackup.bat command is executed, the backup file to be created, and the option that can be specified for the jssdbrecovery.bat command, differ. The following table lists the recovery options that can be specified for the jssdbrecovery.bat command for each backup option specified for the jssdbbackup.bat command.
Table 12‒12: Recovery options (jssdbrecovery.bat command) that can be specified for individual backup options (jssdbbackup.bat command) No.
Backup option
(jssdbbackup.bat command)
Recovery option (jssdbrecovery.bat command)
-f
-i
-maint
-expand
-ALL
-mdb
-sdb
-maint
-expand
-maint
-expand
-maint
-expand
1
-f
-maint
Y
N
N
N
N
N
N
N
2
-expand
N
Y#
N
N
N
N
N
N
3
-o
-ALL
-maint
N
N
Y
N
Y
N
Y
N
4
-expand
N
N
N
Y#
N
Y
N
Y#
5
-mdb
-maint
N
N
N
N
Y
N
N
N
6
-expand
N
N
N
N
N
Y
N
N
7
-sdb
-maint
N
N
N
N
N
N
Y
N
8
-expand
N
N
N
N
N
N
N
Y
When you recover a database by executing the jssdbrecovery.bat command with the -maint option specified, the database size must be the same as when the backup was created. When you recover data in the Item storage database, the database structure (the number of expansions and the directory to expand the database to) must be the same as when the backup was created.
When you recover the database by executing the jssdbrecovery.bat command with the -expand option specified, do not recover the backup to a database smaller than when the backup was created.
-
When you execute the jssdbrecovery.bat command, temporary files are created. For this reason, the installation folder of JP1/Service Support requires the following available space depending on the size of the Item management database:
-
When the Item management database is size S: 250 megabytes
-
When the Item management database is size M: 450 megabytes
-
When the Item management database is size L: 900 megabytes
-
When the Item management database is size LL: 1.8 gigabytes
-
When the Item management database is size XL: 1.8 gigabytes
-
-
You cannot recover a backup that was created in an environment with a different version. Backup and recover must be performed in environments with the same version. If you execute the jssdbrecovery command to recover a backup file created in an environment with a different version and continue running JP1/Service Support, the status of the database and the data registered in the database after recovery might be abnormal.
-
The data in both the Item management database and Item storage database can be recovered separately. However, if you recover the data in one of those databases by using the backup file created before the jssitemstore (stores Items) command is executed, and recover the data in the other database by using the backup file created after the jssitemstore (stores Items) command is executed, data might be inconsistent. Therefore, when you recover data in both the Item management database and Item storage database, do not use the backup files that were created before and after the jssitemstore (stores Items) command is executed. For details about how to recover data in the Item storage database, see 11.2.15 Recovery procedure when the Item storage database is used.
Remarks
-
When you execute the jssdbrecovery.bat command, multiple child processes start within the system. Even if you cancel the jssdbrecovery.bat command by using Ctrl+C, the child processes continue running. For this reason, do not cancel the jssdbrecovery.bat command during execution by using Ctrl+C. If you do, make sure that the pdrstr process is inactive when the -maint option is specified. When the -expand option is specified, make sure that the pdrorg process is inactive. Wait for a while and restart the JP1/Service Support - DB Server service.
-
If a KNAB26103-E error message appears when you execute the jssdbrecovery.bat command, check if any of the following causes applies. If one applies, take the appropriate countermeasures and then re-execute the command.
-
A relative path was used to specify the backup file.
-
The specified backup file is a folder.
-
A UNC path was used to specify the backup file.
-
The absolute path for the backup file exceeds 259 bytes.
-
The backup file name itself exceeds 255 bytes.
-
The backup file name contains multi-byte characters. Alternatively, characters that are not recognized by the OS were used.
-
-
If a KNAB26103-E error message appears, the cause might be one of the following. Eliminate the cause and re-execute the jssdbrecovery.bat command.
-
You used a backup file that was created by using the jssdbbackup.bat command with the -maint option to expand the database or move data to a different database by using the jssdbrecovery.bat command with the -expand option.
-
You used a backup file that was created by using the jssdbbackup.bat command with the -expand option to recover the data in the database by using the jssdbrecovery.bat command with the -maint option.
-
The size of the database you recovered is smaller than the size of the database when the backup was created.
-
-
For details about how to expand the Item management database, see 11.2.4 Expanding the size of the Item management database.
-
After you recover the data in the database, check whether the main window (Item status) appears when you start JP1/Service Support.
-
The database is reorganized when you execute the jssdbbackup.bat command with the -expand option. For this reason, when you execute the jssdbrecovery.bat command to recover data in the database using the backup file, the database might require more space than the Item management database that was used before the backup was made. This might result in failure to recover data in the database. To prevent this problem, perform the following procedure:
-
Execute the jssdbbackup.bat command with the -maint option to create a backup file. Execute the jssdbrecovery.bat command with the -maint option to recover the backup file.
-
Execute the jssdelrec command to place unnecessary Items in the Waiting to be deleted status.
-
Execute the jssitemdeletion command to delete the Items in the Waiting to be deleted status.
-
Execute the jssdbbackup.bat command with the -expand option to create a backup of the data in the database.
-
Execute the jssdbrecovery.bat command with the -expand option to recover the data in the database using the backup file created in step 4.
-
Example
The following example shows how to recover the data in the Item management database using a backup file (c:\backup\backup).
jssdbrecovery.bat -f c:\backup\backup -maint