Add New Extents to the Database Area0. Before starting, OS backup all database files
1. Create a new database structure file defining additional extents:
dbname2.st
For example add a new fixed and variable extent, ensure that there is enough space available in the directory in which it is defined:
#dbname2.st
d "<Area_name>" . f 2000000
d "<Area_name>" .
At this junction it is worth checking the current size of the bi files on disk. If the last variable bi file is approaching 2GB then it is advisable to also add additional bi extents.
2. Add the extents for the database to expand into:
$ prostrct add <database name> dbname2.st
Should PROSTRCT ADD fail, see Note*** below.3. Verify that the extent has been added:
$ prostrct list <database name> dbname3.st
The extent referenced in the error message initially has now become a FIXED extent, the size that it is fixed to depends on the initial physical size of that blown extent, which gets rounded up. Which is why adding a new extent sometimes fails.
4. Truncate the bi file:
$ proutil <database name> -C truncate bi -G 0
If after recovery the bi file structure is oversized, it can be restructured in two steps as follows:
a. Run PROSTRCT REMOVE once for each bi extent to remove all bi file structure:
$ prostrct remove dbname bi
b. Add the bi file structure back. The bi.st file referred contains the structure needed for pathing, number and size of the bi files:
$ prostrct add dbname bi .st
5. Backup the database
***NOTE:
Under certain conditions PROSTRCT ADD will fail depending on the Progress version and the actual size of the variable extent at the time when rounding is done. It is then necessary to force the extent which is at the 2 gigabyte limit to believe it is just less than 2 gigabyte.
If this is necessary use the following steps and return to Step 2 which adds additional extents to the database structure above:
a. Take a new copy of the current database structure
$ prostrct list <database name> tempfile.st
b. Find the related database extent for which the disk resident file size of the extent that has hit two gigabyte.
[WINDOWS]: dir <database name>*.*
[UNIX]: ls -al <database name>*.*
c. Review the database log file confirm the database blocksize
d. Modify the structure file created in Step 1 (tempfile.st) for the 2GB variable extent. Leave the remainder of the .st file as it is. Do not delete any line entries.
Find the extent reference which has hit 2 gigabyte and reset the "2GB" extent file size depending on the database blocksize:
dblocksize (2097152 - ( 16 * dblocksize ))
1KB 2097136
2KB 2097120
4KB 2097088
8KB 2097024
Example: If the database blocksize is 4 KB
The entry must be modified for that extent to add the following to the line:
f 2097088
.st file before modification:
d c:\wrk\sports2000.d13
.st file after modification:
d c:\wrk\sports2000.d13 f 2097088
e. Repair the database structure:
$ prostrct repair <database name> tempfile.st
f. Return to Step 2 to add additional database extents.