Scalable Database Server, HiRDB Version 8 Description
This section provides notes on migrating an application from the 32-bit mode to the 64-bit mode. For details on migrating from 32-bit-mode to 64-bit-mode HiRDB, see the HiRDB Version 8 Installation and Design Guide.
In order to migrate a HiRDB client from the 32-bit mode to the 64-bit mode, you must first install the 64-bit-mode HiRDB and set the environment appropriately; For details on HiRDB client environment setup, see the HiRDB Version 8 UAP Development Guide.
For the most part, files used in the 32-bit mode can be used in the 64-bit mode. However, the following types of files created in the 32-bit mode are incompatible with and cannot be used in the 64-bit-mode HiRDB:
Changing HiRDB from the 32-bit mode to the 64-bit mode results in changes in the default values for the HiRDB system definition operands shown in Table 11-5.
Table 11-5 Operands with different default values
Operand | Specification item | Default in 32-bit mode | Default in 64-bit mode |
---|---|---|---|
pd_work_buff_size | Work table buffer size |
|
5120* |
pd_fes_lck_pool_size | Lock pool size for front-end servers | (Value of pd_max_users + 3) (value of pd_max_access_tables + 4) 6 | (Value of pd_max_users + 3) (value of pd_max_access_tables + 4) 4 |
SHMMAX | Maximum shared memory segment size | 200 megabytes | 1024 megabytes |
* Value if the pd_work_buff_mode operand is omitted, or the default value if pool is specified. The default value does not change if each is specified in pd_work_buff_mode.
Changing from the 32-bit mode to the 64-bit mode increases HiRDB's memory requirements. For details on the memory requirement calculations, see the HiRDB Version 8 Installation and Design Guide.
Changing to the 64-bit mode requires changes in the UOC interface for the database load utility (pdload), with the result that the UOC must be re-created. For details on the UOC interface, see the section on the database load utility (pdload) in the HiRDB Version 8 Command Reference.
Changing to the 64-bit mode changes the configuration and sizes of the SQL linkage areas shown in Table 11-6. For details on the SQL linkage areas, see the HiRDB Version 8 UAP Development Guide.
Table 11-6 Changes in linkage areas
Linkage area | Size (bytes) | |
---|---|---|
32-bit mode | 64-bit mode | |
SQLCA | 336 | 368 |
SQLCABC | 4 | 8 |
SQLCODE | 4 | 8 |
SQLERRD | 46 | 86 |
Changing to the 64-bit mode changes the configuration of the SQL descriptor areas, as well as the sizes and data types of the linkage descriptor areas, as shown in Table 11-7. For details on the SQL descriptor areas, see the HiRDB Version 8 UAP Development Guide.
Table 11-7 Changes in descriptor areas
Descriptor area | 32-bit mode | 64-bit mode | ||
---|---|---|---|---|
Size (bytes) | Data type | Size (bytes) | Data type | |
SQLDA | 16 + 16n | 24 + 24n | ||
SQLDABC | 4 | 8 | ||
SQLVAR | 16n | 24n | ||
SQLVAR_LOB | 16n | 24n | ||
SQLLOBLEN | long | int | ||
SQLDATA | 4 | 8 | ||
SQLIND | 4 | 8 | ||
SQLLOBIND | 4 | long | 8 | int |
Because in UAPs written in C that support the 64-bit mode, the long-type is 8-byte long, the embedded variables that had used long will use int instead, and the C-language data descriptions listed in Table 11-8 will be changed. For details on the C-language data descriptions, see the HiRDB Version 8 UAP Development Guide.
Table 11-8 Changed C-language data descriptions
Data type of SQL | Data description in C | Data structure | Remarks | |
---|---|---|---|---|
INTEGER | Simple type | int variable-name; | Variable | |
Array type | int variable-name [n]; | Array | 1n4096 | |
BLOB indicator variable | int indicator-variable-name; | |||
SQL statement | struct{ int len; char str[n]; } variable-name; |
Structure |
: Cannot be coded.
Following is the procedure for converting a 32-bit-mode UAP into a 64-bit-mode UAP.
All Rights Reserved. Copyright (C) 2007, Hitachi, Ltd.