A database may need to be converted to a larger page format for the following reasons:
to prevent capacity bottlenecks
to use database key values in the extended value range
to utilize the full functionality of UDS/SQL
Converting a database for capacity reasons
The individual capacity reasons that could make it necessary to convert a database from a 2-Kbyte to a 4-Kbyte or 8-Kbyte format are as follows (see the “Design and Definition” manual):
More than 16777 215 (=224-1) records need to be stored for at least one record type of the database.
The record length for at least one record type is greater than 1700 bytes (guideline: die maximum record length in a database with a 2-Kbyte format equals 2020 bytes).
The database uses more than 200 record types (guideline: a maximum of 253 record types can be defined in a database with a 2-Kbyte format).
The database is expected to contain more than 123 realms in the future.
A multi-DB configuration was created with the sole purpose of distributing records of a record type across multiple databases (due to capacity limits).
The conversion of a database from a 4-Kbyte to an 8-Kbyte format is required if the maximum record length permitted for the 4-Kbyte format, i.e. 3968 bytes, is no longer sufficient.
The relevant information on whether and to what extent the above criteria are satisfied for a database can be obtained from the SIA report of the BPSIA utility routine and the record type statistics output by the BSTATUS utility routine (see the “Recovery, Information and Reorganization” manual).
Converting a 2-Kbyte database due to the use of extended database key values
If a database key of a 2- Kbyte database (i.e. one with a 2-Kbyte format) is supplied by an application program with database key values from the extended value range (i.e. with a REC-REF > 254 and/or an RSQ > 224-1; see the "Design and Definition" manual), the database will need to be converted to the 4-Kbyte or 8-Kbyte format even if there are initially no capacity shortages.
Consequently, in the case of multi-DB programs, i.e. application programs which access multiple databases, it is first necessary to check whether these programs also use database key values across multiple databases. If such an application program copies database key values from a 4-Kbyte or 8-Kbyte database to a database key of a 2-Kbyte database, this 2-Kbyte database will also need to be converted to the 4-Kbyte or 8-Kbyte format and restructured accordingly (see section "Restructuring the converted database").
Databases that are affected by the use of extended database key values can be essentially converted in any order; however, the following approach is recommended:
First convert, and possibly restructure, any databases that are to be supplied with extended database key values in the future.
Then convert, and possibly restructure, the databases from which extended database key values my be copied to other databases by application programs.
This approach will eliminate the possibility of errors arising from copying extended database key values to databases that haven’t been converted.
Converting a 2-Kbyte database in order to use the full UDS/SQL functionality
Databases with a 4-Kbyte or 8-Kbyte format are also required in order to use the following functions:
databases on NK4 pubsets
BS2000 access method FASTPAM for files and realms of the database