Recover file-base file
- Last UpdatedOct 03, 2024
- 1 minute read
When a file-base file has a corrupted index or inaccessible or corrupted records, you can recover the file. Use this procedure to recover readable data records from a file-base file and rebuild the index.
Note: When recovering files, this command discards unreadable records and prints an error message. Only use this tool at the direction of the Customer Portal.
-
In a command prompt window, change to the PI\adm directory
-
Type:
pidiag -fbf
inpath outpath
[alignment] [-compress] [-header]with the following options:
Option
Description
inpath
Path and name of input file.
outpath
Path and name of output file.
alignment
Optional. Sets the byte alignment in the output file. A value of 0 or 1 lets the file grow to 2GB. Higher values let the file grow to 2GB times the specified value. For example, with an alignment of 2, the file can grow to 4GB, and with an alignment of 4, the file can grow to 8GB.
-compress
Optional. Removes unused records at the end of the file and allocates unused disk space.
-header
Optional. Displays only the header of the new file rather than both the header and index of the new file after recovery.
In some cases, pidiag -fbf reports the following:
Error reading input record # nn [-10466] No Record Available for Passed recno
This is normal for records between the actual last record and the maximum allocated record. The warning disappears if you run the utility a second time.