The database can be restructured by restoring a PROBKUP taken with the -norecover option to a new structure.
This Process is only valid for Progress 9.x and higher where it is possible to have the total size of BI extents greater than 2 GB.
1. Take an offline Progress backup of the database as it is now with the -norecover parameter, then verify the backup. The verify will ensure the backup is good prior to deleting the current database. If the backup turns out to be bad and the database is deleted there would be no way to recover.
$ probkup <dbname> <destination-device> -norecover
$ probkup <dbname> <destination-device> -vf
If there is enough space to restore the database to a new location on disk with additional bi extents added to the structure file. The current database can be deleted once the restore has completed.
With a known verified good backup of the database, the current database must be deleted if there are space constraints. Use the PRODEL command to remove the database.
$ prodel <dbname>
2. Create a new-db.st file with additional bi extents. For example, if the current configuration has only one variable bi extent the new .st file will have 2 bi extents, 1 fixed at 2 GB and 1 variable extent.
# new-db.st
b <full/path/to/extent> f 2000000
b <full/path/to/extent> v 2000000
3. Restore the database using the new.st file. The structure file must be the database-name of the restored database and placed in the directory where the restore is run from.
$ cp new-db.st <dbname>.st
$ prorest <dbname> <destination-device> -verbose
4. Start the database in single user mode to go through crash recovery.
5. When crash recovery completes successfully the database is ready for use. However, the BI extent structure may first need restructuring to requirement:
6. Restructure the BI extents by truncating the bi file, removing current bi extents then adding new bi extents:
$ proutil <dbname> -C truncate bi
Execute PROSTRCT REMOVE once for each bi extent to be removed. The last or variable extent is the first extent removed.
$ prostrct remove <dbname> bi
8. Create a structure file (addbi.st) defining bi extents of the proper size, number, and file location. Use the PROSTRCT ADD command with the addbi.st, to add the required bi extents sizes
addbi.st
b . f 1000000
b . v 2000000
$ prostrct add <dbname> addbi.st
9. Database is ready for use with proper size and number of bi extents. At this juncture, After-Imaging can be re-enabled.
Additional methods that may be used to recover from a bi file that has hit the 2 GB limit when ai was not enabled are listed below. The preferred order in which to review the solutions is as listed: