The following example how to rectify 'irregular' extent file using PROCOPY or PROREST to a new structure with the required extent sizes.
The Progress standard ‘sports’ database on UNIX or Linux platform is used in this example, but Progress commands will be the same in Windows environment:
1. Open a PROENV Progress environment shell, so that it will recognize and have all Progress commands in the PATH and also have Progress variables defined (e.g. $DLC in UNIX or %DLC% in Windows):
$ progress-install-directory/bin/proenv
2. Go to the directory where the database .db file is located
$ cd 'your-database-directory'
3. Verify the current database block size:
4. If the database is online, shut it down.
$ proshut sports -by
10.2B or later: $ proshut dbname -by -shutdownTimeout immed
5. Truncate database bi file:
$ proutil sports -C truncate bi
6. List current database structure file. This will create (or just update) database structure file ‘sports.st’
$ prostrct list sports
7. Create a copy of database structure file, this will need to be edited later:
$ cp sports.st sports_bak.st
8. Make a file backup copy of all database files and extents by creating a Progress database backup:
$ probkup sports sports.probkup
where ‘sports.probkup’ is just a file name for the backup volume. It can contain path in front if it needs to be created elsewhere.
$ probkup sports /var/backup/sports.probkup
9. Check Progress database backup with the verify option. This will not restore the database, but only a CRC scan check is performed. Do not perform any further steps if it fails:
$ prorest sports sports.probkup -vp
10. Edit database structure file ‘sports_bak.st’ so that it will contain fixed extents with required fixed extent sizes, e.g.
#
b ./sports.b1 f 1024
b ./sports.b2
#
d "Schema Area":6,32;1 ./sports.d1 f 1024
d "Schema Area":6,32;1 ./sports.d2
#
d "Info Area":7,32;1 ./sports_7.d1 f 1024
d "Info Area":7,32;1 ./sports_7.d2
#
d "Customer/Order Area":8,32;8 ./sports_8.d1 f 1024
d "Customer/Order Area":8,32;8 ./sports_8.d2
#
d "Primary Index Area":9,1;8 ./sports_9.d1 f 1024
d "Primary Index Area":9,1;8 ./sports_9.d2
#
d "Customer Index Area":10,1;64 ./sports_10.d1 f 1024
d "Customer Index Area":10,1;64 ./sports_10.d2
#
d "Order Index Area":11,32;64 ./sports_11.d1 f 1024
d "Order Index Area":11,32;64 ./sports_11.d2
10. Delete current Progress database.
$ echo y | prodel sports
11. Create a new database from the ‘new’ structure file with the blocksize information found in step 3 above:
$ prostrct create sports sports_bak.st -blocksize 8192
12. Restore the database from Progress backup volume:
$ prorest sports sports.probkup