Scalable Database Server, HiRDB Version 8 Description

[Contents][Glossary][Index][Back][Next]

11.4 Migrating from 32-bit mode to 64-bit mode

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.

Organization of this section
(1) Incompatible file types
(2) Operands with different default values
(3) Differences in memory requirements
(4) Differences in UOC interface
(5) Differences in SQL linkage areas
(6) Changes in SQL descriptor areas
(7) Differences in SQL data types and C-language data descriptions
(8) Procedure for converting a 32-bit-mode UAP into a 64-bit-mode UAP

(1) Incompatible file types

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:

(2) Operands with different default values

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
  • HiRDB/Single Server: 384*
  • HiRDB/Parallel Server: 1024*
5120*
pd_fes_lck_pool_size Lock pool size for front-end servers (Value of pd_max_users + 3) [Figure] (value of pd_max_access_tables + 4) [Figure] 6 (Value of pd_max_users + 3) [Figure] (value of pd_max_access_tables + 4) [Figure] 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.

(3) Differences in memory requirements

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.

(4) Differences in UOC interface

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.

(5) Differences in SQL linkage areas

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 4[Figure]6 8[Figure]6

(6) Changes in SQL descriptor areas

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 + 16[Figure]n [Figure] 24 + 24[Figure]n [Figure]
SQLDABC 4 [Figure] 8 [Figure]
SQLVAR 16[Figure]n [Figure] 24[Figure]n [Figure]
SQLVAR_LOB 16[Figure]n [Figure] 24[Figure]n [Figure]
SQLLOBLEN [Figure] long [Figure] int
SQLDATA 4 [Figure] 8 [Figure]
SQLIND 4 [Figure] 8 [Figure]
SQLLOBIND 4 long 8 int

n: Number of SQLVAR variables specified in the SQLN descriptor area.

[Figure]: No change in size or data type.

(7) Differences in SQL data types and C-language data descriptions

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 [Figure]
Array type int variable-name [n]; Array 1[Figure]n[Figure]4096
BLOB indicator variable int indicator-variable-name; [Figure] [Figure]
SQL statement struct{
int len;
char str[n];
} variable-name;
Structure [Figure]

[Figure]: Cannot be coded.

(8) Procedure for converting a 32-bit-mode UAP into a 64-bit-mode UAP

Following is the procedure for converting a 32-bit-mode UAP into a 64-bit-mode UAP.

  1. In the declarations of embedded variables, replace all occurrences of the long type with the int type.
  2. Execute UAP preprocessing, specifying the /h64 option, which generates a 64-bit-mode post-source.
  3. Compile the UAP, specifying the option that generates 64-bit-mode object code.
  4. Link the UAP, specifying the 64-bit-mode HiRDB client library as the library to be linked.