Database extents need to be added from time to time in order to accommodate database growth and allow sufficient space for storing database records.
Before changing the database structure, backup the database. The following procedure is extremely low-risk, but it's always a good practice to back the database up before any change.
Run
'prostrct list dbname' command to generate the Control Area's current reflection of the database structure before starting the process. The resulting
dbname.st file should be renamed for later reference.
Steps
- Create a new structure description (.st) file that contains only information about the extents(s) being added. Be sure to avoid overwriting the .st file for the existing database, by giving the .st file a unique name that is different from the existing "dbname.st" file, for example name it "add.st" file.
-
Multiple extents can be added to multiple storage areas at the same time and extents need not be in the same directory as the Control Area (.db file)
-
For all extent types, except after-image extents, there can be only one variable length extent defined and it must be the last extent of the Storage Area. If the current last extent ends with a variable extent, it will become a fixed extent when adding another extent.
-
Additional areas can be added to a database by using a new storage area name. Those new storage areas would be empty and new tables could be added or existing tables and/or indexes could be moved into those areas as required.
Below are examples of a structure file that defines one 1GB fixed data extent and one variable length extent to be added to the current area on disk.
Open Edge 10.x and later
# V10 if using a type I storage area: add.st
#
d "[current storage area name]":[area number],64;1 /fsys2/data/ f 1048576
d "[current storage area name]":[area number],64;1 /fsys3/data/
# V10 if using a type II storage area: add.st
#
d "[current storage area name]":[area number],64;8 /fsys2/data/ f 1048576
d "[current storage area name]":[area number],64;8 /fsys3/data/
Progress 9.x
# V9: add.st
#
d "[current storage area name]":[area number],64 /fsys2/data/ f 1048576
d "[current storage area name]":[area number],64 /fsys3/data/
Progress 7.x and 8.x multi-volume database
# V7 or V8: add.st
#
d /fsys2/data/ f 1048576
d /fsys3/data/
- Shut down the database and stop all batch jobs running against the database. If you require adding extents while database is running, then please refer to Article How to add database extents online ?
- Use the prostrct utility with the add qualifier, specifying the .st file that is created in step 1.
$ prostrct add dbname add.st
- After the extent(s) have been added, use the prostrct utility with the list qualifier to display and verify the new database structure. This will include storage area information: name, number, records per block, blocks per cluster (for OE10 and above) and extent information: type, path, size, number and name to screen. This information is also written to a text file which is named dbname.st by default (unless another name is specified)
$ prostrct list dbname