For UNIX Systems

Scalable Database Server

HiRDB Version 8

Command Reference

3000-6-355(E)

Contents

Notices

Preface

1. Overview of Commands

1.1 Overview

1.2 List of operation commands

1.3 List of utilities

1.4 Utility I/O files

1.4.1 Files and volumes

1.4.2 File modes usable by utilities

1.5 Notes on command execution

1.5.1 Forced termination by interruption of command execution

1.5.2 Batch specification of RDAREA names in operation commands

1.5.3 Specifying the LANG environment variable

1.6 Functions that become available when optional HiRDB program products are installed

2. Operation Commands

pdacunlck (Release consecutive certification failure account lock state)

pdadmvr (Acquire HiRDB product information)

pdaudbegin (Start acquisition of audit trails)

pdaudend (Stop acquisition of audit trails)

pdaudrm (Delete audit trail files in shutdown status)

pdaudswap (Swap audit trail files)

pdbkupls (Display backup file information)

pdbufls (Display global buffer information)

pdbufmod (Change global buffer dynamically)

pdcancel (Forcibly terminate UAP or utility processing)

pdcat (Display messages in file)

pdcat [-d sts specified]

pdcat [-d option omitted]

pdchgconf (Reconfigure the system)

pdchprc (Change number of startup server processes)

pdclose (Close RDAREAs)

pdclttrc (Acquire SQL trace dynamically)

pdcmt (Commit transactions)

pdconfchk (Check system definitions)

pdcspool (Delete troubleshooting information)

pddbadset (Set up HiRDB External Data Access Adapter)

pddbchg (Change the replica status of replica RDAREAs)

pddbfrz (Place a full HiRDB file in a user LOB RDAREA in frozen update status)

pddbls (Display status of RDAREAs)

pddefrev (Generate definition SQL)

pdfbkup (Back up HiRDB file system)

pdffsck (Check and repair the integrity of a HiRDB file system area)

pdfgt (Terminate transaction forcibly)

pdfls (Display HiRDB file system area information)

pdfmkfs (Initialize HiRDB file system area)

pdfrm (Delete HiRDB file)

pdfrstr (Restore HiRDB file system)

pdfstatfs (Display status of HiRDB file system area)

pdgen (Generate system)

pdgeter (Acquire error information)

pdgrprfl (Refresh user and role information)

pdhold (Shut down RDAREAs)

pditvstop (Stop periodic acquisition of HiRDB status)

pditvtrc (Periodically acquire the HiRDB status)

pdjarsync (Manipulate JAR files)

pdlistls (Display list definition information)

pdlodsv (Reduce the size of the installation directory)

pdlogadpf (Allocate log file)

pdlogatul (Control the automatic log unloading facility)

pdlogchg (Change status of log file)

pdlogcls (Close open log file)

pdloginit (Initialize log file)

pdlogls (Display log-related file information)

pdlogls [-d spd] (Display synchronization point dump file information)

pdlogls [-d sys] (Display system log file information)

pdlogopen (Open log file)

pdlogrm (Delete log file)

pdlogswap (Swap log files)

pdlogsync (Collect a synchronization point dump)

pdlogucat (Display unload log file information)

pdlogunld (Unload log file)

pdls (Display HiRDB system status)

pdls [-d act] (Display user status)

pdls [-d aud] (Display the status of audit trail files)

pdls [-d ha] (Display HiRDB system status)

pdls [-d lck] (Display server lock control status)

pdls [-d mem] (Display server shared memory status)

pdls [-d org] (Display progress of reflection processing for online reorganization)

pdls [-d prc] (Display server process status)

pdls [-d ris] (Display log application processing execution status)

pdls [-d rpc] (Display server communication control information)

pdls [-d rpl] (Display HiRDB Datareplicator linkage status)

pdls [-d scd] (Display server schedule status)

pdls [-d stj] (Display whether or not statistical data output type by unit and server is specified)

pdls [-d sts] (Display status file status)

pdls [-d svr] (Display status by unit and server)

pdls [-d trn] (Display server transaction status)

pdls [-d ust] (Display unit activity status)

pdmemsv (Save memory space)

pdobils (Display SQL object buffer statistics)

pdobjconv (Convert SQL objects for 64-bit-mode HiRDB)

pdopen (Open RDAREAs)

pdopsetup (Set up add-on PP)

pdorbegin (Commit a database for online reorganization)

pdorcheck (Check the application conditions for online reorganization)

pdorchg (Change the current RDAREAs for online reorganization)

pdorcreate (Create an environment for reflection processing for online reorganization)

pdorend (Execute reflection processing for online reorganization)

pdpfresh (Refresh server process)

pdplgrgst (Register and delete plug-ins)

pdplgset (Set up a plug-in)

pdprgcopy (Copy a HiRDB update version)

pdprgrenew (Update a HiRDB update version)

pdrbk (Roll back transactions)

pdrdrefls (Display information about related RDAREAs)

pdrels (Release RDAREAs from shutdown status)

pdrisechk (Check the configuration of Real Time SAN Replication)

pdrisedbto (Inherit a database in Real Time SAN Replication)

pdriseset (Set the site status in Real Time SAN Replication)

pdrpause (Restart a process service)

pdrplstart (Start HiRDB Datareplicator linkage)

pdrplstop (Stop HiRDB Datareplicator linkage)

pdsetup (Register or delete HiRDB system in OS)

pdstart (Start HiRDB system, unit, or server)

pdstbegin (Start output of statistical information)

pdstend (Stop output of statistical information)

pdstjswap (Swap statistics log files)

pdstjsync (Apply statistics log buffer to statistics log file)

pdstop (Terminate HiRDB system, unit, or server)

pdstscls (Close open status file)

pdstsinit (Initialize status file)

pdstsopen (Open status file)

pdstsrm (Delete status file)

pdstsswap (Swap status files)

pdsvhostname (Display server's host name)

pdtrndec (Settle unsettled transactions forcibly and automatically)

pdtrnqing (Start or release the transaction queuing facility)

pdusrchk (Check the Directory Server for user information)

pdvrup (Upgrade HiRDB version)

3. Database Initialization Utility (pdinit)

3.1 Overview

3.1.1 Function

3.2 Command format

3.2.1 Format

3.2.2 Options

3.3 Control statement

3.3.1 define system statement

3.3.2 create rdarea statement

3.3.3 Notes

3.4 Rules and notes

3.5 Examples

4. Database Definition Utility (pddef)

4.1 Overview

4.1.1 Function

4.1.2 Executor

4.2 Command format

4.2.1 Format

4.2.2 Options

4.3 Handling of continuation lines

4.4 Rules and notes

4.5 Examples

5. Database Load Utility (pdload)

5.1 Function

5.1.1 What is data loading?

5.1.2 Loading data to a table with LOB columns

5.1.3 Loading data to a table with abstract data type columns (LOB attribute) provided by a plug-in

5.1.4 Data loading using a utility special unit

5.1.5 Data loading with the synchronization point specification

5.1.6 RDAREAs containing a table subject to data loading

5.1.7 Log acquisition mode during execution of pdload

5.1.8 Executor

5.2 Typical examples of data loading

5.2.1 Loading data to a table with indexes defined

5.2.2 Loading data to a table with LOB columns

5.2.3 Loading data to a table with abstract data type columns provided by a plug-in

5.3 List of references by purpose

5.3.1 Required information

5.3.2 Information to be specified depending on the attribute of the table subject to data loading

5.3.3 Information to be specified depending on the type of input data file

5.3.4 Information to be specified depending on the data loading method

5.4 Command format

5.4.1 Format

5.4.2 Options

5.4.3 mtguide and emtdef statements (specification of MT information)

5.4.4 source statement (specification of input data file information)

5.4.5 index statement (specification of index information file information)

5.4.6 idxwork statement (specification of index information file directory)

5.4.7 sort statement (specification of sort work directory information)

5.4.8 lobdata statement (specification of LOB input file information)

5.4.9 lobcolumn statement (specification of LOB column input file information)

5.4.10 lobmid statement (specification of LOB middle file information)

5.4.11 srcuoc statement (specification of UOC storage library information)

5.4.12 array statement (specification of an array data format for a table containing repetition columns)

5.4.13 extdat statement (specification of information in the extended DAT format)

5.4.14 src_work statement (specification of the output destination of divided-input data files)

5.4.15 constraint statement (specification of check pending status)

5.4.16 option statement (specification of data processing information)

5.4.17 report statement (specification of a file to which pdload tuning information is output)

5.5 Input data file

5.5.1 DAT format

5.5.2 Binary format

5.5.3 Fixed-size data format

5.5.4 Arrayed data format for tables containing repetition columns

5.5.5 LOB column input file

5.6 Error information file

5.6.1 Contents of error information file

5.6.2 Output example of error information file

5.6.3 Notes about referencing error information

5.6.4 Rules for output when the errdata operand is specified in a source statement

5.7 Column structure information file

5.7.1 Column name statement

5.7.2 skipdata statement

5.7.3 Specification examples

5.8 Null value/function information file

5.8.1 Column number statement

5.9 Null and default values during data loading

5.10 Using a UOC to load a table

5.10.1 Overview

5.10.2 UOC interface

5.10.3 Examples of UOCs

5.10.4 Creating a shared library

5.11 Rules and notes

5.12 Database status in the event of an error and recovery methods

5.13 Examples

5.13.1 HiRDB/Single Server

5.13.2 HiRDB/Parallel Server

6. Interactive SQL Execution Utility (pdsql)

6.1 Overview

6.1.1 Function

7. Database Structure Modification Utility (pdmod)

7.1 Functions of the database structure modification utility

7.2 Command format

7.3 Adding an RDAREA

7.3.1 Function

7.3.2 Examples

7.3.3 Control statement (create rdarea statement)

7.3.4 Notes

7.4 Expanding an RDAREA

7.4.1 Function

7.4.2 Examples

7.4.3 Control statement (expand rdarea statement)

7.4.4 Notes

7.5 Reinitializing an RDAREA

7.5.1 Function

7.5.2 Examples

7.5.3 Control statement (initialize rdarea statement)

7.5.4 Table and index status after reinitialization

7.5.5 Output of execution results listing

7.5.6 Notes

7.6 Deleting an RDAREA

7.6.1 Function

7.6.2 Example

7.6.3 Control statement (remove rdarea statement)

7.6.4 Notes

7.7 Moving an RDAREAs

7.7.1 Function

7.7.2 Example

7.7.3 Control statement (move rdarea statement)

7.7.4 Output of execution results listing

7.7.5 Notes

7.8 Modifying data dictionary table attribute definitions

7.8.1 Function

7.8.2 Example

7.8.3 Control statement (alter system statement)

7.8.4 Note

7.9 Modifying RDAREA attributes

7.9.1 Function

7.9.2 Example

7.9.3 Control statement (alter rdarea statement)

7.10 Changing an RDAREA from a HiRDB/Single Server structure to a HiRDB/Parallel Server structure

7.10.1 Function

7.10.2 Example

7.10.3 Control statement (alter HiRDB mode to parallel statement)

7.10.4 Notes

7.11 Registering generation information for a HiRDB file system area (inner replica facility)

7.11.1 Function

7.11.2 Example

7.11.3 Control statement (create generation statement)

7.11.4 Notes

7.12 Deleting generation information for a HiRDB file system area (inner replica facility)

7.12.1 Function

7.12.2 Example

7.12.3 Control statement (remove generation statement)

7.12.4 Notes

7.13 RDAREA replica definition (inner replica facility)

7.13.1 Function

7.13.2 Example

7.13.3 Control statement (replicate rdarea statement)

7.13.4 Notes

7.14 Copying RDAREA configuration information (inner replica facility)

7.14.1 Function

7.14.2 Example

7.14.3 Control statement (define copy rdarea statement)

7.14.4 Notes

7.15 Integrating RDAREAs (inner replica facility)

7.15.1 Function

7.15.2 Example

7.15.3 Control statement (recast rdarea statement)

7.15.4 Notes

7.16 Registering an auditor (security audit facility)

7.16.1 Function

7.16.2 Example

7.16.3 Control statement (create auditor statement)

7.16.4 Notes

7.17 Creating an audit trail table (security audit facility)

7.17.1 Function

7.17.2 Example

7.17.3 Control statement (create audit table statement)

7.18 Rules and notes

8. Database Reorganization Utility (pdrorg)

8.1 Overview

8.1.1 Functions of pdrorg

8.1.2 Reorganizing a table

8.1.3 Unloading a table

8.1.4 Reloading to a table

8.1.5 Reorganizing a dictionary table

8.1.6 Creating indexes in batch mode

8.1.7 Re-creating an index

8.1.8 Reorganizing an index

8.1.9 Log acquisition mode during execution of pdrorg

8.1.10 RDAREAs containing a table and indexes being processed

8.1.11 Whether or not execution of pdrorg is permitted on a table containing columns of an abstract data type

8.1.12 Executor

8.2 Reorganizing a table

8.2.1 Examples

8.2.2 Cross-reference by purpose

8.3 Unloading a table

8.3.1 Examples

8.3.2 Cross-reference by purpose

8.3.3 Format of database load utility input files

8.4 Reloading to a table

8.4.1 Examples

8.4.2 Cross-reference by purpose

8.4.3 Whether or not reloading is permitted when the table definitions of unload table and reload table do not match

8.4.4 Handling of a reloading error during table reorganization

8.5 Reorganizing data dictionary tables

8.5.1 Example

8.5.2 Cross-reference by purpose

8.6 Creating indexes in batch mode

8.6.1 Examples

8.6.2 Cross-reference by purpose

8.7 Re-creating indexes

8.7.1 Examples

8.7.2 Cross-reference by purpose

8.8 Reorganizing indexes

8.8.1 Example

8.8.2 Cross-reference by purpose

8.9 Command format

8.9.1 Format

8.9.2 Options

8.9.3 mtguide and emtdef statements (specification of MT information)

8.9.4 unload statement (specification of unload data file)

8.9.5 index statement (specification of index information file information)

8.9.6 idxname statement (specification of index information)

8.9.7 idxwork statement (specification of directory for index information file)

8.9.8 sort statement (specification of work directory for sorting)

8.9.9 lobunld statement (specification of LOB data unload file)

8.9.10 unlduoc statement (specification of UOC storage library information)

8.9.11 tblname statement (re-registration of table data to another table)

8.9.12 array statement (specification of row data output format for repetition columns)

8.9.13 unld_func statement (specification of constructor parameter reverse creation function)

8.9.14 reld_func statement (specification of constructor function)

8.9.15 constraint statement (specification of check pending status)

8.9.16 option statement (specification of data processing information)

8.9.17 report statement (specification of a file to which pdrorg tuning information is output)

8.9.18 blobtovarchar statement (specification of column subject to data conversion)

8.9.19 fixtext_option statement (specification of output data during creation of input data file in fixed-size data format)

8.10 Reorganization using a UOC

8.10.1 How to use a UOC during reorganization

8.10.2 Relationships between options and control statements

8.10.3 Overview of UOC processing

8.10.4 UOC interface

8.10.5 Example of a UOC

8.11 Notes on executing pdrorg on special tables

8.11.1 Table with an abstract data type

8.11.2 Falsification prevented table

8.12 Rules and notes

8.13 Database status in the event of an error and recovery method

8.13.1 Error when unloading

8.13.2 Error when reloading

8.13.3 Error when creating an index in batch mode or re-creating an index

8.13.4 Error when reorganizing an index

8.13.5 Error when unloading LOB data

8.13.6 Error when reloading LOB data

9. Dictionary Import/Export Utility (pdexp)

9.1 Overview

9.1.1 Table definition information import/export

9.1.2 Trigger definition information import/export

9.1.3 Stored procedure information import/export

9.1.4 Generation of a definition SQL

9.2 Command format

9.2.1 Format

9.2.2 Options

9.3 Rules and notes

9.4 Examples

10. Rebalancing Utility (pdrbal)

10.1 Overview

10.1.1 Functions of the rebalancing utility

10.1.2 Operation modes of the rebalancing utility

10.1.3 Execution environment

10.1.4 Executors

10.2 Examples

10.3 Command format

10.3.1 Format

10.3.2 Options

10.3.3 index statement (specification of index information file information)

10.3.4 idxwork statement (specification of directory for index information files)

10.3.5 sort statement (specification of work directory for sorting)

10.3.6 execstop statement (specification of pdrbal execution time)

10.3.7 unld_func statement (specification of constructor parameter reverse creation function)

10.3.8 reld_func statement (specification of constructor function)

10.3.9 report statement (specification of a process results file)

10.3.10 option statement (specification of optional functions)

10.4 Notes about the execution of SQL on FIX hash-partitioned tables during a rebalance operation

10.5 Whether or not SQL is executable during a rebalance operation

10.6 Notes

10.7 Error handling procedures

11. Free Page Release Utility (pdreclaim)

11.1 Overview

11.1.1 About free pages

11.1.2 Overview of pdreclaim

11.1.3 Functions of pdreclaim

11.1.4 Difference in functions from pdrorg

11.1.5 Execution environment

11.1.6 Executor

11.2 Examples

11.3 Command format

11.3.1 Format

11.3.2 Options

11.3.3 idxname statement (specification of index information)

11.3.4 option statement (specification of optional information)

11.4 pdreclaim processing results

11.5 Notes

12. Global Buffer Residence Utility (pdpgbfon)

12.1 Overview

12.1.1 Overview of pdpgbfon

12.1.2 Functions of pdpgbfon

12.1.3 Execution environment

12.1.4 Executor

12.2 Examples

12.3 Command format

12.3.1 Format

12.3.2 Options

12.3.3 idxname statement (specification of index information)

12.3.4 option statement (specification of optional information)

12.4 pdpgbfon processing results

12.5 Notes

13. Integrity Check Utility (pdconstck)

13.1 Overview

13.2 Functions of pdconstck

13.2.1 Integrity check facility

13.2.2 Facility for changing check pending status forcibly

13.3 Examples

13.4 Command format

13.4.1 Format

13.4.2 Options

13.5 pdconstck processing results

13.6 Notes

14. Statistics Analysis Utility (pdstedit)

14.1 Overview

14.2 Command format

14.2.1 Format

14.2.2 Options

14.2.3 Notes on option specifications

14.3 Details about statistical information

14.3.1 Output formats of statistical information

14.3.2 System activity statistical information

14.3.3 UAP statistical information

14.3.4 SQL statistical information

14.3.5 Global buffer pool statistical information

14.3.6 Statistical information about HiRDB files for database manipulation

14.3.7 Deferred write processing statistical information

14.3.8 Index statistical information

14.4 Output of statistical information to a DAT-format file

14.4.1 Data storage format of a DAT-format file

14.4.2 DAT-format file unit

14.4.3 Record formats of DAT-format files

14.5 Notes

14.6 Examples

15. Database Condition Analysis Utility (pddbst)

15.1 Overview

15.1.1 Database condition analysis facility

15.1.2 Condition analysis result accumulation facility

15.1.3 Facility for predicting reorganization time

15.2 Command format

15.2.1 Format

15.2.2 Options

15.2.3 predict statement

15.2.4 workdir statement

15.3 Output format of the database condition analysis facility

15.3.1 Condition analysis by RDAREA (logical analysis)

15.3.2 Condition analysis by RDAREA (physical analysis)

15.3.3 Condition analysis by table or index

15.3.4 Cluster key and clustering data page storage condition analysis

15.4 Execution results of the facility for predicting reorganization time

15.4.1 Output format of the execution results

15.4.2 Output format in CSV format

15.5 Standard value definition file (facility for predicting reorganization time)

15.6 Executing the condition analysis result accumulation facility in prediction level 2

15.6.1 Interval analysis

15.6.2 Merge analysis

15.6.3 Selection criteria

15.7 Rules and notes

15.8 Examples

16. Optimizing Information Collection Utility (pdgetcst)

16.1 Overview

16.1.1 Collecting optimization information by retrieval

16.1.2 Registering optimization information from an optimization information parameter file

16.1.3 Maximum number of concurrently executable utilities

16.2 Command format

16.2.1 Format

16.2.2 Options

16.3 Optimizing information

16.3.1 Optimization information to be collected

16.3.2 Optimizing information collection levels

16.4 Creating the optimization information parameter file

16.4.1 Information to be specified in the optimization information parameter file

16.4.2 Specifications in the optimization information parameter file

16.4.3 Specification example of the optimization information parameter file

16.4.4 Specification rules for the optimization information parameter file

16.5 Rules and notes

16.6 Output format

16.7 Examples

17. Access Path Display Utility (pdvwopt)

17.1 Overview

17.1.1 Function

17.2 Command format

17.2.1 Format

17.2.2 Option

17.2.3 Argument

17.3 Execution procedure

17.4 Rules and notes

17.5 Output format

17.5.1 Foreign server retrieval processing (prediction) information

17.5.2 Set operation information

17.5.3 Query processing information

17.5.4 Join processing information

17.5.5 Base table retrieval processing information

17.5.6 Types of join methods

17.5.7 Types of retrieval methods

17.5.8 Types of transfer methods

17.5.9 Types of access paths

17.5.10 Types of grouping processing methods

17.5.11 Types of plug-in-provided functions

17.5.12 Search conditions

17.5.13 Key conditions

17.5.14 Types of ORDER BY processing methods

17.6 Concept of tuning

17.6.1 Examples of tuning procedure

17.6.2 Notes about index definitions

17.6.3 Notes about index retrieval

17.6.4 Notes about join retrieval

18. Database Copy Utility (pdcopy)

18.1 Functions of the database copy utility

18.2 Information required for making backup copies

18.3 Examples

18.3.1 Backing up in units of systems

18.3.2 Backing up in units of RDAREAs

18.3.3 Backing up in units of servers

18.3.4 Backing up to files on DAT

18.3.5 Backing up using JP1/OmniBack II

18.3.6 Backing up using the inner replica facility and specifying an RDAREA generation

18.3.7 Backing up using the differential backup facility

18.3.8 Backing up using NetBackup

18.4 Command format

18.4.1 Option format

18.4.2 Options

18.5 Notes

18.6 Database copy utility process results listing

18.7 Backup file format

19. Database Recovery Utility (pdrstr)

19.1 Functions of the database recovery utility

19.1.1 Database recovery

19.1.2 Re-creating a log point information file

19.2 Information required for recovering databases

19.3 Examples

19.3.1 Restoring in units of systems

19.3.2 Restoring in units of RDAREAs

19.3.3 Restoring in units of servers

19.3.4 Restoring RDAREAs using JP1/OmniBack II

19.3.5 Restoring from a backup using the differential backup facility

19.3.6 Restoring a specified RDAREA generation when the inner replica facility is used

19.3.7 Restoring RDAREAs from their backup using NetBackup

19.3.8 Re-creating the log point information file

19.4 Command format

19.4.1 Option format

19.4.2 Options

19.5 Notes

19.6 Database recovery utility process results listing

20. Registry Facility Initialization Utility (pdreginit)

20.1 Overview

20.1.1 Function

20.2 Command format

20.2.1 Format

20.2.2 Options

20.3 Control statements

20.3.1 create rdarea statement

20.3.2 Notes

20.4 Rules and notes

20.5 Examples

Appendixes

A. List of Commands

B. Lock Mode During Command Execution

B.1 Lock mode for operation commands

B.2 Lock mode for utilities

C. RDAREA Status During Command Execution

C.1 RDAREA status transitions

C.2 Availability of utility or UAP execution depending on RDAREA status

C.3 Whether or not the check pending status can be set

D. Maximum Number of Concurrently Executable Utilities

E. Creation of Input Data Files for the Database Load Utility

E.1 Creating an input file on fixed-length blocked tape

E.2 Creating an input file on variable-length blocked tape

E.3 Creating an input file on EasyMT tape

F. Creation of a UOC for Use by pdload and pdrorg

F.1 Creating a shared library

F.2 Notes on UOC creation

G. Number of Concurrent Command Connections

H. List of Command Return Codes

Index

[Trademarks]

All Rights Reserved. Copyright (C) 2007, Hitachi, Ltd.

Notices

Relevant program products

List of program products:
For the HP-UX 11.0, HP-UX 11i, or HP-UX 11i V2 (PA-RISC) operating system:

P-1B62-1182 HiRDB/Single Server Version 8 08-00
P-1B62-1382 HiRDB/Parallel Server Version 8 08-00
P-1B62-1582 HiRDB/Single Server Version 8(64) 08-00
P-1B62-1782 HiRDB/Parallel Server Version 8(64) 08-00
P-1B62-1B82 HiRDB/Run Time Version 8 08-00
P-1B62-1C82 HiRDB/Developer's Kit Version 8 08-00
P-1B62-1D82 HiRDB/Run Time Version 8(64) 08-00
P-1B62-1E82 HiRDB/Developer's Kit Version 8(64) 08-00
P-F1B62-11823 HiRDB Staticizer Option Version 8 08-00
P-F1B62-11825 HiRDB Non Recover Front End Server Version 8 08-00
P-F1B62-11826 HiRDB Advanced High Availability Version 8 08-00
P-F1B62-11827 HiRDB Advanced Partitioning Option Version 8 08-00

For the HP-UX 11i V2 (IPF) operating system:

P-1J62-1582 HiRDB/Single Server Version 8(64) 08-00
P-1J62-1782 HiRDB/Parallel Server Version 8(64) 08-00
P-1J62-1D82 HiRDB/Run Time Version 8(64) 08-00
P-1J62-1E82 HiRDB/Developer's Kit Version 8(64) 08-00
P-F1J62-11823 HiRDB Staticizer Option Version 8 08-00
P-F1J62-11825 HiRDB Non Recover Front End Server Version 8 08-00
P-F1J62-11826 HiRDB Advanced High Availability Version 8 08-00
P-F1J62-11827 HiRDB Advanced Partitioning Option Version 8 08-00

For the Solaris 8, 9 or 10 operating system:

P-9D62-1182 HiRDB/Single Server Version 8 08-00
P-9D62-1382 HiRDB/Parallel Server Version 8 08-00
P-9D62-1582 HiRDB/Single Server Version 8(64) 08-00
P-9D62-1782 HiRDB/Parallel Server Version 8(64) 08-00
P-9D62-1B82 HiRDB/Run Time Version 8 08-00
P-9D62-1C82 HiRDB/Developer's Kit Version 8 08-00
P-9D62-1D82 HiRDB/Run Time Version 8(64) 08-00
P-9D62-1E82 HiRDB/Developer's Kit Version 8(64) 08-00
P-F9D62-11823 HiRDB Staticizer Option Version 8 08-00
P-F9D62-11825 HiRDB Non Recover Front End Server Version 8 08-00
P-F9D62-11826 HiRDB Advanced High Availability Version 8 08-00
P-F9D62-11827 HiRDB Advanced Partitioning Option Version 8 08-00

For the AIX(R) 5L V5.1, V5.2 or V5.3 operating system:

P-1M62-1182 HiRDB/Single Server Version 8 08-00
P-1M62-1382 HiRDB/Parallel Server Version 8 08-00
P-1M62-1582 HiRDB/Single Server Version 8(64) 08-00
P-1M62-1782 HiRDB/Parallel Server Version 8(64) 08-00
P-1M62-1B82 HiRDB/Run Time Version 8 08-00
P-1M62-1C82 HiRDB/Developer's Kit Version 8 08-00
P-1M62-1D82 HiRDB/Run Time Version 8(64) 08-00
P-1M62-1E82 HiRDB/Developer's Kit Version 8(64) 08-00
P-F1M62-11823 HiRDB Staticizer Option Version 8 08-00
P-F1M62-11825 HiRDB Non Recover Front End Server Version 8 08-00
P-F1M62-11826 HiRDB Advanced High Availability Version 8 08-00
P-F1M62-11827 HiRDB Advanced Partitioning Option Version 8 08-00

For the Red Hat Linux 7.1, Red Hat Linux 7.2, Red Hat Enterprise Linux AS 2.1, Red Hat Enterprise Linux AS 3 (x86), Red Hat Enterprise Linux ES 3 (x86), Red Hat Enterprise Linux AS 4 (x86), Red Hat Enterprise Linux ES 4 (x86), Red Hat Enterprise Linux AS 3 (AMD64 & Intel EM64T),* Red Hat Enterprise Linux AS 4 (AMD64 & Intel EM64T), or Red Hat Enterprise Linux ES 4 (AMD64 & Intel EM64T) operating system:

P-9S62-1182 HiRDB/Single Server Version 8 08-00
P-9S62-1382 HiRDB/Parallel Server Version 8 08-00
P-9S62-1B82 HiRDB/Run Time Version 8 08-00
P-9S62-1C82 HiRDB/Developer's Kit Version 8 08-00
P-F9S62-11823 HiRDB Staticizer Option Version 8 08-00
P-F9S62-11825 HiRDB Non Recover Front End Server Version 8 08-00
P-F9S62-11826 HiRDB Advanced High Availability Version 8 08-00
P-F9S62-11827 HiRDB Advanced Partitioning Option Version 8 08-00

* Only operating systems that run on the Intel EM64T are supported.

For the Red Hat Enterprise Linux AS 3 (AMD64 & Intel EM64T),* Red Hat Enterprise Linux AS 4 (AMD64 & Intel EM64T), or Red Hat Enterprise Linux ES 4 (AMD64 & Intel EM64T) operating system:

P-9W62-1182 HiRDB/Single Server Version 8 08-00
P-9W62-1382 HiRDB/Parallel Server Version 8 08-00
P-9W62-1B82 HiRDB/Run Time Version 8 08-00
P-9W62-1C82 HiRDB/Developer's Kit Version 8 08-00

* Only operating systems that run on the Intel EM64T are supported.

For the Red Hat Enterprise Linux AS 3 (IPF) or Red Hat Enterprise Linux AS 4 (IPF) operating system:

P-9V62-1182 HiRDB/Single Server Version 8 08-00
P-9V62-1382 HiRDB/Parallel Server Version 8 08-00
P-9V62-1B82 HiRDB/Run Time Version 8 08-00
P-9V62-1C82 HiRDB/Developer's Kit Version 8 08-00
P-F9V62-11823 HiRDB Staticizer Option Version 8 08-00
P-F9V62-11825 HiRDB Non Recover Front End Server Version 8 08-00
P-F9V62-11826 HiRDB Advanced High Availability Version 8 08-00
P-F9V62-11827 HiRDB Advanced Partitioning Option Version 8 08-00

This edition of the manual is released for the preceding program products, which have been developed under a quality management system that has been certified to comply with ISO9001 and TickIT. This manual may also apply to other program products; for details, see Software Information or Before Installing.

Trademarks

ActiveX is a trademark of Microsoft Corp. in the U.S. and other countries.
AIX is a registered trademark of the International Business Machines Corp. in the U.S.
CORBA is a registered trademark of Object Management Group, Inc. in the United States.
DataStage, MetaBroker, MetaStage and QualityStage are trademarks of International Business Machines Corporation in the United States, other countries, or both.
DB2 is a registered trademark of the International Business Machines Corp. in the U.S.
HACMP/6000 is a trademark of the International Business Machines Corp. in the U.S.
HP-UX is a product name of Hewlett-Packard Company.
IBM is a registered trademark of the International Business Machines Corp. in the U.S.
Itanium is a registered trademark of Intel Corporation or its subsidiaries in the United States and other countries.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
JBuilder is a trademark of Borland Software Corporation in the United States and other countries.
Linux is a registered trademark of Linus Torvalds.
Lotus, 1-2-3 are registered trademarks of International Business Machines Corporation in the United States, other countries, or both.
Microsoft Access is a registered trademark of Microsoft Corporation in the U.S. and other countries.
Microsoft Excel is a product name of Microsoft Corp.
Microsoft is a registered trademark of Microsoft Corp. in the U.S. and other countries.
Motif is a registered trademark of the Open Software Foundation, Inc.
MS-DOS is a registered trademark of Microsoft Corp. in the U.S. and other countries.
ODBC is Microsoft's strategic interface for accessing databases.
OLE is the name of a software product developed by Microsoft Corporation and the acronym for Object Linking and Embedding.
ORACLE is a registered trademark of Oracle Corporation.
Oracle8i is a trademark of ORACLE Corporation.
Oracle9i is a trademark of ORACLE Corporation.
Oracle 10g is a trademark of ORACLE Corporation.
OS/390 is a trademark of the International Business Machines Corp. in the U.S.
POSIX stands for Portable Operating System Interface for Computer Environment, which is a set of standard specifications published by the Institute of Electrical and Electronics Engineers, Inc.
RISC System/6000 is a registered trademark of the International Business Machines Corp. in the U.S.
Solaris is a trademark or registered trademark of Sun Microsystems, Inc. in the United States and other countries.
Sun is a trademark or registered trademark of Sun Microsystems, Inc. in the United States and other countries.
Sun Microsystems is a trademark or registered trademark of Sun Microsystems, Inc. in the United States and other countries.
The right to use the trademark DCE in Japan is sub-licensed from OSF.
UNIFY2000 is a product name of Unify Corp.
UNIX is a registered trademark of The Open Group in the United States and other countries.
VERITAS is a trademark or registered trademark of Symantec Corporation in the U.S. and other countries.
Visual Basic is a registered trademark of Microsoft Corp. in the U.S. and other countries.
Visual C++ is a registered trademark of Microsoft Corp. in the U.S. and other countries.
Visual Studio is a registered trademark of Microsoft Corp. in the U.S. and other countries.
WebLogic is a registered trademark of BEA Systems, Inc.
Windows is a registered trademark of Microsoft Corp. in the U.S. and other countries.
Windows NT is a registered trademark of Microsoft Corp. in the U.S. and other countries.
Windows Server is a registered trademark of Microsoft Corp. in the U.S. and other countries.
X/Open is a registered trademark of X/Open Company Limited in the U.K. and other countries.
X Window System is a trademark of X Consortium, Inc.
The following program products include material copyrighted by Sun Microsystems, Inc.: P-9D62-1182, P-9D62-1382, P-9D62-1582, P-9D62-1782, P-9D62-1B82, P-9D62-1C82, P-9D62-1D82, P-9D62-1E82, P-F9D62-11823, P-F9D62-11825, P-F9D62-11826, and P-F9D62-11827.
The following program products include material copyrighted by UNIX System Laboratories, Inc.: P-9D62-1182, P-9D62-1382, P-9D62-1582, P-9D62-1782, P-9D62-1B82, P-9D62-1C82, P-9D62-1D82, P-9D62-1E82, P-F9D62-11823, P-F9D62-11825, P-F9D62-11826, and P-F9D62-11827.
Other product and company names mentioned in this document may be the trademarks of their respective owners. Throughout this document Hitachi has attempted to distinguish trademarks from descriptive terms by writing the name with the capitalization used by the manufacturer, or by writing the name with initial capital letters. Hitachi cannot attest to the accuracy of this information. Use of a trademark in this document should not be regarded as affecting the validity of the trademark.

Restrictions

Information in this document is subject to change without notice and does not represent a commitment on the part of Hitachi. The software described in this manual is furnished according to a license agreement with Hitachi. The license agreement contains all of the terms and conditions governing your use of the software and documentation, including all warranty rights, limitations of liability, and disclaimers of warranty.
Material contained in this document may describe Hitachi products not available or features not available in your country.
No part of this material may be reproduced in any form or by any means without permission in writing from the publisher.
Printed in Japan.

Edition history

Edition 1 (3000-6-355(E)): March, 2007

Copyright

All Rights Reserved. Copyright (C) 2007, Hitachi, Ltd.

Preface

This manual describes the syntax of the commands used with HiRDB Scalable Database Server HiRDB Version 8.

Intended readers

This manual is intended for users who will be constructing or operating HiRDB Version 8 ("HiRDB") relational database systems.

It is assumed that readers of this manual have the following:

A basic knowledge of managing UNIX or Linux systems

A basic knowledge of SQL

The following manuals should be read before reading this manual:

HiRDB Version 8 Installation and Design Guide

HiRDB Version 8 System Operation Guide

Organization of this manual

This manual consists of the following 18 chapters and appendixes:

Chapter 1. Overview of Commands

Chapter 1 explains the methods of entering commands and the descriptive format for commands.

Chapter 2. Operation Commands

Chapter 2 explains the operation commands that can be used with HiRDB.

Chapter 3. Database Initialization Utility (pdinit)

Chapter 3 describes the database initialization utility that defines a physical structure that, in turn, permits files to be used as a HiRDB database.

Chapter 4. Database Definition Utility (pddef)

Chapter 4 describes the database definition utility that permits modifications of schema definitions and contents.

Chapter 5. Database Load Utility (pdload)

Chapter 5 describes the database load utility that stores user-provided data in a table.

Chapter 6. Interactive SQL Execution Utility (pdsql)

Chapter 6 explains the interactive SQL execution utility that can interactively execute SQL statements.

Chapter 7. Database Structure Modification Utility (pdmod)

Chapter 7 explains the database structure modification utility that can modify the physical structure of a database, such as by adding an RDAREA, expanding the database, or reinitializing the database.

Chapter 8. Database Reorganization Utility (pdrorg)

Chapter 8 explains the database reorganization utility for maintaining tables and indexes.

Chapter 9. Dictionary Import/Export Utility (pdexp)

Chapter 9 explains the dictionary import/export utility that migrates table definition information and stored procedure information between HiRDB systems.

Chapter 10. Rebalancing Utility (pdrbal)

Chapter 10 explains the rebalancing utility that rebalances a table partitioned by the hash partitioning method.

Chapter 11. Free Page Release Utility (pdreclaim)

Chapter 11 explains the free page release utility that enables you to release free pages (used free pages) during online operation.

Chapter 12. Global Buffer Residence Utility (pdpgbfon)

Chapter 12 explains the global buffer residence utility that reads table data pages and index pages into a global buffer in advance, such as immediately following HiRDB startup or before starting online jobs.

Chapter 13. Integrity Check Utility (pdconstck)

Chapter 13 explains the integrity check utility (pdconstck), which performs integrity checking and manipulates (sets or releases) the check pending status on tables for which referential constraints or check constraints have been defined.

Chapter 14. Statistics Analysis Utility (pdstedit)

Chapter 14 explains the statistics analysis utility that edits statistical information, such as information about HiRDB system activities.

Chapter 15. Database Condition Analysis Utility (pddbst)

Chapter 15 explains the database condition analysis utility, which analyzes the relationship between data dictionary tables or user RDAREAs and the storage status of the index, and summarizes and displays the results of the analysis.

Chapter 16. Optimizing Information Collection Utility (pdgetcst)

Chapter 16 explains the optimizing information collection utility, which collects information for optimizing based on cost and stores the information in the dictionary table.

Chapter 17. Access Path Display Utility (pdvwopt)

Chapter 17 explains the access path display utility, which displays access path information that was determined by the SQL optimization processing.

Chapter 18. Database Copy Utility (pdcopy)

Chapter 18 explains how to use the database copy utility (pdcopy), which makes a backup of a database.

Chapter 19. Database Recovery Utility (pdrstr)

Chapter 19 explains how to use the database recovery utility, which is used to recover databases and re-create log point information files.

Chapter 20. Registry Facility Initialization Utility (pdreginit)

Chapter 20 explains the registry facility initialization utility, which can be used to register the registry facility for using plug-in utilities.

Appendix A. List of Commands

Appendix A provides a list of operation commands and utilities.

Appendix B. Lock Mode During Command Execution

Appendix B describes the resources that are locked while an operation command or utility is executing.

Appendix C. RDAREA Status During Command Execution

Appendix C describes the RDAREA statuses during execution of commands.

Appendix D. Maximum Number of Concurrently Executable Utilities

Appendix D describes the maximum number of utilities that can be executed concurrently.

Appendix E. Creation of Input Data Files for the Database Load Utility

Appendix E explains the creation of data files that can be input to the database load utility (pdload).

Appendix F. Creation of a UOC for Use by pdload and pdrorg

Appendix F explains the creation of a UOC for use by pdload and pdrorg.

Appendix G. Number of Concurrent Command Connections

Appendix G explains the number of concurrent command connections.

Appendix H. List of Command Return Codes

Appendix H explains the return codes from commands.

Related publications

This manual is related to the following manuals, which should be read as required.

HiRDB (for UNIX)

For UNIX Systems HiRDB Version 8 Description (3000-6-351(E))

For UNIX Systems HiRDB Version 8 Installation and Design Guide (3000-6-352(E))

For UNIX Systems HiRDB Version 8 System Definition (3000-6-353(E))

For UNIX Systems HiRDB Version 8 System Operation Guide (3000-6-354(E))

HiRDB Staticizer Option Version 7 Description and User's Guide (3000-6-282(E))

For UNIX Systems HiRDB Version 8 Disaster Recovery System Configuration and Operation Guide (3000-6-364)*

HiRDB (for Windows)

For Windows Systems HiRDB Version 8 Description (3020-6-351(E))

For Windows Systems HiRDB Version 8 Installation and Design Guide (3020-6-352(E))

For Windows Systems HiRDB Version 8 System Definition (3020-6-353(E))

For Windows Systems HiRDB Version 8 System Operation Guide (3020-6-354(E))

For Windows Systems HiRDB Version 8 Command Reference (3020-6-355(E))

HiRDB (for both Windows and UNIX)

HiRDB Version 8 UAP Development Guide (3020-6-356(E))

HiRDB Version 8 SQL Reference (3020-6-357(E))

HiRDB Version 8 Messages (3020-6-358(E))

HiRDB Datareplicator Version 8 Description, User's Guide and Operator's Guide (3020-6-360(E))

HiRDB Dataextractor Version 8 Description, User's Guide and Operator's Guide (3020-6-362(E))

* This manual has been published in Japanese only; it is not available in English.

You must use the UNIX or the Windows manuals, as appropriate to the platform you are using.

Others

HiRDB External Data Access Version 7 Description and User's Guide (3000-6-284(E))

JP1 Version 6 JP1/VERITAS NetBackup v4.5 Agent for HiRDB License Description and User's Guide (3020-3-D79(E))

Organization of HiRDB manuals

The HiRDB manuals are organized as shown below. For the most efficient use of these manuals, it is suggested that they be read in the order they are shown, going from left to right.

Conventions: Abbreviations

Unless otherwise required, this manual uses the following abbreviations for product and other names.

Name of product or other entity
Representation

HiRDB/Single Server Version 8
HiRDB/Single Server
HiRDB or HiRDB Server

HiRDB/Single Server Version 8(64)

HiRDB/Parallel Server Version 8
HiRDB/Parallel Server

HiRDB/Parallel Server Version 8(64)

HiRDB/Developer's Kit Version 8
HiRDB/Developer's Kit
HiRDB Client

HiRDB/Developer's Kit Version 8(64)

HiRDB/Run Time Version 8
HiRDB/Run Time

HiRDB/Run Time Version 8(64)

HiRDB Datareplicator Version 7
HiRDB Datareplicator

HiRDB Dataextractor Version 7
HiRDB Dataextractor

HiRDB Text Search Plug-in Version 7
HiRDB Text Search Plug-in

HiRDB Spatial Search Plug-in Version 3
HiRDB Spatial Search Plug-in

HiRDB Staticizer Option Version 8
HiRDB Staticizer Option

HiRDB LDAP Option Version 8
HiRDB LDAP Option

HiRDB Advanced Partitioning Option Version 8
HiRDB Advanced Partitioning Option

HiRDB Advanced High Availability Version 8
HiRDB Advanced High Availability

HiRDB Non Recover Front End Server Version 8
HiRDB Non Recover FES

HiRDB Disaster Recovery Light Edition Version 8
HiRDB Disaster Recovery Light Edition

HiRDB External Data Access Version 8
HiRDB External Data Access

HiRDB External Data Access Adapter Version 8
HiRDB External Data Access Adapter

HiRDB Adapter for XML - Standard Edition
HiRDB Adapter for XML

HiRDB Adapter for XML - Enterprise Edition

HiRDB Control Manager
HiRDB CM

HiRDB Control Manager Agent
HiRDB CM Agent

Hitachi TrueCopy
TrueCopy

Hitachi TrueCopy basic

TrueCopy

TrueCopy remote replicator

JP1/Automatic Job Management System 2
JP1/AJS2

JP1/Automatic Job Management System 2 - Scenario Operation
JP1/AJS2-SO

JP1/Cm2/Extensible SNMP Agent
JP1/ESA

JP1/Cm2/Extensible SNMP Agent for Mib Runtime

JP1/Cm2/Network Node Manager
JP1/NNM

JP1/Integrated Management - Manager
JP1/Integrated Management or JP1/IM

JP1/Integrated Management - View

JP1/Magnetic Tape Access
EasyMT

EasyMT

JP1/Magnetic Tape Library
MTguide

JP1/NETM/DM
JP1/NETM/DM

JP1/NETM/DM Manager

JP1/Performance Management
JP1/PFM

JP1/Performance Management Agent for HiRDB
JP1/PFM-Agent for HiRDB

JP1/Performance Management - Agent for Platform
JP1/PFM-Agent for Platform

JP1/Performance Management/SNMP System Observer
JP1/SSO

JP1/VERITAS NetBackup BS v4.5
NetBackup

JP1/VERITAS NetBackup v4.5

JP1/VERITAS NetBackup BS V4.5 Agent for HiRDB License
JP1/VERITAS NetBackup Agent for HiRDB License

JP1/VERITAS NetBackup V4.5 Agent for HiRDB License

JP1/VERITAS NetBackup 5 Agent for HiRDB License

OpenTP1/Server Base Enterprise Option
TP1/EE

Virtual-storage Operating System 3/Forefront System Product
VOS3/FS
VOS3

Virtual-storage Operating System 3/Leading System Product
VOS3/LS

Extensible Data Manager/Base Extended Version 2
XDM basic program XDM/BASE E2
XDM/BASE E2

XDM/Data Communication and Control Manager 3
XDM Data communication control XDM/DCCM3
XDM/DCCM3

XDM/Relational Database XDM/RD
XDM/RD
XDM/RD

XDM/Relational Database Extended Version 2
XDM/RD E2
XDM/RD E2

VOS3 Database Connection Server
DB Connection Server

DB2 Universal Database for OS/390 Version 6
DB2

DNCWARE ClusterPerfect (Linux Version)
ClusterPerfect

Microsoft(R) Excel
Microsoft Excel or Excel

Microsoft(R) Visual C++(R)
Visual C++ or C++

Oracle 8i
ORACLE

Oracle 9i

Oracle 10g

Sun JavaTM System Directory Server
Sun Java System Directory Server or Directory Server

HP-UX 11i V2 (IPF)
HP-UX or HP-UX (IPF)

Red Hat Linux
Linux

Red Hat Enterprise Linux

Red Hat Enterprise Linux AS 3 (IPF)
Linux (IPF)
Linux

Red Hat Enterprise Linux AS 4 (IPF)

Red Hat Enterprise Linux AS 3(AMD64 & Intel EM64T)
Linux (EM64T)

Red Hat Enterprise Linux AS 4(AMD64 & Intel EM64T)

Red Hat Enterprise Linux ES 4(AMD64 & Intel EM64T)

turbolinux 7 Server for AP8000
Linux for AP8000

Microsoft(R) Windows NT(R) Workstation Operating System Version 4.0
Windows NT

Microsoft(R) Windows NT(R) Server Network Operating System Version 4.0

Microsoft(R) Windows(R) 2000 Professional Operating System
Windows 2000

Microsoft(R) Windows(R) 2000 Server Operating System

Microsoft(R) Windows(R) 2000 Datacenter Server Operating System

Microsoft(R) Windows(R) 2000 Advanced Server Operating System
Windows 2000 or Windows 2000 Advanced Server

Microsoft(R) Windows ServerTM 2003, Standard Edition
Windows Server 2003

Microsoft(R) Windows ServerTM 2003, Enterprise Edition

Microsoft(R) Windows ServerTM 2003 R2, Standard Edition
Windows Server 2003 R2 or Windows Server 2003

Microsoft(R) Windows ServerTM 2003 R2, Enterprise Edition

64 bit Version Microsoft(R) Windows ServerTM 2003, Enterprise Edition (IPF)
Windows Server 2003 (IPF) or Windows Server 2003

Microsoft(R) Windows ServerTM 2003, Standard x64 Edition
Windows Server 2003 or Windows Server 2003 x64 Editions
Windows (x64)

Microsoft(R) Windows ServerTM 2003, Enterprise x64 Edition

Microsoft(R) Windows ServerTM 2003 R2, Standard x64 Edition
Windows Server 2003, Windows Server 2003 R2 or Windows Server 2003 x64 Editions

Microsoft(R) Windows ServerTM 2003 R2, Enterprise x64 Edition

Microsoft(R) Windows(R) XP Professional x64 Edition
Windows XP or Windows XP x64 Edition

Microsoft(R) Windows(R) XP Professional Operating System
Windows XP Professional
Windows XP

Microsoft(R) Windows(R) XP Home Edition Operating System
Windows XP Home Edition

Single server
SDS

System manager
MGR

Front-end server
FES

Dictionary server
DS

Back-end server
BES

Windows 2000, Windows XP, and Windows Server 2003 may be referred to collectively as Windows.

The HiRDB directory path is represented as $PDDIR.

The hosts file means the hosts file stipulated by TCP/IP (including the /etc/hosts file).

This manual also uses the following abbreviations:

Abbreviation | Full name or meaning
ACK | Acknowledgement
ADM | Adaptable Data Manager
ADO | ActiveX Data Objects
ADT | Abstract Data Type
AP | Application Program
API | Application Programming Interface
ASN.1 | Abstract Syntax Notation One
BES | Back End Server
BLOB | Binary Large Object
BOM | Byte Order Mark
CD-ROM | Compact Disc - Read Only Memory
CGI | Common Gateway Interface
CLOB | Character Large Object
CMT | Cassette Magnetic Tape
COBOL | Common Business Oriented Language
CORBA(R) | Common ORB Architecture
CPU | Central Processing Unit
CSV | Comma Separated Values
DAO | Data Access Object
DAT | Digital Audio Taperecorder
DB | Database
DBM | Database Module
DBMS | Database Management System
DDL | Data Definition Language
DF for Windows NT | Distributing Facility for Windows NT
DF/UX | Distributing Facility/for UNIX
DIC | Dictionary Server
DLT | Digital Linear Tape
DML | Data Manipulate Language
DNS | Domain Name System
DOM | Document Object Model
DS | Dictionary Server
DTD | Document Type Definition
DTP | Distributed Transaction Processing
DWH | Data Warehouse
EUC | Extended UNIX Code
EX | Exclusive
FAT | File Allocation Table
FD | Floppy Disk
FES | Front End Server
FQDN | Fully Qualified Domain Name
FTP | File Transfer Protocol
GUI | Graphical User Interface
HBA | Host Bus Adapter
HD | Hard Disk
HTML | Hyper Text Markup Language
ID | Identification number
IP | Internet Protocol
IPF | Itanium(R) Processor Family
JAR | Java Archive File
Java VM | Java Virtual Machine
JDBC | Java Database Connectivity
JDK | Java Developer's Kit
JFS | Journaled File System
JFS2 | Enhanced Journaled File System
JIS | Japanese Industrial Standard code
JP1 | Job Management Partner 1
JRE | Java Runtime Environment
JTA | Java Transaction API
JTS | Java Transaction Service
KEIS | Kanji processing Extended Information System
LAN | Local Area Network
LDAP | Lightweight Directory Access Protocol
LIP | loop initialization process
LOB | Large Object
LRU | Least Recently Used
LTO | Linear Tape-Open
LU | Logical Unit
LUN | Logical Unit Number
LVM | Logical Volume Manager
MGR | System Manager
MIB | Management Information Base
MRCF | Multiple RAID Coupling Feature
MSCS | Microsoft Cluster Server
NAFO | Network Adapter Fail Over
NAPT | Network Address Port Translation
NAT | Network Address Translation
NIC | Network Interface Card
NIS | Network Information Service
NTFS | New Technology File System
ODBC | Open Database Connectivity
OLAP | Online Analytical Processing
OLE | Object Linking and Embedding
OLTP | On-Line Transaction Processing
OOCOBOL | Object Oriented COBOL
ORB | Object Request Broker
OS | Operating System
OSI | Open Systems Interconnection
OTS | Object Transaction Service
PC | Personal Computer
PDM II E2 | Practical Data Manager II Extended Version 2
PIC | Plug-in Code
PNM | Public Network Management
POSIX | Portable Operating System Interface for UNIX
PP | Program Product
PR | Protected Retrieve
PU | Protected Update
RAID | Redundant Arrays of Inexpensive Disk
RD | Relational Database
RDB | Relational Database
RDB1 | Relational Database Manager 1
RDB1 E2 | Relational Database Manager 1 Extended Version 2
RDO | Remote Data Objects
RiSe | Real time SAN replication
RM | Resource Manager
RMM | Resource Manager Monitor
RPC | Remote Procedure Call
SAX | Simple API for XML
SDS | Single Database Server
SGML | Standard Generalized Markup Language
SJIS | Shift JIS
SNMP | Simple Network Management Protocol
SQL | Structured Query Language
SQL/K | Structured Query Language / VOS K
SR | Shared Retrieve
SU | Shared Update
TCP/IP | Transmission Control Protocol / Internet Protocol
TM | Transaction Manager
TMS-4V/SP | Transaction Management System - 4V / System Product
UAP | User Application Program
UOC | User Own Coding
VOS K | Virtual-storage Operating System Kindness
VOS1 | Virtual-storage Operating System 1
VOS3 | Virtual-storage Operating System 3
WS | Workstation
WWW | World Wide Web
XDM/BASE E2 | Extensible Data Manager / Base Extended Version 2
XDM/DF | Extensible Data Manager / Distributing Facility
XDM/DS | Extensible Data Manager / Data Spreader
XDM/RD E2 | Extensible Data Manager / Relational Database Extended Version 2
XDM/SD E2 | Extensible Data Manager / Structured Database Extended Version 2
XDM/XT | Extensible Data Manager / Data Extract
XFIT | Extended File Transmission program
XML | Extensible Markup Language

Log representations

The OS log is referred to generically as syslogfile. syslogfile is the log output destination specified in /etc/syslog.conf. Typically, the following files are specified as syslogfile.

OS | File
HP-UX | /var/adm/syslog/syslog.log
Solaris | /var/adm/messages or /var/log/syslog
AIX 5L | /var/adm/ras/syslog
Linux | /var/log/messages

Conventions: Diagrams

This manual uses the following conventions in diagrams:

Conventions: Fonts and symbols

Font and symbol conventions are classified as:

General font conventions

Conventions in syntax explanations

These conventions are described below.

General font conventions

The following table lists the general font conventions:

Font
Convention

Bold
Bold type indicates text on a window, other than the window title. Such text includes menus, menu options, buttons, radio box options, or explanatory labels. For example, bold is used in sentences such as the following:

From the File menu, choose Open.

Click the Cancel button.

In the Enter name entry box, type your name.

Italics
Italics are used to indicate a placeholder for some actual text provided by the user or system. Italics are also used for emphasis. For example:

Write the command as follows:
copy source-file target-file

Do not delete the configuration file.

Code font
A code font indicates text that the user enters without change, or text (such as messages) output by the system. For example:

At the prompt, enter dir.

Use the send command to send mail.

The following message is displayed:
The password is incorrect.

Examples of coding and messages appear as follows (although there may be some exceptions, such as when coding is included in a diagram):

MakeDatabase
...
StoreDatabase temp DB32

In examples of coding, an ellipsis (...) indicates that one or more lines of coding are not shown for purposes of brevity.

Conventions in syntax explanations

Syntax definitions appear as follows:

StoreDatabase [temp|perm] (database-name ...)

The following table lists the conventions used in syntax explanations. The syntactical characters described below are used to provide a clear explanation of code syntax; you do not actually enter these characters.

Example font or symbol | Convention
StoreDatabase | Code-font characters must be entered exactly as shown.
database-name | This font style marks a placeholder that indicates where appropriate characters are to be entered in an actual command.
SD | Bold code-font characters indicate the abbreviation for a command.
perm | Underlined characters indicate the default value.
[ ] | Square brackets enclose an item or set of items whose specification is optional.
| | Only one of the options separated by a vertical bar can be specified at the same time.
... | An ellipsis (...) indicates that the item or items enclosed in ( ) or [ ] immediately preceding the ellipsis may be specified as many times as necessary.
() | Parentheses indicate the range of items to which the vertical bar (|) or ellipsis (...) is applicable.
| The user-specified value preceding the swung dash must be specified in accordance with the attributes following the swung dash.
<< >> | Double angle brackets enclose the default value assumed by the system when the specification is omitted.
< > | Angle brackets enclose the syntax element notation for a user-specified value.
(( )) | Double parentheses enclose the permitted range of values that can be specified.

Syntax element notations

Syntax element notations explain the types of user-specified values.

Syntax element notation | Explanation
<alphabetic> | Alphabetic characters (A-Z, a-z) and _ (underline)
<alphabetic symbol> | Alphabetic characters (A-Z, a-z), #, @, \
<alphanumeric> | Alphabetic characters and numeric characters (0-9)
<alphanumeric symbol> | Alphabetic symbols and numeric characters
<unsigned integer> | Numeric characters
<hexadecimal> | Numeric characters and (A-F, a-f)
<identifier>¹ | Alphanumeric character string beginning with an alphabetic character
<symbolic name> | Alphanumeric symbol string beginning with an alphabetic symbol
<character string> | String of any characters
<path name>² | Includes symbolic names, forward slashes (/), and periods (.).
<HiRDB file name> | Character string consisting of alphabetic characters (A-Z, a-z), numeric characters (0-9), . (period), _ (underline), and @ (maximum 30 characters)

Note

Alphabetic characters are case sensitive (i.e., lowercase alphabetic characters are distinguished from uppercase alphabetic characters).

¹ An RDAREA name is an alphanumeric character string beginning with an alphabetic character or special character, and can include alphanumeric characters, underscores (_), and spaces. If an RDAREA name includes a space, the entire name must be enclosed in double quotation marks (").

A host name is a character string that can include alphabetic characters (A to Z, a to z), numeric characters, periods (.), hyphens (-), and underscores (_). A host name can begin with a numeric character.

² Path names depend on the operating system being used. The backslash (\) must not be used in a HiRDB file system area name.

Notations used in formulas

The following notations are used in computational expressions:

Notation
Explanation

Round up the result to the next integer.
Example: The result of 34 3 is 12.

Discard digits following the decimal point.
Example: The result of 34 3 is 11.

MAX
Select the largest value as the result.
Example: The result of max(10, 2 4, 3 + 8) is 11.

MIN
Select the smallest value as the result.
Example: The result of min(10, 2 4, 3 + 8) is 8.

Conventions in command explanations

This manual explains each command in the format shown as follows; note that this format may differ slightly from one command to another:

Conventions: KB, MB, GB, and TB

This manual uses the following conventions:

1 KB (kilobyte) is 1,024 bytes.

1 MB (megabyte) is 1,024² bytes.

1 GB (gigabyte) is 1,024³ bytes.

1 TB (terabyte) is 1,024⁴ bytes.

Conventions: Version numbers

The version numbers of Hitachi program products are usually written as two sets of two digits each, separated by a hyphen. For example:

Version 1.00 (or 1.0) is written as 01-00.

Version 2.05 is written as 02-05.

Version 2.50 (or 2.5) is written as 02-50.

Version 12.25 is written as 12-25.

The version number might be shown on the spine of a manual as Ver. 2.00, but the same version number would be written in the program as 02-00.

Important notes on this manual

The following facilities are explained, but they are not supported:

Distributed database facility

Server mode system switchover facility

User server hot standby

Rapid system switchover facility

Standby-less system switchover (1:1) facility

Standby-less system switchover (effects distributed) facility

HiRDB External Data Access facility

Inner replica facility (when described for the Windows version of HiRDB)

Updatable online reorganization (when described for the Windows version of HiRDB)

Sun Java System Directory Server linkage facility

Simple setup tool

The following products and option program products are explained, but they are not supported:

HiRDB Control Manager

HiRDB Disaster Recovery Light Edition

HiRDB External Data Access

HiRDB LDAP Option

Notes on printed manuals

Please note that even though the printed manuals are separated into Part I and Part II, the chapters and page numbers sequentially continue from Part I to Part II. Also, please note that the index is only included in Part II.

1. Overview of Commands

This chapter explains the methods of entering commands and the descriptive format for commands.

This chapter contains the following sections:

Organization of this chapter

1.1 Overview

1.2 List of operation commands

1.3 List of utilities

1.4 Utility I/O files

1.5 Notes on command execution

1.6 Functions that become available when optional HiRDB program products are installed

1.1 Overview

The commands used with HiRDB include operation commands and utilities. The same input methods and formats apply to both.

Organization of this section

(1) Command input method

(2) Command descriptive format

(3) Using a command by specifying an alias

(1) Command input method

A HiRDB command is input from a shell.

The command execution mode is shown in Figures 1-1 (for a HiRDB/Single Server) and 1-2 (for a HiRDB/Parallel Server).

Figure 1-1 Command execution mode: HiRDB/Single Server

Explanation

Use either of the following methods to input a command:

Log in from a workstation or personal computer to the remote server machine where the single server is located, then enter the command

Enter the command from the OS console by specifying the server machine where the single server is located

Figure 1-2 Command execution mode: HiRDB/Parallel Server

Explanation

Use either of the following methods to input a command:

Log in from a workstation or personal computer to the remote server machine where the system manager* is located, then enter the command

Enter the command from the OS console by specifying the server machine where the system manager* is located
* Some commands are executed from a server machine other than the system manager. For details about the server machine used to execute each command, see Tables 1-1 List of operation commands and 1-2 List of utilities, and the details about each command.

(2) Command descriptive format

The following shows the command descriptive format:

command-name options command-arguments

(a) command-name

The command name is the file name of the command that is to be executed. Because file names are used as commands, the absolute path name of the HiRDB directory must be specified in the PDDIR environment variable of the environment for each command executor.

To execute HiRDB commands, the following environment variables must be specified in an executor's environment:

PDDIR

Specifies the absolute path name of the HiRDB directory

PDCONFPATH

Specifies the absolute path name of the directory in which the HiRDB system definition file is stored

PATH

Adds $PDDIR/bin to PATH

SHLIB_PATH

Adds $PDDIR/lib to SHLIB_PATH

(b) options

An option either qualifies the command's operation or specifies the object of the operation.

In the following explanations, cmd indicates a command name.

An option is a character string beginning with a minus sign (-) that may or may not be followed by one or more flag arguments.
The following shows the descriptive formats of options:
-option-flag or -option-flag flag-argument(s)

option-flag

One alphanumeric character (case sensitive).

flag-argument

Argument of the option flag (multiple flag arguments can be specified by separating them with a comma (,)).

Multiple option flags without flag arguments can be specified consecutively, preceded by a single minus sign.

Example

The following two specifications are treated as being the same:

cmd -a -b -c

cmd -abc

If an option requires a flag argument, the flag argument cannot be omitted.

When a command that is entered from a shell includes an option flag argument that contains a space, the entire flag argument must be enclosed in double quotation marks (").

Example

An option with argument "1 2" must be specified as follows:

cmd -f "1 2"

If the same option flag is specified more than once, the last specification is effective.

Example

If the following is specified, -a 2 is effective:

cmd -a 1 -a 2

All options must be specified before any command arguments.

Example

If option flag a does not take a flag argument, file and -b in the following specification are assumed to be command arguments:

cmd -a file -b

Two consecutive minus signs (--) indicate the end of the options.

Example

In the following specification, -b is assumed to be a command argument:

cmd -a -- -b

An option consisting of a minus sign only cannot be entered.

Example

In the following specification, - is assumed to be a command argument:

cmd -

(c) command-arguments

A command argument specifies the direct object of a command's operation. If the object is to be qualified, options are used to specify the object.

A control statements file that is specified in a command argument is a regular file unless otherwise noted.

(3) Using a command by specifying an alias

If an operating system command or command in another program has the same name as a HiRDB command, the HiRDB command may fail to execute. If this happens, solve the problem as follows:

In environmental variable settings, assign a higher priority to the HiRDB command.

Execute the command by specifying its absolute path.

In situations when these two methods cannot be used, HiRDB commands can still be executed by assigning arbitrary names to them. For details about how to execute a command in terms of an alias, see the HiRDB Version 8 Installation and Design Guide.

1.2 List of operation commands

Table 1-1 lists the operation commands used with HiRDB.

Table 1-1 List of operation commands

Operation command
Description
Executor
HiRDB status
Executing server machine

pdacunlck
Releases the consecutive certification failure account lock state.
HiRDB administrator
ACT
SDS or MGR

pdadmvr
Displays the HiRDB version information.
HiRDB administrator
ANY
Each server machine

pdaudbegin
Starts acquisition of audit trails.
HiRDB administrator
ACT
SDS or MGR

pdaudend
Stops acquisition of audit trails.
HiRDB administrator
ACT¹²
SDS or MGR

pdaudrm
Deletes audit trail files.
HiRDB administrator
ACT
SDS or MGR

pdaudswap
Swaps audit trail files.
Auditor
ACT
SDS or MGR

pdbkupls
Displays information about backup files acquired by pdcopy.
HiRDB administrator
ANY
Server machine where backup files are located

pdbufls
Displays the status of global buffers.
HiRDB administrator
ACT
SDS or MGR

pdbufmod
Adds, deletes, or changes a global buffer during HiRDB operation.
HiRDB administrator
ACT
SDS or MGR

pdcancel
Forcibly disconnects and terminates the process on HiRDB for processing a specified UAP or utility.
HiRDB administrator
ACT
Any server machine⁵

pdcat
Displays status file status.
USR
ANY²
Any server machine⁵

Displays messages in a message log file.
USR
ACT
Any server machine⁵

pdcbl¹
Preprocesses a UAP written in COBOL.
USR
ANY
Any server machine

pdchgconf
Changes system definitions during HiRDB operation.
HiRDB administrator
ACT
SDS or MGR

pdchprc
Changes the number of resident server processes and maximum number of startup server processes, or displays the current number of resident server processes and current maximum number of startup server processes at the time the pdchprc command is executed.
HiRDB administrator
ACT
SDS or MGR

pdclose
Closes RDAREAs.
HiRDB administrator
ACT
SDS or MGR

pdclttrc
Acquires an SQL trace for a client executing SQL statements.
HiRDB administrator
ACT
SDS or MGR

pdcmt
Commits transactions when transactions that are part of a global transaction cannot be concluded.
HiRDB administrator
ACT
Each server machine⁵

pdconfchk
Checks HiRDB system definitions for inconsistencies.
HiRDB administrator
ANY
SDS or MGR

pdcpp¹
Preprocesses a UAP written in C language.
USR
ANY
Any server machine

pdcspool
Deletes troubleshooting information.
HiRDB administrator
ANY
Each server machine

pddbadset
Sets up HiRDB External Data Access Adapter in the HiRDB environment in order to use the HiRDB External Data Access facility.
HiRDB administrator
INA
Each server machine

pddbchg
Changes the replica status of replica RDAREAs.
HiRDB administrator
ACT
SDS or MGR

pddbfrz
Places a full HiRDB file (used through the last page of the file) that constitutes a user LOB RDAREA in frozen update status.
HiRDB administrator
ACT
SDS or MGR

pddbls
Displays the status of RDAREAs.
HiRDB administrator
ACT
SDS or MGR

pddefrev
Generates a definition SQL statement.
User with DBA privilege
ACT
SDS or MGR

pdfbkup
Makes a backup of a HiRDB file system.
HiRDB administrator
ANY¹⁴
Server machine where the HiRDB file system is located

pdffsck
Checks a HiRDB file system area for integrity errors and corrects any errors that are detected.
Superuser and HiRDB administrator
ANY¹⁶
Server machine where the HiRDB file system is located

pdfgt
Terminates a transaction forcibly when a transaction branch that is part of a global transaction cannot be terminated for some reason.
HiRDB administrator
ACT
Each server machine⁵

pdfls
Displays information about HiRDB files in a HiRDB file system area.
USR
ANY
Server machine where the HiRDB file system is located

pdfmkfs
Initializes files for a HiRDB file system area.
HiRDB administrator
ANY
Server machine where the HiRDB file system is located

pdfrm
Deletes a HiRDB file from a HiRDB file system area.
HiRDB administrator
ANY⁹
Server machine where the HiRDB file system is located

pdfrstr
Restores a HiRDB file system from a backup.
HiRDB administrator
INA
Server machine where the HiRDB file system is located

pdfstatfs
Displays the status of a HiRDB file system area.
USR
ANY
Server machine where the HiRDB file system is located

pdgen
Generates the HiRDB environment interactively.
HiRDB administrator
ANY¹⁰
SDS or MGR

pdgeter
Outputs error information to a specified directory or DAT drive when an error occurs in the HiRDB system.
HiRDB administrator
ANY
Any server machine⁶

pdgrprfl
When the Hitachi Directory Server linkage facility is used, updates the user information maintained by HiRDB to the most recent status.
HiRDB administrator
ACT
SDS or MGR

pdhold
Shuts down RDAREAs.
HiRDB administrator
ACT
SDS or MGR

pditvstop¹¹
Stops the command that was started by the pditvtrc command.
USR
ANY
Any server machine

pditvtrc¹¹
Executes a specified command at a specified interval (in seconds) and then outputs the result to a file.
USR
ANY
Any server machine

pdjarsync
Registers, re-registers, or deletes a JAR file or displays a list of JAR files.
HiRDB administrator
ANY
SDS or MGR

pdlistls
Displays list definition information.
HiRDB administrator
ACT
SDS or MGR

pdlodsv
When JavaTM stored procedures, Java stored functions, and the Hitachi Directory Server linkage facility are no longer used, enables you to delete unneeded load modules from the HiRDB installation directory.
Super user
ANY
Each server machine

pdlogadpf
During HiRDB operation, assigns a physical file to a file group specified in the HiRDB system definition.
HiRDB administrator
ACT
SDS or MGR

pdlogatul
Restarts, cancels, or displays the status of the automatic log unloading facility.
HiRDB administrator
ANY
SDS or MGR

pdlogchg
Forcibly places a specified file group in unload completed status or HiRDB Datareplicator extraction completed status.
HiRDB administrator
ANY²
SDS or MGR

pdlogcls
Closes an open physical file that comprises a file group so that it cannot be used by the active HiRDB.
HiRDB administrator
ACT
SDS or MGR

pdloginit
Creates a log file in the HiRDB file system and initializes it so that it can be used by HiRDB.
HiRDB administrator
ANY²
SDS or MGR

pdlogls
Displays information about log files.
USR
ANY², ³
SDS or MGR

pdlogopen
Opens a closed physical file that comprises a file group so that it can be used by the active HiRDB.
HiRDB administrator
ACT
SDS or MGR

pdlogrm
Deletes a log file from the HiRDB file system.
HiRDB administrator
ANY²
SDS or MGR

pdlogswap
Swaps log files.
HiRDB administrator
ACT
SDS or MGR

pdlogsync
Collects a synchronization point dump.
HiRDB administrator
ACT
SDS or MGR

pdlogucat
Displays information about an unload log file.
HiRDB administrator
ANY
Server machine where the unload log file is located

pdlogunld
Unloads a file group into a destination file and places it in unload completed status.
HiRDB administrator
ANY²
SDS or MGR

pdls
Displays the following types of status:

User status

Status of audit trail files

System status when system switchover facility is used

Server lock status

Information about server's shared memory

Progress of reflection processing for online reorganization

Server processing status

Execution status of log application processing

Communication control information on connected servers

HiRDB Datareplicator linkage status

Server scheduling status

Whether or not an output type for statistical information by unit and server is specified

Unit or server status file status

Unit and server status

Server transaction status

Unit activity status

USR¹³
ANY when -d aud, ha, or rpl is specified; otherwise, ACT
Any server machine⁵ when -d ha, lck, svr, trn, or ust is specified; otherwise, SDS or MGR

pdmemsv
Saves memory space during multi-HiRDB operation.
Super user
INA
SDS or MGR

pdobils
Displays the utilization status of SQL objects stored in the SQL object buffer.
HiRDB administrator
ACT
Any server machine

pdobjconv
Migrates SQL objects to a 64-bit-mode HiRDB.
User with DBA privilege
ACT
SDS or MGR

pdocb¹
Preprocesses a UAP coded in OOCOBOL.
USR
ANY
Any server machine

pdocc¹
Preprocesses a UAP coded in C++.
USR
ANY
Any server machine

pdopen
Opens RDAREAs.
HiRDB administrator
ACT
SDS or MGR

pdopsetup
Installs and uninstalls optional program products.
Super user
INA
Each server machine

pdorbegin
Places original and replica RDAREAs in online reorganization hold status.
HiRDB administrator
ACT
SDS or MGR

pdorcheck
Checks application conditions for updatable online reorganization.
HiRDB administrator
ACT
SDS or MGR

pdorchg
Changes current RDAREAs from original RDAREAs in online reorganization hold status to replica RDAREAs in online reorganization hold status.
HiRDB administrator
ACT
SDS or MGR

pdorcreate
Creates an environment for reflection processing for online reorganization.
HiRDB administrator
ACT
SDS or MGR

pdorend
Executes reflection processing for online reorganization.
HiRDB administrator
ACT
SDS or MGR

pdpfresh
Terminates the current server process and starts a new process.
HiRDB administrator
ACT
SDS or MGR

pdplgrgst
Registers plug-ins and deletes them from a HiRDB.
User with DBA privilege
ACT
Any server machine

pdplgset
Sets up a plug-in in the HiRDB environment.
HiRDB administrator
INA
Each server machine

pdprgcopy
Copies a HiRDB update version into the HiRDB directory.
HiRDB administrator
ANY
SDS or MGR

pdprgrenew
Updates the current HiRDB to the HiRDB update version.
HiRDB administrator
ACT
SDS or MGR

pdrbk
Rolls back transactions when a transaction branch that is part of a global transaction could not be concluded.
HiRDB administrator
ACT
Each server machine⁵

pdrdrefls
Displays information about related RDAREAs.
HiRDB administrator
ACT
SDS or MGR

pdrels
Releases RDAREAs from shutdown status.
HiRDB administrator
ACT
SDS or MGR

pdrisechk
Checks the configuration of Real Time SAN Replication.
HiRDB administrator
ANY
SDS or MGR

pdrisedbto
In the case of Real Time SAN Replication based on the log-only synchronous method, terminates the log application site and inherits the database from the transaction execution site.
HiRDB administrator
ACT
SDS or MGR (log application site)

pdriseset
In the case of Real Time SAN Replication based on the log-only synchronous method, sets, releases, or displays the system status at the site where the command is executed.
HiRDB administrator
ANY
SDS or MGR

pdrpause
Starts the system or restarts processing that has been suspended.
HiRDB administrator
INA
Each server machine

pdrplstart
Starts HiRDB Datareplicator linkage.
HiRDB administrator
ACT⁷
SDS or MGR

pdrplstop
Stops HiRDB Datareplicator linkage.
HiRDB administrator
ACT⁸
SDS or MGR

pdsetup
Registers a HiRDB system under the HiRDB directory into the OS or deletes it from the OS.
Super user
INA
Each server machine

pdstart
Starts a HiRDB system.
HiRDB administrator
INA
SDS⁴ or MGR

Starts a unit or server.
HiRDB administrator
ACT
SDS or MGR

pdstbegin
Starts output of statistical information to the statistics log file.
HiRDB administrator
ACT
SDS or MGR

pdstend
Stops output of statistical information to the statistics log file.
HiRDB administrator
ACT
SDS or MGR

pdstjswap
Swaps statistics log files.
HiRDB administrator
ACT
SDS or MGR

pdstjsync
Outputs information about the statistics log buffer to the statistics log file.
HiRDB administrator
ACT¹⁵
Any server machine

pdstop
Terminates a HiRDB system, unit, or server.
HiRDB administrator
ACT
SDS⁴ or MGR

pdstscls
Closes an open status file.
HiRDB administrator
ACT
SDS or MGR

pdstsinit
Initializes a physical file comprising a status file (logical file).
HiRDB administrator
ANY²
SDS or MGR

pdstsopen
Opens an initialized or closed status file.
HiRDB administrator
ACT
SDS or MGR

pdstsrm
Deletes a status file.
HiRDB administrator
ANY²
SDS or MGR

pdstsswap
Swaps status files.
HiRDB administrator
ACT
SDS or MGR

pdsvhostname
Displays a specified server's host name in DAT format.
HiRDB administrator
ACT
SDS or MGR

pdtrndec
Completes any uncompleted transactions.
HiRDB administrator
ACT
SDS or MGR

pdtrnqing
Starts or releases transaction queuing for a back-end server.
HiRDB administrator
ACT¹⁷
Any server machine⁵

pdusrchk
Checks whether or not users registered in HiRDB are registered in the Directory Server.
HiRDB administrator
ACT
SDS or MGR

pdvrup
Maintains the master directory RDAREA and data dictionary RDAREAs when the HiRDB version has been upgraded.
HiRDB administrator
ACT
SDS or MGR

Legend:

ANY: Can be executed whether or not HiRDB is active.

ACT: Can be executed only while HiRDB is active.

INA: Can be executed only while HiRDB is inactive.

USR: Can be executed by a user without privileges.

SDS: For a HiRDB/Single Server, the command is executed on the server machine of the single server.

MGR: For a HiRDB/Parallel Server, the command is executed on the server machine where the system manager is located.

Note 1

Log files include system log files and synchronization point dump files.

Note 2

A file that is specified in an operation command or utility that is executing must not be in use at the same time by another operation command, utility, or UAP; doing so will result in an error and cause the processing results to be invalidated.

¹

For details about pdcbl, pdcpp, pdocb, and pdocc, see the HiRDB Version 8 UAP Development Guide.

²

This command cannot be executed during the following periods:

During HiRDB startup processing (from output of KFPS01800-I message to output of KFPS05210-I message)

During HiRDB termination processing (from output of KFPS05220-I message to output of KFPS01850-I message)

³

When the -d spd option is specified, this command can be executed only while HiRDB is active.

⁴

Execute this command on the server machine of the single server or a utility special unit.

⁵

This command cannot be executed for a server machine that has a utility special unit.

⁶

Parameters must be set so that the remote shell can be executed between the hosts targeted for error information acquisition. This does not apply when error information is to be acquired for only the host executing the pdgeter command. Moreover, if the -a option is specified, this command must be executed at one of the hosts where the error information is to be acquired.

⁷

This command can be executed only when all units and servers in the HiRDB system are active.

⁸

For a HiRDB/Single Server, this command can be executed only while HiRDB is active. For a HiRDB/Parallel Server, this command can be executed if the unit where the system manager is located is active, even if other units are inactive.

⁹

If the usage purpose of the HiRDB file system area that contains the HiRDB file to be deleted is other than UTL, this command cannot be executed in the HiRDB file system area that contains that HiRDB file while the active HiRDB is in use (if the HiRDB file in the HiRDB file system area has been opened even once). If the usage purpose is UTL, the command can be executed regardless of whether or not the HiRDB file system area is in use. However, it cannot be executed if the specified HiRDB file is in use by the active HiRDB (opened by another process).

¹⁰

When a separate HiRDB environment is to be created, this command can be executed regardless of whether or not HiRDB is active. When an existing HiRDB environment is to be re-created or a new HiRDB environment is to be created, the command can be executed only while the HiRDB is inactive.

¹¹

The pditvtrc and pditvstop commands take another command as their command argument. The execution conditions for the command that is specified as the command argument take effect. When specifying a HiRDB operation command, observe the Executor, HiRDB status, and Executing server machine conditions for that command.

¹²

This command can be executed after acquisition of an audit trail has started.

¹³

Only the auditor can execute -d aud during HiRDB operation. When HiRDB is not running, any HiRDB administrator (including superuser) other than the auditor can execute this command.

¹⁴

To execute this command during HiRDB operation, specify the -f option.

¹⁵

This command can be executed when HiRDB is running and statistical information is being acquired.

¹⁶

Depends on whether or not the -c option is specified and on the purpose of the HiRDB file system area. For details, see the rules in pdffsck.

¹⁷

Whether or not the command can be executed depends on the back-end server's operating status. For details, see the rules in pdtrnqing.

1.3 List of utilities

Table 1-2 lists the utilities used with HiRDB.

Table 1-2 List of utilities

Utility
Description
Executor
HiRDB status
Executing server machine

Database initialization utility (pdinit)
Initializes a database (creates RDAREAs).
HiRDB administrator
ACT⁴
SDS or MGR

Database definition utility (pddef)
Executes definition SQL statements.
User with CONNECT privilege⁵
ACT
Any server machine

Database load utility (pdload)¹
Stores user-created data in a table.
Depends on the operating mode²
ACT
SDS or MGR

SQL interactive execution utility (pdsql)⁶
Executes SQL commands interactively.
User with CONNECT privilege⁵
ACT
Any server machine

Database structure modification utility (pdmod)
Modifies the physical structure of a database, such as by adding, extending, or reinitializing RDAREAs.
HiRDB administrator
ACT
SDS or MGR

Database reorganization utility (pdrorg)¹
Maintains tables such as by reorganizing tables and re-creating indexes.
Depends on the function³
ACT
SDS or MGR

Dictionary import/export utility (pdexp)
Migrates table definition information and stored procedure information.
User with DBA privilege
ACT
SDS or MGR

Rebalancing utility (pdrbal)
Corrects an imbalance of data that results when RDAREAs are added to rebalancing tables.
User with DBA, SELECT, INSERT, or DELETE privilege
ACT
SDS or MGR

Free page release utility (pdreclaim)
Releases free pages (used free pages) during online operation.
User with DBA, INSERT, or DELETE privilege
ACT
SDS or MGR

Global buffer residence utility (pdpgbfon)
Reads table page information into a global buffer.
User with DBA privilege or SELECT privilege for the table, or schema owner
ACT
SDS or MGR

Integrity check utility(pdconstck)
Performs integrity checking and manipulates (sets or releases) the check pending status on tables for which referential constraints or check constraints have been defined.
User with DBA privilege or table owner
ACT
SDS or MGR

Statistics analysis utility (pdstedit)
Inputs information from unload data files and system log files and edits the statistical information.
HiRDB administrator
ANY
Any server machine

Database condition analysis utility (pddbst)
Analyzes the status of tables and indexes in user RDAREAs or the storage status of a data dictionary RDAREA, and displays the analysis result.
User with DBA privilege
ACT
SDS or MGR

Optimizing information collection utility (pdgetcst)
Collects optimization information in order to optimize based on cost and stores the information in a data dictionary table.
User with SELECT privilege for the target table
ACT
SDS or MGR

Access path display utility (pdvwopt)
Displays access path information determined by SQL optimization processing.
USR
ANY
SDS or FES

Database copy utility (pdcopy)¹

Makes a backup of a database.

Acquires log point information and creates a log point information file.

HiRDB administrator
ACT
SDS or MGR

Database recovery utility (pdrstr)¹

In the event of an error, restores a database from a backup copy and information logged after the backup was made.

Re-creates the log point information file.

HiRDB administrator
ACT
SDS or MGR

Registry facility initialization utility (pdreginit)
Creates registry RDAREAs, registry LOB RDAREAs, and registry management tables for controlling and operating the registry facility.
HiRDB administrator
ACT
SDS or MGR

Legend:

ANY: Can be executed whether or not HiRDB is active.

ACT: Can be executed only while HiRDB is active.

SDS: For a HiRDB/Single Server, the command is executed on the server machine of the single server.

MGR: For a HiRDB/Parallel Server, the command is executed on the server machine where the system manager is located.

FES: For HiRDB/Parallel Server, the command is executed on the server machine where the front end server is located.

Note

A file that is specified in an operation command or utility that is executing must not be used at the same time by another operation command, utility, or UAP; doing so will result in an error and cause the processing results to be invalid.

¹

A utility special unit can be used.

²

In the addition mode (-d option omitted), this utility can be executed if the user has the INSERT privilege.

In the creation mode (-d option specified), the INSERT and DELETE privileges are required.

For an audit trail table, the audit privilege is required.

³

Reorganization of a dictionary can be executed only by users with the DBA privilege.

To unload a table, either the DBA privilege or the SELECT privilege for the table is required.

To reload a table, either the DBA privilege or the INSERT and DELETE privileges for the table are required.

To create, batch-create, or reorganize an index, no privilege is required.

⁴

This utility can be executed only when HiRDB is in end-of-initialization wait status (HiRDB is placed in wait status after issuing the KFPS05201-Q message).

⁵

The privilege that is required depends on the SQL to be executed. For details about the privileges required to execute SQL commands, see the manual HiRDB Version 8 SQL Reference.

⁶

HiRDB SQL Executor is required in order to execute the SQL interactive execution utility.

1.4 Utility I/O files

Organization of this section

1.4.1 Files and volumes

1.4.2 File modes usable by utilities

1.4.1 Files and volumes

Files and volumes are defined as follows in a HiRDB system:

File
Logical unit used by utilities

Volume
Physical storage unit
In the case of regular files, volume indicates one regular file; in the case of a tape device, volume indicates one tape medium.
In the case of the HiRDB file system, volume indicates one HiRDB file.

Typically, one file is stored on one volume (single-file, single-volume). However, a file that is too large for a single volume is divided and stored on multiple volumes (single-file, multi-volume). Conversely, multiple small files can be stored on a single volume (multi-file, single-volume) if formatting permits.

When files are added to a multi-file, single-volume, the storage of the last file may extend onto the next volume (multi-file, multi-volume).

Figure 1-3 shows the concepts of files and volumes.

Figure 1-3 Concepts of files and volumes

1.4.2 File modes usable by utilities

All HiRDB utilities use regular files as I/O files unless otherwise specified; the file mode is single-file, single-volume

Some utilities can handle file modes other than single-file, single-volume. Table 1-3 lists the utilities that can handle I/O files other than single-file, single-volume regular files.

Table 1-3 Utilities that can handle I/O files other than single-file, single-volume regular files

Utility
File type
Single-file, multi-volume regular files
Tape device
EasyMT
JP1/OmniBack II
HiRDB files

Single-files
Multi-files

Database load utility (pdload)
Input data files, LOB input files, LOB input files by column
C¹
V
C²
-f easymt
C²
-f easymt
N
N

Database reorganization utility (pdrorg)
Unload data files, LOB data unload files
C
N
C
-f hirdb

Database copy utility (pdcopy)
Backup files
C
-k m
or ²
-k e
N
C
-k o
C
-k i

Database recovery utility (pdrstr)

Dictionary import/export utility (pdexp)
Export files
N
N
N
N
N

Legend:

C:

The files can be used. If a specification on the command line is required, the option is also shown; in such a case, all file-specific information must be specified in addition to the command options. For details about the options, see the explanations of the commands.

V:

Variable-length blocked mode can be used; DAT format can be used in the fixed-length blocked mode. The binary format cannot be used. For details, see Appendix E. Creation of Input Data Files for the Database Load Utility.

N:

Not supported.

¹

NFS files cannot be used when multiple files are to be output with the pdrorg or pdcopy command as regular files, or in the single-file, multi-volume mode. In the case of output with the pdrorg or pdcopy command to regular files, or in the single-file, multi-volume mode, files in a file system for which the size of each volume does not exceed 2 gigabytes must be specified.

²

If MTguide has been installed and is usable, it is used for volume management for single volumes only. If volumes are not managed by MTguide, the following must be specified:

pdload or pdrorg: Specify mtguide nouse in the control information file.

pdcopy or pdrstr: Specify -k e on the command line

Organization of this subsection

(1) Tape devices

(2) EasyMT and MTguide

(3) HiRDB files

(1) Tape devices

Table 1-4 lists the tape devices that are supported by the utilities.

Table 1-4 Tape devices supported by the utilities

Device name | Direct input/output by the utilities
CMT | N
DAT | Y
OMT | N
CGMT | N
8mm | Y
DLT | Y
LTO | Y

Legend:

Y: Can be used.

N: Cannot be used.

Note

When you are using EasyMT or JP1/OmniBack II, see the following manuals for details about the supported tape devices:

When using EasyMT
JP1/Magnetic Tape Access or Magnetic Tape Basic Access Method: EasyMT

When using JP1/OmniBack II
JP1 Version 5 Distributed System Backup Function JP1/OmniBack II Administrator's Guide

When the utilities access the tape device for direct input/output, they assume a single volume and access the device as a single tape drive. They do not provide Autoloader or Tape Library control.

Except for a CMT that can be accessed only in the fixed-length blocked mode, we recommend that you use the tape device in the variable-length blocked mode. You can reduce the number of input/output operations in the variable-length blocked mode, in which the utilities input/output data in units of 32 kilobytes while they input/output data in units of 512 bytes in the fixed-length blocked mode. When using the fixed-length blocked mode, make sure that the block size is 512 bytes.

For details about each tape device, see the applicable OS manual.

If you use a tape device with pdrorg, pdload, or pdrstr, do not specify the device driver's minor number in such a manner that the tape will not be rewound during close processing. If you execute the utility without rewinding the tape, you must rewind the tape using a command such as mt (magnetic tape manipulation program) after the utility has terminated.

To save multiple backups on the same medium, use the utility to output the backups to files and then copy them onto the desired medium by using a command such as tar.

(2) EasyMT and MTguide

When the EasyMT program product is installed and the appropriate option shown in Table 1-3 is specified, labeled magnetic tapes can be handled by a variable-length blocked mode tape device. Tapes created by the HITAC M Series can also be handled.

By combining EasyMT with HiRDB utilities, tape devices can be handled in the following modes (single-volume support):

Single-file, single-volume

Multi-file, single-volume

See the following manuals for details about EasyMT and MTguide:

EasyMT
Magnetic Tape Operation Support: JP1/Magnetic Tape Access or Magnetic Tape Basic Access Method: EasyMT

MTguide
Magnetic Tape Mount Management: JP1/Magnetic Tape Library

(3) HiRDB files

HiRDB utilities cannot handle directly the character special files of hard disk devices as I/O files, but are able to handle them by making them into HiRDB file system areas.

Even a regular file can be handled as a HiRDB file if it is initialized as a HiRDB file system.

To use a HiRDB file as an I/O file, a HiRDB file system must first be created with the pdfmkfs command in which -k UTL is specified, and the appropriate option shown in Table 1-3 must be specified when the HiRDB utility is executed.

HiRDB utilities use HiRDB files in the following modes:

Single-file, single-volume

Single-file, multi-volume

For details about HiRDB files, see the HiRDB Version 8 Installation and Design Guide.

1.5 Notes on command execution

Organization of this section

1.5.1 Forced termination by interruption of command execution

1.5.2 Batch specification of RDAREA names in operation commands

1.5.3 Specifying the LANG environment variable

1.5.1 Forced termination by interruption of command execution

While a command is executing, do not terminate it forcibly by using a signal interrupt (such as CTL + C keys, CTL + \ keys, or the OS's kill command). HiRDB may terminate itself depending on the timing. Use the pdcancel command to terminate utilities.

1.5.2 Batch specification of RDAREA names in operation commands

You can use the methods described below to specify multiple RDAREA names in operation commands. These methods enable you to specify a group of RDAREAs.

Item
Pattern character string
Description
Example of specification

Right truncation
nnn*
The command searches for RDAREAs whose names begin with nnn.
PDUSER*
(the command searches for RDAREAs whose names begin with PDUSER)

Right and left truncation
*nnn*
The command searches for RDAREAs whose names contain nnn.
*PDUSER*
(the command searches for RDAREAs whose names contain PDUSER)

Left truncation
*nnn
The command searches for RDAREAs whose names end with nnn.
*PDUSER
(the command searches for RDAREAs whose names end with PDUSER)

Organization of this subsection

(1) Operation commands supporting batch specification of RDAREA names

(2) Notes

(1) Operation commands supporting batch specification of RDAREA names

The following operation commands support batch specification of RDAREA names:

pdclose

pddbchg

pddbfrz

pddbls

pdhold

pdopen

pdrels

pdorbegin

(2) Notes

Do not specify an asterisk (*) at any location other than the beginning or end of a pattern character string. If an asterisk is specified at a location other than the beginning or end of a pattern character string, the system treats the asterisk as part of the character string.

Do not include a percent sign (%) or underscore (_) in the pattern character string.

If you are using sh (Bourne shell), csh (C shell), and ksh (Korn shell), you must enclose a batch specification of RDAREA names in single quotation marks (').

To treat the pattern as being case sensitive, enclose the entire pattern character string in double quotation marks ("). If the pattern character string is not enclosed in double quotation marks, the system treats it as being all uppercase letters. Also, if the pattern character string contains a space, enclose the pattern character string in double quotation marks ("). If you are using sh (Bourne shell), csh (C shell), and ksh (Korn shell), you must enclose a batch specification of RDAREA names in single quotation marks (').

When there an RDAREA name is duplicated in the RDAREAs grouped by batch specification of RDAREA names and in the RDAREAs specified by another RDAREA name specification (including RDAREA names grouped by another batch specification of RDAREA names), whether or not the RDAREA is processed more than once depends on the command. The following table describes each command's processing when an RDAREA name is duplicated:

Command | When multiple RDAREA name specifications contain a duplicate RDAREA | When there are duplicate RDAREAs in the RDAREAs grouped by batch specification of RDAREA names and in the RDAREAs specified by another RDAREA name specification
pdclose | Y | N
pddbchg | Y | N
pddbfrz | Y | N
pddbls | Y | N
pdhold | Other than -s | Y | N
-s | Y | Y
pdopen | Y | N
pdrels | Y | N
pdorbegin | Y | Y

Legend:

Y: Eliminates a duplicated RDAREA name from processing.

N: Does not eliminate any duplicated RDAREA names from processing; performs processing as many times as an RDAREA name is specified.

1.5.3 Specifying the LANG environment variable

Some commands require specification of the LANG environment variable.

If the LANG environment variable is not specified but the LC_ALL or LC_* environment variable is specified, the latter takes effect. If the LC_ALL or LC_* environment variable is not specified, the specified LANG environment variable takes effect.

Take this into account when executing commands that require specification of the LANG environment variable.

1.6 Functions that become available when optional HiRDB program products are installed

Table 1-5 describes optional HiRDB program products. When you install these programs, the functions described in the table become available.

Table 1-5 HiRDB optional program products

Name of optional program product
Functions that become available when optional program product is installed

HiRDB Staticizer Option#

Inner replica facility

Updatable online reorganization

HiRDB External Data Access#, HiRDB External Data Access Adapter
HiRDB External Data Access facility

HiRDB Advanced High Availability#

Server mode system switchover function

User server hot standby

Rapid system switchover facility

Standby-less system switchover (1:1) facility

Standby-less system switchover (effects distributed) facility

Dynamic updating of global buffers (pdbufmod command)

System reconfiguration command (pdchgconf command)

HiRDB LDAP Option#
Sun Java System Directory Server linkage facility

HiRDB Advanced Partitioning Option#

Matrix partitioning of tables

Changing the partition storage conditions (ALTER TABLE)

HiRDB Non Recover FES
Recovery-unnecessary front-end server

HiRDB Disaster Recovery Light Edition
Real Time SAN Replication (when the log-only synchronous method is used)

#: After installing the optional program product, you must use the pdopsetup command to set up the optional program product.

2. Operation Commands

This chapter explains each of the operation commands.

Organization of this chapter

pdacunlck (Release consecutive certification failure account lock state)

pdadmvr (Acquire HiRDB product information)

pdaudbegin (Start acquisition of audit trails)

pdaudend (Stop acquisition of audit trails)

pdaudrm (Delete audit trail files in shutdown status)

pdaudswap (Swap audit trail files)

pdbkupls (Display backup file information)

pdbufls (Display global buffer information)

pdbufmod (Change global buffer dynamically)

pdcancel (Forcibly terminate UAP or utility processing)

pdcat (Display messages in file)

pdcat [-d sts specified]

pdcat [-d option omitted]

pdchgconf (Reconfigure the system)

pdchprc (Change number of startup server processes)

pdclose (Close RDAREAs)

pdclttrc (Acquire SQL trace dynamically)

pdcmt (Commit transactions)

pdconfchk (Check system definitions)

pdcspool (Delete troubleshooting information)

pddbadset (Set up HiRDB External Data Access Adapter)

pddbchg (Change the replica status of replica RDAREAs)

pddbfrz (Place a full HiRDB file in a user LOB RDAREA in frozen update status)

pddbls (Display status of RDAREAs)

pddefrev (Generate definition SQL)

pdfbkup (Back up HiRDB file system)

pdffsck (Check and repair the integrity of a HiRDB file system area)

pdfgt (Terminate transaction forcibly)

pdfls (Display HiRDB file system area information)

pdfmkfs (Initialize HiRDB file system area)

pdfrm (Delete HiRDB file)

pdfrstr (Restore HiRDB file system)

pdfstatfs (Display status of HiRDB file system area)

pdgen (Generate system)

pdgeter (Acquire error information)

pdgrprfl (Refresh user and role information)

pdhold (Shut down RDAREAs)

pditvstop (Stop periodic acquisition of HiRDB status)

pditvtrc (Periodically acquire the HiRDB status)

pdjarsync (Manipulate JAR files)

pdlistls (Display list definition information)

pdlodsv (Reduce the size of the installation directory)

pdlogadpf (Allocate log file)

pdlogatul (Control the automatic log unloading facility)

pdlogchg (Change status of log file)

pdlogcls (Close open log file)

pdloginit (Initialize log file)

pdlogls (Display log-related file information)

pdlogls [-d spd] (Display synchronization point dump file information)

pdlogls [-d sys] (Display system log file information)

pdlogopen (Open log file)

pdlogrm (Delete log file)

pdlogswap (Swap log files)

pdlogsync (Collect a synchronization point dump)

pdlogucat (Display unload log file information)

pdlogunld (Unload log file)

pdls (Display HiRDB system status)

pdls [-d act] (Display user status)

pdls [-d aud] (Display the status of audit trail files)

pdls [-d ha] (Display HiRDB system status)

pdls [-d lck] (Display server lock control status)

pdls [-d mem] (Display server shared memory status)

pdls [-d org] (Display progress of reflection processing for online reorganization)

pdls [-d prc] (Display server process status)

pdls [-d ris] (Display log application processing execution status)

pdls [-d rpc] (Display server communication control information)

pdls [-d rpl] (Display HiRDB Datareplicator linkage status)

pdls [-d scd] (Display server schedule status)

pdls [-d stj] (Display whether or not statistical data output type by unit and server is specified)

pdls [-d sts] (Display status file status)

pdls [-d svr] (Display status by unit and server)

pdls [-d trn] (Display server transaction status)

pdls [-d ust] (Display unit activity status)

pdmemsv (Save memory space)

pdobils (Display SQL object buffer statistics)

pdobjconv (Convert SQL objects for 64-bit-mode HiRDB)

pdopen (Open RDAREAs)

pdopsetup (Set up add-on PP)

pdorbegin (Commit a database for online reorganization)

pdorcheck (Check the application conditions for online reorganization)

pdorchg (Change the current RDAREAs for online reorganization)

pdorcreate (Create an environment for reflection processing for online reorganization)

pdorend (Execute reflection processing for online reorganization)

pdpfresh (Refresh server process)

pdplgrgst (Register and delete plug-ins)

pdplgset (Set up a plug-in)

pdprgcopy (Copy a HiRDB update version)

pdprgrenew (Update a HiRDB update version)

pdrbk (Roll back transactions)

pdrdrefls (Display information about related RDAREAs)

pdrels (Release RDAREAs from shutdown status)

pdrisechk (Check the configuration of Real Time SAN Replication)

pdrisedbto (Inherit a database in Real Time SAN Replication)

pdriseset (Set the site status in Real Time SAN Replication)

pdrpause (Restart a process service)

pdrplstart (Start HiRDB Datareplicator linkage)

pdrplstop (Stop HiRDB Datareplicator linkage)

pdsetup (Register or delete HiRDB system in OS)

pdstart (Start HiRDB system, unit, or server)

pdstbegin (Start output of statistical information)

pdstend (Stop output of statistical information)

pdstjswap (Swap statistics log files)

pdstjsync (Apply statistics log buffer to statistics log file)

pdstop (Terminate HiRDB system, unit, or server)

pdstscls (Close open status file)

pdstsinit (Initialize status file)

pdstsopen (Open status file)

pdstsrm (Delete status file)

pdstsswap (Swap status files)

pdsvhostname (Display server's host name)

pdtrndec (Settle unsettled transactions forcibly and automatically)

pdtrnqing (Start or release the transaction queuing facility)

pdusrchk (Check the Directory Server for user information)

pdvrup (Upgrade HiRDB version)

pdacunlck (Release consecutive certification failure account lock state)

Function

The pdacunlck command releases identifiers from consecutive certification failure account lock state authorization whose account lock period has not expired, or authorization identifiers that are in permanent consecutive certification failure account lock state.

When executed, the pdacunlck command sets to the null value the consecutive certification failure account lock date and time and the consecutive certification failure count for an authorization identifier if its consecutive certification failure account lock date and time in the SQL_USERS data dictionary table is not the null value.

Executor

HiRDB administrator

Format

 pdacunlck {authorization-identifier[,authorization-identifier]...|ALL}

Command arguments

authorization-identifier[,authorization-identifier]...

Specifies the authorization identifiers whose consecutive certification failure account lock state is to be released. You can specify a maximum of 128 authorization identifiers.

ALL

Specifies that all authorization identifiers are to be released from consecutive certification failure account lock state.

A user attempting to execute the pdacunlck command with ALL specified cannot connect to HiRDB if the user privilege information buffer does not contain information about the CONNECT permissions and the consecutive certification failure account lock date and time are not the null value.

Rules

The pdacunlck command can be executed only when HiRDB is running.

The pdacunlck command must be executed at the server machine that contains the single server or where the system manager is located.

The pdacunlck command cannot be executed if the data dictionary RDAREA is shut down.

Notes

When an authorization identifier is specified, the command places that row of the SQL_USERS data dictionary table in the lock mode. When ALL is specified, the command locks the rows of the SQL_USERS data dictionary table for all users whose consecutive certification failure account lock date and time are not the null value.

For the pdacunlck command, return code 0 indicates normal termination, and return code 8 indicates abnormal termination.

If an authorization identifier is enclosed in double quotation marks ("), the command treats it as being case sensitive. If it is not enclosed in double quotation marks ("), the command treats it as all uppercase letters. If you are using sh (Bourne shell), csh (C shell), or ksh (Korn shell), you must enclose the entire set of authorization identifiers in apostrophes (').

pdadmvr (Acquire HiRDB product information)

Function

Displays the HiRDB version information.

Executor

HiRDB administrator

Format

pdadmvr [-s]

Options

-s

Specifies that the coding following the revision number is to be displayed as the version information. The following shows an example of the version information display:

When the -s option is omitted: 08-00

When the -s option is specified: 08-00-01

Rules

The pdadmvr command can be executed at any time, whether or not HiRDB is active.

The pdadmvr command must be executed at each server machine.

Note

When the pdadmvr command is executed, return code 0 indicates normal termination, and return code 8 indicates abnormal termination (such as an invalid option).

Output format

A circled number in the figure corresponds to the item number in the following table:

No.
Display item
Explanation

1
HiRDB type

single: HiRDB/Single Server

parallel: HiRDB/Parallel Server

2
HiRDB version
HiRDB version

3
Object-Option
Object-Option is always displayed.

4
HiRDB addressing mode

32bit: 32-bit addressing mode

64bit: 64-bit addressing mode

5
Whether or not the POSIX library version has been installed

POSIX: Installed

NO-POSIX: Not installed

6
Whether or not the HiRDB Staticizer Option has been installed

Staticizer-Option: Installed

No-Staticizer-Option: Not installed

7
Whether or not HiRDB External Data Access has been installed#

Exd: Installed

No-Exd: Not installed

8
Whether or not HiRDB Advanced High Availability has been installed

Advanced-High-Availability: Installed

No-Advanced-High-Availability: Not installed

9
Whether or not the HiRDB Advanced Partitioning Option has been installed

Advanced-Partitioning-Option: Installed

No-Advanced-Partitioning-Option: Not installed

10
Whether or not a HiRDB recovery-unnecessary FES has been installed

Non-Recover-FES: Installed

No-Non-Recover-FES: Not installed

11
Whether or not HiRDB Disaster Recovery Light Edition has been installed

Disaster-Recovery-Light-Edition: Installed

No-Disaster-Recovery-Light-Edition: Not installed

# This item is displayed for a HiRDB/Parallel Server only.

pdaudbegin (Start acquisition of audit trails)

Function

The pdaudbegin command starts acquisition of audit trails.

Executor

HiRDB administrator

Format

HiRDB/Single Server

pdaudbegin

HiRDB/Parallel Server

pdaudbegin [-u unit-identifier]

Options

-u unit-identifier<identifier> ((4 characters))

Specifies the identifier of the unit that is to start acquisition of an audit trail.

If the -u option is omitted, the command starts acquiring audit trail on all units.

Rules

The pdaudbegin command can be executed only while HiRDB is active.

The pdaudbegin command must be executed at the server machine that contains the single server or where the system manager is located.

Executing the pdaudbegin, pdaudend, pdaudrm, or pdaudswap command while the pdaudbegin command is executing results in a command error.

The pdaudbegin command results in a command error if the pd_aud_file_name operand has not been specified in the system definition or the audit trail file specified in the pd_aud_file_name operand is missing.

At a HiRDB/Parallel Server, if you execute the pdaudbegin command omitting the -u option and an error occurs during command processing or audit trail acquisition has already begun, the command displays an error message at the corresponding unit. The command starts acquisition of audit trails on units where no error resulted.

Notes

The result of pdaudbegin command can be checked by using the pdls -d aud command, by checking for any error messages, or on the basis of the return code from execution of the command. A return value of 0 for this command indicates normal termination; 4 indicates that only some of the units have terminated normally; and 8 indicates abnormal termination.

You can use the pdls -d aud command to determine whether or not audit trails are being acquired.

pdaudend (Stop acquisition of audit trails)

Function

The pdaudend command stops acquisition of audit trails.

Executor

HiRDB administrator

Format

HiRDB/Single Server

pdaudend

HiRDB/Parallel Server

pdaudend [-u unit-identifier]

Options

-u unit-identifier<identifier> ((4 characters))

Specifies the identifier of the unit that is to stop acquisition of an audit trail.

If the -u option is omitted, the command stops acquisition of audit trails on all units.

Rules

The pdaudend command can be executed only while HiRDB is active and audit trail acquisition has started.

The pdaudend command must be executed at the server machine that contains the single server or where the system manager is located.

A command error results if you execute the pdaudbegin, pdaudend, pdaudrm, or pdaudswap command while the pdaudend command is executing.

The pdaudend command results in a command error if the pd_aud_file_name operand has not been specified in the system definition or the audit trail file specified in the pd_aud_file_name operand is missing.

At a HiRDB/Parallel Server, if you execute the pdaudend command omitting the -u option and an error occurs during command processing or audit trail acquisition has already stopped, the command displays an error message at the corresponding unit. The command stops acquisition of audit trails on the units where no error resulted.

Once audit trail acquisition begins, the system keeps acquiring audit trails until the unit is stopped or you execute the pdaudend command.

Notes

The result of pdaudend command can be checked by using the pdls -d aud command, by checking for any error messages, or on the basis of the return code from execution of the command. A return value of 0 for this command indicates normal termination; 4 indicates that only some of the units have terminated normally; and 8 indicates abnormal termination.

pdaudrm (Delete audit trail files in shutdown status)

Function

The pdaudrm command deletes audit trail files that are in shutdown status.

Executor

HiRDB administrator

Format

HiRDB/Single Server

pdaudrm -g audit-trail-file-name [-f]

HiRDB/Parallel Server

pdaudrm -u unit-identifier -g audit-trail-file-name [-f]

Options

-u unit-identifier<identifier> ((4 characters))

Specifies the identifier of the unit that contains the audit trail file to be deleted.

-g audit-trail-file-name

Specifies the name of the audit trail file to be deleted.

-f

Specifies that the audit trail file specified in the -g option is to be deleted even if it is waiting for data loading.

You can use the pdls -d aud command to check for audit trail files.

Rules

The pdaudrm command can be executed only while HiRDB is active.

The pdaudrm command must be executed at the server machine that contains the single server or where the system manager is located.

A command error results if you execute the pdaudbegin, pdaudend, pdaudrm, or pdaudswap command while the pdaudrm command is executing.

The pdaudrm command results in a command error if the pd_aud_file_name operand has not been specified in the system definition or the audit trail file specified in the pd_aud_file_name operand is missing.

You cannot delete the current audit trail file.

Notes

The result of pdaudrm command can be checked by using the pdls -d aud command, by checking for any error messages, or on the basis of the return code from execution of the command. A return value of 0 for this command indicates normal termination; 8 indicates abnormal termination.

pdaudswap (Swap audit trail files)

Function

The pdaudswap command swaps audit trail files (changes the audit trail file that is the current audit trail file).

Executor

Auditor

To execute the pdaudswap command, you must specify the -U option or set the auditor's authorization identifier and password in the PDUSER environment variable. If the auditor's authorization identifier and password are not correct, a command error results.

Format

HiRDB/Single Server

Pdaudswap [-U authorization-identifier]

HiRDB/Parallel Server

pdaudswap -u unit-identifier [-U authorization-identifier]

Options

-u unit-identifier<identifier> ((4 characters))

Specifies the identifier of the unit that contains the audit trail file to be swapped.

-U authorization-identifier

Specifies the auditor's authorization identifier. When this option is specified, a message requesting entry of a password is displayed.

Rules

The command uses the authorization identifier specified in this option and the password that is entered to connect to HiRDB and checks to determine whether this authorization identifier has the audit privilege.

You can specify this option when you execute the pdaudswap command in an environment in which you can enter a response to a response-request message.

When this option is omitted, the pdaudswap command assumes the value set in the PDUSER environment variable at the time of command execution. If this option is omitted and the PDUSER environment variable has not been set, the pdaudswap command cannot be executed. If this option is omitted, the PDUSER environment variable must be set; the following shows an example:

Example: C shell

setenv PDUSER '"authorization-identifier"/"password"'

Rules

The pdaudswap command can be executed only while HiRDB is active. You cannot use this command when HiRDB was started by the pdstart -r command.

The pdaudswap command must be executed at the server machine that contains the single server or where the system manager is located.

A command error results if you execute the pdaudbegin, pdaudend, pdaudrm, or pdaudswap command while the pdaudswap command is executing.

The pdaudswap command results in a command error if the pd_aud_file_name operand has not been specified in the system definition or the audit trail file specified in the pd_aud_file_name operand is missing.

If there is no swappable file generation or no audit trail file generation has been created, a command error results.

If an open error occurs on the swappable audit trail file generation, the command automatically uses another generation of the file as the target.

If pd_aud_no_standby_file_opr=down was specified in the system definition and the number of available generations is 1 or fewer, executing the pdaudswap command results in a command error.

Notes

The result of pdaudswap command can be checked by using the pdaudswap command, by checking for any error messages, or on the basis of the return code from execution of the command. A return value of 0 for this command indicates normal termination; 8 indicates abnormal termination.

pdbkupls (Display backup file information)

Function

The pdbkupls command displays information about backup files acquired by pdcopy (such as a list of RDAREAs and the backup acquisition date and time).

Use the pdbkupls command:

When you want to check the contents of a backup (for example, to determine what is included in the most recent backup)

When you want to retain the acquired backup information as history

Executor

HiRDB administrator

Format

 pdbkupls -b {backup-file-name[,backup-file-name]...

            |device-symbolic-name[,device-symbolic-name]|device-group-name

            |object-name|policy-name}

       [-k {u|i|e|m|o|n}]

       [-o backup-information-output-file-name] [-c]

       [-a] [-s progress-message-output-interval]

       [-G bar-list-file-name]

       [-U {backup-search-condition-start-date_time,backup-search-condition-end-date_time

              |,backup-search-condition-end-date_time}]

       [-E MT-attribute-file-name-for-EasyMT] [-B input/output-buffer-sectors-count-for-EasyMT]

       [-v volume-name[,volume-name]...] [-N EasyMT-file-name]

Options

-b {backup-file-name[,backup-file-name]...|device-symbolic-name[,device-symbolic-name]|device-group-name|object-name|policy-name}

Specifies the names of the backup files.

When backup-file-name[,backup-file-name]... is specified:

<path name> ((up to 1023 bytes))

Specifies the names of regular files, MT devices, or HiRDB files.

If you specify the name of a regular file or MT device, also specify -k u; if you specify the name of a HiRDB file, also specify -k i.

When device-symbolic-name[,device-symbolic-name] is specified:

<identifier>

Specifies EasyMT device symbolic names. In this case, also specify -k e.

When device-group-name is specified:

<identifier>

Specifies an MTguide device group name. In this case, also specify -k m.

When object-name is specified:

<identifier>

Specifies a JP1/OmniBack II object name. In this case, also specify -k o.

When policy-name is specified:

<identifier> ((up to 128 bytes))

Specifies a NetBackup policy name. In this case, also specify -k n.

Rules

If a host name is specified, an error results.

Multiple file names can be specified only if the backup consists of multiple files. When the backup does not consist of multiple files, all file names after the first one specified are ignored. If the backup consists of multiple files, only one file is specified, and the -a option is also specified, the command terminates with an error.

-k {u|i|e|m|o|n}

Specifies the type of backup file.

u:

Regular file or MT special file.

i:

HiRDB file.

e:

Backup file acquired using EasyMT.

m:

Backup file acquired using MTguide.

o:

Backup file acquired using JP1/OmniBack II.

n:

Backup file acquired using NetBackup.

-o backup-information-output-file-name<path name> ((up to 1023 bytes))

Specifies a file to which the backup file information is to be output. When this option is omitted, the backup file information is output to the standard output.

-c

Specifies that the backup file information is to be output in CSV format. When this option is omitted, the backup file information is output to the standard output.

-a

Specifies that all information is to be output.

When this option is omitted, the command outputs the HiRDB identifier, backup acquisition mode, backup acquisition time, and whether or not a log point information file was specified.

-s progress-message-output-interval<unsigned integer> ((1-1024))

Specifies that progress messages are to be output during execution of the pdbkupls command, and specifies the message output interval in terms of the amount of backup file data to be processed in each interval (in gigabytes). For example, when -s 100 is specified, a progress message is displayed after each 100 gigabytes of data has been processed.

Note that this option is applicable only when the -a option is specified.

-G bar-list-file-name

Specifies the name of the JP1/OmniBack II bar list file used when the database copy utility was executed. This option is applicable only when -k o is specified.

Rules

The bar list file must be found at the server machine where the JP1/OmniBack II sell server is located.

The directory containing the bar list file is /etc/opt/omni/barlists/stream. Note that the protection specification in the bar list file is ignored.

-U {backup-search-condition-start-date_time,backup-search-condition-end-date_time|,backup-search-condition-end-date_time}

Specifies a time period when only backup information acquired during the specified period under the specified policy is to be included in the output backup information. This option is applicable only when the NetBackup linkage facility is used (-k n is specified). When the NetBackup linkage facility is not used, this option is ignored, if specified.

If backup-search-condition-start-date_time and backup-search-condition-end-date_time are both specified, the most recent backup acquired during the specified period is used. If only backup-search-condition-end-date_time is specified, the backup that was current at the specified time is used.

Rules

When this option is omitted, the command uses the most recent backup among the backups acquired under the specified policy.

You can use the bpimagelist command (with the -policy option specified) to check backup acquisition dates/times.

When you specify a backup-search-condition-start-date_time or backup-search-condition-end-date_time, specify an underscore (_) between the date and the time, as shown below. If the time is omitted, 000000 is assumed as the start time and 235959 is assumed as the end time.

 -U YYYYMMDD[_hhmmss],YYYYMMDD[_hhmmss]

YYYY: Year <unsigned integer> ((1990-2037))

Specifies the year.

MM: Month <unsigned integer> ((01-12))

DD: Date <unsigned integer> ((01-31))

hh: Hour <unsigned integer> ((00-23))

mm: Minute <unsigned integer> ((00-59))

ss: Second <unsigned integer> ((00-59))

To specify the end date/time only, specify the comma (,) and then the end date/time.

-E MT-attribute-file-name-for-EasyMT<path name> ((up to 1023 bytes))

Specifies the name of the MT attribute definition file for EasyMT. This option is applicable only when -k e or -k m is specified.

Rules

This file must be connected to the server machine where the pdbkupls command is executed.

In the MT attribute definition file, the following attributes take effect:
buffno: Number of input/output buffer sectors
magazin: MT device allocation pattern
job: Job name
expire: Expiration date
preserve: Retention days
Note that when the -B option is specified, the number of input/output buffer sectors specified in the -B option takes effect.

The contents of this file are checked when EasyMT is executed.

-B input/output-buffer-sectors-count-for-EasyMT<unsigned integer> ((1-255))

Specifies the number of input/output buffer sectors to be used for MT input/output operations. This option is applicable only when -k e or -k m is specified.

Rules

A greater value improves performance, but more memory is required.

If the -E and -B options are both omitted, EasyMT's default value is assumed.

-v volume-name[,volume-name]...<alphanumeric characters> ((up to 6 characters))

Specifies the names of MT volumes on which the backup was made. This option is applicable only when -k e or -k m is specified.

Rules

If a specified volume does not match a volume mounted on the MT deck, an error results.

If the number of volumes needed for the backup is greater than the number of volumes specified, the command does not check the names of the excess volumes.

When this option is omitted, the command does not check the volume names.

To specify multiple volume names, you must specify -k m. In this case, make sure that no volume name is duplicated.

-N EasyMT-file-name<alphanumeric characters> ((up to 17 characters))

Specifies the EasyMT file name that was assigned when the backup file was acquired. This option is applicable only when -k e or -k m is specified.

Rules

If this file name does not match the backup file, an error results.

The backup file must begin at the beginning of the mounted MT (at file sequence 1).

Rules

You can execute the pdbkupls command whether or not HiRDB is active.

Execute the pdbkupls command at the server machine where the host containing the backup files is located. If you use NetBackup, execute the command at the server machine that contains the host to which backup files were output during execution of pdcopy.

The pdbkupls command can process only backup files acquired by pdcopy. If any other backup file is specified, the command results in an error.

To use NetBackup, you must have JP1/VERITAS NetBackup Agent for HiRDB License; for details, see the JP1/VERITAS NetBackup v4.5 Agent for HiRDB License Description and User's Guide.

A differential backup file cannot be specified. If a differential backup file is specified, an error results.

Notes

For the pdbkupls command, return code 0 indicates normal termination, and return code 12 indicates abnormal termination. If the return code is 12, see the previous message and eliminate the cause of the error.

If utf-8 is selected as the character encoding in the pdsetup command, a BOM is not added to a file that is output by pdbkupls.

Output format

The following conventions apply to the output format:

(linefeed) indicates a linefeed code (LF).

If there is no output information, the command outputs * for the item in the standard format and nothing in the CSV format (2 consecutive commas are displayed).

rr...r through uu...u are output for each RDAREA, in ascending order of the RDAREA IDs (in which case, (linefeed) and <<RDAREA information>> are also output for each RDAREA).

When data is output to the backup information output file, EOF is displayed in the row immediately following the last data.

A linefeed is performed after each 1,024 bytes of data (not including linefeed codes).

The following shows the output formats:

When the -a option is omitted

Standard format:

<<System information>>(linefeed)
<HiRDB system id> : aaaa(linefeed)
(linefeed)
<<Backup file information>>(linefeed)
<Backup mode> : dd...d(linefeed)
<Backup start Time> : ee...e(linefeed)
<Logpoint information Y/N> : g(linefeed)

CSV format:

aaaa,dd...d,ee...e,g(linefeed)

Explanation

For details about aaaa through g, see the description for When the -a option is specified.

When the -a option is specified

Standard format:

<<System information>>(linefeed)
<HiRDB system id> : aaaa(linefeed)
(linefeed)
<<Backup file information>>(linefeed)
<Backup file count> : bbbb(linefeed)
<Backup file name> : cc...c(linefeed)
<Backup mode> : dd...d(linefeed)
<Backup start time> : ee...e(linefeed)
<Backup end time> : ff...f(linefeed)
<Logpoint information Y/N> : g(linefeed)
<Get RDAREA's count> : hhhh(linefeed)
<Get RDAREA's list> : ii...i(linefeed)
<Errskip Y/N> : j(linefeed)
<Replica RDAREA generation No> : kk(linefeed)
<Server name> : ll...l(linefeed)
<Server RUNID> : mm...m(linefeed)
<Server group name> : nn...n(linefeed)
<Server block No> : oo...o(linefeed)
<Server generation No> : pp(linefeed)
<Server Log start time> : qq...q(linefeed)
(linefeed)
<<RDAREA information>>(linefeed)
<RDAREA name> : rr...r(linefeed)
<RDAREA id> : ss...s(linefeed)
<RDAREA kind> : tt...t(linefeed)
<RDAREA last LSN> : uu...u(linefeed)
       :

CSV format:

aaaa,bbbb,cc...c,dd...d,ee...e,ff...f,g,hhhh,ii...i,j,kk,ll...l,mm...m,nn...n,
oo...o,pp,qq...q,rr...r,ss...s,tt...t,uu...u ...

Explanation

aaaa

Identifier of the HiRDB used to acquire the backup (1 to 4 characters).

bbbb

Number of backup files specified in the -b option (1 to 4 decimal digits).

cc...c

Names of the backup files specified in the -b option (maximum of 1,023 characters). Backup file names are output in the order specified in the -b option of pdcopy, separated by the comma.

dd...d

Value of the -M option when the backup was acquired (1 to 10 characters).

For -M x or -M r, the value is EXCLUSIVE; for -M s, the value is SHARED.

ee...e

Time the first record was written during backup acquisition (YYYY-MM-DD hh:mm:ss).

ff...f

Time the last record was written during backup acquisition (YYYY-MM-DD hh:mm:ss).

g

Whether or not a log point information file was created during backup acquisition (1 character).

If a log point information file was created, the value is Y; if not, the value is N.

hhhh

Number of RDAREAs stored in the backup files (1 to 4 decimal digits).

ii...i

Name of each RDAREA stored in the backup file (1 to 30 characters). Multiple RDAREA names are separated by the comma and output in ascending order of the RDAREA IDs used during backup acquisition.

j

Whether or not the -J option was specified during backup acquisition (1 character).

If the -J option was specified, the value is Y; if not, the value is N.

kk

Value of the -q option during backup acquisition (1 to 2 decimal digits).

ll...l

Name of the server that contains the RDAREAs (1 to 8 characters).

mm...m

Log server run ID (information used by the system) (8 hexadecimal characters).

nn...n

Log group name (information used by the system) (1 to 8 characters).

oo...o

Block number (8 hexadecimal characters).

pp

Generation number (1 to 2 decimal digits).

qq...q

Time at which use of the system log file began (YYYY-MM-DD hh:mm:ss).

rr...r

Name of an RDAREA (1 to 30 characters).

ss...s

RDAREA ID (1 to 8 decimal digits).

tt...t

RDAREA type (1 to 15 characters):

MASTERDIRECTORY: Master directory RDAREA

DATADIRECTORY: Data directory RDAREA

DATADICTIONARY: Data dictionary RDAREA

SYSTEM_LOB: Data dictionary LOB RDAREA

USER: User RDAREA

USER_LOB: User LOB RDAREA

REG: Registry RDAREA

REG_LOB: Registry LOB RDAREA

uu...u

RDAREA update sequence number (information used by the system) (17 characters).

pdbufls (Display global buffer information)

Function

The pdbufls command displays the status of global buffers.

Executor

HiRDB administrator

Format

pdbufls [-k output-type][-d] [-x [-y]]
       [{-s server-name[,server-name]...
       | -a global-buffer-name[,global-buffer-name]...}]

Options

-k output-type <<sts>>

Specifies the type of information to be displayed:

def

Global buffer definition information.

sts

Global buffer statistical information. The statistical information accumulated since the last time the pdbufls command was executed is displayed. The first time you execute the pdbufls command, or if you specify the -d option, the system displays the statistical information accumulated since HiRDB started.

all

Both global buffer definition information and statistical information.

-s server-name<identifier> ((1-8))

Specifies a server name in order to display information about all global buffers at that server. A maximum of 128 server names that can be specified; subsequent server name specifications are ignored.

-a global-buffer-name<identifier> ((1-16))

Specifies the name of a global buffer for which information is be displayed. If duplicate global buffer names are specified, the duplications are eliminated. A maximum of 128 global buffer names can be specified; subsequent global buffer name specifications are ignored.

-d

Specifies that the system is to display the statistical information about a global buffer since HiRDB started. If-k def is specified, the system ignores this option, if specified.

-x

Specifies that the information is to be displayed in DAT format. When -k all is specified, this option cannot be specified.

-y

When the -x option is specified, specifies that a header is to be displayed.

Rules

The pdbufls command can be executed only while HiRDB is active.

The pdbufls command must be executed at the server machine containing the single server or the server machine where the system manager is located.

If the -s and -a options are both omitted, global buffer information for all servers is displayed

Figure 2-1 shows the collection range of global buffer statistical information.

Figure 2-1 Collection range of global buffer statistical information

Explanation

The range of information to be displayed is A, which is from HiRDB startup to 1. In this case, the previous statistical information collection time is not displayed.

Because the -d option is specified, the system displays the information in the range A + B, which is from HiRDB startup to 2. In this case, the previous statistical information collection time is not displayed. This global buffer information does not take effect on the next pdbufls command.

The information displayed with buf01 is in the range B + C, which is from 1 through 3. The information displayed with buf02 is in the range of D, which is from HiRDB startup to 3. For buf01, the statistical information collection time of 1 above is displayed; for buf02, the previous statistical information collection time is not displayed.

Notes

The following are the pdbufls command's return codes:
0: Normal termination
4: Warning termination (some server processing terminated with an error)
8: Abnormal termination
12: Abnormal termination (an event occurred that prevented output of an error message)
When the return code is 12, check the error message in syslogfile at the host where the single server or dictionary server is located, eliminate the cause of the error, and then re-execute the pdbufls command. If no error message was output to syslogfile, contact the customer engineer.

Output format

-k def specified

DEFINE OF GLOBAL BUFFER
 EDIT TIME aa...a
 BUFNAME SVID   TYPE   SIZE NUM    WRATIO RDAREA/INDEX NAME
                PRMAX  PRNUM  CSIZE  MAPS
 bb...b    cc...c   d      eeK  ff...f     ggg    hh...h
                kk...k   lll     mm...m  nn...n
      [NOT FOUND ii...i=jj...j]

Explanation

aa...a

Time when pdbufls command was executed (year/month/date hour:minute:second).

bb...b

Global buffer name (up to 16 characters).

cc...c

Server name (up to 8 characters).

d

Global buffer type:

R: RDAREA

I: Index

B: LOB

O: Other¹

ee

Buffer length (in KB; 2 decimal digits).

ff....f

Number of buffer sectors (1 to 6 decimal digits in the 32-bit mode; 1 to 10 decimal digits in the 64-bit mode).

ggg

Updated output pages at the time of deferred write trigger (percentage; 3 decimal digits). This is the value specified in the -w option in the pdbuffer operand in the system common definition.

hh...h

RDAREA name or index name (up to 43 characters).

If multiple names are defined, multiple names are output. However, there is no output in the case of the Other¹ global buffer type. There is also no output in the case of RDAREA or index deletion. The output format is as follows:

RDAREA name: RDAREA-name

Index name: authorization-identifier.index-identifier

ii...i

SERVER when the -s option is specified; BUFFER POOL when the -a option is specified.

jj...j

Server name when the -s option is specified (up to 8 characters); global buffer name when the -a option is specified (up to 16 characters).

kk...k

Maximum number of concurrent prefetch operations (5 decimal digits). This is the value specified in the pdbuffer -m option in the system common definition.

lll

Maximum number of batch input pages (3 decimal digits). This is the value specified in the pdbuffer -p option in the system common definition.

mm...m

Internal information used by the system. ****** is always displayed.

nn...n

Internal information used by the system. ** is always displayed.

1 Global buffer specified in the -o option of the pdbuffer operand in the system common definition.

-k sts specified

STATISTICS OF GLOBAL BUFFER
EDIT TIME aa...a
BUFFNAME SVID  HIT(REF,UPD)  RFGET  READ  RFFLS  REFBUF     WAITL
        LAST-EXEC-TIME      UPGET  WRITE UPFLS  UPBUF(TRG) SYNC
                            PRRED  PRHIT PRINS  PRREQ      INSB
                            LRREQ  LWREQ LRPAG  LWPAG
                            CINSM  CFMAX CFAVG
bb...b     cc...c  eee(fff,ggg)     hh...h   jj...j   ll...l    nn...n       qq...q
        dd...d                ii...i    kk...k  mm...m  oo...o(pp...p) rr...r
                            uu...u  vvv    ww...w  xx...x        yy...y
                            zz...z   AA...A  BB...B  CC...C
                            DD...D  EE...E  FF...F
      [NOT  FOUND ss...s=tt...t]

Explanation

aa...a

Time when pdbufls command was executed (year/month/date hour:minute:second).

bb...b

Global buffer name (up to 16 characters).

cc...c

Server name (up to 8 characters).

dd...d

Last time statistical information was acquired for each global buffer (year/month/date hour:minute:second)

If no statistical information has been collected or if the -d option is specified, ****-**-** **:**:** is displayed.

eee

Hits rate for the global buffer (percentage; 3 decimal digits).

fff

Hits rate for referencing requests (percentage; 3 decimal digits).

ggg

Hits rate for updating requests (percentage; 3 decimal digits).

hh...hh

Number of reference GETs.¹

ii...i

Number of update GETs.¹

jj...j

Number of actual READs.¹

kk...k

Number of actual WRITEs.¹

ll...l

Number of reference buffer flushes.¹

mm...m

Number of update buffer flushes.¹

nn...n

Number of current reference buffers (1 to 6 decimal digits in the 32-bit mode; 1 to 10 decimal digits in the 64-bit mode).

oo...o

Number of current update buffers (1 to 6 decimal digits in the 32-bit mode; 1 to 10 decimal digits in the 64-bit mode).

pp...p

Number of update buffers for the next time output of a deferred write trigger occurs (1 to 6 decimal digits in the 32-bit mode; 1 to 10 decimal digits in the 64-bit mode).

qq...q

Number of times a wait for buffer lock release occurred.¹

rr...r

Number of DB synchronization points.¹

ss...s

SERVER when the -s option is specified; BUFFER POOL when the -a option is specified.

tt...t

Server name when the -s option is specified (up to 8 characters); global buffer name when the -a option is specified (up to 16 characters).

uu...u

Number of prefetch input pages.¹

vvv

Prefetch hit range (3 decimal digits).

ww...w

Number of prefetch buffer shortages.¹

xx...x

Number of prefetch READ requests.¹

yy...y

Number of out of buffer errors.¹

zz...z

Number of LOB buffer read requests.¹

AA...A

Number of LOB buffer write requests.¹

BB...B

Number of pages input into LOB buffer in batch.¹

CC...C

Number of pages output from LOB buffer in batch.¹

DD...D

Internal information used by the system.

EE...E

Internal information used by the system.

FF...F

Internal information used by the system.

1 The display format is as follows:

Numeric range | Display format
0 999 | 0 999
1,000 9,994 | 1.00K 9.99K¹
9,995 99,949 | 10.0K 99.9K¹
99,950 999,499 | 100K 999K¹
999,500 9,994,999 | 1.00M 9.99M¹
9,995,000 99,949,999 | 10.0M 99.9M¹
99,950,000 999,499,999 | 100M 999M¹
999,500,000 4,294,967,295 | 1.00G 4.29G¹

K: Kilo

M: Mega

G: Giga

¹ The decimal place beyond the displayed digits is rounded off.

DAT output format (when -x and -y options are specified)

-k def

"DEFINE_OF_GLOBAL_BUFFER"[CR]
"EDIT_TIME"[CR]
"aa...a"[CR]
"BUFFNAME","SVID","TYPE","SIZE","NUM","WRATIO","RDAREA/INDEX_NAME","PRMAX","PRNUM","CSIZE","MAPS"[CR]
"bb...b","cc...c","d",ee,ff...f,ggg,"hh...h",kk...k,lll,mm...m,nn[CR]

-k sts

"STATISTICS_OF_GLOBAL_BUFFER"[CR]
"EDIT_TIME"[CR]
"aa...a"[CR]
"BUFFNAME","SVID","LAST_EXEC_TIME","HIT","REFHIT","UPDHIT","RFGET","UPGET","READ","WRITE",
"RFFLS","UPFLS","REFBUF","UPBUF","TRG","WAITL","SYNC","PRRED","PRHIT","PRINS","PRREQ","INSB",
"LRREQ","LWREQ","LRPAG","LWPAG","CINSM","CFMAX","CFAVG"[CR]
"bb...b","cc...c","dd...d",eee,fff,ggg,"hh...h","ii...i","jj...j","kk...k",
"ll...l","mm...m",nn...n,oo...o,pp...p,"qq...q","rr...r","uu...u",vvv,"ww...w","xx...x","yy...y",
"zz...z","AA...A","BB...B","CC...C","DD...D","EE...E","FF...F"[CR]

Note

[CR] indicates a linefeed.

Rules for output in the DAT format

The elements are separated by the comma (,), and information about one global buffer is displayed on each line. If multiple RDAREAs have been allocated to the same global buffer, one line of global buffer definition information is displayed for each allocated RDAREA, and all items other than the RDAREA name are repeated.

When a character element is included, it is enclosed in double quotation marks ("). Global buffer statistical information including the unit is treated as a character element.

Because the pdbufls command's execution time is included on the title line, this information is displayed only when title line output (-y option) is specified.

If the following information items cannot be acquired, the command displays the null value for a numeric element and only "" for a character element:
- Buffer length and number of buffer sectors in the global buffer definition information
- Previous time the global buffer statistical information was acquired
The internal information used by the system will be the null value or "".

When information is displayed in DAT format, the following error message is not output:
[NOT FOUND ss...s=tt...t]

pdbufmod (Change global buffer dynamically)

Function

The pdbufmod command adds, deletes, or changes a global buffer during HiRDB operation.

The change made by pdbufmod is not inherited after the normal termination of unit or server. Therefore, you need to apply this change using the pdbuffer operand in the system definition before the next normal start of HiRDB. The pdchgconf command lets you change the system definitions without having to terminate HiRDB.

You can use the pdbufmod command if HiRDB Advanced High Availability has been installed.

Executor

HiRDB administrator

Format

 pdbufmod -k change-type -a global-buffer-name

         [{-r RDAREA-name[,RDAREA-name]...|-b RDAREA-name[,RDAREA-name]...

             |-o|-i authorization-identifier.index-identifier}]

         [-n buffer-sectors-count [-l buffer-size]]

         [-m maximum-concurrent-prefetch-operations-count] [-p maximum-batch-input-pages-count]

         [-w updated-output-page-rate-during-deferred-write-trigger]

         [-y update-buffer-sectors-count-for-deferred-write-trigger-event]

Options

-k change-type

Specifies the type of change to be made.

add:

Specifies that a new global buffer is to be added or another global buffer is to be added to the existing global buffers.

To add a new global buffer, make sure that the -n option is specified. If you are adding a new global buffer specifying the -r, -b, or -i option, the RDAREA or index to be specified must be defined beforehand.

If the existing shared memory segment does not have enough space, the new global buffer is created in a new shared memory segment.

del:

Specifies that a global buffer is to be deleted or specific RDAREAs are to be deleted from the global buffer.

To delete specific RDAREAs, specify the RDAREAs in the -r or -b option.

You must place the RDAREAs allocated to a global buffer to be deleted or the RDAREAs to be deleted from a global buffer in shutdown and closed status beforehand.

upd:

Specifies that the global buffer definition is to be changed. The global buffer definition items include the maximum number of concurrent prefetch operations, maximum number of batch input pages, and updated output page rate during deferred write trigger.

Once the global buffer definition is changed, the contents of the global buffer cache are discarded.

If the change made to the global buffer definition results in an increase in the memory size for the global buffer and there is not enough space in the existing shared memory segment, the command creates the global buffer with the definitions in a new shared memory segment.

The following table shows the relationship between the change type and other options:

Other option | -k change-type
add | del | upd
-a | M | M | M
-r | O | O | N
-b | O | O | N
-o | O¹ | N | N
-i | O¹ | N | N
-n | O¹, ² | N | O
-l | O¹ | N | O
-m | O¹ | N | O
-p | O¹ | N | O
-w | O¹ | N | O
-y | O¹ | N | O

Legend:

M: Mandatory

O: Optional

N: Not specifiable

1 You can specify this operand when a new global buffer is to be added.

2 To add a new global buffer, make sure that this operand is specified.

-a global-buffer-name<identifier> ((1-16))

Specifies the name of the global buffer to be added, deleted, or changed.

If you are specifying -k add (to add an RDAREA to an existing global buffer), -k del, or -k upd, specify the name of a global buffer that has already been defined. If you are specifying -k add (to add a new global buffer), specify a global buffer name that is unique in the server.

-r RDAREA-name[,RDAREA-name]...<identifier> ((1-30))

Specifies the names of the RDAREAs that are to be allocated to the global buffer or that are to be deleted from the global buffer.

Rules

A batch specification of RDAREA names is not permitted.

If you specify the number of buffer sectors with the -n option and also specify multiple RDAREAs for a single global buffer, the largest page size in the RDAREAs becomes the buffer size. Therefore, we recommend that you allocate RDAREAs with the same page size to a global buffer. If any of the RDAREAs with identical page size contains a table that serves a different purpose or to which frequent random or sequential access is made, that RDAREA should be allocate to a separate global buffer in order to improve buffering efficiency.

You cannot specify a duplicate RDAREA name. If you specify a duplicate RDAREA name, the command eliminates the RDAREA from processing.

You can specify a maximum of 128 RDAREA names. If you specify more than 128 RDAREA names, the command ignores the excess RDAREA names.

If an RDAREA name is enclosed in double quotation marks ("), the command treats it as being case sensitive. If it is not enclosed in double quotation marks ("), the command treats it as in all uppercase letters. If an RDAREA name contains a space, enclose the RDAREA name in double quotation marks ("). If you are using sh (Bourne shell), csh (C shell), and ksh (Korn shell), you need to enclose the entire RDAREA names in single quotation mark (').

To specify a user RDAREA, the data dictionary RDAREA must be in one of the following statuses:
- Open and shutdown release status
- Open and command shutdown status

-b RDAREA-name[,RDAREA-name]...<identifier> ((1-30))

Specifies the names of LOB RDAREAs that are to be allocated to the global buffer or that are to be deleted from the global buffer.

Effective specification method

Specify the following LOB RDAREAs:

LOB RDAREA that stores a plug-in index

LOB RDAREA with a small amount of data that is accessed frequently

We recommend that you allocate a single LOB RDAREA to a single LOB global buffer.

Rules

You can specify data dictionary LOB RDAREAs, user LOB RDAREAs, and registry LOB RDAREAs. An error results if any other type of RDAREA is specified.

A batch specification of RDAREA names is not permitted.

If you specify the -b option, you cannot specify the -m, -p, or -w option.

If you have not allocated the global buffer (when the -o option is specified), you must specify the LOB RDAREA specified in the -r option also in the -b option.

You cannot specify a duplicate RDAREA name. If you specify a duplicate RDAREA name, the command eliminates the RDAREA from processing.

You can specify a maximum of 128 RDAREA names. If you specify more than 128 RDAREA names, the command ignores the excess RDAREA names.

If an RDAREA name is enclosed in double quotation marks ("), the command treats it as being case sensitive. If it is not enclosed in double quotation marks ("), the command treats it as in all uppercase letters. If an RDAREA name contains a space, enclose the RDAREA name in double quotation marks ("). If you are using sh (Bourne shell), csh (C shell), and ksh (Korn shell), you need to enclose the entire RDAREA names in single quotation mark (').

If you specify a user LOB RDAREA, the data dictionary RDAREA must be in one of the following statuses:
- Open and shutdown release status
- Open and command shutdown status

-o

Specifies that a global buffer is to be allocated to all RDAREAs that are not specified with the -r option. You can specify the -o option only once. If this option is specified more than once, the first option specified takes effect.

-i authorization-identifier.index-identifier
authorization-identifier: <identifier> ((1-8))
index-identifier: <identifier> ((1-30))

Specifies the name of the index (authorization-identifier.index-identifier) to which an index global buffer is to be allocated.

Effective specification method

Specify an index that is used frequently. By allocating a global buffer to a frequently-used index, you can reduce the number of input/output operations because the percentage of index pages made resident in memory increases.

This effect is especially large if you allocate an index defined for a cluster or unique key to a global buffer. Note that the index identifier of a cluster key is determined by HiRDB. After defining a table, search the dictionary table (INDEX_NAME column of SQL_INDEXES table) to obtain the index identifier.

Allocating all indexes to index global buffers degrades the overall utilization factor of global buffers. Therefore, carefully select the appropriate indexes for allocation of global buffers, taking memory size into consideration.

Rules

If a pair of authorization identifier and index identifier is enclosed in double quotation marks ("), the command treats it as being case sensitive. If it is not enclosed in double quotation marks ("), the command treats it as in all uppercase letters. If the index identifier contains a space, enclose it in double quotation marks ("). If you are using sh (Bourne shell), csh (C shell), and ksh (Korn shell), you need to enclose this information in single quotation mark (').

If you specify authorization-identifier.index-identifier, the data dictionary RDAREA must be in one of the following statuses:
- Open and shutdown release status
- Open and command shutdown status

-n buffer-sectors-count
In 32-bit mode: <unsigned integer> ((4-460000))
In 64-bit mode: <unsigned integer> ((4-1073741824))

Specifies the number of global buffer sectors.

Guidelines for specification value

Specifying a value that is greater than necessary reduces the number of input/output operations, but it increases overhead for searching the buffer.

A global buffer is allocated in shared memory. If its size is larger than necessary, frequent paging occurs when other memory is used, thereby adversely affecting the performance.

Depending on the timing of synchronization point acquisition and the percentage of update pages in the global buffer, output operations may concentrate on the database. Therefore, you also need to take into account the balance of input/output operations.

If there are too may buffer sectors, allocation of shared memory may fail.

Determine the number of global buffer sectors based on the following table:

Condition | Determining the number of global buffer sectors
Global buffer with the -r or -o option specified | HiRDB/Single Server | Number of concurrent SQL processing requests number of pages used per SQL statement (about 3 to 6)
HiRDB/Parallel Server | Number of concurrently executable users average number of tables accessed concurrently per transaction 3 n¹
Global buffer with the -b option specified | Total number of LOB RDAREAs percentage of residency²(%)
Global buffer with the -i option specified | Number of pages containing index percentage of residency³(%)

1 The buffer hit rate cannot be improved by the number of buffer sectors obtained based on n=1. Therefore, determine the appropriate buffer space as a coefficient (buffer hit rate).

2 Although the desired percentage of residency is 1 (100%), determine this value taking into account some factors, such as the memory capacity and the frequency of data access. For details about the total number of pages in a user LOB RDAREA and a register RDAREA, see the HiRDB Version 8 Installation and Design Guide.

3 Although the desired percentage of residency is 1 (100%), determine this value taking into account such factors as the memory size and the importance of the index. For details about the total number of pages in an index, see the HiRDB Version 8 Installation and Design Guide.

Set this value in such a manner that the buffer hit rate becomes 80% or higher for applications using HiRDB. You can check the buffer hit rate with the following methods:
- Update buffer hit rate and reference buffer hit rate provided by the statistics analysis utility (statistical information on global buffers).
- pdbufls command's header name HIT

-l buffer-size<unsigned integer> ((even number in the range 4-30))

Specifies the size of the global buffer in kilobytes. Specify this option together with the -n option.

Guidelines for specification value

Normally, you will omit this option, in which case the command assumes the maximum page size of the RDAREAs allocated to this global buffer as the buffer size. In the following cases, however, consider specifying a value:

If you intend to add an RDAREA whose page length will be greater than this value or you will increase the page length of an RDAREA by initializing it in the future, we recommend that you specify a sufficiently large value in this option. However, if you can terminate HiRDB, there is no need to specify such a large value because the maximum page length will be assumed for the buffer the next time HiRDB starts.

Rules

If this option's value is less than the maximum RDAREA page size, the command assumes the maximum RDAREA page size as the buffer size.

If you specify an odd number in this option, the command adds 1 to the specified value in determining the buffer size.

-m maximum-concurrent-prefetch-operations-count<unsigned integer> ((0-95000)) <<0>>

Specifies the maximum number of prefetch operations that can be executed concurrently. When a character special file is used to search a large amount of data, the prefetch facility can reduce the input/output time.

If you specify 0 in this option or omit this option, the prefetch facility will not be used. To use the prefetch facility, you must specify 1 or a greater value.

Guidelines for specification value

This option specifies the number of concurrently executable SQL statements to which the prefetch facility is applied in tables that are contained in the RDAREAs allocated to the global buffer. The prefetch facility is applied to the following SQL statements, where a value of 2 is used as the execution count for 3:

SELECT, UPDATE, and DELETE statements that do not use an index (excluding the = and IN conditions)

SELECT, UPDATE, and DELETE statements that perform searches in ascending order* using an index (excluding the = and IN conditions)

SELECT, UPDATE, and DELETE statements that perform searches in ascending order* using a cluster key (excluding the = and IN conditions)

* For a multicolumn index, the searches are conducted in the order specified in the index definition.

Rules

If you use the prefetch facility, you need to re-estimate the shared memory size because a buffer dedicated to batch input is allocated from the shared memory separately from the global buffers.

For details about the formulas for determining the size of shared memory required for the prefetch facility and global buffers, see the HiRDB Version 8 Installation and Design Guide.

-p maximum-batch-input-pages-count<unsigned integer> ((2-256)) <<32>>

Specifies the maximum number of batch input pages for the prefetch facility. This specification is applicable only when 1 or a greater value is specified in the -m option.

Guidelines for specification value

Based on the shared memory size and cost performance, specify the value that satisfies the following condition:

a b = 64 to 128 (kilobytes)

a: Page length of the RDAREA containing the data or index of the table that is subject to prefetch processing
b: Maximum number of batch input pages

-w updated-output-page-rate-during-deferred-write-trigger
<unsigned integer> ((0-100)) <<20>>

Specifies the percentage of updated output pages during deferred write trigger. For details about deferred write trigger, see the HiRDB Version 8 Installation and Design Guide.

If this operand's value is 0, the system does not output pages updated by deferred write trigger.

Guidelines for specification value

Determine the appropriate value by checking the relevant information, such as the number of input/output operations per global buffer and the hit rate for updated pages, using the statistics analysis utility. If the hit rate for updated pages is high for a global buffer, specify a low output rate for this global buffer; if the hit rage is low, specify a high output rate.

If the specified value is too large, update processing occurs frequently, resulting in frequent input/output operations. The number of pages to be written in the database also increases during delayed write processing, thereby adversely affecting throughput. On the other hand, if the specified value is too small, the number of pages to be written in the database increases during a synchronization point dump. Therefore, reduce the number of times the same pages are written in the database between synchronization point dumps.

Specify a value of 0 if all pages are in the global buffer and the same pages are frequently updated by multiple transactions. This can reduce the total number of pages that are written in the database between the synchronization points.

-y update-buffer-sectors-count-for-deferred-write-trigger-event

<unsigned integer> ((2-2147483647))

Specifies the number of update buffer sectors for when deferred write processing is to be executed. When the number of update buffer sectors reaches the specified value, the deferred write trigger writes updated pages to the disk.

If the -y option is omitted, the number of update buffer sectors for the deferred write trigger event depends on the combination of the pd_dbbuff_rate_updpage and pdbuffer -y operands, as shown below:

pd_dbbuff_rate_updpage operand specification | pdbuffer -y operand specification | Number of update buffer sectors for deferred write trigger event
Specified | Specified | pdbuffer -y operand value
Omitted | Number of global buffer sectors x pd_dbbuff_rate_updpage operand value
Omitted | Specified | pdbuffer -y operand value
Omitted | Determined by HiRDB

Specification guidelines

Normally, you omit this operand. There may be times when deferred write processing is not completed within the synchronization point interval. In such a case, you may want to reduce the writing time by reducing the number of updated buffers and accepting a slight reduction in the updated buffer hit rate; you do this by specifying this operand. Assume 50% (the initial value set by HiRDB) as the specification guideline, and determine the operand value by referring to the section Tuning the synchronization point processing time when deferred write processing is used in the manual HiRDB Version 8 System Operation Guide.

Rules

If the value specified in this option is greater than the number of global buffer sectors, the number of global buffer sectors is used.

Notes

If the value of the -y option is too small, there is an increase in the frequency of deferred write processing, resulting in an increase in workload. For this reason, it is important to specify an appropriate value based on the specification guidelines.

Rules

The pdbufmod command can be executed only while HiRDB is active.

The pdbufmod command must be executed at the server machine that contains the single server or where the system manager is located.

When the pdbufmod command is executed, the system locks the related RDAREAs and their RDAREA status in the EX mode. Any other transaction or utility accessing these RDAREAs is placed in the wait status.

You cannot execute the pdbufmod command in the following cases:

The rapid system switchover facility or standby-less system switchover facility is being used.

pd_dbbuff_modify=Y is not specified in the system definition.

You cannot execute more than one pdbufmod command at the same time.

The maximum number of global buffer sectors that can be defined and the maximum number of new shared memory segments that can be added are determined by the values of the pd_max_add_dbbuff_no and pd_max_add_dbbuff_shm_no operands in the system definition.

Notes

Deletion of shared memory segments that is accompanied by deletion of a global buffer may be delayed depending on the command's termination timing. To immediately delete them, execute the pdpfresh command.

If the unit is terminated or HiRDB is terminated forcibly while the pdbufmod command is executing, use the pdbufls -k def command after the restart to make sure that the previous operation has been completed. If it has not been completed, re-execute the pdbufmod command.

The following shows the pdbufmod command's return codes:
0: Normal termination
4: Warning termination (some server processing terminated abnormally)
8: Abnormal termination
12: Abnormal termination (an event occurred that prevented output of an error message)
If the return code is 12, check the error message in syslogfile at the host where the single server or dictionary server is located, eliminate the cause of the error, and then re-execute the pdbufmod command. If no error message has been output to syslogfile, contact the customer engineer.

Examples

Example 1:

This example adds the global buffer gbuf01 and then allocates the added RDAREA RDAREA1 to this global buffer.

pdbufmod -k add   .................1
         -a gbuf01   ..............2
         -r RDAREA1   .............3
         -n 1000   ................4

Explanation

Specifies that a global buffer is to be added.

Name of the global buffer to be added

RDAREA to be allocated

Number of sectors for the global buffer

Example 2:

This example deletes the global buffer gbuf01 to which no RDAREA has been allocated.

pdbufmod -k del   .................1
         -a gbuf01   ..............2

Explanation

Specifies that a global buffer is to be deleted.

Name of the global buffer to be deleted

Example 3:

This example changes the number of sectors for the global buffer gbuf01 from 1000 to 2000.

pdbufmod -k upd   .................1
         -a gbuf01   ..............2
         -n 2000   ................3

Explanation

Specifies that a global buffer definition is to be changed.

Name of the global buffer whose definition is to be changed

Number of buffer sectors after change

pdcancel (Forcibly terminate UAP or utility processing)

Function

The pdcancel command forcibly disconnects and terminates the process on HiRDB for processing a specified UAP or utility.

When a process is still active on HiRDB although the corresponding UAP has been terminated due to an error, etc., this command is used to terminate the process. This command forcibly terminates a process in a single server on the HiRDB that has been connected with a UAP or terminates processes in front-end and back-end servers.

The pdcancel command also cancels utility processing that is executing.

Executor

HiRDB administrator

Format

HiRDB/Single Server

pdcancel {-U| -u UAP-identifier [-i process-ID]| -i process-ID -d}

HiRDB/Parallel Server

pdcancel {-x host-name | -X unit-identifier}
        {-U| -u UAP-identifier [-i process-ID]| -i process-ID -d}

Options

UAP

-x host-name<identifier> ((1-32))

Specifies the name of the host containing the front-end server to which the corresponding UAP is connected.

The host name can be obtained with the pdls command.

-X unit-identifier<identifier> ((4 characters))

Specifies the identifier of the unit containing the front-end server to which the corresponding UAP is connected.

-U

Specifies that all UAPs running on the unit with the specified host name are to be forcibly terminated.

-u UAP-identifier<character string> ((1-30))

Specifies the UAP identifier (PDCLTAPNAME) of the client UAP corresponding to the process on HiRDB that is to be forcibly terminated. If more than one UAP with the same identifier is running on the corresponding unit, the -i option must be specified.

-i process-ID<unsigned integer> ((1-10))

Specifies the process ID of the process that is to be forcibly terminated. When this option is specified together with the -u option, the process ID of a single server or front-end server must be specified. When this option is specified together with the -d option, the process ID of a single server, dictionary server, front-end server, or back-end server must be specified. The pdls command (with prc specified in the -d option) can be used to display process IDs. The process ID of the process to be forcibly terminated can be determined from the service request acceptance time for the corresponding UAP.

-d

Specifies that the HiRDB process is to be forcibly terminated after a core dump is acquired. If the process is engaged in transaction processing, the command forcibly terminates the dictionary server, front-end server, and back-end server handling the transaction, then acquires the core dump.

Utility

-x host-name<identifier> ((1-32))

Specifies the name of the host containing the system manager. In the case of the database initialization utility (pdinit) or the database structure modification utility (pdmod), the host name of the dictionary server must be specified.

The host name can be obtained by the pdls command.

-X unit-identifier<identifier> ((4 characters))

Specifies the identifier of the unit where the system manager is located. However, if the database initialization utility or the database structure modification utility is being terminated forcibly, the identifier of the unit which where the dictionary server is located must be specified.

-u UAP-identifier<identifier> ((1-8))

Specifies the name of the server processing the utility. A server name begins with 0m in the list of names displayed by the pdls command (prc specified in the -d option). For example, the server name for the database load utility (pdload) is displayed as 0mload0. To forcibly terminate the database structure modification utility, pdmod must be specified as the UAP identifier.

The following table lists the server name for each utility:

Utility | Server name*
Database initialization utility (pdinit) | 0minitx
Database load utility (pdload) | 0mloadx
Database structure modification utility (pdmod) | pdmod
Database reorganization utility (pdrorg) | 0mrorgx
Dictionary import/export utility (pdexp) | 0mexpx
Rebalancing utility (pdrbal) | 0mrbalx
Free page release utility (pdreclaim) | 0mrorgx
Global buffer residence utility (pdpgbfon) | 0mrorgx
Database condition analysis utility (pddbst) | 0mdbst
Optimizing information collection utility (pdgetcst) | 0mgcst
Database copy utility (pdcopy) | 0bcpyx
Database recovery utility (pdrstr) | 0brstr

* x at the end of a name is a numeric character (0, 1, 2, ...).

-i process-ID<unsigned integer> ((1-10))

Specifies the process ID of the utility that is to be terminated forcibly. This option must be specified in order to terminate a utility.

-d

Specifies that the utility is to be forcibly terminated after a core dump is acquired. If the utility is engaged in transaction processing, the command forcibly terminates the single server, dictionary server, and back-end server handling the transaction, then acquires the core dump.

Rules

The pdcancel command can be executed only while HiRDB is active.

The pdcancel command can be executed from any server machine except one that contains a utility special unit.

In the case of UAP-connected processes, the pdcancel command (-d option not specified) can be used only to forcibly terminate processes engaged in transaction processing. If transaction processing has not started or has already terminated, but the single server or front-end server does not send a response to the UAP, terminate the single server or front-end server process by executing the pdcancel command specifying the -d option (in this case, the core is collected) or the kill OS command. Whether or not the process corresponding to the specified UAP is engaged in transaction processing can be determined from the information displayed by the pdls command (trn -a specified in the -d option). If information is displayed for the UAP, the process is engaged in transaction processing; otherwise, the process is not engaged in transaction processing.

If the pdcancel command is not executed for a process that is still engaged in processing at the HiRDB side although the corresponding UAP had been terminated due to an error, the process will be forcibly terminated when the time specified in the corresponding client environment definition (PDSWAITTIME) is reached.

Notes

The result of the pdcancel command can be checked by the pdls command (-d prc specified).

The pdcancel command may not execute if a non-alphanumeric character was specified for PDCLTAPNAME in the client environment definition.

A utility should not be cancelled unnecessarily.

Return code 0 for the pdcancel command indicates normal termination, and return code 8 indicates abnormal termination (such as an invalid option or rsh error).

pdcat (Display messages in file)

Common function

The pdcat command displays the contents of HiRDB system files for a specified type of display object.

Common format

pdcat [-d display-object-type] [display-object-type-options]

Note

The specifiable options depend on the display object type.

Common options

-d display-object-type

Specifies the type of file to be displayed:

sts

Status file

Default

Message log file

Common note

Return code 0 for the pdcat command indicates normal termination, and return code 8 indicates abnormal termination.

If you specify the TMPDIR environment variable and cancel the pdcat command or another HiRDB command during execution, files whose names begin with pdcmd may remain in the directory set by TMPDIR. In such a case, use the OS's rm command to delete those files.

pdcat [-d sts specified]

Function

Outputs status file contents to the standard output.

Executor

Any user (with or without privileges)

Format

Unit status files

pdcat -d sts [{-x host-name| -u unit-identifier}]
     -f physical-filename [-v][-e]

Server status files

pdcat -d sts -s server-name -f physical-filename [-v][-e]

Options

{-x host-name | -u unit-identifier}

Specifies the identifier of the unit or the name of the host corresponding to the unit status file. If this option is omitted, the information for the entire HiRDB system is displayed.

-x host-name<identifier> ((1-32))

Specifies the name of the host corresponding to the unit status file.

-u unit-identifier<identifier> ((4 characters))

Specifies the identifier of the unit corresponding to the unit status file.

-s server-name<identifier> ((1-8))

Specifies the server name corresponding to the server status file. Even though there is only one HiRDB server in a HiRDB/Single Server, it must be specified in order to identify the object of server status file operations.

-f physical-filename<pathname> ((up to 167 characters))

Specifies the absolute pathname of the physical file. A physical file name must be specified as HiRDB-file-system-area-name/HiRDB-filename.

In the case of a HiRDB that uses Real Time SAN Replication based on the log-only synchronous method, either the status file for transaction processing or the status file for log application processing can be specified. Note that the volume containing the physical file must be readable.

-v

Specifies that the following items concerning the status file are to be checked:

Record integrity by first and last record numbers.

Record length and records count, based on the file management information displayed by the pdstsinit command

Completion of file updating, based on the status file management information

Records count and record type in the status file management information

If checking detects an error, an error message is output after the contents of the specified status file have been displayed.

If this option is omitted, status file checking is not performed.

-e

Specifies that the status file is to be opened in the lock mode. If the pdcat command is executed with this option specified at the time the unit or server is being started, HiRDB may terminate abnormally due to a lock error.

When this option is omitted, the status file is not opened in the lock mode, and the correct status may not be displayed if the specified status file is being used by the HiRDB.

Rules

The pdcat command can be executed at any time, whether or not HiRDB is active. However, it cannot be executed during HiRDB startup or termination processing.

The pdcat command can be executed from any server machine except one that contains a utility special unit.

Output format

Path name:aa...aa
Initial_time Current_time  R_le   R_co  factor  Available manage
bb...b        cc...c         ddddd  ee...e  fff%     gg...g    hh...h

Explanation

aa...a

Name of the physical file (up to 63 digits)

bb...b

Initialization date and time (in the format year/month/date hour:minute:second)

cc...c

Current date and time (in the format year/month/date hour:minute:second)

If not being used as the current file --/--/-- --:--:-- is displayed.

ddddd

Record length (decimal)

ee...e

Records count (decimal)

fff

Record utilization in the file (%)

gg...g

Number of contiguous free records in the file (decimal)

hh...h

Number of management records in the file (decimal)

The information displayed for a file that has been corrupted or in which an error has occurred may not be correct.

pdcat [-d option omitted]

Function

The pdcat command displays messages contained in a message log file.

Executor

Any user (with or without privileges)

Format

HiRDB/Single Server

pdcat [-a| b | ab ] [-c significance-code[,significance-code]...]
     [-y yyyymmdd] [-t hhmmss] [-T hhmmss] [-n records-count]
     [filename]

HiRDB/Parallel Server

pdcat [-a| b | ab ] [-c significance-code[,significance-code]...]
     [-x host-name| -u unit-identifier]] [-y yyyymmdd]
     [-t hhmmss] [-T hhmmss] [-n records-count]
     [filename]

Options

-{a | b | ab}

-a

Specifies that all message information except the message IDs and message texts is to be displayed.

-b

Specifies that the message IDs and message texts only are to be displayed.

-ab

Specifies that all message information is to be displayed.

-c significance-code

Specifies a significance code when specific messages are to be selected on the basis of their significance codes (for details about significance codes, see the manual HiRDB Version 8 Messages). When this option is omitted, messages are not selected on the basis of significance codes.

{-x host name| -u unit-identifier}

To display messages by host or unit, specifies the unit's unit identifier or the host's host name. When this option is omitted, messages for all hosts or units are displayed.

-x host-name<identifier> ((1-32))

To display messages by host, specifies the host's name.

To display server-related messages when the standby-less system switchover (effects distributed) facility is used, you must specify the name of a host whose server is running. This is because messages on the server in the switched system are being output to the message log for the host whose server is running.

-u unit-identifier<identifier> ((4 characters))

To display messages by unit, specifies the unit identifier of that unit.

To display server-related messages when the standby-less system switchover (effects distributed) facility is used, you must specify the identifier of a unit whose server is running. This is because messages on the server in the switched system are being output to the message log for the unit whose server is running.

-y yyyymmdd

Specifies a date, when only messages for and subsequent to the specified message log date are to be displayed (in the format year-month-date, where the year consists of the four-digit calendar year, and the month and date each consist of two digits). When this option is omitted, messages are not selected on the basis of the message log date.

-t hhmmss

Specifies a time, when only messages for and subsequent to the specified message log time are to be displayed (in the format hour-minute-second). When this option is omitted, messages are not selected on the basis of a message log begin time.

-T hhmmss

Specifies a time, when only messages for and prior to the specified message log time are to be displayed (in the format hour-minute-second). When this option is omitted, messages are not selected on the basis of a message log end time.

-n records-count<unsigned integer> ((1-32767))

Specifies the maximum number of message log records to be displayed. When this option is omitted, all selected message log records are displayed.

Command arguments

filename<path-name>

Specifies the name of the message log file to be displayed. A file created by copying a message log file can be specified. When this option is omitted, the messages in the following message log files are merged into chronological order and then displayed:

$PDDIR/spool/pdlog1

$PDDIR/spool/pdlog2

Rules

The pdcat command can be executed only while HiRDB is active.

The pdcat command can be executed from any server machine except one that contains a utility special unit.

Notes

For a HiRDB/Parallel Server, the storage location of the message log file depends on the pd_mlg_msg_log_unit operand value in the system definition, as shown below:

When pd_mlg_msg_log_unit=manager is specified
Unit where the system manager is located

When pd_mlg_msg_log_unit=local is specified
All units

If pd_mlg_msg_log_unit=local was specified, the pdcat command displays the contents of the message log file for the corresponding unit. If pd_mlg_msg_log_unit=manager was specified or the pd_mlg_msg_log_unit operand was omitted, and if the system manager is located on the unit, the command displays the contents of the message log file for that unit; if the system manager is not located on the unit, the command displays nothing.

Output format

aa...a bb...b cc...c dddd ee...e ff...f gg...g hhhh ii...i
jjj kk...k ll...l

Explanation

aa...a

Message serial number (7 decimal digits).

bb...b

Process ID (10 decimal digits).

cc...c

Message serial number within the process (server) (7 decimal digits).

dddd

HiRDB identifier (4 characters).

ee...e

Date (in the format year/month/date) (10 decimal digits).

ff...f

Time (in the format hour:minute:second) (8 decimal digits).

gg...g

Request source host name (first 8 characters).

When the standby-less system switchover (effects distributed) facility is used, this is the name of the host whose server is running.

hhhh

Unit identifier (4 characters).

When the standby-less system switchover (effects distributed) facility is used, this is the identifier of the unit whose server is running.

ii...i

Message output request source server name (8 characters).

jjj

Internal information used by the system (3 characters).

kk...k

Message ID (11 decimal digits).

ll...l

Message text (up to 223 characters).

pdchgconf (Reconfigure the system)

Function

The pdchgconf command changes system definitions during HiRDB operation.

Before executing the pdchgconf command, check that the definitions after the change will be valid (execute the pdconfchk -d chgconf command).

You can use the pdchgconf command only if HiRDB Advanced High Availability has been installed.

Executor

HiRDB administrator

Format

pdchgconf

Options

None

Changing procedure

Figure 2-2 provides an overview of changing system definitions.

Figure 2-2 Overview of changing system definitions (pdchgconf command)

Explanation

Before executing the pdchgconf command, create the chgconf directory in $PDDIR/conf in order to store the system definition file after the change. In the case of a HiRDB/Parallel Server, create this directory in all units.

After copying all system definition files from $PDDIR/conf to the chgconf directory, make desired changes to the system definitions.
For details about the system definitions that can be changed, see the HiRDB Version 8 System Operation Guide.

Execute the pdchgconf command.

When the pdchgconf command terminates, the system definition files before the changes are saved in the backconf directory in $PDDIR/conf.

The system definition files after the changes are stored in $PDDIR/conf.

Rules

The pdchgconf command can be executed only while HiRDB is active.

The pdchgconf command must be executed at the server machine that contains the single server or where the system manager is located.

Notes

You cannot use the pdchgconf command to change the pd_system_id or pd_master_file_name operand. Nor can you delete this information from the current system file or an overwrite-disabled system file. An attempt to change or delete this information will result in an error.

You cannot make changes to system definitions that affect OS parameters (kernel parameters). To make such changes, use the normal procedure for changing system definitions (terminate HiRDB, make changes to the system definitions, and then re-start HiRDB).

When you execute the pdchgconf command, the system log files are swapped. Before executing the pdchgconf command, make sure that there is enough space for operation with the new configuration. If you execute the pdchgconf command while there is no swappable system log file, HiRDB displays the KFPS01256-E message and stops (displays abort code Psjnf07 or Psjn381). If HiRDB has stopped, provide a swappable system log file and then start HiRDB. If there is no swappable system log file, you need to add one. For details about how to handle when there is no swappable file, see the HiRDB Version 8 System Operation Guide.

Although the system log files are swapped when you execute the pdchgconf command, no message to that effect is displayed. Therefore, if you need the message log in the message log file, back up the message log file before executing the pdchgconf command.

If the following conditions apply, you may not be able to execute the pdchgconf command:

For a HiRDB/Parallel Server, some units or servers have terminated (including reduced activation). If only recovery-unnecessary front-end servers are inactive, you may be able to execute the pdchgconf command; for details, see Notes when a recovery-unnecessary front-end server is used.

For a HiRDB/Parallel Server, a communication error has occurred in the network between units.

Updatable online reorganization is executing.

The pdrplstop command is executing.

A transaction or utility was still active 15 minutes after the pdchgconf command was executed.

HiRDB was started with the pdstart -r command.

While HiRDB Datareplicator is linked, the value of the pd_rpl_init_start operand does not match the actual data extraction mode.*

* The details are as follows:

Value of the pd_rpl_init_start operand before change | HiRDB Datareplicator linkage status | Value of the pd_rpl_init_start operand after change | Whether or not the pdchgconf command can be executed
Y | Active | Y | Y
N or omitted | N
Has been stopped by the pdrplstop command | Y | N
N or omitted | Y
N or omitted | Inactive | Y | N
N or omitted | Y
Has been activated by the pdrplstart command | Y | Y
N or omitted | N

Legend:
Y: Executable
N: Not executable

The following limitations apply while the pdchgconf command is executing:

UAP response time may be delayed. The guideline for the pdchgconf command's execution time is: time required for normal termination of HiRDB + time required for normal startup of HiRDB.

Do not execute any other operation command or utility.

The system switchover facility is not available. If the system switchover facility is used in the HA monitor's server mode, the standby system is stopped during execution of the pdchgconf command. In this case, update the system definitions after the pdchgconf command terminates normally and then restart the standby system. If the system switchover facility is using Hitachi HA Toolkit Extension, stop the standby system before executing the pdchgconf command, update the system definitions after the pdchgconf command terminates normally, and then restart the standby system.

To add or delete a unit or server while HiRDB Datareplicator is linked, you must re-create HiRDB Datareplicator's extraction environment. If a HiRDB transaction is processed and data is added, updated, or deleted in the extracted database while HiRDB Datareplicator's extraction environment is being re-created, inconsistency occurs in the target database. In this case, do not use the pdchgconf command to change the configuration.

If Real Time SAN Replication based on the log-only synchronous method is in use and the pdchgconf command is used, you must execute the preparations for log application. For details about Real Time SAN Replication, see the manual HiRDB Version 8 Disaster Recovery System Configuration and Operation Guide.

If the pdchgconf command's execution fails, the system automatically restores the previous system definitions, using the system definition files stored in the backconf directory under $PDDIR/conf. If this recovery processing fails, HiRDB may terminate itself. In such a case, check the error messages and take appropriate action.

During execution of the pdchgconf command, error messages and abort codes that accompany HiRDB startup and termination may be displayed. In such a case, there may be a problem with the new system definitions or environment. Take appropriate action according to the displayed error messages and abort codes.

Return code 0 for the pdchgconf command indicates normal termination, and return code 8 indicates abnormal termination.

While only recovery-unnecessary front-end servers are inactive, you still may not be able to execute the pdchgconf command in the following cases:

The pd_mode_conf operand value in the system definition is AUTO.

After the system definition is changed, a currently inactive unit's front-end server will no longer be a recovery-unnecessary front-end server.

Notes when a recovery-unnecessary front-end server is used

If a recovery-unnecessary front-end server has stopped normally and the corresponding unit is running, the pdchgconf command cannot be executed.

If all units are running except ones that contain a recovery-unnecessary front-end server and no individual server has stopped, the pdchgconf command can be executed even when a unit containing a recovery-unnecessary front-end server is inactive. However, if Notes 5 through 10 are true, the pdchgconf command cannot be executed.
The pdchgconf command replaces the system definition file in $PDDIR/conf in the inactive unit with the system definition file in $PDDIR/conf/chgconf. The command then restarts the inactive unit in order to apply the new system definition. If a problem occurs, such as a machine shutdown or a network error, the pdchgconf command may not replace the system definition file in the inactive unit or may not restart the unit. In such a case, the command displays the KFPS04665-W message. If this message is displayed, you must take actions (i) and (ii) below before restarting the unit. If these actions are not taken, HiRDB cannot accept the correct changes to the system definition, resulting in invalid operation. If such invalid operation occurs, immediately terminate the corresponding unit and take actions (i) and (ii):
(i) Replace the system definition file in $PDDIR/conf or $PDCONFPATH with the new one.
(ii) Use the pdconfchk command to make sure that there are no differences in the system definitions between the units.

pdchprc (Change number of startup server processes)

Function

The pdchprc command changes the number of resident server processes and the maximum number of startup server processes. It also displays the current number of resident server processes and the current maximum number of startup server processes.

Executor

HiRDB administrator

Format

HiRDB/Single Server

pdchprc [-p resident-processes-count[,maximum-startup-processes-count]]

HiRDB/Parallel Server

pdchprc {-a| -s server-name}
       [-p resident-processes-count[,maximum-startup-processes-count]]

Options

-p resident-processes-count [,maximum-startup-processes-count]<unsigned integer> ((0-2048))

Specifies new values for the number of resident server processes and maximum number of startup server processes. If the maximum number of startup processes is omitted, the number of resident processes is assumed. If the -p option is omitted, the command displays the current number of resident server processes and current maximum number of startup server processes at the time the pdchprc command is executed.

The number of processes can be any value in the range 0 to the maximum number of startup server processes specified in the HiRDB system definition. The maximum number of startup server processes is shown below. Note that if you have not specified the pd_max_reflect_process_count operand, treat the value of this operand as 0.

Single server or front-end server
Value of pd_max_users operand in the system common definition + value of pd_max_reflect_process_count operand

Back-end server
Value of pd_max_bes_process operand in the server common definition or back-end server definition + value of pd_max_reflect_process_count operand

Dictionary server
Value of pd_max_dic_process operand in the server common definition or dictionary server definition + value of pd_max_reflect_process_count operand

-a

Specifies that the number of resident server processes and maximum number of startup server processes for every server that is active when the pdchprc command is executed are to be displayed. If this option is specified together with the -p option, the command changes the number of resident server processes and the maximum number of startup server processes for every active front-end server and back-end servers to the values specified in the -p option.

-s server-name<identifier> ((1-8))

Specifies the name of a server whose number of resident server processes and maximum number of startup server processes are to be changed or displayed.

Rules

The pdchprc command can be executed only while HiRDB is active.

The pdchprc command must be executed at the server machine containing the single server or the server machine where the system manager is located.

An error results if the number of resident processes specified in the -p option is greater than the maximum number of startup processes.

If either value specified in the -p option is greater than the maximum number of startup server processes specified in the HiRDB system definition, HiRDB displays a warning message and assumes the maximum number of startup server processes specified in the HiRDB system definition.

Whenever the number of resident processes or the maximum number of startup processes is changed by the -p option, HiRDB displays a message to that effect at each applicable server.

The new number of resident server processes and maximum number of startup server processes set by the pdchprc command remain in effect at each applicable server until the server is terminated. Once HiRDB is terminated normally or forcible or planned termination is executed, this information is not inherited at the next restart.

Notes

If the server specified in the -s option is not active or is terminating, the pdchprc command terminates with an error. When the -a option is specified, neither the number of resident server processes nor the maximum number of startup server processes is changed at or displayed for any inactive server or any server that is terminating.

To change the number of resident processes or the maximum number of startup processes for a dictionary server, the name of the dictionary server must be specified in the -s option.

If the maximum number of startup server processes is changed to 0, all transaction processing underway at the time the pdchprc command executes terminates with an error.

If the maximum number of startup processes for a dictionary server or back-end server is changed to a value that is less than the value specified in the HiRDB system definition and if many transactions are concentrated at that server, the transactions the server can no longer handle may terminate with an error.

On the HiRDB/Parallel Server, if the system manager and the front-end server are the same unit, changing the maximum number of processes that can be launched on the front-end server to 0 disables the following utilities:

Database load utility (pdload)

Database structure modification utilities (pdmod)

Database reorganization utility (pdrorg)

Database condition analysis utility (pddbst)

Optimizing Information collection utility (pdgetcst)

When the standby-less system switchover (effects distributed) facility is used, if the pdchprc command is used to display the number of resident server processes and the maximum number of active processes, the number of resident back-end server processes and the maximum number of active processes may not match depending on the number of allocated server processes. Additionally, even when you specify the -p option to change the number of resident processes and the maximum number of active processes, the number of resident back-end server processes and the maximum number of active processes may not be changed depending on the number of allocated server processes. For details about the number of allocated server processes when the standby-less system switchover (effects distributed) facility is used, see the HiRDB Version 8 System Operation Guide.

Return code 0 for the pdchprc command indicates normal termination, and return code 8 indicates abnormal termination (such as an invalid option or rsh error).

Output format

The following information is displayed only when the -p option is omitted:

aa...a     bbbb,cccc     dddd,eeee
aa...a     bbbb,cccc     dddd,eeee

Explanation

aa...a

Server name (1-8 characters)

bbbb

Number of resident server processes specified in the HiRDB system definition

cccc

Maximum number of startup server processes specified in the HiRDB system definition

dddd

New number of resident server processes set by the pdchprc command. If it is the same as bbbb, **** is displayed.

eeee

New maximum number of startup server processes set by the pdchprc command. If it is the same as cccc, **** is displayed.

pdclose (Close RDAREAs)

Function

The pdclose command closes specified RDAREAs. RDAREAs that have been shut down by the pdhold command and RDAREAs in error shutdown status can be specified.

Executor

HiRDB administrator

Format

pdclose -r {RDAREA-name[,RDAREA-name]...|ALL} [-q generation-number]

Options

-r {RDAREA-name[,RDAREA-name]...|ALL}

-r RDAREA-name<identifier> ((1-30))

Specifies the name of an RDAREA to be closed. You can also use batch specification of RDAREA names. For details about batch specification of RDAREA names, see 1.5.2 Batch specification of RDAREA names in operation commands.

ALL

Specifies that all RDAREAs except the master directory RDAREA are to be closed. If the -q option is specified, the command processes the same generation of RDAREAs.

Rules

You cannot close an RDAREA that is in reference-possible backup hold (update WAIT mode) or updatable backup-hold status, nor can you close a master directory RDAREA.

You cannot specify a duplicated RDAREA name. If the name is specified, the system will eliminate all duplicated RDAREA names.

You can specify a maximum of 128 RDAREAs. If more than 128 RDAREA names are specified, the system ignores the excess names.

If an RDAREA name is enclosed in double quotation marks ("), the system treats it as being case sensitive; otherwise, the system treats it as all uppercase letters. If an RDAREA name contains a space, enclose the entire name in double quotation marks ("). If you use the Bourne shell (sh), C shell (csh), or Korn shell (ksh), you must enclose the entire set of RDAREA names in single quotation marks (').

If you specify a user RDAREA or user LOB RDAREA, make sure that the corresponding data dictionary RDAREA is in one of the following statuses:

Open and shutdown release status

Open and shutdown status placed by the pdhold command

When you specify both data dictionary and user RDAREAs or both data dictionary and user LOB RDAREAs, be sure to specify the data dictionary RDAREAs last.

If you are using the inner replica facility, you can also specify original and replica RDAREA names. In this case, you can specify only user RDAREAs and user LOB RDAREAs.

-q generation-number<unsigned integer> ((0-10))

Specifies the generation number of a replica RDAREA.

If you specify this option, make sure that the original RDAREA name is specified in the -r option. An error results if you specify an original RDAREA whose replicas have all been deleted or if you specify a normal RDAREA (one without a replica RDAREA).

Rules

The pdclose command can be executed only while HiRDB is active.

The pdclose command must be executed at the server machine containing the single server or the server machine where the system manager is located.

The pdclose command locks the specified RDAREAs in the EX mode. If another transaction is accessing a specified RDAREA, the pdclose command will go onto wait status until the transaction terminates.

If the pdclose command is executed on a shared RDAREA, all back-end servers are locked. If there can be multiple concurrent accesses to the corresponding RDAREA, global deadlock may occur, resulting in a timeout. If global deadlock has occurred, re-execute the pdclose command.

If hybrid is selected as the processing method for Real Time SAN Replication, executing the pdclose command results in a database synchronization wait for the remote site. This may result in an overhead of 2 seconds or more for each RDAREA specified in the -r option. If the database synchronization wait for the remote site fails, you must recover the remote site's database. For details about the error handling when Real Time SAN Replication is used, see the HiRDB Version 8 System Operation Guide.

Note

The result of the pdclose command can be checked by the pddbls command.

The following shows the pdclose command's return codes:
0: Normal termination
4: Warning termination (some RDAREA processing terminated with an error)
8: Abnormal termination
12: Abnormal termination (an event occurred that prevented output of an error message)
If the error code is 12, check the error message in syslogfile at the host where the single server or dictionary server is located, eliminate the cause of the error, and then re-execute the command. If no error message has been output to syslogfile, contact the customer engineer.

pdclttrc (Acquire SQL trace dynamically)

Function

The pdclttrc command acquires an SQL trace for a client executing SQL statements. The SQL trace information is output to the client.

You can determine the server name and process ID subject to acquisition of the SQL trace from the client's IP address and UAP identification information in the pdls -d prc command's execution results.

Executor

HiRDB administrator

Format

 pdclttrc [-s server-name] [-p process-ID] [-e] [-l PDUAPREPLVL-value]

        [-m maximum-length-of-?-parameter-and-search-data]

        [-n output-operation-codes-count] [-o SQL-trace-file-size]

Options

-s server-name<identifier> ((1-8))

Specifies the name of the server to which the client subject to acquisition of the SQL trace is connected. Specify the name of the single server or a front-end server.

When this option is omitted, the command acquires an SQL trace for all processes connected to all HiRDB servers (single or front-end servers).

For a single server, specifying an invalid server name does not result in an error.

-p process-ID<unsigned integer> ((1-10))

Specifies the process ID of the server to which the client subject to acquisition of the SQL trace is connected.

For a HiRDB/Parallel Server, this option must be specified together with the -s option. For a HiRDB/Single Server, the -s option is optional.

When this option is omitted, the command acquires an SQL trace for all processes connected to the single server or front-end server.

-e

Stops acquisition of SQL traces.

Rules

When the connection has been broken or SQL trace acquisition has stopped because the -n option value was reached, specifying this option does not result in an error.

If only this option is specified, the command stops acquisition of SQL traces for all processes that are connected to all HiRDB servers (single or front-end servers).

When this option is specified together with the -s option, the command stops acquisition of the SQL traces for all processes connected to the specified server.

When this option is specified together with the -p option, the command stops acquisition of the SQL trace for the specified process.

A stop request to the client is executed by the next SQL statement. If an internal operation is executed in the meantime, SQL trace information may be output even after its acquisition is stopped by the -e option. For details about internal operations, see the operation codes in 14.4.3 Record formats of DAT-format files.

-l PDUAPREPLVL-value

To output UAP statistical report information in addition to SQL trace information, specifies the UAP statistical report information that is to be output (value of the PDUAPREPLVL client environment definition). For details about the specification values and information output destination, see the HiRDB Version 8 UAP Development Guide.

When the inter-process memory communication facility is used, this option is ignored, if specified. The command displays the messages during process-to-process memory communication.

When this option is specified together with the -e option, this option is ignored.

-m maximum-length-of-?-parameter-and-search-data<unsigned integer> ((4-32008))

Specifies in bytes the maximum length of the search data and ? parameter information that is to be output to the SQL trace.

This option provides the same function as when INOUT is specified in the PDPRMTRC client environment definition.

When this option is specified together with the -e option, this option is ignored.

-n output-operation-codes-count<unsigned integer> ((0-10000)) <<0>>

Specifies the number of operation codes to be output to the SQL trace file. SQL trace acquisition stops when information has been output for the specified number of operation codes.

When this option is omitted, the command outputs SQL trace information until a pdclttrc command with the -e option specified is executed or until DISCONNECT is executed.

When this option is specified together with the -e option, this option is ignored.

-o SQL-trace-file-size<unsigned integer> ((0,4096-2000000000)) <<32768>>

Specifies in bytes the size of the SQL trace file.

When 0 is specified, the maximum file size is assumed.

When this option is specified together with the -e option, this option is ignored.

Rules

The pdclttrc command can be executed only when HiRDB is running.

The pdclttrc command must be executed at the server machine that contains the single server or where the system manager is located.

The pdclttrc command acquires a SQL trace only if the connected client version is 07-01 or later.

When the pdclttrc command is executed, it starts acquisition of the SQL trace for the SQL statement that is currently being processed; however, the command does not display the following information for this SQL statement:

SQL start time

SQL runtime that is displayed when PDSQLEXECTIME=YES is specified in the client environment definition

SQL runtime and differential information, which are output to the UAP statistical report for each SQL statement

The SQL trace file and UAP statistical report are output to the directory specified in the PDCLTPATH client environment definition. When PDCLTPATH is omitted, the SQL trace file is output to the directory that is the current directory for UAP execution.
If both the -l option and the PDREPPATH client environment definition are specified, the SQL trace file is output to the directory specified in PDREPPATH.
The following table shows the output destination of an SQL trace file when the -l option is specified:

PDCLTPATH | PDREPPATH | Output destination of SQL trace file
Omitted | Omitted | Current directory
Specified | Omitted | Directory specified in PDCLTPATH
Omitted | Specified | Directory specified in PDREPPATH
Specified | Specified

When the -l option is specified, the command does not output information from prior to the command's execution because the information for each UAP statement begins with the beginning of the command.

The names of the SQL trace files that are output are pdxxxxxxxxyyyyyyyyyy-1.trc and pdxxxxxxxxyyyyyyyyyy-2.trc.
xxxxxxxx: Server name (1 to 8 characters)
yyyyyyyyyy: Server process ID (1 to 10 decimal digits)

If an SQL trace has already been acquired at the client, the pdclttrc command is ignored, if executed.

If the pdclttrc command is executed while another pdclttrc command is executing, a message is displayed indicating that an SQL trace is being acquired for the current process.

Notes

If connection is broken for a reason such as a communication error or DISCONNECT, or if SQL trace information has been output for the number of operation codes specified in the -n option, SQL trace acquisition terminates automatically.

The following are the pdclttrc command's return codes:
0: Normal termination
8: Error termination

pdcmt (Commit transactions)

Function

The pdcmt command forcibly commits transactions when none of the transactions that are part of a global transaction could be concluded (for example, because of a communications error). All the transactions in the global transaction must be committed, otherwise they will not be synchronized.

The pdcmt command is used to forcibly commit transactions that are shown in the status information displayed by the pdls -d trn command as being in READY status (Status 1) and p status (Status 2).

Executor

HiRDB administrator

Format

pdcmt {-x host-name | -u unit-identifier} [-s server-name]
     {-A | -t transaction-identifier}

Options

{-x host-name | -u unit-identifier}

Specifies the identifier of the unit or the name of the host in which the transactions to be committed are located.

-x host-name<identifier> ((1-32))

Specifies the name of the host in which the transactions to be committed are located.

-u unit-identifier<identifier> ((4 characters))

Specifies the identifier of the unit in which the transactions to be committed are located.

-s server-name<identifier> ((1-8))

Specifies the server name when the unit has multiple servers. If this option is omitted, all servers in the object host are subject to the pdcmt command.

-A

Specifies that all transactions in the server specified by the -s option that are in READY status and recovery waiting status are to be committed.

-t transaction-identifier<alphanumeric characters> ((16 characters))

Specifies that the transaction identifier of a transaction in READY status and recovery processing waiting status is to be committed.

Rules

The pdcmt command can be executed only while HiRDB is active.

Execute the pdcmt command at each server machine. Note that you cannot execute this command at the server machine on a utility special unit.

Notes

The results of the pdcmt command can be checked on the basis of the return code from execution of the pdls command (with -d trn specified) or by checking for any error messages. Return code 0 for the pdcmt command indicates normal termination, and return code 1 indicates abnormal termination (such as an invalid option or rsh error).

Forced commit may not be possible for a transaction that is connected to a recovery-unnecessary front-end server and executed, even if transaction status 1 is READY and transaction status 2 is p. In such a case, you must complete the transaction automatically; for details about how to complete a transaction that is in uncompleted status for transaction determination, see the manual HiRDB Version 8 System Operation Guide.

pdconfchk (Check system definitions)

Function

Checks the contents of system definitions that are required in order to start HiRDB.

If there is an error in the system definitions, the command displays the erroneous definition along with the details.

Executor

HiRDB administrator

Format

pdconfchk [-d subdirectory-name] [-n] [-l]

Option

-d subdirectory-name<path name>

Specifies the subdirectory that contains the HiRDB system definition file to be checked, expressed as a path name relative to $PDDIR/conf or $PDCONFPATH. $PDDIR/conf is the directory that contains unit control information definition files. $PDCONFPATH is the directory that contains other HiRDB system definition files.

The following table shows the locations of the HiRDB system definition files that can be checked:

Type of HiRDB system definition file | -d option specified | -d option omitted
Unit control information definition file | $PDDIR/conf/ | $PDDIR/conf/subdirectory/
Other file | $PDCONFPATH/ | $PDCONFPATH/subdirectory/

Criteria

Before changing the HiRDB system definitions for the current environment, you should save the new HiRDB system definitions in a subdirectory and check them. This enables you to check the modified HiRDB system definitions before proceeding.

Rules

Create in advance the subdirectory that will be specified.

Store in the subdirectory not only the modified HiRDB system definition file but all HiRDB system definition files.

For a HiRDB/Single Server, the same path name is set in $PDDIR/conf and $PDCONFPATH.

For a HiRDB/Parallel Server, the path name pointed to by $PDDIR/conf and $PDCONFPATH may be different (for example, when the HiRDB system definition file is shared). In this case, create a subdirectory with the same name on both paths.
If the $PDDIR/conf and $PDCONFPATH settings are different for each unit, create the subdirectory under $PDDIR/conf and $PDCONFPATH and then store the HiRDB system definition files in the subdirectories.

The maximum lengths of $PDDIR/conf/subdirectory and $PDCONFPATH/subdirectory are 220 bytes. Make sure that the name does not exceed 220 bytes.

To check the system definitions that are to be changed by the pdchgconf command, store the new system definition files in $PDDIR/conf/chgconf and then specify -d chgconf when you execute the pdconfchk command.

-n

Specifies that checking of the system files and access permissions is to be skipped. Use this option when the system files have not been created by the pdfmkfs or pdloginit command.

-l

When Real Time SAN Replication based on the log-only synchronous method is used, this option specifies that the status file for log application processing and the synchronization point dump file for log application processing, which are required for log application processing, are to be included as targets for system file checking as well as for access privilege checking.

The -l option can be specified only when all of the conditions listed below are satisfied; if any of these conditions is not satisfied, the pdconfchk command terminates with an error:

Y is specified in the pd_rise_use operand in the system definition.

syssync is specified in the pd_rise_pairvolume_combination operand in the system definition.

data or never is specified in the pd_rise_fence_level operand in the system definition.

Information subject to checking

Syntax checking
The command outputs the result of syntax checking to the standard output and standard error output.

Checking for system files

The command checks for any system log file, synchronization point dump file, or status file.

Checking for access privilege

The command checks to see if the HiRDB administrator can access HiRDB files.

Checking for duplicated system files

The command checks the system log files, synchronization point dump files, and status files for any duplication.

Checking for hosts

The command checks to see if the host names are specified in the HOSTS file.

Checking between server machines (applicable to HiRDB/Parallel Server)

The command checks between server machines based on the system manager's server machine.

For details about the operands in the system definition that can be checked by the pdconfchk command, see Operands Checked by the pdconfchk Command in the manual HiRDB Version 8 System Definition.

Rules

You can execute the pdconfchk command whether or not HiRDB is active.

You can execute the pdconfchk command on the server machine containing the single server or the server machine where the system manager is located.

Notes

If the command does not detect any error in the system definitions, it displays KFPS05007-I return code=0 and terminates itself. If the command detects an error, it displays KFPS05007-I return code=8 and terminates itself.

During checking between server machines, the command ignores any comment section (any text following *) or any comment line.

If the command detects an error during checking between server machines, check the contents of the system definitions in the server machine where the system manager is located. There may be an error in the system definitions in this server machine.

During checking between server machines, the command ignores any tab or space that follows a definition statement. Tabs and spaces preceding a definition statement are subject to checking.

During checking between server machines, if the order of definitions does not match between system manager definitions and other definitions, the command treats some of the definitions with a wrong sequence as errors.

Example:

System manager definitions Other definitions

A B

B A

The command treats system manager definition B and other definition B as different definitions.

Return code 0 for the pdconfchk command indicates normal termination, and return code 8 indicates abnormal termination (such as an invalid argument or a pdconfchk command execution error).

If the pdconfchk command displays the KFPY01012-E message, the command may terminate with KFPS05007-I return code=0. In this case, eliminate the cause of the error.

When execution of the pdconfchk command results in the KFPS05062-W message, the pdconfchk command terminates with KFPS05007-I (return code=0).

Even when the pdconfchk command's execution was successful, the KFPO00107-E message may be displayed. To determine the result of definition checking by the pdconfchk command, check the KFPS05007-I message.

Output format

<Checking for system files or access privilege>
[aa...a]
 bbbb    cc...c    dd...d    ee...e
<Checking for duplicate system files>
[aa...a]
 bbbb    cc...c    dd...d    ee...e
 bbbb    cc...c    dd...d    ee...e
<Checking for hosts>
[aa...a]
 bbbb    cc...c    dd...d    ff...f
<Checking between server machines (applicable to HiRDB/Parallel Server)>
[aa...a]
<gggg:hhhh>
 gggg;  cc...c;  line = iii <- hhhh;  cc...c;  nothing
 gggg;  cc...c;  nothing  -> hhhh;  cc...c;  line = iii

Explanation

aa...a

Type of error detected in the checked item:

File not found

File was not found. Possible reasons:

The specified path name contains invalid characters.

The HiRDB file name is too long (more than 30 characters).

File invalid

File is invalid.

No Permission

There is no permission.

Duplicate filename

File name is duplicated.

Hosts name not matched

Host name does not match.

Different definition

Definitions do not match between the system manager unit and non-system manager unit.

bbbb

Unit identifier

cc...c

Name of the system definition file

dd...d

Operand specification

ee...e

File name specified in the operand shown as dd...d (absolute pathname)

ff...f

Defined host name if dd...d is pdstart, pdunit, or pd_hostname

gggg

Identifier of the unit that contains the system manager

hhhh

Identifier of the unit that contains other than the system manager

iii

Line number in the system definition file

Output example

[File not found]
unt1   pdutsys   pd_syssts_file_name_1
       /dev/rdsys011/ut1sts1a                   ...1
[File invalid]
unt1   pdutsys   pd_syssts_file_name_3
       /users/yyy/pddir                         ...2
[No permission]
unt1   bes1   pd_sts_file_name_1
       /dev/rdsys011/bes1sts1a                  ...3
[Duplicate filename]
unt1   fes1   pdlogadpf -d sys -g fes1log1 -a
       /dev/rdsys011/fes1log1                   ...4
unt1   fes1   pdlogadpf -d sys -g fes1log1 -b
       /dev/rdsys011/fes1log1                   ...4
unt1   bes1   pdlogadpf -d spd -g bes1spd1 -a
       /dev/rdsys011/fes1log1                   ...4
[Hosts name not matched]
unt1   pdsys     pdstart -x
       dcm3500                                  ...5
[Different definition]
<unt1:unt2>
unt1   pdsys    line = 2   -> unt2   pdsys
     nothing                                    ...6
unt1   pdsys    nothing    <- unt2   pdsys
     line = 5                                   ...7

Explanation

The file that was specified in the pd_syssts_file_name_1 operand for pdutsys on unt1 was not found.

The file specified in the pd_syssts_file_name_3 operand for pdutsys on unt1 is invalid.

There is no access privilege for the file specified in the pd_sts_file_name_1 operand for bes1 on unt1.

The file name specified in the pdlogadpf -d sys -g fes1log1 -a operand for fes1 on unt1 is the same as the following file names:

File name specified in the pdlogadpf -d sys -g fes1log1 -b operand for fes1 on unt1

File name specified in the pdlogadpf -d spd -g bes1spd1 -a operand for bes1 on unt1

Host name for unt1 does not match the host name specified in the pdstart -x dcm3500 operand for pdsys on unt1.

Definition in line 2 for pdsys on unt1 is not found in pdsys on unt2.

Definition in line 5 for pdsys on unt1 is not found in pdsys on unt1.

Examples

This example changes system definitions of the current HiRDB/Parallel Server (consisting of units 1 and 2). The HiRDB system definition file to be changed is pdsvrc on unit 1.

Creates the subdirectory chk under $PDDIR/conf and $PDCONFPATH on units 1 and 2.

Copies pdutsys from $PDDIR/conf to $PDDIR/conf/chk/ on each unit.

Copies the HiRDB system definition files from $PDCONFPATH to $PDCONFPATH/chk/ on each unit.

Changes the definitions in $PDCONFPATH/chk/pdsvrc on unit 1.

Executes pdconfchk -d chk.*

Assuming there are no problems with the definitions, this example uses the pdstop command to execute normal termination or planned termination of HiRDB. Note that in the case of planned termination, some definitions cannot be changed.

Uses the pdlogunld command to unload the system log file in unload wait status.

Copies the HiRDB system definition file changed in step 4 to $PDCONFPATH.

Uses the pdstart command to start HiRDB normally.

* During execution of pdconfchk -d chk, the HiRDB system definition files are checked at the following locations:

pdcspool (Delete troubleshooting information)

Function

The pdcspool command deletes the troubleshooting information created by HiRDB in the spool ($PDDIR/spool directory) and the temporary work files created in the temporary work file storage directory ($PDDIR/tmp directory).

Executor

HiRDB administrator

Format

pdcspool [-i] [-d days] [-k type]

Options

-i

Specifies that when a file storing troubleshooting information is to be deleted, a prompt is to be returned to the standard output device requesting confirmation that the file is to be deleted (in the case of temporary work files, the option does not return a prompt). Responding with a y to the prompt causes the file to be deleted. The default is to delete the file without generating a prompt, in which case the name of the deleted file is output to the standard output device.

-d days <unsigned integer> ((0-24855)) <<1>>

This option makes files that were created 24 hours specified number of days from the time the pdcspool command was executed subject to deletion. If 10 is specified, all files created 240 or more hours before are subject to deletion.

If 0 is specified, all troubleshooting information in the spool and all temporary work files in the temporary work file storage directory are subject to deletion.

If all parameters are omitted, the troubleshooting information in the spool and the temporary work files in the temporary work file storage directory that were created 24 or more hours before are subject to deletion.

If you execute periodically commands that take a long time to execute, such as pdcopy and pdrstr, specify a value that provides sufficient time for the commands to be completed.

-k type

This option specifies the range of troubleshooting information to be deleted.

If this option is omitted, the command deletes all troubleshooting information except for the access path information. Note that you cannot specify this option for temporary work files.

all

Deletes all troubleshooting information including the access path information.

dump

Deletes the files internally collected by HiRDB (files other than the deadlock timeout information and access path information files).

Rules

The pdcspool command can be executed at any time, whether or not HiRDB is active.

The pdcspool command must be executed at each server machine.

Notes

Return code 0 or 4 for the pdcspool command indicates normal termination, and return code 12 indicates abnormal termination.

The pdcspool command may not delete a troubleshooting information file that was output by a command or utility executed by a user other than the HiRDB administrator. In such a case, the user with the deletion privilege for the troubleshooting information files must delete the file using the OS's rm command. However, do not delete the following directories and files in the temporary work file storage directory ($PDDIR/tmp directory):

home

pdommenv

Files whose names begin with CMb

If the TMPDIR environment variable has been specified, the temporary work files will be output to the directory specified in this environment variable, not to the $PDDIR/tmp directory. The temporary work files in the directory specified in the TMPDIR environment variable are not subject to deletion by the pdcspool command. Therefore, you need to delete these files directly using the OS's rm command.

The pdcspool command makes all files that were created by HiRDB in the spool ($PDDIR/spool directory) and the temporary work file storage directory ($PDDIR/tmp directory) subject to deletion. Therefore, any files created in those directories will be deleted together. The following table describes the directories that are subject to deletion:

Spool ($PDDIR/spool directory)

Directory
Description of output file
-k option
Remarks

all
dump
Omitted

pdsqldump
Access path information
Y
N
N
This is output when 1 or a greater value is specified in the PDVWOPTMODE client environment definition and then an SQL statement is executed.

pdlckinf
Deadlock/timeout information
Y
N
Y
This is output when an error occurs during lock control.

save
Save core file, etc.
Y
Y
Y
This is output upon abnormal termination of a process.

pdshmdump
Shared memory dump file
Y
Y
Y
This is output upon abnormal termination of a process or a unit.

pdsysdump(1,2)
Quick dump file
Y
Y
Y
None.

pdsdsdump(1,2)
Y
Y
Y
This is output in a HiRDB/Single Server.

pdfesdump(1,2)
pddicdump(1,2)
pdbesdump(1,2)
Y
Y
Y
This is output in a HiRDB/Parallel Server.

pdjnlinf
System log file status information file
Y
N
Y
Only files beginning with pdsnap. are deleted.

pdtrninf
Recovered transaction information file
Y
N
Y
This is output only when Real Time SAN Replication is used.

Legend:

Y: Deleted.

N: Not deleted.

Temporary work file storage directory ($PDDIR/tmp directory)
The command deletes everything except the following directories and files:

Directory name or file name | Description of output file
home | Current working directory of a process where HiRDB is run
pdommenv | Shared memory information file
File name beginning with CMb | Differential information file for the pdbufls command

pddbadset (Set up HiRDB External Data Access Adapter)

Function

The pddbadset command sets up HiRDB External Data Access Adapter in the HiRDB environment in order to use the HiRDB External Data Access facility. If the external DBMS is HiRDB Version 5.0, HiRDB Version 7, or XDM/RD E2, HiRDB External Data Access Adapter is included in HiRDB External Data Access.

When you execute the pddbadset command, files are copied from the installation directory to the HiRDB environment ($PDDIR/adapter). One execution of the pddbadset command sets up a single HiRDB External Data Access Adapter.

This command also enables you to cancel the setup of an existing HiRDB External Data Access Adapter.

You can use the pddbadset command only if HiRDB External Data Access has been installed.

Executor

HiRDB administrator

Format

pddbadset {HiRDB-External-Data-Access-Adapter-name installation-directory-name

            |-d HiRDB-External-Data-Access-Adapter-name}

Options

-d HiRDB-External-Data-Access-Adapter-name

Specifies the name of the HiRDB External Data Access Adapter whose setup is to be cancelled. When you cancel the setup of the existing HiRDB External Data Access Adapter, the shared library for the HiRDB External Data Access Adapter is deleted from the HiRDB environment.

Command arguments

HiRDB-External-Data-Access-Adapter-name

Specifies the name of the HiRDB External Data Access Adapter to be set up. Note that an attempt to set up again at a server machine an existing HiRDB External Data Access Adapter results in abnormal termination.

hiv6:

Specifies that the DBMS is HiRDB or XDM/RD E2. With XDM/RD E2, the XDM/RD E2 connection facility is used to establish connection from the HiRDB client to XDM/RD E2 via a DB connection server.

orav8:

Specifies that the DBMS is Oracle 8i.

orav9:

Specifies that the DBMS is Oracle 9i.

orav10:

Specifies that the DBMS is Oracle 10g.

db2udbv6:

Specifies that the DBMS is DB2. Note that this argument is not applicable in the Solaris or Linux version.

installation-directory-name

Specifies the name of the directory that contains the files of the HiRDB External Data Access Adapter installed on the server machine.

Rules

The pddbadset command can be executed only while HiRDB is inactive.

The pddbadset command must be executed at each server machine.

Notes

The result of the pddbadset command can be checked on the basis of the return code from execution of the command. A return value of 0 indicates normal termination, and 8 indicates abnormal termination.

Do not execute multiple pddbadset commands concurrently on the same server machine.

If there is no $PDDIR/adapter directory during execution of the pddbadset command, the $PDDIR/adapter directory is created automatically.

pddbchg (Change the replica status of replica RDAREAs)

Function

The pddbchg command changes the replica status of replica RDAREAs (from sub-RDAREA to current RDAREA).

You can use the pddbchg command when HiRDB Staticizer Option has been installed.

Executor

HiRDB administrator

Format

pddbchg -q generation-number -r {RDAREA-name[,RDAREA-name]...|ALL} [-w]

Options

-q generation-number<unsigned integer> ((0-10))

Specifies the generation number of RDAREAs that are to be current RDAREAs.

-r {RDAREA-name[,RDAREA-name]...|ALL}

RDAREA-name<identifier> ((1-30))

Specifies the original name of an RDAREA that is to be a current RDAREA. You can specify user RDAREAs and user LOB RDAREAs. You can also use batch specification of RDAREA names. For details about batch specification of RDAREA names, see 1.5.2 Batch specification of RDAREA names in operation commands.

ALL

Specifies that all replica RDAREAs with the generation number specified in the -q option are to be switched to current RDAREAs.

Rules

If the same RDAREA name is specified more than once, the duplicate RDAREA name is ignored.

You can specify a maximum of 128 RDAREA names. If more than 128 RDAREA names are specified, the excess names are ignored.

If an RDAREA name is enclosed in double quotation marks ("), the system treats it as being case sensitive; otherwise, the system treats it as all uppercase letters. If an RDAREA name contains a space, enclose the entire name in double quotation marks ("). If you are using sh (Bourne shell), csh (C shell), and ksh (Korn shell), you must enclose the entire set of RDAREA names in single quotation marks (').

-w

Specifies that if a specified RDAREA is locked, the command is to wait until the RDAREA is unlocked or until the value specified in the pd_lck_wait_timeout operand of the system definition operand is reached.

If you omit this option and a specified RDAREA is locked by another transaction, the command terminates with an error.

Rules

The pddbchg command can be executed only while HiRDB is active.

The pddbchg command must be executed at the server machine that contains the single server or where the system manager is located.

When you execute the pddbchg command, the data dictionary RDAREA must be in one of the following statuses:

Open and shutdown release status

Open, and with shutdown status placed by the pdhold command

The pddbchg command enables you to change a current RDAREA regardless of the status of the RDAREA because the command does not check the status of the existing and new current RDAREAs.

You cannot use the pddbchg command on an original RDAREA that employs updatable online reorganization.

If the pddbchg command is executed on a shared RDAREA, all back-end servers are locked. If there can be multiple concurrent accesses to the corresponding RDAREA, global deadlock may occur, resulting in a timeout. If global deadlock has occurred, re-execute the pddbchg command.

Notes

The result of the pddbchg command can be checked by the pddbls command.

The pddbchg command locks the data dictionary table, inner replica configuration, and the specified RDAREAs. While the pddbchg command is executing, an attempt to access an RDAREA at the corresponding server results in wait status due to the locked inner replica resources. For details about the lock, see B.1 Lock mode for operation commands.

The following describes the relationship among the pddbchg command, transactions, and utilities in terms of the lock-release wait status:

pddbchg command processing when another transaction or utility is accessing the current RDAREA
When the -w option is specified
The pddbchg command is placed in lock-release wait status for all locked resources until the value specified in the pd_lck_wait_timeout system definition operand is reached or the transaction accessing the resources terminated.
When the -w option is not specified
The pddbchg command terminates with an error if another transaction is accessing the data dictionary table, the server containing a specified original RDAREA, a new current RDAREA, or an existing current RDAREA.

Other transaction's or utility's processing when the pddbchg command is accessing the current RDAREA
Another transaction or utility is placed in wait status until the pddbchg command terminates or the value specified in the pd_lck_wait_timeout system definition operand or the PDCWAITTIME client environment definition operand is reached.

When the pddbchg command is executed, deadlock may occur for a referencing or updating transaction. By specifying pd_deadlock_priority_use=Y in the system definition and a deadlock priority value in the pd_command_deadlock_priority operand, you can specify whether the referencing or updating transaction or the operation command is to take control in the event of deadlock.

If an error occurs during pddbchg command processing, the processing is cancelled for each server that contains an RDAREA being processed. If this happens, the pddbchg command resumes processing at the other servers.

The following shows the pddbchg command's return code:
0: Normal termination
4: Warning termination (some RDAREA processing terminated with an error)
8: Abnormal termination
12: Abnormal termination (an event occurred that prevented output of the error message)
If the error code is 12, check the error message in syslogfile at the host where the single server or dictionary server is located, eliminate the cause of the error, and then re-execute the command. If no error message has been output to syslogfile, contact the customer engineer.

pddbfrz (Place a full HiRDB file in a user LOB RDAREA in frozen update status)

Function

The pddbfrz command places a full HiRDB file (used through the last page of the file) that constitutes a user LOB RDAREA in frozen update status. You cannot update or delete LOB data in a HiRDB file that is in frozen update status.

Use this command to back up data without using pdcopy.

Executor

HiRDB administrator

Format

pddbfrz [-d] -r {RDAREA-name[,RDAREA-name]...|ALL} [-q generation-number]

Options

-d

Specifies that HiRDB files are to be released from frozen update status.

When this option is omitted, the command places full HiRDB files in frozen update status. Note that you cannot place the first HiRDB file in an RDAREA in frozen update status.

-r {RDAREA-name[,RDAREA-name]...|ALL}

RDAREA-name<identifier> ((1-30))

Specifies the names of the RDAREAs that are to be placed in the frozen update status or released from frozen update status. You can specify only the names of user LOB RDAREAs.

You can also use batch specification of RDAREA names. For details about batch specification of RDAREA names, see the 1.5.2 Batch specification of RDAREA names in operation commands.

ALL

Specifies that all user LOB RDAREAs are to be placed in the frozen update status. When the -d option is specified, the command releases all user LOB RDAREAs from frozen update status.

Note that when the -q option is specified, the command processes the user LOB RDAREA with the specified generation number.

Rules

An error results if a specified RDAREA is not a user LOB RDAREA, a specified user LOB RDAREA contains a plug-in index, or a specified user LOB RDAREA is unused.

If you are using the inner replica facility, you can also specify original and replica RDAREAs.

If the same RDAREA name is specified more than once, the duplicate RDAREA name is ignored.

You can specify a maximum of 128 RDAREA names. If more than 128 RDAREA names are specified, the excess names are ignored.

If an RDAREA name is enclosed in double quotation marks ("), the system treats it as being case sensitive; otherwise, the system treats it as all uppercase letters. If an RDAREA name contains a space, enclose the entire name in double quotation marks ("). If you are using sh (Bourne shell), csh (C shell), or ksh (Korn shell), you must enclose the entire set of RDAREA names in single quotation marks (').

-q generation-number<unsigned integer> ((0-10))

Specifies a generation number for a replica RDAREA.

When you specify this option, make sure that an original RDAREA is specified in the -r option. An error results if you specify an original RDAREA whose replica RDAREAs have all been deleted or if you specify a regular RDAREA (one without a replica RDAREA).

Rules

The pddbfrz command can be executed only while HiRDB is active.

The pddbfrz command must be executed at the server machine that contains the single server or where the system manager is located.

When you execute the pddbfrz command, the user LOB RDAREA must be in one of the following statuses:

Open and shutdown release status

Open, and shutdown status placed by the pdhold command

The pddbfrz command locks a specified RDAREA. If you execute the pddbfrz command to process an RDAREA that is being accessed by another transaction, the command is placed in wait status until that transaction terminates.

Executing the pddbfrz command does not place the first HiRDB file in an RDAREA in frozen update status because this file contains HiRDB management records.

You can place only HiRDB files that are filled with data in frozen update status. If a HiRDB file is not full during command execution, it will not be placed in frozen update status later when it becomes full of data.

The pddbfrz command is not applicable to RDAREAs that employ updatable online reorganization.

Notes

The result of the pddbfrz command can be checked by the pddbst command.

If you want to update data in a HiRDB that is in frozen update status or if you need to access such an RDAREA for reasons such as reorganization with pdrorg, use the pddbfrz -d command to release the HiRDB file from frozen update status. After updating the RDAREA, back up all HiRDB files again.

The following shows the pddbfrz command's return codes:
0: Normal termination
4: Warning termination (some RDAREA processing terminated with an error)
8: Abnormal termination
12: Abnormal termination (an event occurred that prevented output of an error message)
If the error code is 12, check the error message in syslogfile at the host where the single server or dictionary server is located, eliminate the cause of the error, and then re-execute the command. If no error message has been output to syslogfile, contact the customer engineer.

pddbls (Display status of RDAREAs)

Function

The pddbls command displays the status of RDAREAs.

Executor

HiRDB administrator

Format

HiRDB/Single Server

pddbls {{-r RDAREA-name [, RDAREA-name]... | -r ALL}
         [-{l | a}] [-{b|o}][-x[-y]]
       |{-q generation-number|-C} [-{l | a}][-x[-y]]}

HiRDB/Parallel Server

pddbls {{-r RDAREA-name [, RDAREA-name]... | -r ALL
         | -s server-name [, server-name]...}
         [-{l | a}] [-{b|o}][-m][-x[-y]]
       |{-q generation-number|-C} [-{l | a}][-m][-x[-y]}

Options

-r RDAREA-name<identifier> ((1-30))

Specifies the name of an RDAREA whose status is to be displayed. You can also use batch specification of RDAREA names. For details about batch specification of RDAREA names, see 1.5.2 Batch specification of RDAREA names in operation commands.

The same RDAREA name should not be specified more than once; if specified, a duplicate RDAREA name is ignored. A maximum of 128 RDAREA names can be specified. If more than 128 RDAREA names are specified, the excess names are ignored.

If an RDAREA name is enclosed in double quotation marks ("), it is treated as being case sensitive; otherwise, it is treated as all uppercase letters. If an RDAREA name contains a blank, the entire name must be enclosed in double quotation marks (").

If the Bourne shell (sh), C shell (csh), or Korn shell (ksh) is used, it is also necessary to enclose the RDAREA name in single quotation marks (').

-r ALL

Specifies that information about all RDAREAs is to be displayed.

-s server-name<identifier> ((1-8))

Specifies the name of a server when the status of all of that server's RDAREAs is to be displayed. The command displays information about all RDAREAs for the specified server.

A maximum of 128 server names can be specified. If more than 128 server names are specified, the excess names are ignored.

-{l | a}

-l

Specifies that only the RDAREA status is to be displayed.

-a

Specifies that all information about RDAREAs other than shared RDAREAs is to be displayed.

When the -m option is specified, the command displays shared RDAREA information for all servers. Note that the segment usage information in a shared RDAREA is displayed only for an updatable back-end server.

-b

Specifies that information is to be displayed only for RDAREAs in shutdown status. When a server name is specified, the command displays information about the RDAREAs in shutdown status for the specified server only. When this option is omitted, the command displays information about all specified RDAREAs.

-o

Specifies that the status of all RDAREAs with the same original RDAREA as the specified RDAREA is to be displayed.

The -o and -b options are mutually exclusive. If you specify -r ALL or -s server-name, the command displays the same information whether or not this option is specified.

-x

Specifies that the information is to be displayed in DAT format.

-y

When the -x option is specified, specifies that a header is to be displayed.

-m

Specifies that shared RDAREA information is to be displayed.

When a shared RDAREA is specified in the -r option and the -m option is also specified, the command displays the applicable RDAREA and shared RDAREA information for all back-end servers.

-q generation-number

Specifies that the status of all RDAREAs with the specified generation number is to be displayed. Specify this option to display information about RDAREAs for which replica RDAREAs have been defined in an environment where the inner replica facility is used.

The -q, -b, and -o options are mutually exclusive.

-C

Specifies that the status of all current RDAREAs is to be displayed. Specify this option to display information about RDAREAs for which replica RDAREAs have been defined in an environment where the inner replica facility is used.

The -c, -b, and -o options are mutually exclusive.

Rules

The pddbls command can be executed only while HiRDB is active.

The pddbls command must be executed at the server machine containing the single server or the server machine where the system manager is located.

When a user RDAREA or a user LOB RDAREA is specified, the corresponding data dictionary RDAREA must be in one of the following statuses:

Open and shutdown release status

Open and shutdown status placed by the pdhold command

Notes

The following shows the pddbls command's return codes:
0: Normal termination
4: Warning termination
8: Abnormal termination
12: Abnormal termination (an event occurred that prevented output of an error message)
If the error code is 12, check the error message in syslogfile at the host where the single server or dictionary server is located, eliminate the cause of the error, and then re-execute the command. If no error message has been output to syslogfile, contact the customer engineer.

Output format

STATE OF RDAREA
RDAREA ID     STATUS  [SERVER] TYPE [ORIGINAL-RDAREA] [ORIGINAL-ID]    [GENERATION-NUMBER]
              OPNMODE [SHARED]                        [REPLICA-STATUS] [REPLICA-COUNTER]
aa...a bb...b cc...c  dd...d  eeee  kk...k            ll...l           mm
              jj...j  ppp                             n                oo
 [SEGMENT   ff...f/gg...g]
 [UNABLE TO DISPLAY CODE=hh]
    :    :   :
 [NOT FOUND ii...i=aa...a]
 [RDAREA NOT FOUND]
 [NO REPLICA DEFINED ii...i=aa...a]
 [NO SPECIFIED GENERATION]

Note

kk...k, ll...l, mm, n, oo, [NO REPLICA DEFINED ii...i=aa...a], and [NO SPECIFIED GENERATION] are displayed only in an environment in which the inner replica facility is used. In any other environment, this information is not displayed.

Explanation

aa...a

RDAREA name (up to 30 characters).

bb...b

RDAREA number (11 decimal digits).

cc...c

Status of RDAREA (up to 17 characters). The following statuses are displayed for RDAREAs:

RDAREA status | Explanation | Segment information
CLOSE | Closed | DS
CLOSE HOLD | Closed, error shutdown |
CLOSE HOLD (RIS E) | Closed, error shutdown (log application-disabled status due to a failure) |
CLOSE HOLD (RIS L) | Closed, error shutdown (UAP in no-log mode, log application-disabled status due to utility execution) |
CLOSE HOLD (RIS M) | Closed, error shutdown (log application-disabled status due to pdmod) |
CLOSE HOLD (INQ) | Closed, reference-possible command shutdown |
CLOSE HOLD (CMD) | Closed, command shutdown |
CLOSE HOLD (BU) | Closed, updatable backup-hold | D
CLOSE HOLD (BU I) | Closed, reference-possible backup-hold | D
CLOSE HOLD (BU W) | Closed, updatable backup-hold (WAIT mode) | D
CLOSE HOLD (BU IW) | Closed, reference-possible backup-hold (update WAIT mode) | D
CLOSE HOLD(SYNC) | Closed, synchronization shutdown |
CLOSE HOLD(ORG) | Closed, online reorganization hold |
CLOSE ACCEPT-HOLD | Closed, pdhold command-accepted |
HOLD | Error shutdown |
HOLD(INQ) | Reference-possible command shutdown | D¹
HOLD(CMD) | Command shutdown | D¹
HOLD (BU) | Updatable backup-hold | D
HOLD (BU I) | Reference-possible backup-hold | D
HOLD (BU W) | Updatable backup-hold (WAIT mode) | D
HOLD (BU IW) | Reference-possible backup-hold (update WAIT mode) | D
HOLD(SYNC) | Synchronization shutdown |
HOLD(ORG) | Online reorganization hold | D
HOLD (RIS E) | Error shutdown (log application-disabled status due to a failure) |
HOLD (RIS L) | Error shutdown (UAP in no-log mode, log application-disabled status due to utility execution) |
HOLD (RIS M) | Error shutdown (log application-disabled status due to pdmod) |
ACCEPT-HOLD | pdhold command-accepted | D¹
OPEN | Open | D

D: Displayed

DS: Displayed when RDAREA open timing is set to DEFER or SCHEDULE.

: Not displayed.

1 Segment information is not displayed during close processing.

dd...d

Server name for HiRDB/Parallel Server (up to 8 characters).

eeee

Type of RDAREA:

MAST

Master directory RDAREA

DDIR

Data directory RDAREA

DDIC

Data dictionary RDAREA

DLOB

Data dictionary LOB RDAREA

USER

User RDAREA

ULOB

User LOB RDAREA

LIST

List RDAREA

RGST

Registry RDAREA

RLOB

Registry LOB RDAREA

ff...f

Number of unused segments in RDAREA (11 decimal digits).

For a LOB RDAREA, the next segment is included in the number of unused segments, but it cannot be reused until the synchronization point is reached. Once the synchronization point is reached, it can be reused.

Segments that stored data of the BLOB type that has been deleted by a DELETE statement.

For BLOB-type data updated by the UPDATE statement, the segments that stored the data before the updating was performed.

Segments that stored BLOB-type dictionary data deleted by a change procedure, such as DROP PROCEDURE or DROP SCHEMA.

gg...g

Total number of segments in RDAREA (11 decimal digits).

hh

Return code. The following return codes are displayed:

Return code | Explanation | Required action
01 | RDAREA is in a status such that no information can be displayed (see cc...c for the RDAREA status). | Not applicable.
02 | Information on an RDAREA cannot be displayed because the RDAREA is being accessed in the lock mode by another transaction. | Re-execute the command after the transaction that is accessing the RDAREA in the lock mode has terminated.
03 | No global buffer was allocated to the RDAREA. | Allocate a global buffer, then re-execute the command.
04 | HiRDB file access error occurred. | Take action appropriate to the corresponding error message.
05 | Lock error occurred.
101 | Invalid RDAREA type was specified. | Check for a specification error; if there was no error, contact maintenance personnel.

ii...i

For an RDAREA, RDAREA is displayed; for a server, SERVER is displayed (six characters).

jj...j

User-specified open timing for the HiRDB file system area. This is the HiRDB file system area's open timing specification (INITIAL, DEFER, or SCHEDULE) that was specified in the system common definition or with the database initialization utility or database structure modification utility.

kk...k

Name of the original RDAREA (maximum of 30 characters).

ll...l

Number of the original RDAREA (8 decimal digits).

mm

Generation number (0-10).

n

Replica status (C: current, S: sub).

oo

Replica counter (1-10).

This information is displayed for an original RDAREA.

ppp

Shared RDAREA information (applicable when the -m option is specified):

SUP: Shared RDAREA (updatable back-end server)

SRD: Shared RDAREA (reference-only back-end server)

NON: Non-shared RDAREA

When the -m option is omitted or for a HiRDB/Single Server, neither a header nor shared RDAREA information is displayed.

Notes

If a specified RDAREA is not found, the message NOT FOUND RDAREA= is displayed.

If a specified server is not found, the message NOT FOUND SERVER= is displayed.

When the -b option is specified but there is no RDAREA in shutdown status, or when there are no RDAREAs for a server specified in the -s option, the message RDAREA NOT FOUND is displayed.

When the -a option is specified but the information cannot be displayed, the message UNABLE TO DISPLAY CODE=hh is displayed.

If the -q or -C option is specified but no replica RDAREA has been defined, or if the -o option is specified but a normal RDAREA (for which no replica RDAREA has been defined) is specified, the command displays [NO REPLICA DEFINED ii...i=aa...a]. If the -o option is specified, the command also displays the RDAREA name.

If there is no such replica RDAREA whose generation number is specified in the -q option, the command displays [NO SPECIFIED GENERATION].

DAT output format (when -x and -y options are specified)

"RDAREA","ID","STATUS","UNUSED_SEGMENT","TOTAL_SEGMENT","SERVER","TYPE","OPNMODE","ORIGINAL-RDAREA",
"ORIGINAL-ID","GENERATION-NUMBER","REPLICA-STATUS","REPLICA-COUNTER","SHARED"[CR]
"aa...a",bb...b,"cc...c",ff...f,gg...g,"dd...d","eeee","jj...j","kk...k",
ll...l,mm,"n",oo,"ppp"[CR]

Note

[CR] indicates a linefeed.

Rules for output in DAT format

The elements are separated by the comma (,), and information about one RDAREA is displayed on each line.

A character element is enclosed in double quotation marks (").

If information cannot be acquired for a reason regarding, for example, the options that are specified, the inner replica facility usage specification, or the server type, the command displays only a blank or "".

If the -a option was specified but segment information cannot be acquired due to its status, the command displays -1 as the number of unused segments in the RDAREA and the return code for the total number of segments in the RDAREA.

When information is displayed in DAT format, the following error messages are not output:
[NOT FOUND ii...i=aa...a]
[RDAREA NOT FOUND]
[NO REPLICA DEFINED ii...i=aa...a]
[NO SPECIFIED GENERATION]

pddefrev (Generate definition SQL)

Function

The pddefrev command generates a definition SQL for tables, indexes, view tables, alias tables, stored procedures, and triggers defined in the HiRDB system.

The generated definition SQL can be used as an input to the database definition utility. This command generates the definition SQL by starting the dictionary import/export utility (pdexp) internally.

Executor

User with DBA privilege

Format

pddefrev -f control-statements-filename
        -o definition-SQL-output-filename
       [-w work-directory-name]

Options

-f control-statements-filename<pathname> ((up to 1023 bytes))

Specifies the name of the control statements file that contains the tables and stored procedures for which the definition SQL is to be generated. For details about the contents of the control statements file, see Chapter 9. Dictionary Import/Export Utility (pdexp).

-o definition-SQL-output-filename<pathname> ((up to 1023 bytes))

Specifies the absolute pathname of the file to which the generated definition SQL is to be output. If the specified file already exists, HiRDB writes the generated definition SQL by overwriting the existing information; if the specified file does not already exist, HiRDB creates it.

-w work-directory-name<pathname>

Specifies the absolute pathname of the directory to be used for temporary storage of the export file that will be created internally by the pddefrev command in order to export the dictionary. If this option is omitted, /tmp is assumed.

The following is the name of the export file that is created:

pddefrev.exp.HHMMSS

The local time is set in HHMMSS.

Rules

The pddefrev command can be executed only while HiRDB is active.

The pddefrev command must be executed at the server machine containing the single server or the server machine where the system manager is located.

To execute the pddefrev command, you must grant access permissions for the definition SQL output file and work directory to the HiRDB administrator beforehand.

Notes

The results of the pddefrev command can be checked on the basis of the return value and by whether or not there are any error messages. Return code 0 for the pddefrev command indicates normal termination, and return code 8 or 12 indicates abnormal termination.

Only one pddefrev command can be executed at a time. The command cannot be executed while the dictionary import/export utility is executing.

The following table lists the definition SQL statements that are generated by this command:

Type
Index definition
Comment definition
Definition SQL to be generated

Base table
Defined
Defined
CREATE TABLE
CREATE INDEX
COMMENT

Not defined
CREATE TABLE
CREATE INDEX

Not defined
Defined
CREATE TABLE
COMMENT

Not defined
CREATE TABLE

View table

Defined
CREATE VIEW
COMMENT

Not defined
CREATE VIEW

Alias table

CREATE ALIAS

Stored procedure

CREATE PROCEDURE

Trigger

CREATE TRIGGER

: Not applicable

The definition SQL statements are generated in the order specified in the control statements file.

A semicolon (;) is added at the end of the line of a generated definition SQL statement so that the definition SQL can be used as an input to the database definition utility. end_proc; is added in the case of CREATE PROCEDURE and CREATE TRIGGER.

Definition SQL statements involving any of the following tables, procedures, or functions are not generated:

Table definitions containing abstract data types (CREATE TABLE)

Index definitions specifying index types (CREATE INDEX)

Function definitions (CREATE FUNCTION and system-defined scalar functions)

Procedures specifying an abstract data type as a data type for a parameter in a procedure (CREATE PROCEDURE)

Procedures calling another procedure from within the procedure definition (CREATE PROCEDURE)

A procedure declared in an abstract data type (CREATE TYPE)

Procedures calling a function definition (CREATE FUNCTION or system-defined scalar function) from within the procedure definition

When CREATE PROCEDURE is created, the values of the SQL or extended SQL optimization options are generated in decimal format.

Linefeed is performed on the created definition SQL statement in accordance with a condition. For details about the linefeed condition, see 9.3(3) Rules for definition SQL generation.

If you select utf-8 as the character encoding in the pdsetup command, you can use a file with a BOM as the control statement file for pddefrev. Note that even when you do this, the BOM is skipped. No BOM is included in the file that is output by pddefrev.

pdfbkup (Back up HiRDB file system)

Function

The pdfbkup command makes a backup in a regular file of the HiRDB file system. Backups can also be made in units of HiRDB files.

During the backup processing, this command also backs up the attributes of the HiRDB file system (specified by the pdfmkfs command). Although the attributes are inherited, once a HiRDB file system is expanded, the pdfrstr command cannot restore the original size from a backup that was made before the expansion.

The number of added areas and the number of noncontiguous free areas can be determined by displaying the status of a HiRDB file system area (by entering the pdfstatfs command). The added areas and noncontiguous free areas can then be merged and the HiRDB file system area used more effectively by taking the following measures:

Back up the HiRDB file system (pdfbkup command)

Initialize the HiRDB file system area (pdfmkfs command)

Restore the backed up HiRDB file system to the initialized HiRDB file system (pdfrstr command)

Executor

HiRDB administrator

Format

pdfbkup  [-y]  [-r]  [-i]  [-{c|l|f}]
        HiRDB-file-system-area-name[/HiRDB-filename]
        backup-filename

Options

-y

Specifies that the HiRDB file system is to be backed up without obtaining user confirmation. When this option is omitted, the backup is made only after the user confirms the processing.

-r

Specifies that if a file with the specified backup file name already exists, it is to be deleted and re-created. When this option is omitted, an error occurs if a file with the specified backup file name already exists.

-i

Specifies that if an error occurs during backup of the HiRDB file system, the backup of the file where the error occurred is to be abandoned and processing is to continue with the next file. When this option is omitted, the command terminates with an error when an error occurs.

-{c|l|f}

Specifies the processing to be performed if another process or user is accessing the specified HiRDB file system area. Note that files cannot be backed up by the -c or -l option if the write privilege is not in effect for the source HiRDB file system area. When this is the case, specify the -f option.

-c

Cancel backup processing if another process or user is accessing the specified HiRDB file system area

-l

Do not make a backup of any HiRDB file currently being accessed by another process or user

-f

Execute backup processing even if another process or user is accessing the specified HiRDB file system area (files are backed up even when the write privilege is not in effect for the target HiRDB file system area)

Command arguments

HiRDB-file-system-area-name[/HiRDB-filename]

Specifies the name of the character special file or regular file that contains the HiRDB file system to be backed up and (optionally) the name of an HiRDB file.

HiRDB-file-system-area-name<pathname> ((up to 165 characters))

Specifies the name of the HiRDB file system area.

HiRDB-filename<HiRDB filename>

Specifies the name of an HiRDB file.

backup-filename

Specifies the name of the regular file in which the backup is to be made.

Rules

The pdfbkup command can be executed at any time, whether or not HiRDB is active. If you execute the command during operation, specify the -f option.

The pdfbkup command must be executed at each server machine where the HiRDB file system area is stored.

Only one HiRDB file system can be backed up into one regular file. Therefore, a commensurate number of regular files are needed in order to back up multiple HiRDB file systems.

The backup file is not created if an error occurs during backup processing.

A confirmation message is displayed when the -y option is omitted. The HiRDB file system is not backed up if any character other than G is entered in response to the confirmation message.

Before backing up a HiRDB file, use the pdfls command to check its record length. You cannot restore a HiRDB file if the record length of the backup HiRDB file is not a multiple of the sector length of the target HiRDB file system area.

If you are executing the command on an HiRDB file system area that is used for shared RDAREAs, execute it from the server machine where the updatable back-end server is located.

Notes

The execution results of the pdfbkup command can be confirmed by the return code after the command has executed and by whether or not there are any error messages. Return code 0 for this command indicates normal termination, 1 indicates warning termination, and -1 indicates abnormal termination.

If the pdfbkup command terminates abnormally, the backup file may have been created but its contents may not be valid.

If the HiRDB file system area or HiRDB file to be backed up is larger than 2GB, the target file must be created in a file system that can handle large files.

pdffsck (Check and repair the integrity of a HiRDB file system area)

Function

The pdffsck command checks a HiRDB file system area for integrity errors and repairs any errors that are detected. If an inconsistency is detected, the command displays the corresponding file or area.

You should execute the pdffsck command when either of the following occurs:

The KFPI21586-W message is displayed during execution of the pdfls command

The available space in the HiRDB file system area becomes less than the original capacity (for example, 100 gigabytes were allocated, but only 80 gigabytes are now available)

The following table describes the integrity check items and repair methods:

Target | Check item | Cause | Repair method
HiRDB file | Whether or not there are unusable HiRDB files | Cancellation of file creation or deletion processing | Manages the files as being in unused status and the allocated area as free area.
Area in a HiRDB file | Whether or not there is an area that is referenced neither from the free area list nor from the file management table | Cancellation of file extension (automatic extension) processing | Manages the isolated area as a free area.
Management information in the HiRDB file system area | Inconsistent statistical information stored in the management area of the HiRDB file system area | Cancellation of file creation or deletion processing | Correct the information, such as file count statistical information, when each check is completed.

Executor

Superuser and HiRDB administrator

Format

 pdffsck [-c] HiRDB-file-system-area-name

Options

-c

Specifies that the HiRDB file system area is to be checked only. When the -c option is specified, the HiRDB file system area is not repaired.

Command argument

HiRDB-file-system-area-name <path name> ((up to 165 characters))

Specifies the name of the HiRDB file system area.

Rules

When you specify the -c option, you can execute the pdffsck command whether or not HiRDB is active. When you omit the -c option, you must execute the pdffsck command as explained below, depending on the purpose of the HiRDB file system area:

When -k HiRDB-file-system-area-for-DB is specified
Execute the command after placing all RDAREAs in the HiRDB file system area in command shutdown and closed status with the pdhold -c command, and then terminating the active processes with the pdpfresh command. After executing the pdffsck command, release all RDAREAs from shutdown status with the pdrels command.

When -k HiRDB-file-system-area-for-SYS is specified
Execute the command after swapping system log files with the pdlogswap command and then closing the system log file with the pdlogcls command. After executing the pdffsck command, use the pdlogopen command to make the system log file available for use in the active HiRDB.

When -k HiRDB-file-system-area-for-UTL is specified
If the HiRDB file system area is being used by a utility, execute the command only after the utility's processing has been completed.

When -k HiRDB-file-system-area-for-WORK is specified
Since the HiRDB file system area cannot be restored during operation of HiRDB, execute it after HiRDB has terminated.

You can execute the pdffsck command with the -c option specified on a HiRDB file system area that is being accessed by another process or user. The pdffsck command with the -c option omitted cannot be executed on a HiRDB file system area that is being accessed by another process or user.

The pdffsck command must be executed at each server machine where the HiRDB file system area is stored.

If you are executing the command on a HiRDB file system area for which -k SDB has been specified, execute it from the server machine where the updatable back-end server is located.

Notes

If an I/O error occurs, the command cancels the processing.

You can use the pdfls command to check the HiRDB files that have been created in the target HiRDB file system area.

If a HiRDB file system area is checked while the RDAREA automatic extension facility is being used, automatic extension occurs after the check processing has terminated. To determine whether or not the RDAREA automatic extension facility is in effect for the target HiRDB file system area, execute the pdfstatfs command.

While the pdffsck command is executing, do not execute pdmod or pdrstr. If they are executed, the database may become corrupted.

If file repair processing by the pdffsck command is cancelled while it is underway, re-execute the command to complete the repair processing.

In HiRDB version 07-02 or earlier, the pdffsck command may not be able to repair information in the management area that has become corrupted. In such a case, the KFPI21585-E message is displayed. As directed in this message, restore the target HiRDB file system area from a backup. For details, see the manual HiRDB Version 8 System Operation Guide.

Output format

When the KFPI21559-W message is displayed due to an inconsistency detected in the area, the applicable information item listed below is displayed, as appropriate for the detected inconsistency. If the KFPI21558-I message is displayed but no inconsistency was detected, the information below is not displayed.

When there are unusable HiRDB files (cancellation of file creation or deletion processing)

An unusable HiRDB file is distinguished by the status of the area allocated to it, in terms of whether or not the area itself is usable. If the area is not usable, the command displays the name, start location, and size of every file in the area. Because the area may not be unusable for all the unusable files, the displayed unusable file count may not match the number of files that are listed.

unusable file count                 aa...a
file list
    FILE NAME                  OFFSET[kB]    SIZE[kB]
    bb...b                        cc...c      dd...d
      :                               :           :
total unusable area size[kB]             ee...e

Explanation

aa...a

Number of unusable HiRDB files (1 to 4 decimal digits)

bb...b

Name of an HiRDB file whose area is not usable (up to 30 characters)

cc...c

Offset to the start of the HiRDB file (up to 10 decimal digits)

dd...d

Size of the HiRDB file (kilobytes) (up to 10 decimal digits)

ee...e

Total size (kilobytes) of all the HiRDB files whose area is not usable (the size that can be reused as free area by repairing) (up to 10 decimal digits)

When there are unusable areas (cancellation of file extension processing)

The start location and size of each unusable area is displayed. This information is displayed for all applicable areas. The displayed unusable area count always matches the number of areas that are listed.

unusable area count                aa...a
area list
    OFFSET[kB]                      SIZE[kB]
    bb...b                            cc...c
      :                                  :
total unusable area size[kB]          dd...d

Explanation

aa...a

Number of unusable areas (up to 4 decimal digits)

bb...b

Offset to the start of an unusable area (up to 10 decimal digits)

cc...c

Size of the unusable area (kilobytes) (up to 10 decimal digits)

dd...d

Total size (kilobytes) of all the areas that are unusable (the size that can be reused as free area by repairing) (up to 10 decimal digits)

When there are both unusable HiRDB files and unusable areas

unusable file count                 aa...a
file list
    FILE NANE                  OFFSET[kB]    SIZE[kB]
    bb...b                        cc...c      dd...d
      :                               :           :
unusable area count                ff...f
area list
    OFFSET[kB]                     SIZE[kB]
    gg...g                          hh...h
      :                               :
total unusable area size[kB]         ee...e

Explanation

aa...a

Number of unusable HiRDB files (1 to 4 decimal digits)

bb...b

Name of an HiRDB file whose area is not usable (up to 30 characters)

cc...c

Offset to the start of the HiRDB file (up to 10 decimal digits)

dd...d

Size of the HiRDB file (kilobytes) (up to 10 decimal digits)

ee...e

Total size (kilobytes) of all HiRDB files whose area is not usable and of the unusable areas (the size that can be reused as free area by repairing) (up to 10 decimal digits)

ff...f

Number of unusable areas (up to 4 decimal digits)

gg...g

Offset to the start of an unusable area (up to 10 decimal digits)

hh...h

Size of an unusable area (kilobytes) (up to 10 decimal digits)

pdfgt (Terminate transaction forcibly)

Function

The pdfgt command terminates a transaction forcibly when a transaction branch that is part of a global transaction could not be terminated (such as because of a communication error, etc.).

If a communication error occurs before an OLTP system and a global transaction are synchronized, or if the OLTP system is down, a transaction will not terminate until synchronization notification is completed. The pdfgt command can be used in such a case to terminate the transaction forcibly. The pdfgt command can also be used to terminate a transaction in which a non-transient error has occurred.

The pdfgt command terminates forcibly a transaction for which transaction status 1 is FORGETTING and transaction status 3 is w, as displayed by the pdls command (-d trn specified).

Executor

HiRDB administrator

Format

pdfgt {-x host-name| -u unit-identifier} [-s server-name]
 {-A | -t transaction-identifier}

Options

{-x host-name| -u unit-identifier}

Specifies the name of the host or the unit identifier of the unit where the transaction to be terminated forcibly is located.

-x host-name<identifier> ((1-32))

Specifies the name of the host where the transaction to be terminated forcibly is located.

-u unit-identifier<identifier> ((4 characters))

Specifies the unit identifier of the unit where the transaction to be terminated forcibly is located.

-s server-name<identifier> ((1-8))

For a unit with multiple servers, specifies a server name in order to specify a particular server. When this option is omitted, all servers at the object host are subject to the pdfgt command.

-A

Specifies that all transactions at the server specified by the -s option that are in synchronization wait status and FORGETTING status are to be terminated forcibly.

-t transaction-identifier<identifier> ((16 characters))

Specifies the transaction identifier of a transaction in synchronization wait status and FORGETTING status that is to be terminated forcibly.

Rules

The pdfgt command can be executed only while HiRDB is active.

The pdfgt command must be executed at each server machine. However, it is not necessary to execute the command at a server machine of a utility special unit.

Note

The results of the pdfgt command can be checked by the pdls command (with -d trn), by the return code of the pdfgt command, or by any error messages. Return code 0 for the pdfgt command indicates normal termination, and return code 1 indicates abnormal termination (such as an invalid option or rsh error).

Forced termination may not be possible for a transaction that is connected to a recovery-unnecessary front-end server and executed, even if transaction status 1 is FORGETTING and transaction status 3 is w. In such a case, complete the transaction automatically. For details about how to complete a transaction that is in uncompleted status for transaction determination, see the manual HiRDB Version 8 System Operation Guide.

pdfls (Display HiRDB file system area information)

Function

The pdfls command displays information about HiRDB files in a HiRDB file system area. If only the name of a HiRDB file system area is specified in the command argument, information about all HiRDB files in the specified HiRDB file system area is displayed. If a HiRDB file name is also specified, information about only the specified HiRDB file is displayed.

Executor

Any user (with or without privileges)

Format

pdfls [-[H][-L| -S][-{t|u}]] HiRDB-file-system-area-name
                          [/HiRDB-filename]
     | [-x] HiRDB-file-system-area-name[/HiRDB-filename]}

Options

-H

Specifies that the display is to be with headers in alphabetical order of the HiRDB file names.

-L

Specifies that the HiRDB files are to be displayed in alphabetical order of the HiRDB file names with each file's lock status.

-S

Specifies that the HiRDB file partition storage status (extent status) is to be displayed in alphabetical order of the HiRDB file names.

-{t|u}

-t

Specifies that the contents of the HiRDB file system area are to be displayed in the order of the update close date and time, beginning with the most recent one. The update close date and time refer to the most recent date and time the file was written since it was opened. If no write operation has occurred on the HiRDB file, the system treats the file creation date and time as the update close date and time. For a HiRDB file constituting an RDAREA, the actual update close date and time may not be used.

-u

Specifies that the contents of the HiRDB file system area are to be displayed in the order of the close date and time, beginning with the most recent one. The close date and time refer to the most recent date and time the file was read since it was opened. If no read operation has occurred on the file, the system treats the file creation date and time as the close date and time. For a HiRDB file constituting an RDAREA, the actual close date and time may not be used.

If the -H or -L option is specified together with the -t or-u option, the -t or-u option is effective.

-x

Specifies that only the HiRDB file names are to be displayed (listed horizontally in alphabetical order). When this option is omitted, the HiRDB file names are listed vertically.

Command arguments

HiRDB-file-system-area-name<pathname> ((up to 165 characters))

Specifies the name of the HiRDB file system area whose files are to be displayed.

HiRDB-filename<HiRDB filename>

Specifies the name of the HiRDB file whose information is to be displayed.

Rules

The pdfls command can be executed at any time, whether or not HiRDB is active.

The pdfls command must be executed separately for each server machine containing the HiRDB file system.

If you are executing the command on a HiRDB file system area that is used for shared RDAREAs, execute it from the server machine where the updatable back-end server is located.

Notes

Return code 0 for the pdfls command indicates normal termination, and return code -1 indicates abnormal termination.

Output format

-H option specified

MODE     UID   GID   RSIZE   RNUM   TIME   FILE
aabbcc    dd...d  ee...e  ffff      gg...g   hh...h   ii...i

Explanation

aa

Owner's access privileges:

rw

Read and write

r-

Read

-w

Write

--

None

bb

Group's access privileges:

rw

Read and write

r-

Read

-w

Write

--

None

cc

Other users' access privileges:

rw

Read and write

r-

Read

-w

Write

--

None

dd...d

Owner's name (up to 9 characters).

ee...e

Owner's group name (up to 9 characters).

ffff

Record length (4 decimal digits).

gg...g

Number of records (8 decimal digits).

hh...h

Update close date and time.

This information is displayed in the format hour:minute month date year.

The following output example is for 2005-01-07 (Friday) at 09:05:

09:05 Jan 07 2005

ii...i

HiRDB file name (up to 30 characters).

-H and -L options specified

MODE   UID    GID    PID  L TIME   FILE
aabbcc  dd...d   ee...e   pppp q hh...h   ii...i

Explanation

aa

Owner's access privileges:

rw

Read and write

r-

Read

-w

Write

--

None

bb

Group's access privileges:

rw

Read and write

r-

Read

-w

Write

--

None

cc

Other users' access privileges:

rw

Read and write

r-

Read

-w

Write

--

None

dd...d

Owner's name (up to 9 characters).

ee...e

Owner's group name (up to 9 characters).

pppp

ID of process locking the file (up to 10 decimal digits in AIX 5L and up to 5 decimal digits in other OSs).

If the ID of the process locking the file is unknown, the command displays *. If there is no process locking the file, the command displays -.

q

Lock status identification flag:

E

Exclusive lock

S

Shared lock

*

Lock status unknown

-

Not locked

hh...h

Update close date and time.

This information is displayed in the format hour:minute month date year.

The following output example is for 2005-01-07 (Friday) at 09:05:

09:05 Jan 07 2005

ii...i

HiRDB file name (up to 30 characters).

-H and -S options specified

MODE    UID     GID     RSIZE  RNUM    TIME    FILE
aabbcc   dd...d    ee...e    ffff     gg...g    hh...h    ii...i
               extent size    jj...j

Explanation

aa

Owner's access privileges:

r

Read

w

Write

-

Neither read nor write

bb

Group's access privileges:

r

Read

w

Write

-

Neither read nor write

cc

Other users' access privileges:

r

Read

w

Write

-

Neither read nor write

dd...d

Owner's name (up to 9 characters)

ee...e

Owner's group name (up to 9 characters)

ffff

Record length (4 decimal digits)

gg...g

Number of records (8 decimal digits)

hh...h

Update close date and time

This information is displayed in the format hour:minute month date year.

The following output example is for 2005-01-07 (Friday) at 09:05:

09:05 Jan 07 2005

ii...i

HiRDB file name

jj...j

Number of records per HiRDB file extension. If there is more than one HiRDB file extent, this information is displayed for each extension.

pdfmkfs (Initialize HiRDB file system area)

Function

The pdfmkfs command initializes a specified hard disk partition (character special files) or a regular files area as a HiRDB file system area.

Executor

HiRDB administrator

Format

Character special files

pdfmkfs -n HiRDB-file-system-area-size -l max-files-count
      [-k usage-purpose] [-e max-secondary-allocations-count]
      [-s sector-length] [-i]
       character-special-files-area-name

Regular files

pdfmkfs [-r] -n HiRDB-file-system-area-size -l max-files-count
       [-k usage-purpose] [-e max-secondary-allocations-count]
       [-i] [-r]
        regular-files-area-name

Options

-n HiRDB-file-system-area-size<unsigned integer>

Specifies, in megabytes, the space to be allocated as the HiRDB file system area. The permitted value ranges are as follows:

File type | HP-UX | Solaris | AIX 5L | Linux
Regular file | 1-2,047 | 1-2,047 | 1-2,047 | 1-2,047
Character special file | 1-2,047 | 1-2,047 | 1-2,047 | 1-2,047
Large file | Regular file | 1-131,071 | 1-1,048,575 | 1-65,411# | 1-1,048,575
Character special file | 1-131,071 | 1-1,048,575 | 1-1,048,575 | 1-1,048,575

# This value range is applicable to a Journaled File System (JFS). For an Enhanced Journaled File System (JFS2), the value range is 1-1,048,575.

The management area used for management of a HiRDB file system area is also included in the value of the -n option. Therefore, the actual size allocated to the HiRDB file is (value of the -n option) - (size of management area). For details about determining the size of the management area, see Notes. You can use the pdfstatfs command to check the actual size that is allocated to the HiRDB file.

-l max-files-count<unsigned integer> ((1-4096))

Specifies the maximum number of HiRDB files that can be created in the allocated HiRDB file system area.

Once you execute the pdfmkfs command, you can no longer change this value. Therefore, carefully determine this value taking into account the number of HiRDB files to be used and future expansion plans.

-k usage-purpose<<SVR>>

Specifies the purpose for which the HiRDB file system area will be used:

DB

HiRDB file system area for RDAREAs

SDB

HiRDB file system area for shared RDAREAs. SDB can be specified for a HiRDB/Parallel Server when a character special file is used as the HiRDB file system area. For regular RDAREAs, use a HiRDB file system area whose purpose is DB.

When the purpose of initialization is SDB, execute the command at the server machine where the updatable back-end server is located. Do not execute the command from a referencing-possible back-end server.

Once created, a DB-purpose HiRDB file system area cannot be distinguished from a SDB-purpose HiRDB file system area. For this reason, you should assign area names that distinguish between the two purpose types.

SYS

HiRDB file system area for system log files, synchronization point dump files, status files, or audit trail files.

If you specify SYS, do not specify the -e option.

WORK

HiRDB file system area for list RDAREA or work table files. If you specify WORK in the Linux version, the corresponding HiRDB file system area cannot be created in a character special file.

UTL

HiRDB file system area for utilities.

You can create the following files in a HiRDB file system area for utilities:

Unload data files

LOB data unload files

Index information files (applicable to delayed batch creation of plug-in index)

Backup files

Differential backup files

Differential backup management files

Unload log files

SVR

HiRDB file system area that can be used for any purpose other than utilities

SVR can be specified if there is no problem with mixing HiRDB files for different usage purposes in a single HiRDB file system area, such as in a test system. Normally, however, each HiRDB file system area is dedicated to a particular type of usage.

Limitations with the Linux version of HiRDB (when using character special files)

When using character special files with the Linux version of HiRDB, the following limitations apply:

Usage purpose
Availability
Remarks

DB
Y

SDB
Y

SYS
Y

WORK
N
You cannot specify a character special file in the pdwork operand in the system definition.

UTL
Y

SVR
N

Legend:

Y: Available.

N: Not available.

-e max-extensions-count<unsigned integer> ((0-60000)) <<0>>

Specifies the maximum number of extensions for each HiRDB file in the HiRDB file system area. HiRDB increases the size of HiRDB files according to the specified number of extension. The maximum number of extensions permitted per HiRDB file is 23. If the specified value is maximum number of files 23 or greater, the command ignores the specified value and assumes the maximum number of files 23.

Criteria

In the case of a HiRDB file system area for work table files, if the estimated size of a work table file exceeds the value listed below, make sure that the number of extensions is specified. For details about estimating the size of work table files, see the HiRDB Version 8 Installation and Design Guide.
- For HiRDB/Single Server
128 kilobytes
- HiRDB/Parallel Server
512 kilobytes

Even when the estimated size does not exceed the above value, or for an HiRDB file system area for other than work table files, we recommend that you specify the number of extensions.

If you are using RDAREA automatic extension, make sure that the number of extensions is specified.

Operations such as deletion, re-initialization (for reduction of allocation size or with with reconstruction specified), and integration of RDAREAs result in deletion of allocated HiRDB files and reduction in size. As a result, the HiRDB file system area becomes fragmented. If you use these operations, you should specify the number of extensions. If the system cannot allocate contiguous free space when an RDAREA is added, extended, or re-initialized, multiple fragmented spaces are used to create the new HiRDB file. In this case, the number of extensions that is required is number of fragmented free spaces - 1.

Determining the specification value

Use one of the following formulas to determine the number of extensions:

-k option
Number of extensions to be specified

DB
min (60000, 23 cumulative total number of final files for the RDAREA to be extended*)
If you frequently perform deletion, re-initialization (for reduction of allocation size or with with reconstruction specified), or integration of RDAREAs, you should use the following value:
min (60000, 23 cumulative total number of RDAREA structure files)

SDB

SYS
0

WORK
min(60000, 23 value of the -l option)
min(60000, 23 cumulative number of files subject to extension)
Extension is applied to work table files and final files in the RDAREA subject to extension.*

UTL

SVR

Note 1

Once you execute pdfmkfs, you can no longer change the number of extensions. Therefore, specify an appropriate value taking into account the future extensions.

Note 2

As the number of extensions increases, the memory size required by the processes that use the HiRDB file system area increases.

Note 3

If the specified value is less than the value obtained from the above formula, the limit of the HiRDB file system area is reached before the maximum number of extensions is reached for the HiRDB files.

* Note that the number of last files in an RDAREA subject to extension is not one per RDAREA. This is because when pdmod is used to expand an RDAREA, the RDAREA is extended at the end, so that the last HiRDB file specified in the expand rdarea statement becomes the last file. Both the last file before and the last file after the expansion are included in the number of last files in the RDAREA subject to extension.

-s sector-length<unsigned integer> ((1024,2048,4096)) <<1024>>

If you are using a character special file as the HiRDB file system area with a device that handles a medium with a physical sector length of 2,048 and 4,096 bytes, such as DVD-RAM device, this option specifies the minimum I/O unit expressed as the sector length (the physical sector length of a medium corresponding to a character string special file). For details about the physical sector length of a medium, see the manual for the medium.

Rules

If the physical sector length of a medium is greater than 4,096 bytes, that medium cannot use a HiRDB file system area for character special files.

If the physical sector length of a medium is 1,024 bytes or less, make sure that a multiple of the sector length equals 1,024, then specify 1,024 as the physical sector length. If a multiple of the sector length is not equal to 1,024, you cannot use the character special files on that medium.

If using regular files, do not specify the sector length of the HiRDB file system area.

If you specify 2,048 or 4,096 as the sector length, you can specify either DB or UTL in the -k option. When the -k option is omitted, SVR is assumed. Therefore, when you specify a sector length, make sure that -k DB or -k UTL is specified.

You can use a HiRDB file system area for which a sector length is specified for the following purposes:
- HiRDB file system area for RDAREAs other than list RDAREAs
- Output destination of the pdlogunld command (unload log file)
- Backup files for pdcopy and pdrstr
- Unload data files for pdrorg
If you are using the HiRDB file system area for RDAREAs, specify a multiple of the sector length specified in the -s option as the page length in the pdinit or pdmod control statement for creating an RDAREA.

-i

Specifies that the HiRDB file system area specified in the -n option is to be initialized from the beginning. When this option is omitted, the command creates only the management information for the HiRDB file system area. If the HiRDB file system area is large, it may take time to initialize it.

If you omit the -i option for a regular file, the command creates only the management information for the HiRDB file system area (an area with a maximum size of about 3.5 megabytes is allocated).

The HiRDB file system area will be extended up to the size specified with the -n option when it is actually used. The OS file system containing this HiRDB file system area may become full when this HiRDB file system area is put into use. To avoid this, specify the -i option.

-r

Specifies that no confirmation message is to be displayed when a regular file is initialized. If this option is omitted and the specified regular file already exists, the command displays a confirmation message asking whether or not to initialize the file. If a letter other than g is entered in response to the confirmation message, the command will not initialize the file.

Command arguments

character-special-files-area-name<path name> ((up to 165 characters))

Specifies a name for the character special files area to be initialized. This name is used as the name of the HiRDB file system area.

regular-files-area-name<path name> ((up to 165 characters))

Specifies a name for the regular files area to be initialized. This name is used as the name of the HiRDB file system area.

You can specify a maximum of 30 characters for the name of a HiRDB file that is created in the HiRDB file system area. Note that because HiRDB-file-system-area-name/HiRDB-filename cannot exceed 167 characters, the maximum length of an HiRDB file name is reduced accordingly if the HiRDB file system area name is greater than 136 characters.

For HiRDB files that are created automatically by HiRDB, make sure that the following maximum lengths for HiRDB file system area names are not exceeded:

HiRDB file created automatically by HiRDB | Maximum length of HiRDB file system area name (in characters)
Work table file (specified with pdwork operand in system definition) | 141
Audit trail file (specified with pd_aud_file_name operand in system definition) | 150
Index information file for delayed batch creation of plug-in index (specified with pd_plugin_ixmk_dir operand in system definition) | 136
Unload log file for system log for the automatic log unloading facility (specified with pd_log_auto_unload_path operand in system definition) | 136

Rules

The pdfmkfs command can be executed at any time, whether or not HiRDB is active.

The pdfmkfs command must be executed separately for each server machine for which a HiRDB file system area is to be initialized.

Notes

Return code 0 for the pdfmkfs command indicates normal termination, and return code -1 indicates abnormal termination.

If the value specified as the area size is greater than the size of the disk volume or partition during initialization, the partition physically following that partition may be damaged. Therefore, a size that is greater than the size of the disk volume or partition must not be specified.

The following shows the relationships among a HiRDB file system area name, HiRDB file name, and physical file name:

It is recommended that the name specified for a character special files area or a regular files area be linked symbolically to the entity name by the ln OS command, not to the entity name itself. This simplifies operations in the following cases:

When the HiRDB file system area is restored onto another hard disk after a hard disk failure

When the RDAREA structure is modified

The results of executing the pdfmkfs command can be checked by the pdfstatfs command.

For details about the values specifiable in the -n, -l, and -e options, see the following manuals, depending on the usage purpose:

SYS usage purpose
Chapter 23. Sample Files in the HiRDB Version 8 Installation and Design Guide.

DB usage purpose
Chapter 21. Simple Installation of a HiRDB/Single Server in the HiRDB Version 8 Installation and Design Guide.

WORK usage purpose
Chapter 22. Simple Installation of a HiRDB/Parallel Server in the HiRDB Version 8 Installation and Design Guide.
Sections 3.2.1, 3.3.2, and 3.3.3 in the manual HiRDB Version 8 System Definition.

UTL usage purpose
Chapter 8. Database Reorganization Utility (pdrorg)
Chapter 18. Database Copy Utility (pdcopy)

SVR usage purpose
See the appropriate manuals previously, depending on the usage purpose of the HiRDB file to be created in the HiRDB file system area.

If the purpose of use is WORK, generates a utilization rate warning message on an initialized HiRDB file system area, based upon the specifications pd_watch_resource and pdwork_wrn_pnt that are provided in the system definitions.

If you are using a regular file for the HiRDB file system area, specify an unlimited value or a value that is greater than the -n option value as the maximum value of system resources for the HiRDB administrator and root user. Especially with the AIX 5L version, note that the maximum file size is 1 gigabyte by default. You can check the maximum value of system resources with each OS shell using the limit or ulimit command. If you change the maximum file size in AIX 5L, you must also change the /etc/security/limits file. For details, see the documentation for the applicable OS and shell.

A management area is allocated to the HiRDB file system area. The size of the management area to be allocated depends on the type of OS, the -n, -l, -e, and -s options, and the type of files to be used. The formulas for determining the size of a management area are presented below. Note that the sizes of the fixed and variable management sections may increase depending on the process because they are read into memory while the corresponding HiRDB file system area is used.

Management area (bytes)
= Fixed management section + variable management section + HiRDB file management section a
 + 4096 (applicable to AIX 5L)

-n 2047 or less
Fixed management section = 4096
Variable management section = (20 + 4 a)/c c + (48 + 16 (a + b))/c c
HiRDB file management section = 320/c c

-n 2048 or greater
Fixed management section = 4096
Variable management section = (20 + 4 a)/c c + (56 + 24 (a + b))/c c
HiRDB file management section = 480/c c

Description of variable symbols:

a: Value of the -l option

b: Value of the -e option (0 if the option is omitted)

c: Value of the -s option (1024 for character special files, 512 for regular files if the option is omitted)

When a HiRDB file system area created as a regular file is manipulated by methods such as OS commands, its allocation status on the disk may change. For example, if the cp command is used to copy the HiRDB file system area, the amount of disk space used may increase within the size specified in the -n option because the part that has not been used by HiRDB is allocated on the disk. Additionally, if AIX 5L's backup or restore command is used on a HiRDB file system area created with the -i option specified in order to back up or restore data, only initialization may be executed and the part that has not been used by HiRDB may be released from the disk. For details, see the applicable OS documentation.

Examples

Initialize the following HiRDB file system areas:

Character special files /svr01

Regular files /prdb/ios001

Command execution

pdfmkfs -n 25 .......................1
       -l 10 .......................2
       -e 5 ........................3
       /svr01 ......................4
pdfmkfs -n 30 .......................5
       -l 15 .......................6
       /prdb/ios001 ................7

Explanation

Size of HiRDB file system area: 25 MB

Maximum number of files: 10

Maximum number of secondary allocations: 5

Name of character special files area: /svr01

Size of HiRDB file system area: 30 MB

Maximum number of files: 15

Name of regular files area: /prdb/ios001

pdfrm (Delete HiRDB file)

Function

The pdfrm command deletes a specified HiRDB file from a HiRDB file system area.

Executor

HiRDB administrator

Format

pdfrm [-i] HiRDB-file-system-area-name/HiRDB-filename

Options

-i
Specifies that a confirmation message is to be displayed before the HiRDB file is deleted. The file can be deleted by entering y as the response to the confirmation message.

Command arguments

HiRDB-file-system-area-name/HiRDB-filename

Specifies the name of the character special files area or the regular files area containing the HiRDB file to be deleted and the name of the HiRDB file to be deleted.

HiRDB-file-system-area-name<pathname> ((up to 165 characters))

Specifies the name of the HiRDB file system area.

HiRDB-filename<HiRDB filename>

Specifies the name of the HiRDB file.

Rules

If the usage purpose of the HiRDB file system area that contains the HiRDB file to be deleted is other than UTL, the pdfrm command cannot be executed in the HiRDB file system area that contains that HiRDB file while the active HiRDB is in use (if the HiRDB file in the HiRDB file system area has been opened even once). If the usage purpose is UTL, the pdfrm command can be executed regardless of whether or not the HiRDB file system area is in use. However, it cannot be executed if the specified HiRDB file is in use by the active HiRDB (opened by another process).

The pdfrm command must be executed separately for each server machine containing the HiRDB file system area.

An HiRDB file that is in use (opened by another process) cannot be deleted.

When the -i option was specified and any character other than y is entered in response to the confirmation message, the HiRDB file will not be deleted.

If you are executing the command on an HiRDB file system area that is used for shared RDAREAs, execute it from the server machine where the updatable back-end server is located.

Notes

Return code 0 for the pdfrm command indicates normal termination, and return code -1 indicates abnormal termination.

The result of the pdfrm command can be checked by the pdfls command.

Except when the usage purpose is UTL, the pdfrm command is used to delete a HiRDB file forcibly under emergency conditions. Normally, a HiRDB file should be deleted with a host command, such as the database structure modification utility, the pdlogrm command, or the pdstsrm command, depending on the usage purpose.

Because the pdfrm command can delete forcibly a HiRDB file that comprises an RDAREA, care should be taken in executing this command.

pdfrstr (Restore HiRDB file system)

Function

The pdfrstr command restores a HiRDB file system backed up by the pdfbkup command. Restoration can also be performed in units of HiRDB files.

The number of added areas and the number of noncontiguous free areas can be determined by displaying the status of a HiRDB file system area (by entering the pdfstatfs command). The added areas and noncontiguous free areas can then be merged and the HiRDB file system area used more effectively by taking the following measures:

Back up the HiRDB file system (pdfbkup command)

Initialize the HiRDB file system area (pdfmkfs command)

Restore the backed up HiRDB file system to the initialized HiRDB file system (pdfrstr command)

Executor

HiRDB administrator

Format

pdfrstr  [-y] [-q] [-{t|o|r}]
        backup-filename[/HiRDB-filename]
        HiRDB-file-system-area-name

Options

-y

Specifies that the HiRDB file system is to be restored without obtaining user confirmation. When this option is omitted, the system is restored only after the user confirms the processing.

-q

Specifies that high-speed restoration, which writes the backup file information in the batch mode, is to be used.

-{t|o|r}

Specifies the processing to be performed if a file with the same name as a HiRDB file in the backup file to be restored already exists in the restoration destination HiRDB file system area:

-t

Do not restore if the existing HiRDB file in the restoration destination HiRDB file system area has a more recent time stamp

-o

Do not use the HiRDB file in the backup file for restoration

-r

Restore from the HiRDB file in the backup file regardless of the time stamp

When this option is omitted, -t is assumed.

Command arguments

backup-filename[/HiRDB-filename]

Specifies the backup file backed up by the pdfbkup command. If a particular HiRDB file is to be restored, also specifies that file.

backup-filename

Specifies the name of the backup file.

HiRDB-filename<HiRDB filename>

Specifies the name of the backed up HiRDB file that is to be restored.

HiRDB-file-system-area-name<pathname> ((up to 165 characters))

Specifies the name of the restoration destination HiRDB file system area.

Rules

The pdfrstr command can be executed only while HiRDB is inactive.

The pdfrstr command must be executed at each server machine where the HiRDB file system area is stored.

Any HiRDB files in the restoration destination HiRDB file system area that are not in the backup file will remain in the HiRDB file system area after execution of the pdfrstr command.

A confirmation message is displayed when the -y option is omitted. The HiRDB file system is not restored if any character other than G is entered in response to the confirmation message.

If there are no HiRDB files in the restoration destination HiRDB file system area, the -q option is assumed when the pdfrstr command executes.

If the pdfrstr command with the -q option specified terminates abnormally during execution, the HiRDB file system area at the storage destination may become corrupted. Thus, if there are any HiRDB files in the storage destination HiRDB file system area, you should back them up in advance with the pdfbkup command.

You cannot restore a HiRDB file if the record length of the backup HiRDB file is not a multiple of the sector length of the target HiRDB file system area. Before backing up a HiRDB file, use the pdfls command to check its record length. To check the sector length of the target HiRDB file system area, use the pdfstatfs command.

Notes

The execution results of the pdfrstr command can be confirmed by the return code after the command has executed and by whether or not there are any error messages. Return code 0 for this command indicates normal termination, 1 indicates warning termination, and -1 indicates abnormal termination.

Restoration to a utility HiRDB file system area cannot be made while the utility is executing; in such a case, restoration should be performed after termination of the utility.

pdfstatfs (Display status of HiRDB file system area)

Function

The pdfstatfs command displays the status of a specified HiRDB file system area.

Executor

Any user (with or without privileges)

Format

pdfstatfs [-{c|d}] [{-S|-x[-y]}] [-b] HiRDB-file-system-area-name

Options

-{c|d}

c

Specifies that the maximum available area for allocation in the HiRDB file system area is to be set to 0. This is effective when the usage purpose of the HiRDB file system area is WORK and UTL.

d

Specifies that the maximum available area for allocation in the HiRDB file system area is to be displayed.

-S

Indicates the status of available free areas in the HiRDB file system area.

-x

Specifies that the information is to be displayed in DAT format.

-y

When the -x option is specified, specifies that a header is to be displayed.

-b

Specifies that the sector length of the HiRDB file system area is to be displayed.

Command arguments

HiRDB-file-system-area-name<pathname>((up to 165 characters))

Specifies the name of the HiRDB file system area whose status is to be displayed.

Rules

The pdfstatfs can be executed at any time, whether or not HiRDB is active.

The pdfstatfs command must be executed separately for each server machine containing the HiRDB file system area.

If you are executing the command on an HiRDB file system area that is used for shared RDAREAs, execute it from the server machine where the updatable back-end server is located.

Notes

Return code 0 for the pdfstatfs command indicates normal termination, and return code -1 indicates abnormal termination.

When the maximum available area for allocation is to be displayed by specifying the -d option after this value has been set to 0 with the -c option, the maximum available area of the HiRDB file system area used since the -c option was set can be acquired.

Displaying the maximum available area of the HiRDB file system area between the time the -c option is specified and the -d option is specified is possible only when the usage purpose of the HiRDB file system area is WORK and UTL. When the usage purpose is SYS, DB, or SVR, the maximum available area cannot be set to 0 with the -c option; thus, the maximum available area that is displayed is that accumulated from the time the pdfmkfs command was executed.

Output format

user area capacity         aa...a[kB]
remain user area capacity  bb...b[kB]
[peak capacity              mm...m[kB]]
available file size        cc...c[kB]
available file count       dd...d
current file count         ee...e
remain file count          ff...f
free area count            gg...g
available expand count     hh...h
current expand count       ii...i
[sector size                qq...q[Byte]]
initialize area kind       jj...j
initialize user id         kk...k
initialize time            ll...l

[***** HiRDB file system area space information *****]
[offset[kB]     size[kB]  used/unused]
[   nn...n      oo...o    pp...p]

Explanation

aa...a

Size (in KB) in the HiRDB file system area of the user area allocated to the user (up to 10 decimal digits).

bb...b

Size (in KB) in the user area of the unused space (space not allocated to HiRDB files) (up to 10 decimal digits).

cc...c

Size (in KB) of the largest space that can be allocated to a single file (up to 10 decimal digits).

dd...d

Maximum number of files that can be created, as specified with the -l option of the pdfmkfs command (up to 4 decimal digits).

ee...e

Number of HiRDB files that have already been created (up to 4 decimal digits).

ff...f

Number of HiRDB files that can still be created (maximum number of creatable files - number of already created files) (up to 4 decimal digits).

gg...g

Total number of noncontiguous free areas (up to 5 decimal digits).

hh...h

Maximum number of secondary allocations available to the HiRDB file system area (up to 5 decimal digits).

ii...i

Total number of secondary allocations that have been executed for the HiRDB file system area (up to 5 decimal digits).

jj...j

HiRDB file system area's usage purpose, as specified in the -k option of the pdfmkfs command (up to 9 characters).

If the usage purpose is SDB, DB is displayed.

kk...k

Login name of the user who initialized the HiRDB file system area (up to 32 characters).

ll...l

Date and time the HiRDB file system area was initialized (24 characters).

This information is displayed in the format day month date hour:minute:second year.

The following output example is for 2005-01-07 (Friday) at 09:05:08:

initialize time Fri Jan 07 09:05:08 2005

mm...m

User maximum available space at the current time (up to 10 decimal digits); displayed only when the -d option is specified.

nn...n

The leading offset for an area being used or an area not being used in the HiRDB file system area. This is displayed only when the -S option is specified.

oo...o

The size of an area being used or an area not being used in the HiRDB file system area. This is displayed only when the -S option is specified.

pp...p

Indicates whether an area is being used.

used

Being used.

unused

Not being used.

This is displayed only when the -S option is specified.

qq...q

Sector length of the HiRDB file system area (1 to 4 decimal digits).

This is 512 for a regular file and the sector length specified in the -s option of the pdfmkfs command for a character special file (1,024 when the option is omitted).

DAT output format (when -x -y is specified)

"USER_AREA_CAPACITY","REMAIN_USER_AREA_CAPACITY","PEAK_CAPACITY","AVAILABLE_FILE_SIZE",
"AVAILABLE_FILE_COUNT","CURRENT_FILE_COUNT","REMAIN_FILE_COUNT","FREE_AREA_COUNT","AVAILABLE_EXPAND_COUNT",
"CURRENT_EXPAND_COUNT","SECTOR_SIZE","INITIALIZE_AREA_KIND","INITIALIZE_USER_ID","INITILIZE_TIME"[CR]
aa...a,bb...b,mm...m,cc...c,
dd...d,ee...e,ff...f,gg...g,hh...h,
ii...i,qq...q,"jj...j","kk...kk","ll...ll"[CR]

Note

[CR] indicates a linefeed.

Rules for output in DAT format

The elements are separated by the comma (,), and information is output as a single line of text ending with a carriage return.

A character element is enclosed in double quotation marks (").

The sector length and the current maximum amount of usage by user are displayed only when the appropriate combination of information acquisition options is specified. If an information acquisition option is not specified, the command displays a blank or only "" without displaying the corresponding item.

pdgen (Generate system)

Function

The pdgen command enables an HiRDB environment to be specified interactively.

When the pdgen command is executed, a menu is displayed. An environment is specified by following the displayed instructions (for details about how to execute the system generator, see the HiRDB Version 8 Installation and Design Guide).

Executor

HiRDB administrator

Format

pdgen

Options

None

Rules

When a separate HiRDB environment is being constructed, the pdgen command can be executed regardless of whether or not the HiRDB is active. When an existing HiRDB environment is being regenerated or a new HiRDB environment is being generated, the pdgen command can be executed only while HiRDB is inactive.

The pdgen command must be executed at the server machine containing the single server or the server machine where the system manager is located.

pdgeter (Acquire error information)

Function

The pdgeter command outputs error information to a specified directory or DAT drive when an error occurs in the HiRDB system.

Executor

HiRDB administrator

Format

pdgeter [{-o output-destination-directory-name
         |output-destination-device-name}]
       [-w work-directory-name] [-x host-name[,host-name]...]
       [-am]
       [-t]

Options

{-o output-destination-directory-name|output-destination-device-name}

Specifies the name of the directory or device to which error information is to be output. If this option is omitted, output is to the $PDDIR/erinf/outinf directory.

output-destination-directory-name<path name>

For output of error information to a directory, specifies the absolute path name of that directory. The name of a directory at the host where the pdgeter command is executed must be specified.

output-destination-device-name<path name>

For output of error information to a DAT drive, specifies the DAT drive's device name. The device name of a DAT drive installed at the host where the pdgeter command is executed must be specified.

-w work-directory-name<path name>

When directing the output of troubleshooting information to a tape device, specify the name of a work directory for temporary storage of the information being output. Specify the name as the directory name, in an absolute path, of the server machine that will execute the pdgeter command. HiRDB creates a temporary work file in the specified directory. This temporary work file should be created in the following situations:

When the -t option is specified

When information on any server other than the server machine on which the pdgeter command is launched is to be output to a tape device

The default for this option is $PDDIR/erinf/work.

Directories beginning with /dev cannot be specified in this option.

-x host-name[,host-name]...<identifier> ((1-32))

Specifies names of hosts from which error information is to be acquired. If this option is omitted, the name of the host where the pdgeter command is executed is assumed.

-am

Specifies the type of error information that is to be acquired:

-a

All error information. When this option is omitted, only the minimum error information is acquired; Table 2-1 shows the error information acquired depending on the specification of the -a option.

Even when this option is specified, master directory, data directory, and data dictionary error information from all HiRDB systems cannot be acquired. Master directory, data directory, and data dictionary error information is acquired only for the HiRDB system at the host where the pdgeter command is executed and for a host specified in the -x option that contains the master directory, etc. (single server or dictionary server).

-m

Specifies that only OS information from the system information is to be acquired, without acquiring shared memory dump information.

Table 2-1 Error information acquired depending on -a option specification

Information acquired
-a option
Remarks

Specified
Omitted

All files under $PDDIR/spool directory
u
u
None

All files under $PDDIR/conf directory
u
u

All files under $PDDIR/.dbenv directory
u
u

RPC trace file
u
u

All files under $PDDIR/tmp directory
u
N

pdinit control statement
O
O
Before executing the pdgeter command, first copy the following file name under the $PDDIR/conf directory of the host where command is executed:
pdinit control statement: $PDDIR/conf/INITCONT
The following indicates the host of the copy destination:

-a option specified

Copy to the host executing where the command is executed

-a option omitted

Copy to one of the hosts for which error information is to be acquired

pdmod control statement
O
O
Before executing the pdgeter command, first copy to the $PDDIR/conf directory of one of the hosts for which error information is to be acquired.

Master directory
O
N

If $PDDIR/conf/INITCONT exists at the host where the command is executed, error information is acquired.

An HiRDB file expanded by pdmod is not subject to acquisition.

When there are multiple hosts for which error information is to be acquired and the other hosts are host of a HiRDB system that differs from the host where the command is executed, the information of the other hosts cannot be acquired. In such a case, only information on the HiRDB system at the host where the command is executed can be acquired.

Information is acquired only when the single server or dictionary server is specified in the -x option.

To determine the size of a temporary disk space required for collecting information, use the pdfls command (record length of the HiRDB file to be acquired number of records).

Data directory
O
N

Data dictionary
O
N

OS library
u
u
Information depends on the OS:

HI-UX/WE2 version:

/usr/lib/libdld.sl

/lib/libM.sl

/lib/libc.sl

HP-UX version:

/usr/lib/libdld.sl

/lib/libm.sl

/lib/libc.sl

HP-UX(64) version:

/usr/lib/pa20_64/libdld.sl

/usr/lib/pa20_64/libm.sl

/usr/lib/pa20_64/libc.sl

HP-UX(IPF) version:

/usr/lib/hpux64/libdl.so

/usr/lib/hpux64/libm.so

/usr/lib/hpux64/libc.so

AIX version:

/usr/lib/libdl.a

/lib/libm.a

/lib/libc.a

Solaris version:

/usr/lib/libdl.so

/lib/libm.so

/lib/libc.so

Linux version:

/usr/lib/libdl.so

/lib/libm.so

/lib/libc.so

Sort library
N
N
None

Shared memory contents
O
O

Error information is acquired only while HiRDB is active.

Error information is not acquired when the -m option is specified.

The file name is shmdump, and the information is output under the $PDDIR/spool/pdshmdump directory.

For details about how to estimate the memory size, see the HiRDB Version 8 Installation and Design Guide.

HiRDB/Single Server
Formula for shared memory used by unit controller (20.1.2(1)) + formula for shared memory used by single server (20.1.2(2)).
HiRDB/Parallel Server
Formula for shared memory used by unit controller (20.2.2(1)) + formula for shared memory used by each server (20.2.2(2)).These sizes can be verified by executing the pdls -d mem command while HiRDB is active.

System information
O
O

The file name is set to pdgeter.sysinf.hhmmss (where hhmmss is the hour, minute, and second).

If the -m option is specified, only OS information is output.

Because a series of HiRDB commands executed in a shell will terminate abnormally if HiRDB is inactive, the OS information and the error messages of the series of HiRDB commands are output to a file.

Log
N
N
None

System log file
N
N

User RDAREA
N
N

u: Information is acquired.

O: Information acquisition depends on the details in the Remarks column.

N: Information is not acquired.

-t

Specify this option when directing the output of troubleshooting information to a non-DAT tape device. Note that AIX 5L does not support this option.

When specifying this option, be sure to specify the name of a work directory using the -w option.

The pdgeter command uses the append option (-r option) of the tar command to record troubleshooting information onto a tape device. However, some tape devices do not support the append option. Therefore, error information cannot be output to this tape device.

The -t option temporarily stores the troubleshooting information to be recorded on a work directory and then writes the information to the tape device, even without an append option. Therefore, the -t option allows the system to record troubleshooting information on tape devices other than DAT drives.

Rules

The pdgeter command can be executed at any time, whether or not HiRDB is active.

The pdgeter command can be executed at any server machine. However, it should be set so that the remote shell can be executed among the hosts for which the error information is to be acquired. This does not apply in acquiring error information of only the host where the pdgeter command is executed. When the -a option is specified, the command should be executed at one of the hosts for which error information is to be acquired.

Shared memory dump information cannot be acquired if HiRDB is inactive.

The collected error information can be compressed by the compress command in the shell script. Error information can be output without compression in systems that cannot use the compress function.

Notes

If the output destination directory or work directory is under $PDDIR, HiRDB may terminate abnormally due to a space shortage. Thus, it is important to prepare an adequate amount of disk space.

A check should be made that the specified output destination directory and work directory exist in the system. If such a specification is omitted, the file will be created in the default directory. If the file already exists in $PDDIR/erinf/outinf or $PDDIR/erinf/work, an error message will be output and processing will be discontinued. If a nonexistent directory or a directory without write privilege is specified, an error message will be output and processing will be discontinued.

If a nonexistent device is specified, an error message will be output and processing will be discontinued.

If the following directory or file exists under the output destination directory or work directory, an error message will be output and processing will be discontinued.
PDDIR, lib, usr, HiRDB

When a network error occurs, information at the local host can be acquired but information from other hosts cannot be acquired. However, if multiple host names are specified in the -x option and an output destination device name is specified in the -o option, it may not be possible to acquire information for the local host; if only the local host is specified in the -x option when the pdgeter command is executed, information for the local host can be acquired.

Although the name of the file output to the directory is unique for each host, note that error information will be overwritten if the results collected on the host where the command is executed are expanded at that host. Also, if the same DAT drive is used several times, error information output to that device may overwrite previous error information.

If comments in the pdinit control statement file violate the following rules, the information in the master directory cannot be acquired because the pdgeter command will not operate normally:

If there are multiple comments (enclosed by /* and */) on the same line, there must be at least one space between comments.

There must be at least one space between a comment and the control statement.

The following applies to acquisition of error information when the system switching facility is being used:

IP address inherited
Information for the executing system host can be acquired even if the host where the command is executed is not the executing system host. Because information for a standby system cannot be acquired unless the host where the command is executed is a standby system host, it is necessary to remotely log into the standby system host and execute the pdgeter command.

IP address not inherited
Because the name of the executing system host and the standby system host are different, information can be acquired if the names of these hosts are specified in the -x option. If the -a option is specified and master directory information is to be acquired, the host names of the executing system and the standby system host should both be specified in the -x option.

If multiple instances of the pdgeter command are executed simultaneously at the same host, the commands will not operate normally and valid error information will not be acquired.

When the -a option is specified, the specification value of the pdstart and pdunit operand and in the system common definition ($PDDIR/conf/pdsys) of the host where the pdgeter command is executed is analyzed. If a single pdstart or pdunit operand was specified on multiple lines, the pdgeter command will not operate normally.

The -w option requires the temporary available free disk space indicated by the following formula:
a b 2

a

number of server machines on which troubleshooting information is to be collected

b

total file capacity for storing troubleshooting information

For a description of files for storing troubleshooting information, refer to Table 2-1.

The results of the pdgeter command can be checked on the basis of the return value and by whether or not there are any error messages. The following are the pdgeter command's return codes:
0: Normal termination
4: Warning termination (some information acquisition processing was skipped)
8: Abnormal termination
12: Termination by an interrupt

When the pdgeter command is executed on the active HiRDB and the output destination directory or work directory is a directory under $PDDIR, HiRDB may stop due to a space shortage. An adequate amount of disk space must be provided. It is also possible that there will not be adequate space on the disk if error information is left in the output destination directory; for this reason, error information that is no longer needed should be deleted. The following table shows how to estimate the amounts of disk space and device space needed at the host where the pdgeter command is executed:

Hosts specified in -x option
Output destination specified in -o option

Directory
Device

One

Disk space

Total for all acquired information files at the target host.

Device space

Disk space

Total for all acquired information files at the target host.1 2 3

Device space

Total for all acquired information files at the target host.

Multiple

Disk space

Total for all acquired information files at the target hosts.

Device space

Disk space

Total for all acquired information files at each of the target hosts.2 4

Device space

Total for all acquired information files at the target hosts.

: Not applicable.

Note

See Table 2-1 for the acquired information files at the target host.

If the -a option is specified, information about the master directory, data directory, and data dictionary is collected for each HiRDB file and its backup copy is then made. Therefore, if you specify the -a option, add the following value as the size of temporary backup file to the disk size:

Record-length number-of-records

You can obtain the record length and number of records by executing the pdfls command.

¹ Not applicable if the target host is the host where the pdgeter command is executed.

² Disk space required when a work directory is used.

³ Not applicable if the -t option is omitted.

⁴ If the -t option is omitted, the disk space is the sum of all acquired information files per applicable host.

Output format

Information is output in the following format to the directory or device specified in the -o option.

File name

The file name is shown as follows, depending on the -o and -w specifications:

Host specified in -x option | Output destination specified in -o option
Directory | Device
Only host where pdgeter command is executed is specified | host-name.time.Z | Individual error information¹
Host other than host where pdgeter command is executed is also specified | host-name.time.Z | host-name.time.Z

Note

The format for the time is hhmmss.

¹ If the -t option is specified, the default will be host-name.time.Z.

Regardless of the -o and -w specifications, the execution results of operating system commands issued in a pdgeter command are output to a file named pdgeter.comlog.time.

Format

If host-name.time.Z is expanded, the file name will be host-name.time. The host-name.time file comprises three or four files. Figure 2-3 shows the contents of the host-name.time file.

Figure 2-3 Contents of host-name time file

Usage examples

Example 1

Error information at the host where the command is executed (host1) is to be acquired; the output destination directory name is /err1.

Overview

Example of command execution

pdgeter -o/errl -x hostl

Example 2

The error information of multiple hosts (host2 and host3) is output to the host where the command is executed (host1); the output destination device name is /dev/dat01 and the work directory name is /work.

Overview

Example of command execution

pdgeter -o/dev/dat01 -w/work -x host2,host3

pdgrprfl (Refresh user and role information)

Function

When the Directory Server linkage facility is used, the pdgrprfl command updates to the most recent status the user and role information maintained in memory by HiRDB.

You should execute the pdgrprfl command in the following situations:

When you have added, changed, or deleted a user or role with the Directory Server

When you have added, changed, or deleted a member in a role

This command enables you to establish connection with the HiRDB using the most recent user information provided by the Directory Server. It also enables you to use table access privileges on the basis of the most recent role information in the Directory Server.

For details about the Directory Server linkage facility, see the HiRDB Version 8 System Operation Guide.

Executor

HiRDB administrator

Format

pdgrprfl

Option

None

Rules

You can execute the pdgrprfl command while HiRDB is active.

You can execute the pdgrprfl command on the server machine containing the single server or the server machine where the system manager is located.

The pdgrprfl command is available only when the Directory Server linkage facility is used.

Do not execute more than one pdgrprfl command at any one time.

If you execute the pdgrprfl command, the buffer hit rate for the table definition information and user privilege information reduces temporarily.

Notes

Return code 0 for the pdgrprfl command indicates normal termination, and return code 8 indicates abnormal termination.

Relationship between front-end server activity status and pdgrprfl command

You can execute the pdgrprfl command whether or not a front-end server is running. However, if there is a front-end server that is preparing to start or stop, the pdgrprfl command terminates with an error.

If you execute the pdgrprfl command when it cannot be determined whether or not a front-end server other than a recovery-unnecessary front-end server is running, an error results because the user or role information in the front-end servers cannot be updated. If you execute the pdgrprfl command when it cannot be determined whether or not a recovery-unnecessary front-end server is running, the command skips that front-end server. Its user or role information is updated to the most recent status later when it is restarted.

The following table provides details of the relationship between the front-end server activity status and the pdgrprfl command:

pdls -d svr command execution result | Front-end server status | pdgrprfl command execution result
Unit | Server | Recovery- unnecessary front-end server | Other front-end server
STARTING | STOP | Initial status | Command terminated with error. | Command terminated with error.
STARTING | STARTING | Preparing to start | Command terminated with error. | Command terminated with error.
ACTIVE | STARTING
STARTING | STARTING | Preparing to start (server process has already started) | Command terminated with error. | Command terminated with error.
ACTIVE | STARTING
ACTIVE | STARTING | Ready to start | Command processing executed. | Command processing executed.
ACTIVE | SUSPEND
ACTIVE | ACTIVE | Running | Command processing executed. | Command processing executed.
ACTIVE | TRNPAUSE
STOP |  | Stopped due to reduced mode operation | Command processing skipped. | Command processing skipped.
ACTIVE | STOP | Stopped by individual server stop command
STOP(N) |  | Stopped by normal termination | Command processing skipped. | Command processing skipped.
STOP(F) |  | Stopped by forced termination | Command processing skipped. | Command processing skipped.
STOP(A) |  | Server activity status unknown because unit shutdown was detected | Command processing skipped. | Command terminated with error.
STOPPING |  | Preparing to stop | Command terminated with error. | Command terminated with error.
ACTIVE | STOP | Ready to execute the database recovery utility (after executing the pdstart -r command) | Command terminated with error. | Command terminated with error.

Legend:

: Not applicable

pdhold (Shut down RDAREAs)

Function

The pdhold command shuts down specified RDAREAs. If a specified RDAREA is in use, the command shuts it down when its utilization is completed.

Shutdown without specifying any options other than -r and -q is called command shutdown.

Executor

HiRDB administrator

Format

pdhold -r {RDAREA-name[,RDAREA-name]...|ALL} [-q generation-number]
      [{-c|-i|-b [-w] [-u]|-s}]

Options

-r {RDAREA-name[,RDAREA-name]...|ALL}

RDAREA-name<identifier> ((1-30))

Specifies the names of RDAREAs to be shut down. A shutdown achieved by specifying the -r option is called command shutdown.

You can also use batch specification of RDAREA names. For details about batch specification of RDAREA names, see 1.5.2 Batch specification of RDAREA names in operation commands.

ALL

Specifies that all RDAREAs are to be shut down. The following table describes the RDAREAs that are shut down depending on the combination of the -q and other options:

Other option | -q option omitted | -q option specified
-b | All RDAREAs except list RDAREAs | RDAREAs of the specified generation in the inner replica group
-s | When the -s option is specified, the -q option cannot be omitted.
Other | All RDAREAs except the master directory RDAREA

Rules:

If you specify the -b option, you can also specify a master directory RDAREA; otherwise, you cannot specify a master directory RDAREA. Additionally, if you specify the -b option, you cannot specify a list RDAREA.

You cannot specify a duplicated RDAREA name. If specified, the system will eliminate all duplicated RDAREA names.

You can specify a maximum of 128 RDAREAs. If more than 128 RDAREA names are specified, the system ignores the excess names.

If an RDAREA name is enclosed in double quotation marks ("), the system treats it as being case sensitive; otherwise, the system treats it as all uppercase letters. If an RDAREA name contains a blank, enclose the entire name in double quotation marks ("). If you use the Bourne shell (sh), C shell (csh), or Korn shell (ksh), you need to enclose the RDAREA name in single quotation marks (').

If specifying a user RDAREA or user LOB RDAREA, make sure that the corresponding data dictionary RDAREA is in one of the following statuses:
Open and shutdown release status
Open and shutdown status placed by the pdhold command

When specifying both data dictionary and user RDAREAs or both data dictionary and user LOB RDAREAs, be sure to specify the data dictionary RDAREAs last.

If you are using the inner replica facility, you can also specify the original and replica RDAREA names. In this case, you can specify only user RDAREAs and user LOB RDAREAs.

-q generation-number<unsigned integer> ((0-10))

Specifies a replica RDAREA generation number.

If you specify this option, make sure that the original RDAREA name is specified in the -r option. An error results if you specify an original RDAREA whose replicas have all been deleted or if you specify a normal RDAREA (one without a replica RDAREA).

-c

Specifies that the RDAREA is to be shut down and then closed. This is called closed command shutdown.

If this option is omitted, HiRDB shuts down only the specified RDAREAs.

-i

Specifies that the RDAREAs that have been shut down are to be made available to users for referencing. This is called reference-possible command shutdown.

If you omit this option, you cannot reference the RDAREAs shut down.

-b [-w] [-u]

Specifies that the RDAREAs are to be placed in backup hold status.

The backup-hold status enables a backup copy to be made even in online mode. RDAREAs are placed in backup hold at the following times:

When a backup is acquired in pdcopy's updatable mode

When a backup is acquired using a method other than pdcopy, such as a general-purpose backup tool or OS command.

When dual logical volumes are separated

For example, specify this option to back up RDAREAs using JP1/OmniBack II's backup acquisition facility.

There are four different backup-hold statuses:

Reference-possible backup-hold (-b specified)

Reference-possible backup-hold (update WAIT mode) (-b,-w specified)

Updatable backup-hold (-b, -u specified)

Updatable backup-hold (WAIT mode) (-b, -w, -u specified)

Statuses 1 and 2 above are called committing a database.

The following explains each backup-hold status:

Reference-possible backup-hold

If an updating transaction can result in an error until the shutdown status is released, place the RDAREA on reference-possible backup-hold.

Notes

For an RDAREA in the reference-possible backup-hold status, no deadlock occurs with an updating transaction.

You can use the backup copy obtained in this status to restore the database to the point where the backup was made without having to use the system log. Using the system log existing immediately before the RDAREA was placed in the backup-hold status, you can restore the database to the point where the error occurred.

You can reference an RDAREA on reference-possible backup-hold, but an attempt to update the RDAREA results in an SQL error (-920) unless the shutdown status is released. If an updating transaction in no-log mode results in an error, all updated RDAREAs, if any, are placed in shutdown status.

Reference-possible backup-hold (update WAIT mode)

If an updating transaction can be placed on hold until the shutdown status is released, place the RDAREA on reference-possible backup-hold (update WAIT mode).

Notes

You can use the backup copy obtained in this status to restore the database to the point where the backup was made without having to use the system log. Using the system log existing immediately before the RDAREA was placed on backup-hold, you can restore the database to the point of error occurrence.

You can reference an RDAREA on reference-possible backup-hold (update WAIT mode), but an attempt to update the RDAREA results in the hold status unless the RDAREA is released from the backup-hold status. Therefore, the value of the pd_lck_wait_timeout operand in the system definitions and the value of PDCWAITTIME in the client environment definitions must be at least the period of time the backup-hold status is in effect. If timeout occurs, the updating transaction results in an SQL error (-770).

If you place an RDAREA on reference-possible backup-hold (update WAIT mode), deadlock may occur with an updating transaction. By specifying pd_deadlock_priority_use=Y in the system definition and a deadlock priority value in the pd_command_deadlock_priority operand, you can specify whether the updating transaction or the operation command is to take control in the event of deadlock.

If deadlock occurs, the backup-hold status placed by the pdhold command is released and the same backup-hold processing is repeated. You can use the backup copy obtained in this status to restore the database to the point where the backup was made. This retry processing is repeated up to five times. If deadlock occurs on the fifth retry, the system releases all the backup-hold statuses placed by the pdhold command and terminates the processing with an error.

If an updating transaction in no-log mode terminates with an error due to timeout or deadlock, all updated RDAREAs, if any, are placed in shutdown status.

Updatable backup-hold

If you want to immediately place an RDAREA in backup-hold status and access it in this status, place the RDAREA in the updatable backup-hold status. If another command is executing, you can execute the pdhold command to place an RDAREA in updatable backup hold status after that command has terminated.

Notes

You can reference and update an RDAREA in the updatable backup-hold status.

For an RDAREA on updatable backup-hold, an applicable page's physical log is output when the update buffer takes effect on the database, unless the shutdown status is released. Therefore, note the following:
(a) Check to see if there is enough space in the system log file.
(b) If updating a large amount of data, do not place the RDAREA on updatable backup-hold (a large amount of plug-in index data is also updated).
(c) Upon completion of backup processing, immediately release the RDAREA from the updatable backup-hold status.

Even during the execution of updating transaction, the pdhold command can place an RDAREA on updatable backup-hold.

To restore the database using the backup copy obtained in this status, you need the system log acquired after the backup processing and the previous synchronization point. However, if an updating transaction was executed in the pre-update log acquisition or no-log mode after the previous synchronization point, you cannot restore the database with this backup copy.

Shared RDAREAs cannot be placed in updatable backup-hold status.

Updatable backup-hold (WAIT mode)

If an RDAREA can be placed in backup-hold status after completion of an updating transaction and you want to access the RDAREA in this status, place the RDAREA in the updatable backup-hold status (WAIT mode).

Notes

To restore the database using a backup copy obtained in this status, you do not need the system log if no warning message (KFPH00157-W) was output when the RDAREA was released from the backup-hold status. If a warning message was output, you need the system log existing after the previous synchronization point. Using the system log existing immediately before the RDAREA was placed in backup-hold status, you can restore the database to the point of error occurrence, whether or not a warning message was output. If the backup copy was made with pdcopy specifying -M s, you need the system log existing after the previous synchronization point, whether or not a warning message was output.

If you place an RDAREA on updatable backup-hold (WAIT mode), you can reference and update the RDAREA.

For an RDAREA on updatable backup-hold (WAIT mode), an applicable page's physical log is output when the update buffer takes effect on the database unless the shutdown status is released. Therefore, note the following:
(a) Check to see if there is enough space in the system log file.
(b) If updating a large amount of data, do not place the RDAREA on updatable backup-hold (a large amount of plug-in index data is also updated).
(c) Upon completion of backup processing, immediately release the RDAREA from the updatable backup-hold status.

If updating transaction processing is underway, the pdhold command to place an RDAREA on updatable backup-hold (WAIT mode) is placed on hold until the transaction processing is completed.

If an RDAREA is on updatable backup-hold, an updating transaction in pre-update log acquisition or no-log mode for this RDAREA is placed on hold until the RDAREA is released from the backup-hold status. Therefore, the value of the pd_lck_wait_timeout operand in the system definitions and the value of PDCWAITTIME in the client environment definitions must be at least the period of time the backup-hold status is in effect. If timeout occurs, the updating transaction in pre-update log acquisition or no-log mode results in an error.

If you place an RDAREA on updatable backup-hold (WAIT mode), deadlock may occur with an updating transaction in the pre-update log acquisition or no-log mode. By specifying pd_deadlock_priority_use=Y in the system definition and a deadlock priority value in the pd_command_deadlock_priority operand, you can specify whether the updating transaction or the operation command is to take control in the event of deadlock.

If deadlock occurs, the backup-hold status placed by the pdhold command is released and the same backup-hold processing is repeated. You can use the backup copy obtained in this status to restore the database to the point where the backup was made. This retry processing is repeated up to five times. If deadlock occurs on the fifth retry, the system releases all the backup-hold status placed by the pdhold command and terminates the processing with an error.

If an updating transaction in pre-update log acquisition or no-log mode terminates with an error due to timeout or deadlock, all updated RDAREAs, if any, are placed in shutdown status.

Shared RDAREAs cannot be placed in updatable backup-hold (WAIT mode) status.

-w

Specifies that the RDAREAs are to be placed on reference-possible backup-hold (update WAIT mode) or updatable backup-hold (WAIT mode).

If you place the RDAREAs on reference-possible backup-hold (update WAIT mode), an updating transaction is placed on hold. If you place the RDAREAs on updatable backup-hold (WAIT mode), an updating transaction in pre-update log acquisition or no-log mode is placed on hold.

-u

Specifies that the RDAREAs are to be placed on updatable backup-hold.

You can reference and update an RDAREA on updatable backup-hold. However, an attempt to update a UAP or utility in no-log mode is placed on hold until the shutdown status is released. If you omit this option, the system places the specified RDAREAs on reference-possible backup-hold.

Rules of backup-hold

While an RDAREA is in the backup-hold status, you cannot execute pdmod (to extend, reinitialize, or change the attributes of an RDAREA), pdload, or pdrorg (to reload) on the RDAREA.

The status of an RDAREA on reference-possible backup-hold (update WAIT mode) or updatable backup-hold is not inherited during a rerun.

If you place an RDAREA on updatable backup-hold during operation in the no-log mode, be sure to use the pdlogswap -d sys -w command to swap the system log files and validate the synchronization point dump beforehand. Otherwise, you need to use pdrstr to specify a range of recovery in the event of an error.

If you terminate or restart HiRDB while making a backup copy in the updatable backup-hold status, the backup copy obtained cannot be guaranteed. In this case, obtain a backup copy again.

For an RDAREA on reference-possible backup-hold (update WAIT mode), deadlock may occur between the pdhold command and an updating transaction. For an RDAREA on updatable backup-hold, deadlock may occur between the pdhold command and an updating transaction in the no-log mode. In the event of deadlock, if the RDAREA is already placed on reference-possible backup-hold (update WAIT mode) or updatable backup-hold, execute the pdrels command to release the RDAREA from the shutdown status and then re-execute the pdhold command. If the RDAREA has not been placed on reference-possible backup-hold (update WAIT mode) or updatable backup-hold, re-execute the pdhold command after a while.

If update buffer contents become effective for an RDAREA while it is on updatable backup-hold (WAIT mode) status, a warning message (KFPH00157-W) is issued when the backup-hold status is released. If this warning message has not been issued, you can restore data to the point where the backup was made without using the system log. However, if this message has been issued, you need the system log obtained since the previous synchronization point. Whether or not the warning message has been issued, if you use the system log obtained immediately before the backup shutdown, you can restore data to the point where the error occurred. If you have acquired the backup using pdcopy with -M s specified, you need the system log obtained since the previous synchronization point whether or not the warning message has been issued.

If the pdhold command that has been issued to place an RDAREA in backup hold status is placed in wait status by another command, the timeout specified in the pd_lck_wait_timeout operand in the system definition does not apply to this pdhold command. The command is kept in wait status until the RDAREA is released from the other command. To terminate the pdhold command in wait status, use the pdcancel command to end the process.

You cannot place in backup hold status an RDAREA that has been placed temporarily in reference-possible shutdown status from online reorganization hold status. To determine whether or not an RDAREA is in online reorganization hold status, use the pdls -d org command.

-s

Specifies that the RDAREAs are to be placed in synchronization shutdown status.

Synchronization shutdown is used when the inner replica facility is used. RDAREAs are placed in synchronization shutdown status, for example, when data in an RDAREA is to be copied as the data in another generation of RDAREA within the same inner replica group (for re-pairing paired volumes).

When an RDAREA is placed in synchronization shutdown status, the buffers for the corresponding RDAREA are discarded and the referencing and updating transactions are placed in wait status.

Rules

If an RDAREA is placed in synchronization shutdown status, conformity is lost in the contents of the RDAREA because the update buffer for that RDAREA is discarded without being applied to the database. If there is an update buffer, inconsistent information is written into the RDAREA. You cannot release this synchronization shutdown status until data is copied from another RDAREA to the corresponding RDAREA within the same inner replica group to achieve data conformity.

An error results if you specify this option, and the following RDAREAs are specified in the -r option:

RDAREAs other than user RDAREAs or user LOB RDAREAs

Original RDAREAs all of whose replica RDAREAs have been deleted, or RDAREAs that do not have replica RDAREAs

If you specify this option and multiple RDAREAs are specified in the -r option, the command executes the processing in the batch mode for each server. If an error occurs during processing, the command ignores the processing at the server containing the erroneous RDAREA, and resumes processing at the other servers.

While synchronization shutdown is in effect, you cannot execute pdmod (to extend or delete RDAREAs or change their attributes), pdload, pdrorg, or pdcopy.

Once an RDAREA is placed in synchronization shutdown status, it is also locked in the same manner as with reference-possible backup hold (update WAIT mode). Therefore, the values of the pd_lck_wait_timeout operand in the system definition and PDCWAITTIME in the client environment definition must be no less than the duration of the synchronization shutdown. If a timeout occurs, a referencing or updating transaction results in an SQL error (-770).

If an RDAREA is placed in synchronization shutdown status, deadlock may occur for a referencing or updating transaction. By specifying pd_deadlock_priority_use=Y in the system definition and a deadlock priority value in the pd_command_deadlock_priority operand, you can specify whether the referencing or updating transaction or the operation command is to take control in the event of deadlock. If the operation command results in an error due to deadlock, re-execute the pdhold command after a specific period of time. If the pdhold -s command with multiple RDAREAs specified results in an error, synchronization shutdown processing is ignored for all the RDAREAs.

If an updating transaction running in the no-log mode terminates with an error due to a timeout or deadlock and if there is an RDAREA that has already been updated by the transaction, that RDAREA will be placed in no-log shutdown status.

To perform the synchronized shutdown of multiple related RDAREAs, such as those containing a table and its index, use only one pdhold command.

Rules

You can execute the pdhold command only while HiRDB is active.

Execute the pdhold command at the server machine containing the single server or the server machine where the system manager is located.

The pdhold command locks RDAREAs in the EX mode or in the PR mode if the -i or -b option is specified. Therefore, if another transaction is accessing the specified RDAREA, the pdhold command is placed on hold until the transaction terminates. If the -i or -b option is specified, the pdhold command is placed on hold only if an updating transaction is accessing a specified RDAREA. Table 2-2 shows the relationship between an RDAREA's shutdown status and transaction.

Table 2-2 Relationship between RDAREA's shutdown status and transaction

RDAREA shutdown status | Transaction
Reference | Update | Update (no log)¹
Command shutdown | Wait | Wait | Wait
Error | Error | Error
Reference-possible shutdown | No wait² | Wait | Wait
No wait | Error | Error
Reference-possible backup hold | No wait² | Wait | Wait
No wait | Error | Error
Reference-possible backup hold (update WAIT mode) | No wait² | Wait | Wait
No wait | Wait | Wait
Updatable backup-hold | No wait | No wait | No wait
No wait | No wait | Wait
Updatable backup-hold (WAIT mode) | No wait² | Wait | Wait
No wait | No wait | Wait
Synchronization shutdown | Wait | Wait | Wait
Wait | Wait | Wait

Note

The upper row indicates the case in which a transaction locks the RDAREA first. The lower row indicates the case in which the pdhold command locks the RDAREA first. For example, if a referencing UAP locks the RDAREA first, an attempt to place the RDAREA in the command shutdown status using the pdhold command places the command on hold. If the pdhold command (command shutdown) locks the RDAREA first, an attempt to execute a UAP to update this RDAREA results in an error.

1 This indicates a transaction in the no-log mode for which NO is specified for PDDBLOG in the client environment definition.

2 If an updating access occurs between a referencing access and the time the command is entered, any subsequent accesses will be placed in wait status.

Table 2-3 shows the handling of a transaction in shutdown processing, where in shutdown processing means ACCEPT-HOLD (the RDAREA status obtained as the execution result by the pddbls command):

Table 2-3 Handling of a transaction in shutdown processing

Status in shutdown processing | Referencing transaction | Updating transaction
Command shutdown | Error | Error
Reference-possible shutdown | Wait | Error
Reference-possible backup hold | Wait | Error
Reference-possible backup hold (update WAIT mode) | Wait | Wait
Updatable backup-hold | No wait* | No wait*
Updatable backup-hold (WAIT mode) | Wait | Wait
Synchronization shutdown | Wait | Wait

* The transaction is not placed in wait status because updatable backup-hold status does not lock RDAREAs.

You cannot place an RDAREA containing a falsification prevented table that is in reload-not-completed data status into reference-possible command shutdown status (-i specified) or backup hold status (-b specified). Reloading data to a falsification prevented table with pdrorg releases the table from reload-not-completed data status. After the reload-not-completed data status is released, place the table in reference-possible command shutdown or backup hold status.

If the pdhold command is executed on a shared RDAREA, all back-end servers are locked. If there can be multiple concurrent accesses to the corresponding RDAREA, global deadlock may occur, resulting in a timeout. If global deadlock has occurred, re-execute the pdhold command.

When RDAREA automatic extension has been applied to an RDAREA, placing the RDAREA in updatable backup-hold status or updatable backup-hold (WAIT mode) status suppresses the automatic extension of the RDAREA. To release RDAREA automatic extension from the suppression, execute the pdrels command to release the updatable backup hold or the updatable backup hold (WAIT mode).

When RDAREA automatic extension has been applied to an RDAREA, before placing the RDAREA in updatable backup-hold status or updatable backup-hold (WAIT mode) status, use the database condition analysis utility to check that there is enough unused area. If there is not enough unused area, execute the free page release utility.

Note

You can use the pddbls command to check the result of the pdhold command.

The following shows the pdhold command's return codes:
0: Normal termination
4: Warning termination (some RDAREA processing terminated with an error)
8: Abnormal termination
12: Abnormal termination (an event occurred that prevented output of an error message)
If the error code is 12, check the error message in syslogfile at the host where the single server or dictionary server is located, eliminate the cause of the error, and then re-execute the command. If no error message has been output to syslogfile, contact the customer engineer.

If hybrid is selected as the processing method for Real Time SAN Replication and any of the options listed below is specified during execution of the pdhold command, a database synchronization wait for the remote site occurs. This may result in an overhead of 2 seconds or more for each RDAREA specified in the -r option.

-c (closed, command shutdown)

-b -u (updatable backup hold)

-b- -u -w (updatable backup hold (WAIT mode))

-s (synchronization shutdown)

If database synchronization wait for the remote site fails, you must restore the database at the remote site. For details about error handling when Real Time SAN Replication is used, see the HiRDB Version 8 System Operation Guide.

pditvstop (Stop periodic acquisition of HiRDB status)

Function

The pditvstop command stops a command that was started by the pditvtrc command.

Executor

Any user (with or without privileges)

Format

pditvstop output-file-prefix

Command arguments

output-file-prefix

Specifies the prefix of the output file that was specified in a pditvtrc command.

Rules

The pditvstop command can be executed at any time, whether or not HiRDB is active.

Execute the pditvstop command from the server machine that was used to execute the pditvtrc command that is to be stopped.

If you cannot execute the pditvstop command for some reason, such as that output-file-prefix.lck or output-file-prefix.pid has been deleted, use the ps command to check the PID and then use kill PID(kill -TERM PID).

The output file prefix is part of the output file path used in the pditvtrc command. The pditvstop command accepts both absolute and relative path names, regardless of the output file prefix specified in the pditvtrc command (absolute or relative path name).

Notes

The following shows the pditvstop command's return codes:
0: Normal termination
1: One of the following meanings:

The locked directory output-file-prefix.lck was not found.

output-file-prefix.lck or output-file-prefix.pid was not found.

output-file-prefix.lck or output-file-prefix.pid was found, but the process was not found.

pditvtrc (Periodically acquire the HiRDB status)

Function

The pditvtrc command executes a specified command at a specified interval (in seconds) and then outputs the termination status to the standard output or standard error output file.

Executor

Any user (with or without privileges). The execution permissions required by the command that is executed by the pditvtrc command apply.

Format

pditvtrc interval-in-seconds output-file-prefix file-size retained-generations-count

         command [arg1 [arg2] ...]

Command arguments

interval-in-seconds

Specifies the interval in seconds at which the specified command is to be executed. The specified value must be an integer of 0 or greater (if 0 is specified, the command will be executed consecutively).

If the specified command does not terminate within the specified interval, counting the seconds stops. When the specified command terminates, the pditvtrc command executes the next command and starts counting the seconds again. Even when the specified command terminates within the specified interval, an error may still occur with respect to the specified interval.

output-file-prefix

Specifies the prefix of the output file.

The actual output file name is output-file-prefixXX (00 XX < number of retained generations). If output-file-prefixXX already exists when the pditvtrc command starts, XX begins at YY + 1, where the most recent output file is output-file-prefixYY. However, if YY + 1 is equal to or greater than the number of retained generations and there is no output file with output-file-prefixXX, then XX begins at output-file-prefix00.

After executing the specified command, if the output file exceeds the specified file size, the pditvtrc command swaps output files and outputs the results of the command's execution to the output file named output-file-prefixXX, with XX incremented. When the value of XX reaches the specified number of retained generations, the value of XX is reset to 00 in wrap-around fashion. If this happens, the previous output files will be overwritten.

Each time an output file exceeds the specified file size, the pditvtrc command swaps the output files to retain a maximum of the specified number of generations of output files.

file-size

Specifies the maximum output file size in megabytes.

After executing the specified command, if the current output file named output-file-prefixXX exceeds this file size, the pditvtrc command swaps the current output files.

retained-generations-count((2-100))

Specifies the number of output file generations to be retained.

The number of generations applies to the actual output file names. The number of output file generations is unlimited, but a maximum of the specified number of the newest output files are retained because the prefix of the output file can be 00 XX < number of retained generations.

command [arg1 [arg2]...]

Specifies the command to be executed and its arguments.

The syntax for the command line is the same as for normal commands. You can specify not only HiRDB operation commands but also any other commands.

Rules

The pditvtrc command can be executed at any time, whether or not HiRDB is active. For the command that is specified within the pditvtrc command, the rules for that command are applicable.

Execute the pditvtrc command from a desired server machine. For the command that is specified within the pditvtrc command, the rules for that command are applicable.

Note the available space at the output target because the pditvtrc command may output more execution results than the file size number of retained generations. If the HiRDB directory ($PDDIR) and OS directory (such as /tmp and /var) become full, HiRDB and the OS may not function correctly. For this reason, we recommend that you output the execution results to a different disk than one that contains HiRDB and OS directories.

The pditvtrc command creates a locked directory named output-file-prefix.lck to avoid multiple concurrent outputs to the same output file prefix. This lock is released when the pditvstop command is terminated or when the termination is caused by the SIGTERM or SIGQUIT signal. However, forcible termination using the SIGKILL signal may retain the lock. If the locked directory is retained, use the ps command to make sure that no corresponding process is running, and then delete the locked directory by executing rm -r output-file-prefix.lck.

When executed, the pditvtrc command starts the background process that functions at the specified interval and then terminates the pditvtrc command itself. This background process keeps running even if the terminal used to execute the pditvtrc command is terminated. To terminate the process, you must execute pditvstop output-file-prefix. If you cannot execute the pditvstop command for some reason, such as that output-file-prefix.lck or output-file-prefix.pid has been deleted, use the ps command to check the PID and then use kill PID(kill -TERM PID). This background process treats the SIGQUIT signal in the same manner as the SIGTERM signal.

If you execute the pdstart command while the pditvtrc command is executing, HiRDB startup may fail. If this happens, re-execute the pdstart command. Also, When you execute a HiRDB command with the pditvtrc command, execute the pditvstop command before terminating HiRDB.

If the specified command terminates with a return code other than 0 for more than nine times in a row, the pditvtrc command terminates.

Notes

The following shows the pditvtrc command's return codes:
0: Normal termination
1: A pditvtrc command with the same output file is already running or the command is unable to create an output file or the locked directory output-file-prefix.lck.

Output format

YYYY/MM/DD HH:MM:SS   ...............................................1
Standard output + standard error output of "command  arg1  arg2 ..."..2
RC=command return-code   ................................................3
       :

Explanation

Execution date and time of the specified command

Standard output and standard error output of "command arg1 arg2 ..."

Return code of "command arg1 arg2 ..."

For details about 2 and 3, see the applicable manual (for HiRDB commands, see the description of the applicable command in this manual).

Examples

Example 1:

This example executes the pditvtrc command for various commands:

pditvtrc 60 /outputdir/rpc 10 2 pdls -d rpc -a
pditvtrc 60 /outputdir/trn 10 2 pdls -d trn
pditvtrc 60 /outputdir/prc 10 2 pdls -d prc
pditvtrc 60 /outputdir/lck 10 2 pdls -d lck
pditvtrc 60 /outputdir/buf 10 2 pdbufls

Explanation

Every 60 seconds, each pditvtrc command adds the execution result of its command to a separate output file. The maximum size of each output file is 10 megabytes and the number of retained generations is 2 for each output file.

Example 2:

This example executes one pditvtrc command to execute multiple commands:

pditvtrc 60 /outputdir/trc 20 6 trcscript

Contents of trcscript

#!/bin/posix/sh
SCRIPT_RC=0

# date '+%Y/%m/%d %H:%M:%S' pditvtrc displays the first command start time
pdls -d rpc -a
RC=$?
echo "RC=$?"
if [[ $RC != 0 ]] ; then SCRIPT_RC=1; fi

#date '+%Y/%m/%d %H:%M:%S' pdls -d trn displays its own execution time
pdls -d trn
RC=$?
echo "RC=$?"
if [[ $RC != 0 ]] ; then SCRIPT_RC=1; fi

#date '+%Y/%m/%d %H:%M:%S' pdls -d prc displays its own execution time
pdls -d prc
RC=$?
echo "RC=$?"
if [[ $RC != 0 ]] ; then SCRIPT_RC=1; fi

date '+%Y/%m/%d %H:%M:%S'
pdls -d lck
RC=$?
echo "RC=$?"
if [[ $RC != 0 ]] ; then SCRIPT_RC=1; fi

#date '+%Y/%m/%d %H:%M:%S' pdls -d prc displays its own execution time
pdbufls
RC=$?
echo "RC=$?"
if [[ $RC != 0 ]] ; then SCRIPT_RC=1; fi

exit $SCRIPT_RC

Explanation

This example executes the shell script trcscript every 60 seconds and outputs the execution results to the output file /outputdir/trc. The size of the output file is 20 megabytes and the number of retained generations is 6.

pdjarsync (Manipulate JAR files)

Function

The pdjarsync command manipulates JAR files.

There are the following types of JAR file manipulation:

Re-registration of a JAR file between hosts (applicable to HiRDB/Parallel Server only)

Registration of a JAR file

Re-registration of a JAR file

Deletion of a JAR file

Display of a list of JAR files

This command is used when Java stored procedures or Java stored functions are used.

Executor

HiRDB administrator

Format

HiRDB/Single Server

pdjarsync [{-I|-R|-D| -L } ]
          [-u authorization-identifier [,authorization-identifier]...]
          [-f JAR-filename]

HiRDB/Parallel Server

pdjarsync [{-S|-I|-R|-D| -L}]
          [-x host-name[,host-name]...]
          [-u authorization-identifier [,authorization-identifier]...]
          [-f JAR-filename]

Options

{-S|-I|-R|-D| -L}

Specifies the type of JAR file manipulation.

-S

For the HiRDB/Parallel Server, this option re-registers the specified JAR file between hosts.

The command re-registers (replaces) a JAR file in the host specified with the -x option into the server machine in the HiRDB environment. If the -x option is omitted, the command re-registers a JAR file in the server machine containing the dictionary server into the server machine in the HiRDB environment.

Specify the -S option if you have modified the HiRDB server configuration (such as when increasing the number of server machines) or conducted system switchover.

-I

This option registers the specified JAR file.

If you specify this option, be sure to specify the -u and -f options.

If the specified JAR file has already been registered, the command results in an error.

-R

This option re-registers the specified JAR file.

If the specified JAR file has already been registered, the command overwrites the registered JAR file.

If you specify this option, be sure to specify the -u and -f options.

-D

This option deletes the specified JAR file.

If you specify this option, be sure to specify the -u and -f options.

If the specified JAR file has not been registered, the command results in an error.

If the pdjarsync command terminates abnormally, a JAR file under write operation may remain in the system. In this case, specify the -d option to delete such remaining JAR files.

-L

This option displays a list of registered JAR files.

Table 2-4 shows the relationship between JAR file manipulation type and other options.

Table 2-4 Relationship between JAR file manipulation type and other options

JAR file manipulation type | Other option
-x | -u | -f
-S | O* | O | O
-I | O | M | M
-R | O | M | M
-D | O | M | M
-L | O | O | O

M: Mandatory

O: optional

* If specifying the -x option, specify only one host name.

-x host-name[,host-name]

If specifying the -s option, specify only one host name that is to be the origin of re-registration. If this option is omitted, the system assumes the host where the dictionary server is located.

If you specify an option other than -s, specify the name of the host being manipulated. If omitted, the system assumes all hosts in the HiRDB environment.

-u authorization-identifier[,authorization-identifier]...

Specify the authorization identifier of the user who is to manipulate the JAR file.

If you have specified the -I, -R, and -D options, be sure to specify this option also.

For the authorization identifier, you cannot specify MASTER or HiRDB.

-f JAR-filename

Specify the name of the JAR file to be manipulated.

If you have specified the -I, -R, and -D options, be sure to specify this option also.

If you specify the -S and -L options but omit this option, the system assumes all JAR files that have been registered.

The JAR files are stored in the directory specified with the pd_java_archive_directory operand in the system definitions.

Rules

You can execute the pdjarsync command whether or not HiRDB is active.

Execute the pdjarsync command at the server machine containing the single server or the server machine where the system manager is located.

Do not execute more than one pdjarsync command at any one time.

Notes

If you execute the INSTALL JAR, REPLACE JAR, or REMOVE JAR SQL statement, the pdjarsync command is executed internally. In these cases, the pdjarsync command is executed from the single server or the front-end server.

The following shows the pdjarsync command's return code:
0: Normal termination
4: Abnormal termination (for registration or re-registration, the specified JAR has already been registered; for deletion, the specified JAR file has not been registered)
8: Abnormal termination

Output format

HOSTNAME(aabbcc)  DATE        TIME       SIZE    OWNER   FILE
dd...d               eeee/ff/gg    hh:ii:jj      kk...k      ll...l     mm...m
 :               :          :        :       :      :

Explanation

aabbcc

Time the pdjarsync command was executed

dd...d

Host name

eeee/ff/gg

Date of the JAR file*

hh:ii:jj

Time of the JAR file*

kk...k

Size of the JAR file (in bytes)

ll...l

Owner of the JAR file

mm...m

Name of the JAR file

* If an SQL statement (INSTALL JAR, REPLACE JAR) or JDBC method was used to register or re-register the JAR file, this is the date and time the SQL statement or JDBC method was executed. If the pdjarsync command was used to register or re-register the JAR file, this is the date and time of the registered or re-registered JAR file.

pdlistls (Display list definition information)

Function

The pdlistls command displays the list definition information.

Executor

HiRDB administrator

Format

pdlistls [-d {1|2}]
      [-u list-owner's-name]
      [-t list-base-table-owner's-name,list-base-table-name]

Options

-d {1|2}

Specifies the list definition information to be displayed.

-d option | Information to be displayed
Values of system definitions* | List owner's name | Name of list | Number of lists | Base table's owner's name | Name of base table
1 | D | D |  | D |  |
2 | D | D | D |  | D | D

D: Displayed

: Not displayed

* Indicates the values of the pd_max_list_users and pd_max_list_count operands.

-u list-owner's-name <identifier> ((1-30))

To display only the specified list owner's list definition information, specify the name of the list owner with this option. If this option is omitted, the system assumes all list owners.

The specified list owner's name is treated as all uppercase letters unless it is enclosed in double quotation marks (").

-t list-base-table-owner's-name, list-base-table-name

To display only the specified list base table's list definition information, specify the list base table's owner's name and list base table's name with this option.

A list base table's owner's name can be expressed as 1-8 characters and a list base table's name can be expressed as an identifier consisting of 1-30 characters. The specified list base table's owner's name and list base table's name are treated as all uppercase letters unless they are enclosed in double quotation marks ("). If the name contains a space, enclose it in double quotation marks (").

Rules

You can execute the pdlistls command only when HiRDB is active.

Execute the pdlistls command on the server machine containing the single server or the server machine where the system manager is located.

Notes

Return code 0 for the pdlistls command indicates normal termination, and return code 8 indicates abnormal termination.

Output format

-d 1 specified

STATE OD LIST  DEFINITION
#        OWNER NAME    LIST COUNT
[aa...a     bb...b          cc...c]
          :
[NOT FOUND dd...d]
pd_max_list_users : ee...e
pd_max_list_count : ff...f

Explanation

aa...a

Sequence number displayed

bb...b

List owner's name

cc...c

Number of segments in the list

dd...d

Information that was not found

-t option specified: TABLE

-u option specified: USER

ee...e

Value of the pd_max_list_users operand in the system definitions (for the single server or dictionary server)

ff...f

Value of the pd_max_list_count operand in the system definitions (for the single server or dictionary server)

-d 2 specified

STATE OD LIST  DEFINITION
#        OWNER NAME  LIST NAME  BASE TABLE OWNER  BASE TABLE NAME
[aa...a     bb...b         cc...c        dd...d                 ee...e]
          :
[NOT FOUND ff...f]
pd_max_list_users : gg...g
pd_max_list_count : hh...h

Explanation

aa...a

Sequence number displayed

bb...b

List owner's name

cc...c

Name of the list

dd...d

List base table's owner's name

ee...e

List base table's name

ff...f

information that was not found

-t option specified: TABLE

-u option specified: USER

gg...g

Value of the pd_max_list_users operand in the system definitions (for the single server or dictionary server)

hh...h

Value of the pd_max_list_count operand in the system definitions (for the single server or dictionary server)

pdlodsv (Reduce the size of the installation directory)

Function

If the following facilities are not used, the pdlodsv command deletes unneeded load modules from the HiRDB installation directory, thereby saving the disk space:

Java stored procedures and stored functions

Directory Server linkage facility

HiRDB External Data Access facility

The pdlodsv command is supported by HP-UX 11.0 (32-bit-mode POSIX library version), Solaris (32-bit-mode POSIX library version), and AIX 5L (32-bit-mode POSIX library version).

Once you execute the pdlodsv command, these facilities will no longer be available. Note that if you are using either one of these facilities, you cannot execute the pdlodsv command.

Executor

Superuser

Format

pdlodsv [-r load-type]

Option

-r load-type

Specifies the load type to be deleted.

If you omit this option, the system displays the status of the current installation directory.

posix

The command deletes the POSIX library version of load modules, that is, the following directories and files. A POSIX version of the load module is created when the pdsetup -l command is executed on HP-UX 11.0 (32-bit mode), Solaris (32-bit mode), and AIX 5L(32-bit mode).

Type
Directory
File

HiRDB/Single Server
/opt/HiRDB_S/bin_r/
/opt/HiRDB_S/bin_nr/
/opt/HiRDB_S/lib_r/
/opt/HiRDB_S/lib_nr/
All files under the directory

HiRDB/Parallel Server
/opt/HiRDB_P/bin_r/
/opt/HiRDB_P/bin_nr/
/opt/HiRDB_P/lib_r/
/opt/HiRDB_P/lib_nr/
All files under the directory

Rules

You can execute the pdlodsv command whether or not HiRDB is active. However, do not execute it while the pdsetup command is executing.

Execute the pdlodsv command for each server machine.

Notes

Return code 0 for the pdlodsv command indicates normal termination, return code 1 indicates abnormal termination (such as a user privilege error), return code 8 indicates abnormal termination (such as a missing environment variable), and return code 12 indicates abnormal termination (such as an invalid option or user privilege error).

If you reinstall HiRDB, the effects of size reduction will be lost. Therefore, if you have reinstalled HiRDB, execute the pdlodsv command as required.

If you execute the pdlodsv command, the Java stored procedures, Java stored functions, and Directory Server linkage facility are no longer available. To use these facilities, do not execute the pdlodsv command. To use these facilities after executing the pdlodsv command, reinstall HiRDB.

Output format

KIND      STATUS
aa...a      bb...b

Explanation

aa...a

Load type

POSIX: POSIX library version of HiRDB

bb...b

Status of the facility with the POSIX library version of HiRDB:

USE

This facility cannot be deleted because it is in use.

NOUSE

This facility is not in use.

REMOVED

This facility has already been deleted from the installation directory.

Note

If you execute the pdlodsv command with a HiRDB other than the HP-UX 11.0 (32-bit mode), Solaris (32-bit mode), or AIX 5L version, only the header section is displayed.

pdlogadpf (Allocate log file)

Function

The pdlogadpf command allocates during HiRDB operation a physical file to a file group specified in the HiRDB system definition. The physical file must have been created with the pdloginit command before the pdlogadpf command is executed.

Once the pdlogadpf command is executed, the file group becomes available to the active HiRDB system when it is opened by the pdlogopen command.

Executor

HiRDB administrator

Format

HiRDB/Single Server

pdlogadpf -d spd [-s server-name] -g file-group-name
         -a primary-physical-file-name [-b secondary-physical-file-name]

HiRDB/Parallel Server

pdlogadpf -d spd -s server-name -g file-group-name
         -a primary-physical-file-name [-b secondary-physical-file-name]

Options

-d spd

Specifies that a physical file is to be allocated as a synchronization point dump file.

-s server-name<identifier> ((1-8))

Specifies the name of the server corresponding to the file group.

-g file-group-name<identifier> ((1-8))

Specifies the name of the file group to which the physical file is to be allocated. This file group name must have been specified in a single server definition, front-end server definition, back-end server definition, or dictionary server definition.

-a primary-physical-file-name<pathname> ((up to 167 characters))

Specifies the absolute path name of the primary physical file that is to be allocated to the file group. Specify the physical file name in the format HiRDB-file-system-area-name/HiRDB-file-name.

-b secondary-physical-file-name<pathname> ((up to 167 characters))

Specifies the absolute path name of the secondary physical file that is to be allocated to the file group. Specify the physical file name in the format HiRDB-file-system-area-name/HiRDB-file-name.

This option is required when dual synchronization point dump files are used. If dual synchronization point dump files are not used, specifying this option will result in an error.

If you use dual synchronization point dump files and specify both the -a and the -b options, and if an allocation error occurs on either the primary or secondary file, a command error results.

Rules

The pdlogadpf command can be executed only while HiRDB is active.

The pdlogadpf command must be executed at the server machine containing the single server or the server machine where the system manager is located.

Notes

Executing the pdlogadpf command for a file group to which a physical file has already been allocated results in an error.

The result of the pdlogadpf command can be determined from the command's return code, an error message (if any), or the message log. Return code 0 for this command indicates normal termination, 4 indicates abnormal termination, and 8 indicates abnormal termination (such as invalid option or rsh error).

If you use Real Time SAN Replication based on the log-only synchronous method, the synchronization point dump file to be allocated depends on the site where the command is executed:

At the transaction execution site
The synchronization point dump file for transaction processing is allocated. The synchronization point dump file for log application processing cannot be allocated.

At the log application site
The synchronization point dump file for log application processing is allocated. The synchronization point dump file for transaction processing cannot be allocated.

Examples

Allocate a physical file to a file group specified in the system definition.

Name of file group
spdfgf15

Name of physical file

/svr01/spdf15

HiRDB/Single Server

pdlogadpf -d spd                                    1
         -g spdfgf15                               2
         -a /svr01/spdf15                          3

Explanation

Type of log file: spd (synchronization point dump file)

Name of file group: spdfgf15

Name of physical file: /svr01/spdf15

HiRDB/Parallel Server

pdlogadpf -d spd                                    1
         -s bes1                                   2
         -g spdfgf15                               3
         -a /svr01/spdf15                          4

Explanation

Type of log file: spd (synchronization point dump file)

Name of server corresponding to the file group: bes1

Name of file group: spdfgf15

Name of physical file: /svr01/spdf15

pdlogatul (Control the automatic log unloading facility)

Function

The pdlogatul command controls the automatic log unloading facility as follows:

Restarting the automatic log unloading facility that was terminated during HiRDB operation

Cancelling the automatic log unloading facility during execution

Displaying the status of the automatic log unloading facility

For details about the automatic log unloading facility, see the HiRDB Version 8 System Operation Guide.

Executor

HiRDB administrator

Format

HiRDB/Single Server

pdlogatul -d sys [-s server-name] [{-i | -b | -t[-w]}]

HiRDB/Parallel Server

pdlogatul -d sys -s server-name [{-i | -b | -t[-w]}]

Options

-d sys

Specifies that the system log files are to be manipulated.

-s server-name <identifier> ((1-8))

Specifies the name of the server to be manipulated.

-i

Specifies that the status of the automatic log unloading facility is to be displayed.

-b

Specifies that the automatic log unloading facility is to be restarted.

-t

Specifies that the automatic log unloading facility is to be cancelled.

-w

If the -t option is specified to cancel the automatic log unloading facility, this option specifies that the command termination is to be delayed until the current log unloading process is completed. The -w option takes effect only when the -t option is specified. If you specify the -t option, but omit the -w option, the system cancels the automatic log unloading facility immediately after the pdlogatul command is executed, forcibly terminating the ongoing unloading process.

When this option is specified, completion of unloading process is delayed by about nine hours (32768 seconds). If the unloading process is not completed within this period of time, the system cancels the automatic log unloading facility, in which case the unloading process will be terminated forcibly.

By specifying this option, you can eliminate the incomplete unload log files (which usually result from cancellation of the automatic log unloading facility) and input all the current unload log files with pdrstr.

Rules

You can execute the pdlogatul command while HiRDB is active. If you specify the -i or -t option, you can execute the command even during the HiRDB termination processing (during the execution of the pdstop command).

Execute the pdlogatul command at the server machine containing the single server or the server machine where the system manager is located.

If there is a current log generation, its log file group information is output.

If the pdlogatul -t -w command terminates with return code 4, there may be an incomplete unload log file. In these cases, check the nature of the error on the basis of the output error message, take an appropriate action, and re-execute the pdlogatul -b command. Then, execute the pdlogatul -t -w command.

Notes

The following shows the pdlogatul command's return code:
0: Normal termination
4: One of the following:

If the -t and -w options were specified, the system forcibly terminated unloading process and cancelled the automatic log unloading facility because the unloading process was not completed within the waiting period (32768 seconds).

If the -t and -w options were specified, the system cancelled the automatic log unloading facility while monitoring the completion of unloading process for one of the following reasons:

None of the directories for unload log files was available.

The name of the unload log file was duplicated.

There were not enough resources (such as a memory shortage or too many active processes)

8: Command error

Output format

HOSTNAME : aa...a(bb...b)
SERVER_NAME : cc...c
AUTO_LOG_UNLOAD  NOW_UNLOAD_LOG_GROUP  CREATE_DIR
                d                   ee...e      ff...f
CURRENT LOG GENERATION INFO.
LOG_GROUP  GEN_NO. SERVER_RUN_ID  RUN_ID  UNLOAD_FILE_NAME
gg...g        hh...h     ii...i              jj...j      kk...k

Explanation

aa...a

Host name

bb...b

The time pdlogatul was executed (in the format hour:minute:second)

cc...c

Server name

d

Status of the automatic log unloading facility:

ACTIVE: Active

STOP: Inactive

STOPPING: Waiting for unloading process during termination

-: Automatic log unloading facility unavailable

ee...e

File group name for the system log file that is currently unloaded

If the automatic log unloading facility is not active, **** is displayed.

ff...f

Directory name for the unload log file in use

gg...g

File group name for the current generation of system log files

hh...h

Generation number of the current generation of system log

ii...i

Run ID of the current generation of server

jj...j

Run ID of the current generation of system log

kk...k

Name of the file created when the current generation of log was automatically unloaded

pdlogchg (Change status of log file)

Function

The pdlogchg command forcibly places a specified file group in unload completed status, extraction by HiRDB Datareplicator completed status, or overwriting permitted status for online reorganization. The status of the current file group cannot be changed.

Executor

HiRDB administrator

Format

HiRDB/Single Server

pdlogchg {-d sys [-s server-name] -g file-group-name [{-R|-G}]
        |-z log-point-information-filename}

HiRDB/Parallel Server

pdlogchg {-d sys -s server-name [-u unit-identifier] -g file-group-name [{-R|-G}]
        |-z log-point-information-filename [-x host-name]}

Options

-d sys

Specifies that the status of a system log file is to be changed.

-s server-name<identifier> ((1-8))

Specifies the name of the server corresponding to the file group.

-u unit-identifier<identifier> ((4 characters))

When the standby-less system switchover (effects distributed) facility is used, specifies the unit identifier of the host that contains the disk on which the system log file whose status is to be changed was created.

When the applicable server and system manager are running, the -u option is ignored, if specified.

Specifying the -u option results in an error if any of the following is true:

The specified unit does not belong to the target HA group for the server specified in the -s option.

The server specified in the -s option does not belong to the HA group.

The standby-less system switchover (effects distributed) facility is not in effect.

The following table describes whether or not the -u option is required:

Server status | Host containing the disk where file is created | Specification of -u option
Active | Host containing the running back-end server | Optional
Inactive | Host containing the primary back-end server
Other host | Mandatory

-g file-group-name<identifier> ((1-8))

Specifies the name of the file group whose status is to be changed.

-z log-point-information-filename<pathname>

Specifies that the status change is to be applied only to file groups older than the log point recorded in the specified log point information file.

One of the following files must be specified as the log point information file:

File created by specifying the -z option in the pdcopy command

File created by specifying the -z option in the pdrstr command

The log point information file must be specified in terms of an absolute path name beginning with / (root directory).

-x host-name<identifier> ((1-32))

Specifies the name of the host of the server to which the log file group whose status is to be changed belongs.

When this option is omitted, the host where the command is entered is assumed.

-R

Specifies that a file group is to be forcibly changed from extracting status to extraction completed status when HiRDB Datareplicator linkage is being executed. When this option is specified, only the extraction status is changed from extracting to extraction completed.

-G

Specifies that when updatable online reorganization is underway, a file group in overwriting denied status for online reorganization is to be placed forcibly in overwriting permitted status for online reorganization.

Rules

The pdlogchg command can be executed under the following conditions:

If pd_log_unload_check=N is specified in the system definitions, HiRDB is running, and the file group to be operated upon is open, the command cannot be executed without the -R option.

In all other cases, the command can be executed regardless of whether or not HiRDB is running (except when HiRDB is booting or terminating).

The pdlogchg command must be executed at the server machine containing the single server or the server machine where the system manager is located.

Notes

The following are the pdlogchg command's return codes:
0: Normal termination
4: Abnormal termination
8: Abnormal termination (such as an invalid option or rsh error)
12: Abnormal termination (when retry was executed from a standby system in a configuration in which IP addresses are not inherited)

The pdlogchg command must not be executed during HiRDB startup processing. HiRDB startup processing begins when the KFPS01800-I message is output and ends when the KFPS05210-I message is output. If the command is executed during that time, the system log file may not become effective in HiRDB. To make the system log file effective in such a case, its file group must be closed with the pdlogcls command after HiRDB startup processing is completed, then the file group must be opened with the pdlogopen command.

Because the pdlogchg command references the HiRDB system definition file, it may be impossible to change the file status if the information in the HiRDB system definition file for the active HiRDB that collected the system log does not match the information in the HiRDB system definition file referenced by the pdlogchg command.

Processing may terminate normally even if the pdlogchg command results in an error.
Whether or not the processing has terminated normally can be determined by checking the termination code (whether or not it is 0) or by checking the status (whether or not the status has changed) with the pdlogls command.

The results of the pdlogchg command can be checked by the following methods:

HiRDB is active
By executing the pdlogls command.

HiRDB is inactive
By checking the return code set by the command, by checking any error messages, or by executing the pdlogls command.

A command execution error will result if the pdlogchg command is executed when HiRDB is not running and HiRDB is started before the execution of the command terminates. If this problem occurs, re-execute the pdlogchg command by checking the HiRDB operation status.

When updatable online reorganization is underway with pd_log_org_no_standby_file_opr=stop specified in the system definition, HiRDB can no longer start if both the following conditions apply to one of the servers:

HiRDB has been forcibly terminated because all system log file groups were placed in overwriting denied status for online reorganization.

The system definitions cannot be changed for HiRDB operational reasons, and no system log file can be added.

If the above events occur, to cancel the updatable online reorganization and continue the current application only using the secondary RDAREAs, use the pdlogchg -G command to forcibly place the system log file group in overwriting permitted status for online reorganization, so that HiRDB can be started (execute the pdlogchg -G command on all system log files at the corresponding server). This action may cause a database inconsistency in the primary RDAREA because the updating of data required during reflection processing for online reorganization is not complete. To re-execute the updatable online reorganization, you must recover the primary RDAREA from the data in the secondary RDAREA. For details about recovering a primary RDAREA, see the manual HiRDB Staticizer Option Version 7 Description and User's Guide.

If pd_log_unload_check=N is specified on a server, the command cannot be executed without the -R option if the server has been individually terminated by issuing the pdstop -s command.

If pd_log_rpl_no_standby_file_opr=stop is specified in the system common definition for HiRDB Datareplicator linkage, the -R option is executed in order to forcibly change the status of the file group when data linkage is stopped due to occurrence of an error that satisfies the following three conditions:

HiRDB was terminated forcibly because all system log files have been placed in extracting status.

The definition cannot be changed for HiRDB operational reasons.

An error was generated by the HiRDB Datareplicator and the HiRDB.

Datareplicator cannot be activated. In such a case, the pdlogchg command with the -R option specified should be executed for all system log files to change the status from extracting to extraction completed. In this case, data may not be applicable to the target database, resulting in inconsistency between the extracted and target databases because some of the update information for the extracted database is lost. To avoid this, you need to re-create the target database before restarting the data linkage. For details about re-creating a database, see the HiRDB Datareplicator Version 8 Description, User's Guide and Operator's Guide.

pdlogcls (Close open log file)

Function

The pdlogcls command closes an open physical file that comprises a specified file group, so that it cannot be used by the active HiRDB. However, the following physical files cannot be closed:

Current system log file or a system log file in overwrite disabled status

Synchronization point dump file in writing status or overwrite disabled status

Executor

HiRDB administrator

Format

HiRDB/Single Server

pdlogcls {-d {sys|spd} [-s server-name] -g file-group-name [-a][-b]

HiRDB/Parallel Server

pdlogcls {-d {sys|spd} -s server-name -g file-group-name [-a][-b]

Options

-d sys|spd

Specifies the type of log file to be closed:

sys

System log file

spd

Synchronization point dump file

-s server-name<identifier> ((1-8))

Specifies the name of the server corresponding to the file group.

-g file-group-name<identifier> ((1-8))

Specifies the name of the file group containing the file to be closed.

-a

When a system log file or synchronization point dump file is to be closed, specifies that the primary physical file is to be closed.

-b

When a system log file or synchronization point dump file is to be closed, specifies that the secondary physical file is to be closed. If the system log file is not dualized, specifying this option results in a command error.

When the -a and -b options are both omitted, the following processing is performed:

If the system log file is not dualized, the command closes physical file A in the same manner as when the -a option is specified

If the system log file is dualized, the command closes physical files A and B in the same manner as when the -a and -b options are both specified

Rules

The pdlogcls command can be executed only while HiRDB is active.

The pdlogcls command must be executed at the server machine containing the single server or the server machine where the system manager is located.

If the specified physical file is already closed, a warning message (KFPS01283-W or KFPS02168-W) is output.

Notes

The following are the pdlogcls command's return codes:
0: Normal termination
4: Abnormal termination
8: Abnormal termination (such as an invalid option or rsh error)

The pdlogcls command may result in an error if it is executed while log files are being swapped or being processed by another operation command.

The result of the pdlogcls command can be checked by the pdlogls command.

If pd_log_remain_space_check=safe is specified in the system definition and closing a system log file with the pdlogcls command results in a space shortage, the command issues the KFPS01280-E message (reason code: 712) and results in an error. In such a case, increase the available space for the system log file and then re-execute the pdlogcls command. For details about using the facility for monitoring free area for system log files, see the HiRDB Version 8 System Operation Guide.

If you use Real Time SAN Replication based on the log-only synchronous method, the file to be closed depends on the site where the command is executed.

At the transaction execution site
The system log file and the synchronization point dump file for transaction processing are closed. The synchronization point dump file for log application processing cannot be closed.

At the log application site
The synchronization point dump file for log application processing is closed. Neither the system log file nor the synchronization point dump file for transaction processing can be closed.

pdloginit (Initialize log file)

Function

The pdloginit command creates a log physical file in the HiRDB file system area and initializes it so that it can be used by the active HiRDB.

Executor

HiRDB administrator

Format

HiRDB/Single Server

pdloginit {-d sys [-s server-name]
         -f physical-filename -n HiRDB-records-count [-l record-length]
       | -d spd [-s server-name]
         -f physical-filename -n HiRDB-records-count}

HiRDB/Parallel Server

pdloginit {-d sys -s server-name[-u unit-identifier]
            -f physical-filename -n HiRDB-records-count
            [-l record-length] [-D]
          | -d spd -s server-name[-u unit-identifier]
            -f physical-filename -n HiRDB-records-count [-D]}

Options

-d sys|spd

Specifies the type of log file to be initialized:

sys

System log file

spd

Synchronization point dump file

-s server-name<identifier> ((1-8))

Specifies the name of the server corresponding to the file group.

-f physical-filename<pathname> ((up to 167 characters))

Specifies the absolute pathname of the physical file to be initialized. The physical file name must be specified in the format HiRDB-file-system-area-name/HiRDB-filename. A HiRDB file name cannot be duplicated in the HiRDB file system area. If the specified HiRDB file has already been initialized, the command results in an error. A name beginning with pl cannot be specified as a HiRDB file name.

-n HiRDB-records-count<unsigned integer> ((12-2097152))

Specifies the number of records in the HiRDB file to be initialized.

For the purposes of this section, a record is an area with the following size in the HiRDB file system:

For -d sys, the record length specified in the -l option

For -d spd, 4096 bytes

Specification range

For the number of HiRDB records, specify a value in the following range:

For -d sys
Maximum value: 2147483648 (-l option value)
Minimum value: ((pd_log_max_data_size value in the system definition) + 368 + 3 4096) (-l option value) + 1

For -d spd
12 to 262144

Guidelines for the specification value

For details about how to estimate the number of HiRDB records, see the HiRDB Version 8 Installation and Design Guide.

For -d sys
The estimated number of records should be the total number. The standard value for this option is the total number/number of system log files to be created 1.2.

For -d spd
The standard value for this option is the estimated number of records 1.2.

-l record-length<unsigned integer> ((1024-4096))

Specify the record length for the HiRDB file to be initialized as a system log file. This option should be specified when it is necessary to create a system log file before modifying the system definition, or when it is desirable to explicitly specify a record length.

Notes

Any record length specified here should be the same as one that was specified in the pd_log_rec_leng operand in the system definition. The following values can be assigned:

If the specified value is 1024, a record length of 1024 is assigned.

If the specified value is 1025-2048, a record length of 2048 is assigned.

If the specified value is 2049-4096, a record length of 4096 is assigned.

Any other values cause an error. The default is initialization using the value specified in the pd_log_rec_leng operand in the system definition. Files that are initialized using a record length different from that specified in the pd_log_rec_leng operand cannot be opened as system log files.

When specifying a record length, the following factors should be taken into consideration:

The shorter a record length, the greater the number of I/O operations required on the data file for handling large-size data. However, this will decrease the amount of free space due to the rounding up of space requiring to the HiRDB record size unit, thus improving the file utilization efficiency.

The longer a record length, the smaller the number of I/O operations required on the data file for handling large-size data. However, this will increase the amount of free space due to the rounding up of space requiring to the HiRDB record size unit, thus reducing the file utilization efficiency.

As a guide for the record length to be specified, use the average block length that is output to the system log file according to statistical information. It is recommended that the following values be specified in this option:

If the average block length is less than or equal to 1024 bytes, specify 1024.

If the average block length is 1025-2048 bytes, specify 2048.

If the average block length is greater than or equal to 2049 bytes, either specify 4096 bytes or use the default.

Note that specifying this option in initializing a file as a synchronization point dump file will cause an error. Similarly, specifying a record length less than the sector length for the HiRDB file system causes an error.

-u unit-identifier<identifier> ((4 characters))

When the standby-less system switchover (effects distributed) facility is used, specifies the unit identifier of the host that contains the disk on which the file is to be created.

When the applicable server is running, the -u option is ignored, if specified.

Specifying the -u option results in an error if any of the following is true:

The specified unit does not belong to the target HA group for the server specified in the -s option.

The server specified in the -s option does not belong to the HA group.

The standby-less system switchover (effects distributed) facility is not in effect.

The following table describes whether or not the -u option is required:

Server status | Host containing the disk where file is created | Specification of -u option
Active | Host containing the running back-end server | Optional
Inactive | Host containing the primary back-end server
Other host | Mandatory

-D

Specifies that a unit or server is to be added by the pdchgconf command.

This option initializes the system log file or synchronization point dump file that is needed in order to add a unit or server. When this option is specified, the command will not check the server name.

If you execute the pdloginit command with this option specified, make sure that the command is executed at the unit where the system log file or synchronization point dump file is to be created.

Rules

The pdloginit command can be executed at any time, whether or not HiRDB is active (except during HiRDB startup or termination processing).

The pdloginit command must be executed at the server machine containing the single server or the server machine where the system manager is located.

If the same environment variable as in the HiRDB directory is not set in the PDDIR environment variable during execution of the pdloginit command and a command error occurs, no message will be output.

When creating a HiRDB file system in a character special file, partition the hard disk on which the file is created as follows:

If the file to be initialized is a system log file (if -d sys), an integral multiple of the sector length of the hard disk partition should be equal to the record length specified in the -l option.

If the file to be initialized is a synchronization point dump file (if d spd), an integral multiple of the sector length of the hard disk partition should be equal to 4096.

In all files in each server, the record length for the system log file should be equal to the value specified in the pd_log_rec_leng operand of the HiRDB system definition.

Notes

When creating duplicate system log files for redundancy, the physical files for systems A and B comprising a log file group should be initialized so that they are equal in record length and the number of records.

If the system log file is to be dualized, physical files A and B should be created on separate hard disks, if possible, for purposes of error handling.

The result of the pdloginit command can be determined from the command's return code or error message, if any. The return codes are as follows:
0: Normal termination
4: Abnormal termination
8: Abnormal termination (such as invalid option or rsh error)
12: Abnormal termination (when retry was executed from a standby system in a configuration in which IP addresses are not inherited)

Files cannot be initialized in a HiRDB file system that has a sector length greater than 4096 bytes.

If you use Real Time SAN Replication based on the log-only synchronous method, the files that can be initialized depend on the site where the command is executed.

At the transaction execution site
The system log file, synchronization point dump file for transaction processing, and synchronization point dump file for log application processing are initialized.

At the log application site
The synchronization point dump file for log application processing is initialized. Neither the system log file nor the synchronization point dump file for transaction processing can be initialized.

Examples

Example 1

Create system log files.

HiRDB/Single Server

pdloginit -d sys                                     1
         -f /svr01/logf11                           2
         -n 64                                      3
pdloginit -d sys                                     1
         -f /svr01/logf12                           2
         -n 64                                      3

Explanation

Type of log file to be initialized: sys (system log files)

Names of physical files: /svr01/logf11, /svr01/logf12

Number of records in each physical file: 64

HiRDB/Parallel Server

pdloginit -d sys                                     1
         -s bes1                                    2
         -f /svr01/logf11                           3
         -n 64                                      4
pdloginit -d sys                                     1
         -s bes1                                    2
         -f /svr01/logf12                           3
         -n 64                                      4

Explanation

Type of log file to be initialized: sys (system log files)

Name of server corresponding to the file group: bes1

Names of physical files: /svr01/logf11, /svr01/logf12

Number of records in each physical file: 64

Example 2

Create synchronization point dump files.

HiRDB/Single Server

pdloginit -d spd                                     1
         -f /svr01/spdf11                           2
         -n 64                                      3
pdloginit -d spd                                     1
         -f /svr01/spdf12                           2
         -n 64                                      3

Explanation

Type of log file to be initialized: spd (synchronization point dump file)

Names of physical files: /svr01/spdf11, /svr01/spdf12

Number of records in each physical file: 64

HiRDB/Parallel Server

pdloginit -d spd                                     1
         -s bes1                                    2
         -f /svr01/spdf11                           3
         -n 64                                      4
pdloginit -d spd                                     1
         -s bes1                                    2
         -f /svr01/spdf12                           3
         -n 64                                      4

Explanation

Type of log file to be initialized: spd (synchronization point dump files)

Name of server corresponding to the file group: bes1

Names of physical files: /svr01/spdf11, /svr01/spdf12

Number of records in each physical file: 64

pdlogls (Display log-related file information)

Common function

Displays log-related file information.

Common format

pdlogls -d target-display-type [target-display-type-specific-option]

Common options

-d target-display-type

Specifies the log-related file to be displayed.

spd

Synchronization point dump files

sys

System log files

Common note

The following are the pdlogls command's return codes:
0: Normal termination
4: Abnormal termination
8: Abnormal termination (such as an invalid option or rsh error)
12: Abnormal termination (when retry was executed from a standby system in a configuration in which IP addresses are not inherited)

If you specify the TMPDIR environment variable and cancel the pdlogls command during execution, files whose names begin with plcmd may remain in the directory set by TMPDIR. In such a case, use the OS's rm command to delete those files.

pdlogls [-d spd] (Display synchronization point dump file information)

Function

The pdlogls command displays information about synchronization-point dump files.

Executor

Users without access privileges can also execute this command.

Format

HiRDB/HiRDB/Single Server

pdlogls -d spd [-s server-name] [-g file-group-name] [-e] [-l]

HiRDB/ Parallel Server

pdlogls -d spd -s server-name [-g file-group-name] [-e] [-l]

Option

-s server-name<identifier> ((1-8))

Specifies the name of the server whose information is to be displayed.

-g file-group-name<identifier> ((1-8))

Specifies the name of a file group whose information is to be displayed. If you omit this option, the command displays information about all file groups for the specified server.

-e

Specifies that information about element files is to be displayed. If you omit this option, the command does not display information about element files.

-l

Specifies that the maximum skip count for effective synchronization point dumps is to be displayed. If you omit this option, the command does not display the maximum skip count for effective synchronization point dumps. 0 is displayed if the skipped effective synchronization point dumps monitoring facility is not used.

Rules

The pdlogls command with the -d spd option can be executed only when HiRDB is running.

The pdlogls command should be executed on a server machine with a single server or the system manager.

Notes

Executing the pdlogls command during a file group status change (during swapping or when an operation command for manipulating a file group is being processed) may result in incorrect information being displayed.

Each record represents a 4096-byte area in the HiRDB file system area.

If you use Real Time SAN Replication based on the log-only synchronous method, the file to be displayed depends on the site where the command is executed.

At the transaction execution site
The synchronization point dump file for transaction processing is displayed. The synchronization point dump file for log application processing is not displayed.

At the log application site
The synchronization point dump file for log application processing is displayed. The synchronization point dump file for transaction processing is not displayed.

Output format

HOSTNAME: aa...a(bbccdd)
pd_spd_syncpoint_skip_limit: ee...e
Server  Group   Generation Status Log     Log
name            number            group   block
ff...f     gg...g   hh...h       [i]    jj...j     kk...k
      Status Path
Sys-A [l]    mm...m
Sys-B [n]    oo...o

Explanation

aa...a

Host name (up to 32 characters)

bbccdd

Hour, minute, second (time the pdlogls command was executed)

ee...e

Maximum skip count for effective synchronization point dumps (decimal). If the skipped effective synchronization point dumps monitoring facility is not used, 0 is displayed.

ff...f

Server name (up to 8 characters)

gg...g

File group name (up to 8 characters)

hh...h

Generation number (8 hexadecimal digits)

i

Generation status

a

Not overwritable

u

Being written or overwritable

r

Reserved

jj...j

File group name of the system log read by HiRDB when HiRDB restarts (up to 8 characters)

kk...k

Block number of the log read by HiRDB when HiRDB restarts (8 hexadecimal digits)

l

Status of the primary physical file:

o: Open

c: Closed

h: Shutdown

mm...m

Path name of the primary physical file

n

Status of the secondary physical file:

o: Open

c: Closed

h: Shutdown

oo...o

Path name of the secondary physical file

pdlogls [-d sys] (Display system log file information)

Function

The pdlogls command displays information about system log files.

Executor

Users without access privileges can also execute this command.

Format

HiRDB/Single Server

pdlogls -d sys [-s server-name] [-g file-group-name] [-e]

HiRDB/Parallel Server

pdlogls -d sys -s server-name [-u unit-identifier] [-g file-group-name] [-e]

Options

-s server-name<identifier> ((1-8))

Specifies the name of the server whose information is to be displayed.

-g file-group-name<identifier> ((1-8))

Specifies the name of a file group whose information is to be displayed. If you omit this option, the command displays information about all file groups for the specified server.

-e

Specifies this option when displaying information about an element file. The default is not to display information about element files.

-u unit-identifier<identifier> ((4 characters))

When the standby-less system switchover (effects distributed) facility is used, specifies the unit identifier of the host that contains the disk on which the system log file for which information is to be displayed was created.

When the applicable server and system manager are running, the -u option is ignored, if specified.

Specifying the -u option results in an error if any of the following is true:

The specified unit does not belong to the target HA group for the server specified in the -s option.

The server specified in the -s option does not belong to the HA group.

The standby-less system switchover (effects distributed) facility is not in effect.

The following table describes whether or not the -u option is required:

Server status | Host containing the disk where file is created | Specification of -u option
Active | Host containing the running back-end server | Optional
Inactive | Host containing the primary back-end server
Other host | Mandatory

Rules

The pdlogls command with the -d sys option can be executed regardless of whether HiRDB is running. However, this command cannot be executed when HiRDB is starting or terminating.

The pdlogls command should be executed on a server machine with either a single server or the system manager.

Notes

Executing the pdlogls command during a file group status change (during swapping or when an operation command for manipulating a file group is being processed) may result in incorrect information being displayed.

If a waiting for unload condition is displayed even after unloading (status change), it is possible that a previously entered pdlogunld or pdlogchg command generated an error that prevents the updating of the memory status. Even if such a problem arises, the unloading processing itself should have terminated normally. If this happens, use the pdlogcls command to close the affected file group and then open it by using the pdlogopen command.

Any value exceeding the pdlogadpf -d sys operand specified in the system definition will be ignored when HiRDB is started, but it will be included in the result of the pdlogls command that is executing when HiRDB is terminated.

Output format

HOSTNAME : aa...a(bbccdd)
***** Off-line Information *****                                 1
Group  Type Server  Gen No. Status  Run ID  Block No. Ex-Status
ee...e   fff   gg...g    hh...h   ijklmno  pp...p   qq...q rr...r   JKLMNOPQ  2
     Element  Status  Record-count   Sys-A  Sys-B1  Record-size
     ss...s     tuvwxy   AA...A BB...B     CDEFGH CDEFGH   IIII   3

¹ This information is displayed only when the system log file is dualized.

Explanation

Item 1 is displayed when log file information about the offline status (the corresponding server is shut down) is to be output.¹

Item 2 indicates the status of the file group.

Item 3 indicates the status of the element file.

aa...a

Host name (up to 32 characters)

bbccdd

Time when pdlogls command executed (hour:minute:second)

ee...e

File group name (up to 8 characters)

fff

File type (3 characters)

sys

System log file

gg...g

Server name (up to 8 characters)

hh...h

Generation number (up to 8 hexadecimal digits)

ijklmno

File group status (7 characters)

i

File group open state

o:Open

c:Close

If the file group being used is closed, use the pdlogopen command to open it.

j

File group status

c:Current

s:Standby

n:Reserved

If the file group being used is reserved, use the pdlogopen command to set it in the standby status.

k

File group unloading status

a:Waiting for unloading but extraction not complete
(This includes logs that were used as "current" in the past but are no longer current because of swapping, and therefore need to be unloaded. This file group can also be a system log file on which the extraction of data linkage information by the HiRDB Datareplicator has not completed. Upon completion of the extraction process, the file group shifts into the extraction complete status.)
Upon unloading using the pdlogunld command, the file group shifts into the unload complete status.

u:Waiting for unloading but extraction not complete
(This includes logs that were used as "current" in the past but are no longer current because of swapping, and therefore need to be unloaded.)
Upon unloading using the pdlogunld command, the file group shifts into the unload complete status.

e:Unloaded but extraction not complete
(This file group may be a system log file on which the extraction of data linkage information by the HiRDB Datareplicator has not completed. Upon completion of the extraction process, the file group shifts into the extraction complete status.)

-:Unloaded and extraction complete

l

Overwrite enabled/disabled status of the file group

d:Overwrite disabled (contains a log required for HiRDB system recovery)
If all system log files in the server are in this status, a new system log file should be added.

-:Overwrite enabled (does not contain a log required for HiRDB system recovery)

m

Status of the file group in HiRDB

b:Being used by pdlogchg or pdlogunld command, or being used in recovery processing

-:Not being used by pdlogchg or pdlogunld command, nor being used in recovery processing

n

File group utilization history

c: The file group is in one of the following statuses; this is displayed only when HiRDB is inactive:

File group currently being used as current

File group in which control information in the log file still remains as is due to an error that occurred when the file group was previously used as current

-: The file group previously used as "current" and has correctly been processed.

o

Internal information used by the system

pp...p

Run ID (run ID of the log service when the file was used) (8 hexadecimal digits)

qq...q

Beginning block number (8 hexadecimal digits)

rr...r

Ending block number (8 hexadecimal digits)

ss...s

Element file name (up to 8 characters)

tuvwxy

Element file status (6 characters)

t

Element file open status

o:Open (physical file comprising the element file is open)

c:Closed (physical file comprising the element file is closed)

u

Whether or not the element file is usable

n:Element file not composed of physical files that can be used while HiRDB is running

u:Element file composed of physical files that can be used while HiRDB is running

v

Element file unloading status ²

a:Waiting for unloading but extraction not complete
(Contains a log file that must be unloaded; or, is a system log file for which the extraction of data linkage information by the HiRDB Datareplicator is not completed. Upon completion of the extraction process, the element file shifts into the extraction complete status.)
Upon unloading using the pdlogunld command, the element file shifts into the unload complete status.

u:Waiting for unloading but extraction not complete
(Contains a log that must be unloaded.)
Upon unloading using the pdlogunld command, the element file shifts into the unload complete status.

e:Unloaded but extraction not complete
(This element file is a system log file on which the extraction of data linkage information by the HiRDB Datareplicator has not been completed. Upon completion of the extraction process, the element file shifts into the extraction complete status.)

-:Unloaded and extraction complete

w

Internal information used by the system

x

Element file shutdown status

h:Shut down (an element file that contains a physical file that has not output a log since an error occurred, either during output of a log to the physical file comprising the element file, or during an I/O operation involving a log file header)

-:Not shut down (normal element file)

y

Whether or not element file can be read:

r:The physical file comprising the element file cannot be read.

-:The physical file comprising the element file can be read.

AA...A

Number of records used in the file (up to 8 hexadecimal digits) 3, 5

Number of records in the HiRDB file system area to which a log was output

BB...B

Total number of records in the file (up to 8 hexadecimal digits) 4, 5

Number of records in the HiRDB file system area to which a log was output

CDEFGH

Physical file status (6 characters)

C

Physical file open status

o:Open (physical file being opened)

c:Closed (physical file being closed)

D

Physical file status

c:Current (If the status of the file group is "current," the file group is actually eligible for log output. If the status of the file group is not "current," an error occurred when the file group was "current" in the past. The file group has not been recovered from the error, and therefore status information still remains in the log file header. To use the file group, either perform an error recovery with the pdlogunld or pdlogchg command, or use the pdloginit command to initialize the file group.)

s:Standby

E

Physical file unloading status ²

a:Waiting for unloading but extraction not complete
(Contains a log that must be unloaded. This physical file can also be a system log file on which the extraction of data linkage information by the HiRDB Datareplicator has not been completed. Upon completion of the extraction process, the physical file shifts into the extraction complete status.)
Upon unloading using the pdlogunld command, the physical file shifts into the unload complete status.

u:Waiting for unloading but extraction not complete
(Contains a log that must be unloaded.)
Upon unloading using the pdlogunld command, the physical file shifts into the unload complete status.

e:Unloaded but extraction not complete
(This physical file is a system log file on which the extraction of data linkage information by the HiRDB Datareplicator has not completed. Upon completion of the extraction process, the physical file shifts into the extraction complete status.)

-:Unloaded and extraction complete

F

Internal information used by the system

G

Physical file shutdown status

h:Shut down (the physical file has not output a log since an error occurred, either during output of a log or during an I/O operation involving a log file header)

-:Not shut down (can output a log)

H

Whether or not the physical file can be read

r:Read disabled status (full or partial recovery fails because the log has been erased (initialized) and cannot be read. This condition can arise if an error occurs in the system log file, the error is resolved, and the physical file is re-created and opened.)

-:Read enabled status

IIII

Record length of the file (decimal display)⁶

Record length in the HiRDB file system to which a log can be output

JKLMNOPQ:

File group extension status (8 characters)

J:

File group's overwriting status for online reorganization

r: Overwriting denied status for online reorganization

-: Overwriting permitted status for online reorganization

A system log file is placed in this status if it does not employ updatable online reorganization or while online reorganization is not underway.

K:

Internal information used by the system

L:

Internal information used by the system

M:

Internal information used by the system

N:

Internal information used by the system

O:

Internal information used by the system

P:

Internal information used by the system

Q:

Internal information used by the system

Notes

1 The offline (with the corresponding server shutdown) status display (file groups, element files, physical files in groups A and B) is valid only in the unloaded condition.

² If the file group is unloaded, it is not necessary to execute the pdlogunld or pdlogchg command even if the element or physical file is waiting to be unloaded. This is because an error occurred during the execution of the pdlogunld or pdlogchg command, which prevented status information from being overwritten.

3 A 0 display means that no log was output. If the element file is in a status other than "current" after full recovery, the number of used records indicated may be incorrect.

4 The total number of records in a file is equal to the number of HiRDB file records which can be output as log blocks. This number can be determined as follows, based upon the record length specified in the -l option of the pdloginit command:

-l 1024: number of records specified in -n option of pdloginit command -13

-l 2048: number of records specified in -n option of pdloginit command -7

-l 2048: number of records specified in -n option of pdloginit command -4

5 A record represents an area of the following size on the HiRDB file system controlled by the Log Service:

If sys is specified in the -d option of the pdloginit command, the record length specified in the -l option

If spd is specified in the -d option of the pdloginit command, 4096 bytes

pdlogopen (Open log file)

Function

The pdlogopen command opens a closed physical file that comprises a specified file group, so that it can be used by the active HiRDB.

Executor

HiRDB administrator

Format

HiRDB/Single Server

pdlogopen {-d {sys|spd} [-s server-name] -g file-group-name [-a][-b]

HiRDB/Parallel Server

pdlogopen {-d {sys|spd} -s server-name -g file-group-name [-a][-b]

Options

-d sys|spd

Specifies the type of log file to be opened:

sys

System log file

spd

Synchronization point dump file

-s server-name<identifier> ((1-8))

Specifies the name of the server corresponding to the file group.

-g file-group-name<identifier> ((1-8))

Specifies the name of the file group containing the file to be opened.

-a

When a system log file or synchronization point dump file is being opened, this option specifies that the primary physical file is to be opened.

-b

When a system log file or synchronization point dump file is being opened, this option specifies that the secondary physical file is to be opened. If the system log file or synchronization point dump file is not dualized, specifying this option results in a command error.

When the-a and -b options are both omitted, the following processing is performed:

If the system log file is not dualized, the command opens physical file A in the same manner as when the -a option is specified

If the system log file is dualized, the command opens physical files A and B in the same manner as when the -a and -b options are both specified

Rules

The pdlogopen can be executed only while HiRDB is active.

The pdlogopen command must be executed at the server machine containing the single server or the server machine where the system manager is located.

If the specified physical file is already open, a warning message (KFPS01283-W or KFPS02167-W) is output.

Notes

The following are the pdlogopen command's return codes:
0: Normal termination
4: Abnormal termination
8: Abnormal termination (such as an invalid option or rsh error)

The pdlogopen command may result in an error if it is executed while the file group status is being changed (such as during file swapping or processing by another operation command).

The result of the pdlogopen command can be checked by the pdlogls command.

If you use Real Time SAN Replication based on the log-only synchronous method, the file to be opened depends on the site where the command is executed.

At the transaction execution site
The system log file and the synchronization point dump file for transaction processing are opened. The synchronization point dump file for log application processing cannot be opened.

At the log application site
The synchronization point dump file for log application processing is opened. Neither the system log file nor the synchronization point dump file for transaction processing can be opened.

pdlogrm (Delete log file)

Function

The pdlogrm command deletes a log physical file from the HiRDB file system. An open physical file cannot be deleted.

Executor

HiRDB administrator

Format

HiRDB/Single Server

pdlogrm -d sys|spd [-s server-name] -f physical-filename [-u]

HiRDB/Parallel Server

pdlogrm -d sys | spd -s server-name [-X unit-identifier] -f physical-filename [-u] [-D]

Options

-d sys | spd

Specifies the type of log file to be deleted:

sys

System log file

spd

Synchronization point dump file

-s server-name<identifier> ((1-8))

Specifies the name of the server corresponding to the file group that consists of the physical file.

-f physical-filename<pathname> ((up to 167 characters))

Specifies the absolute pathname of the physical file to be deleted. The physical file name must be specified in the format HiRDB-file-system-area-name/HiRDB-filename.

If you use Real Time SAN Replication based on the log-only synchronous method, the file to be deleted depends on the site where the command is executed.

At the transaction execution site
The system log file, synchronization point dump file for transaction processing, and synchronization point dump file for log application processing are deleted.

At the log application site
The synchronization point dump file for log application processing is deleted. Neither the system log file nor the synchronization point dump file for transaction processing can be deleted.

-u

Specifies that if the physical file specified with the -f option is a system log file, it is to be deleted forcibly even if it is in any of the following statuses:

Unload wait status

Extracting status with HiRDB Datareplicator linked

Overwriting denied status for online reorganization

When this option is omitted, the system checks the unload status of the physical file; if the file is in unload wait status, the command results in an error.

This option is ignored if specified for a synchronization point dump file.

This option is used when normal deletion processing (pdlogrm command with -u not specified) cannot be executed for some reason. If the file still cannot be deleted by the pdlogrm command with -u specified, the pdfrm command can be used.

-X unit-identifier<identifier> ((4 characters))

When the standby-less system switchover (effects distributed) facility is used, specifies the unit identifier of the host that contains the disk from which the file is to be deleted.

When the applicable server is running, the -X option is ignored, if specified.

Specifying the -X option results in an error if any of the following is true:

The specified unit does not belong to the target HA group for the server specified in the -s option.

The server specified in the -s option does not belong to the HA group.

The standby-less system switchover (effects distributed) facility is not in effect.

The following table describes whether or not the -X option is required:

Server status | Host containing the disk where file is created | Specification of -X option
Active | Host containing the running back-end server | Optional
Inactive | Host containing the primary back-end server
Other host | Mandatory

-D

Specifies that a unit or server is to be deleted by the pdchgconf command.

To delete a unit or server, the system deletes that unit's or server's system log files and synchronization point dump files. When this option is specified, the command will not check the server name.

If you are executing the pdlogrm command with this option specified, make sure that the command is executed at the unit that contains the system log files or synchronization point dump files to be deleted.

Rules

The pdlogrm command can be executed at any time, whether or not HiRDB is active (except during HiRDB startup or termination processing).

The pdlogrm command must be executed at the server machine containing the single server or the server machine where the system manager is located.

Note

The result of the pdlogrm command can be determined from the command's return code or error message, if any. The return codes are as follows:
0: Normal termination
4: Abnormal termination
8: Abnormal termination (such as invalid option or rsh error)
12: Abnormal termination (when retry was executed from a standby system in a configuration in which IP addresses are not inherited)

If you are using Real Time SAN Replication based on the log-only synchronous method, and log application processing has not been performed on the system log file that is to be deleted, when you delete the system log file at the transaction execution site the log application processing will terminate abnormally because of detection of missing log information at the log application site. In such a case, you must perform the preparations for log application and restart the log application processing.
For details about the preparations for log application, see the manual HiRDB Version 8 Disaster Recovery System Configuration and Operation Guide.

pdlogswap (Swap log files)

Function

The pdlogswap command swaps log files. If there is no file to be swapped in, the command results in an error.

Executor

HiRDB administrator

Format

HiRDB/Single Server

pdlogswap -d sys [-s server-name] [-w [-t validation-wait-monitoring-time]]

HiRDB/Parallel Server

pdlogswap -d sys -s server-name [-w [-t validation-wait-monitoring-time]]

Options

-d sys

Specifies that system log files are to be swapped.

-s server-name<identifier> ((1-8))

Specifies the name of the server corresponding to the file group whose files are to be swapped.

-w

Specifies that termination of the command is to be delayed until the synchronization point dump that is obtained after the system log files are swapped has been validated.

If HiRDB is operated without unloading the system log, specifying this option to swap system log files prior to database backup provides the following advantages:

If the system log files are to be placed in unload completed status after backing up the database, all the system log files used before backup processing can be placed in unload completed status.

During database recovery, the number of system log files to be read by the database recovery utility can be minimized.

-t validation-wait-monitoring-time <unsigned integer> ((10-32768)) <<180>>

Specifies in seconds the amount of time for monitoring for validation of the synchronization point dump when the -w option is specified (the -w option delays termination of the command until the synchronization point dump has been validated). This option is applicable only when the -w option is specified.

Rules

The pdlogswap command can be executed only while HiRDB is active.

The pdlogswap command must be executed at the server machine containing the single server or the server machine where the system manager is located.

Only one pdlogswap command can be executed at a time. However, while a pdlogswap command with the -w option specified is waiting for validation of a synchronization point dump, another pdlogswap command without the -w option specified can be executed.

Notes

The results of the pdlogswap command can be checked by the pdlogls command, the KFPS01280-E error message (reason code 105 or 116), or the return code after command execution. The return code can be obtained using echo $status. Following are the values returned after command execution:

0

Terminated normally.

4

System log files were swapped, but command processing was terminated forcibly because the synchronization point dump was not validated within the validation wait monitoring time specified in the -t option.

8

Terminated abnormally.

When the -w option is specified and the synchronization point dump is not validated within the validation wait monitoring time specified in the -t option, the pdlogswap command is terminated forcibly.

If safe or warn is specified in the pd_log_remain_space_check operand and one of the following is applicable, the facility for monitoring free space for system log files may detect a space shortage in the system log file:

The pdlogswap command was executed when the size of the file group in the swappable target status and in the standby status was less than the size of the current file group.

More than one pdlogswap command was executed consecutively.

For details about the facility for monitoring free space for system log files, see the HiRDB Version 8 System Operation Guide.

pdlogsync (Collect a synchronization point dump)

Function

The pdlogsync command collects a synchronization point dump.

Executor

HiRDB administrator

Format

HiRDB/Single Server

pdlogsync -d sys [-s server-name] [-w [-t timeout]]

HiRDB/Parallel Server

pdlogsync -d sys -s server-name [-w [-t timeout]]

Options

-d sys

Specifies that a synchronization point dump is to be acquired.

-s server-name<identifier> ((1-8))

Specifies the name of the server at which a synchronization point dump is to be collected.

-w

Specifies this option if the termination of the pdlogsync command is to wait until the system point dump is enabled. This option allows the user to determine whether the synchronization point dump has been enabled, based upon a return code returned from the execution of the pdlogsync command. A return code of 0 indicates that the synchronization point dump has been enabled.

Specify this option when creating a backup acquisition shell. Refer to Examples for examples of creating a backup acquisition shell.

-t timeout<unsigned-integer> ((10-32768)) <<180>>

When the -w option is specified, specifies a timeout value (in seconds) for the pdlogsync command. The pdlogsync command terminates if a synchronization point dump is not enabled by the time specified in this option. However, the processing for enabling the synchronization point dump will continue. A message KFPS02183-I is output when a synchronization dump is enabled. However, this message will not be output if N is specified in the pd_spd_assurance_msg operand in the system definition.

Rules

The pdlogsync command can be executed only when HiRDB is running.

The pdlogsync command should be executed on a server machine with either a single server or the system manager.

Notes

The following are the pdlogsync command's return codes:
0: Normal termination
4: Abnormal termination
8: Abnormal termination (such as an invalid option or rsh error)

Examples

Following is an example of creating a backup acquisition shell using the pdlogsync command in conjunction with the operation of a system log without unloading. In this example, a backup is generated after the synchronization point dump is enabled, so that any system log files collected before a backup was acquired can be released.

#!/bin/sh
$PDDIR/bin/pdlogsync -d  sys   w
if [ $status = 0 ]     ; then
   $PDDIR/bin/pdcopy -m host2:/dbarea/area1/rdmt1 -i -p /usr/ofile -f /usr/seifile/cof101
else
       echo  "Synchronization point enabling failed"
fi

Explanation

Because the w option is specified in the pdlogsync command, a return code 0 indicates the successful enabling of the synchronization point dump.

If the synchronization point dump is enabled, HiRDB uses the database copy utility (pdcopy) to acquire a backup. If the enabling process fails, HiRDB does not acquire a backup.

pdlogucat (Display unload log file information)

Function

The pdlogucat command displays information about an unload log file.

You use the pdlogucat command to check the contents of a created unload log file.

Executor

HiRDB administrator

Format

 pdlogucat [-k {std|csv}] unload-log-file-name

Options

-k {std|csv}

Specifies the output format for the information.

std

Output the information in the format of fixed fields with headers.

csv

Output the information in CSV format.

Command arguments

unload-log-file-name<path name>

Specifies the absolute path name of the unload log file.

If you are specifying an unload log file created in a HiRDB file system area, the maximum path name length is 167 characters.

Rules

You can execute the pdlogucat command whether or not HiRDB is active.

Execute the pdlogucat command at the server machine where the host containing the unload log file is located.

Notes

Do not execute the pdlogucat command for an unload log file that is being created by the pdlogunld command or by the automatic log unloading facility. If the pdlogucat command is executed under such circumstances, invalid information may be displayed.

For the pdlogucat command, return code 0 indicates normal termination, and return code 8 indicates abnormal termination.

Output format

When -k std is specified (output information is fixed-length)

Hostname: aa....aa(bbccdd)
File_type  Format_ver  System_id  Unit_id  Serv_name  Run_id    User_run_id  Server_name
Group     Svs_start_time       Gen_num   Unload_time          First_block_num  Buff_leng
Status
eee        fffff       gggg       hhhh     ii....ii   jjjjjjjj  kkkkkkkk     ll....ll
mm....mm  nnnn/oo/pp qq:rr:ss  tt....tt  uuuu/vv/ww xx:yy:zz  AA....AA         BB....BB
CC....CC

Note

One line of header text, delimited by a carriage return, is followed by a similarly delimited line of file information.

If there is no information for an item, * is displayed.

If the version of the specified unload log file is earlier than 07-02, * is displayed for server run ID and file group name.

aa....aa

Host name (up to 32 characters)

bbccdd

Time the pdlogucat command was executed (hour minute second)

eee

File type

sys: System log file

fffff

Internal information used by the system

gggg

HiRDB identifier

hhhh

Unit identifier

ii....ii

Internal information used by the system

jjjjjjjj

System log run ID (hexadecimal)

kkkkkkkk

Server run ID (hexadecimal)

ll....ll

Server name (up to 8 characters)

mm....mm

File group name (up to 8 characters)

nnnn/oo/pp qq:rr:ss

Current system log file allocation time (year/month/date hour:minute:second)

tt....tt

Generation number (up to 8 hexadecimal characters)

uuuu/vv/ww xx:yy:zz

Unload log file creation start time (year/month/date hour:minute:second)

AA....AA

Start log block number (up to 8 hexadecimal characters)

BB....BB

Internal information used by the system

CC....CC

System log unload completion status

completed: Unload log file that has been created correctly

failed: Unload log file whose creation was cancelled

When -k csv is specified (output information is variable-length)

aaa,bbbbb,cccc,dddd,ee....ee,ffffffff,gggggggg,hh....hh,ii....ii,jjjjjjjj,kk....kk,
llllllll,mm....mm,nnnnnn,o

Note

If there is no information for an item, that item is simply omitted. For example, if the system log run ID (ffffffff) is not available, the display is as follows aaa,bbbbb,cccc,dddd,ee....ee,,gggggggg,...

aaa

File type

sys: System log file

bbbbb

Internal information used by the system

cccc

HiRDB identifier

dddd

Unit identifier

ee....ee

Internal information used by the system

ffffffff

System log run ID (hexadecimal)

gggggggg

Server run ID (hexadecimal)

hh....hh

Server name (up to 8 characters)

ii....ii

File group name (up to 8 characters)

jjjjjjjj

Current system log file allocation time (Julian seconds, in hexadecimal)

kk....kk

Generation number (up to 8 hexadecimal characters)

llllllll

Unload log file creation start time (Julian seconds, in hexadecimal)

mm....mm

Start log block number (up to 8 hexadecimal characters)

nnnnnn

Internal information used by the system

o

System log unload completion status:

0: Unload log file that has been created correctly

1: Unload log file whose creation was cancelled

pdlogunld (Unload log file)

Function

The pdlogunld command unloads a specified file group to a specified output destination file and places the file group in unload completed status.

Executor

HiRDB administrator

Format

HiRDB/Single Server

pdlogunld -d sys [-s server-name] -g file-group-name
                [-o output-destination-filename] [-n] [-f]
                [-k output-destination-file-type]
                [-i output-destination-file's-initial-size
                    [,extension-size]]

HiRDB/Parallel Server

pdlogunld -d sys -s server-name [-u unit-identifier] -g file-group-name
                [-o output-destination-filename] [-n] [-f]
                [-k output-destination-file-type]
                [-i output-destination-file's-initial-size
                    [,extension-size]]

Options

-d sys

Specifies that a system log file is to be unloaded.

-s server-name<identifier> ((1-8))

Specifies the name of the server corresponding to the file group.

-g file-group-name<identifier> ((1-8))

Specifies the name of the file group containing the file to be unloaded.

-o output-destination-filename<pathname> ((up to 167 characters when -k hirdb is specified))

Specifies the name of the unload log file at the destination. This file is created in the host containing the server whose name is specified in the -s option. When this option is omitted, the standard output is assumed.

If you specify -k hirdb, specify the name of the destination file in the format HiRDB-file-system-area-name/HiRDB-filename.

-n

Specifies that the unload waiting status is to be retained without changing the file group status. When this option is specified, multiple unload files can be created, because the same generation of files can be unloaded one after another.

-f

Specifies that the file is to be unloaded without checking the file group status. Specifying this option enables the current file group or an unload-completed file group to be unloaded. In this case, the status of the file group remains unchanged.

-k output-destination-file-type

If the -o option is specified, this option specifies the type of unload log file at the destination. When this option is omitted, the system assumes regular.

regular

Outputs to a regular file.

hirdb

Outputs to a HiRDB file. Specify this option if you are using the system switchover facility.

If you specify -k hirdb, you must have created an HiRDB file system area in advance with the pdfmkfs command (-k UTL specified).

If you are using the system switchover facility, make sure that the system log files are unloaded on the disk (character special file) shared by the running system and the standby system. In this case, you can use the unload log files collected by the running system to recover the standby system.

-i output-destination-file's-initial-size[,extension-size] <unsigned integer> ((1-1,048,574)) <<100>>

If you specified -k hirdb, use this option to specify the destination file's initial size and extension size (used when the initial size is exceeded) in megabytes (MB).

When this option is omitted, the system assumes 100 MB for both initial and extension sizes.

Rules

Usually there is no need to specify this option because a default value of 100 MB is sufficient for the maximum size of unload log file (the maximum size of system log file is 1 gigabyte (GB)). If the system log file is smaller than 100 MB, specify the actual size in this option.

For the initial size, specify a value that is less than the value of the -n option used when the HiRDB file system area was created with the pdfmkfs command.

You cannot extend the size of the destination file when:

The number of extensions exceeds the specified value for the HiRDB file system area.

The number of extensions exceeds the maximum extension count permitted for each HiRDB file (23).

-u unit-identifier<identifier> ((4 characters))

When the standby-less system switchover (effects distributed) facility is used, specifies the unit identifier of the host that contains the disk on which the system log file to be unloaded was created.

When the applicable server and system manager are running, the -u option is ignored, if specified.

Specifying the -u option results in an error if any of the following is true:

The specified unit does not belong to the target HA group for the server specified in the -s option.

The server specified in the -s option does not belong to the HA group.

The standby-less system switchover (effects distributed) facility is not in effect.

The following table describes whether or not the -u option is required:

Server status | Host containing the disk where file is created | Specification of -u option
Active | Host containing the running back-end server | Optional
Inactive | Host containing the primary back-end server
Other host | Mandatory

Rules

The pdlogunld command can be executed under the following conditions:

If pd_log_unload_check=N is specified in the system definition, HiRDB is running, and the file group to be operated upon is open, execution of this command requires the specification of the -f option.

In all other cases, this command can be executed regardless of whether HiRDB is running (except when HiRDB is starting or terminating).

The pdlogunld command must be executed at the server machine containing the single server or the server machine where the system manager is located.

The current file group or an unloaded-completed file group cannot be unloaded unless the -f option is specified.

Notes

The following are the pdlogunld command's return codes:
0: Normal termination
4: Abnormal termination
8: Abnormal termination (such as an invalid option or rsh error)
12: Abnormal termination (when retry was executed from a standby system in a configuration in which IP addresses are not inherited)

A swappable file group unloaded with the -f option specified may become the current file group during unload processing. In this case, the command results in an error. Therefore, a swappable file group should first be closed by the pdlogcls command before it is unloaded by the pdlogunld command with the -f option specified.

The pdlogunld command must not be executed during HiRDB startup processing. HiRDB startup processing begins when the KFPS01800-I message is output and ends when the KFPS05210-I message is output. If the command is executed during this period, the swapped in system log file may not become effective in HiRDB. To make this system log file effective, the corresponding file group must be closed with the pdlogcls command after HiRDB startup processing is completed, then the file group can be opened with the pdlogopen command.

Because the pdlogunld command references the HiRDB system definition file, it may be impossible to unload the specified file group if the information in the HiRDB system definition file for the active HiRDB that collected the system log does not match the information in the HiRDB system definition file referenced by the pdlogunld command.

The result of the pdlogunld command can be checked by the following methods:

When HiRDB is active
pdlogls command

When HiRDB is not active
Completion message

A command execution error results if the pdlogunld command is executed when HiRDB is not running and one of the following conditions arises before the command terminates:

HiRDB starting

HiRDB online

HiRDB shutting down

If this happens, any unloaded log files that are created cannot be used for database recovery processing. If this problem occurs, re-execute the pdlogunld command by checking the operating status of HiRDB.

In a server specifically shut down by using the pdstop -s command, the pdlogunld command cannot be executed without the -f option specification if pd_log_unload_check=N is specified for that server.

When an unload log file created in a HiRDB file system area by the pdlogunld command is migrated to another HiRDB file system area by the pdfbkup or pdfrstr command, the record length of the unload log file must be a multiple of the sector length of the HiRDB file system area that is used during the pdfrstr command's execution. The following table presents the relationship between the record length of an unload log file and the sector length of the HiRDB file system area that is used during execution of the pdfrstr command execution:

Record length of unload log file (bytes) | Sector length of the HiRDB file system area used during pdfrstr command execution (bytes)
1,024 | 2,048 | 4,096
1,024 | Y | N | N
2,048 | Y | Y | N
4,096 | Y | Y | Y

Legend:

Y: pdfrstr command can be executed.

N: pdfrstr command cannot be executed.

You can use the pdfls command to check the record length of an unload log file. To check the current sector length, use the pdfstatfs command (the sector length of a HiRDB file system area is the value specified in the -s option during execution of the pdsfmkfs command).

pdls (Display HiRDB system status)

Common function

The pdls command displays the status of the HiRDB system for a specified display object.

Common executor

Any user (with or without privileges)

Common format

HiRDB/Single Server

pdls [-d display-object-type [display-object-type-options]]

Note

The specifiable options depend on the display object type.

HiRDB/Parallel Server

pdls [-x host-name[,host-name]...]
     [-d display-object-type [display-object-type-options]]

Common options

-x host-name<identifier> ((1-32))

Specifies the name of the host of the server for which status is to be displayed.

When this option is omitted, the items for the specified display object type are displayed for all servers in the system. If -d aud is specified, you cannot specify the -x option.

-d display-object<<svr>>

Specifies the type of object whose status is to be displayed:

act

User status

aud

Status of audit trail files

ha

System status when system switching facility is used

lck

Server lock status

mem

Information about common server memory

org

Progress of reflection processing for online reorganization

prc

Server processing status

ris

Execution status of log application processing at the log application site (applicable only when Real Time SAN Replication based on the log-only synchronous method is used).

rpc

Displays server communication control information

rpl

HiRDB Datareplicator linkage status

scd

Server scheduling status

stj

Displays whether types of statistical information output by unit and server are specified

sts

Status file status

svr

Unit and server status

trn

Server transaction status

Common rules

When aud, ha, rpl, or ust is specified in the -d option, you can execute the pdls command whether or not HiRDB is active. The pdls command with any other option specified can be executed only when HiRDB is running.

You can execute the pdls command with -d ha, lck, svr, trn, or ust specified from any server machine (except a server machine on a utility special unit). Otherwise, this command must be executed at the server machine that contains the single server or where the system manager is located. If you have specified -d ris, execute the command at the log application site of the server machine that contains the single server, or where the system manager is located.

An option that is not applicable to the specified display object is ignored, if specified.

When you execute the pdls command, we recommend that you specify $PDDIR/bin/pdls (if you specify pdls, another program product's command that has the same name may be executed).

Common note

If you specify the TMPDIR environment variable and cancel the pdls command or another HiRDB command during execution, files whose names begin with pdcmd may remain in the directory set by TMPDIR. In such a case, use the OS's rm command to delete those files.

When the standby-less system switchover (effects distributed) facility is used, the server switched over to another unit is treated as the target unit's server.

pdls [-d act] (Display user status)

Function

Displays user status.

Format

pdls -d act [-s server-name]

Option

-s server-name<identifier> ((1-8))

Specifies that the status of users in the specified server is to be displayed. When this option is omitted, the status of users associated with all servers in the HiRDB system is displayed.

Notes

Return code 0 for the pdls -d act command indicates normal termination, and return code 8 indicates abnormal termination. When the return code is 8, see the previous message and eliminate the cause of the error.

Output format

HOSTNAME : aa...a(bbccdd)
SVID    PID     ACTID             LOCK-STATE
ee...e    ff...f      gggg-hhhh-ii...i     j

Explanation

aa...a

Host name (up to 32 characters)

bbccdd

Time when pdls command was executed (hour:minute:second)

ee...e

Server name (up to 8 characters)

ff...f

Process ID (up to 10 decimal digits for AIX-5L; up to 5 decimal digits for other systems)

0 is displayed in the case of user information recovered by a unit restart.

gggg-hhhh-ii...i

User identification number (up to 16 decimal digits)

j

Lock hold status of UNTIL DISCONNECT specification:

Y

Lock is held

N

Lock is not held

pdls [-d aud] (Display the status of audit trail files)

Function

The pdls -d aud command displays the status of audit trail files.

Format

 pdls -d aud [-u unit-identifier] [-U authorization-identifier]

Options

-u unit-identifier<identifier> ((4 characters))

Specifies the identifier of the unit whose information is to be displayed.

The -u option is applicable to a HiRDB/Parallel Server. When the -u option is omitted, the command displays the information for all units.

-U authorization-identifier

Specifies the auditor's authorization identifier. When this option is specified, a message requesting entry of a password is displayed.

This option is effective when the pdls -d aud command is executed during HiRDB operation. When HiRDB is not running, you can execute this command without setting this option or the PDUSER environment variable if you are a HiRDB administrator (including superuser).

Rules

When HiRDB is running, only the auditor can execute the pdls -d aud command.

The command uses the authorization identifier specified in this option and the password that is entered in the response-request message to connect to HiRDB and checks that this authorization identifier has the audit privilege.

You can specify this option only when you execute the pdls -d aud command in an environment in which you can enter a response to a response-request message.

When this option is omitted, the pdls -d aud command assumes the value set in the PDUSER environment variable during command execution. If this option is omitted and the PDUSER environment variable has not been set, the pdls -d aud command cannot be executed. If this option is omitted, the PDUSER environment variable must be set, as shown in the following example:

Example: C shell

setenv PDUSER '"authorization-identifier"/"password"'

Notes

Return code 0 for the pdls -d aud command indicates normal termination, and return code 8 indicates abnormal termination.

The pdls -d aud command cannot be executed during unit startup or termination processing.

If the pd_aud_file_name operand has not been specified in the system definition or the audit trail file specified in the pd_aud_file_name operand is missing, executing the pdls -d aud command results in a command error.

If you execute the pdls -d aud command for a HiRDB/Parallel Server without specifying the -u option and an error occurs on the unit during command processing, the command displays the error message; if no error occurs on the unit, the command displays information about the audit trail files.

If you initialize a unit status file while the unit is inactive and then start the unit, the command displays - as the data loading status of the audit trail file generation that has been placed in shutdown status due to an error.

Output format

HOSTNAME     : aa...a(bbccdd)
UNITID       : eeee
Audit-Status : ff...f
File-Name    : gg...g
Generation-Name    Status
hh...h             ijk
   :                :

When information about all units is displayed, the command displays as many sets of the above information as there are units.

Explanation

aa...a:

Host name (1-32 characters)

bbccdd:

Time the pdls command was executed (hour-minute-second)

eeee:

Unit identifier (4 characters)

ff...f:

Audit trail acquisition status (1-8 characters)

ACTIVE: Acquiring

INACTIVE: Stopped

********: The audit trail acquisition status cannot be displayed because HiRDB is not active.

gg...g:

Name of the HiRDB file system area for audit trail files (absolute path name expressed in 1-117 characters)

If the name of the audit trail file exceeds 117 characters, the command displays the first 117 characters.

hh...h:

File name for each audit trail file generation (16 characters)

If the number of audit trail file generations is 1 or fewer, this information is not displayed.

ijk:

Status of each audit trail file generation (3 characters)

If the number of audit trail file generations is 1 or fewer, this information is not displayed.

i: Current status of the audit trail file:

c: Current. The current audit trail is being output to this generation. If audit trail acquisition has stopped, this file will be used as the current file the next time acquisition begins.

s: Standby. The current audit trail is not being output to this generation. In the case of an audit trail file that is in shutdown status due to an error, s is displayed while the unit is inactive.

j: Data loading status of the audit trail file:

d: Waiting for data loading. Data has not been loaded from the applicable audit trail file generation to the audit trail table.

-: Data loading has been completed. Data has been loaded from the applicable audit trail file generation to the audit trail table. In the case of an audit trail file that is in shutdown status due to an error, - is displayed while the unit is inactive.

k: Shutdown status of the audit trail file:

h: Shut down. An error occurred in the audit trail file and no audit trail has been output to the file since then.

-: Not shut down.

pdls [-d ha] (Display HiRDB system status)

Function

Displays the HiRDB system status when the system switching facility without IP address inheritance is used.

Format

pdls -d ha [{-u unit-identifier|-s server-name}] [-a]

Options

-u unit-identifier<identifier> ((4 characters))

Specifies the identifier of the unit for which system status is to be displayed. When this option is omitted, the system status is displayed for all units.

If you specify the identifier of a unit to which the standby-less system switchover (effects distributed) facility is applicable, only the host and guest BESs in that unit are subject to this status display.

-s server-name<identifier> ((1-8))

When the standby-less system switchover (effects distributed) facility is used, this option specifies the name of the server whose status is to be displayed. Specifying the server name of a unit to which the standby-less system switchover (effects distributed) facility is not applicable results in an error (KFPS05041-E message).

-a

When the standby-less system switchover (effects distributed) facility is used, specifies that not only the execution status but also the detailed information (standby status, acceptable status, and running system start wait status) is to be displayed.

Rules

If the standby-less system switchover (effects distributed) facility is not being used, the -a option is ignored, if specified.

If the -a and -u options are both specified, detailed information about the host and guest BESs in the specified unit is displayed.

If the -a and -s options are both specified, detailed information is displayed for each unit in the HA group of the specified server.

When the -a option is omitted, information about the executing server is displayed.

To check the servers that are in acceptable status, specify the -a option.

The information to be displayed depends on the combination of the -a, -u, and -s options that are specified, as shown below:

Option | Active servers | Inactive servers
-a | -u | -s | Execution status | Standby or acceptable status | Running system start wait status
Specified | Specified | Specified |  |  |  |
Omitted | D | D | D | D
Omitted | Specified | D | D | D | D
Omitted | D | D | D | D
Omitted | Specified | Specified |  |  |  |
Omitted | D | E | E | E
Omitted | Specified | D | E | E | D*
Omitted | D | E | E | D*

Legend:

D: Displayed

: Not displayed

E: Results in an error

* Status of the inactive servers on all units in the HA group is displayed.

Notes

Return code 0 for the pdls -d ha command indicates normal termination, and return code 8 indicates abnormal termination.

If this command is specified when the system switching facility is not used or when the system switching facility is used but without IP address inheritance, a message is displayed and processing of the command terminates.

Output format

When the standby-less system switchover (effects distributed) facility is not used

UNITID  INITIAL-HOST  [STATUS]  RESERVED-HOST  [STATUS]
aaaa     bb...b         [ccc]      dd...d           [eee]
 :        :             :         :              :

Explanation

aaaa

Unit identifier (4 characters)

bb...b

Host name of current system (up to 32 characters)

ccc

Status of host of current system (3 characters):

In the monitor mode:

ONL: Executing (online)

SBY: On standby (including stopped)

STP: Both systems are stopped

In the server mode:

ONL: Executing (online)

SBY: On standby*

STP: Stopped

dd...d

Host name of spare system (up to 32 characters)

If the corresponding unit is not subject to system switchover or is using the system switchover facility with inheritance of IP addresses, ******* is displayed.

eee

Host status of spare system (3 characters):

In the monitor mode:

ONL: Executing (online)

SBY: On standby (including stopped)

STP: Both systems are stopped

***: Not subject to system switchover or using the system switchover facility with inheritance of IP addresses

In the server mode:

ONL: Executing (online)

SBY: On standby

STP: Stopped

***: Not subject to system switchover or using the system switchover facility with inheritance of IP addresses

* When the standby-less system switchover (1:1) facility is used, the alternate BES is placed in SBY status when its preparations have been completed, not when the alternate BES unit has started.

Supplementary description of the output format:

The following table shows the system statuses and display result:

System status | Display result
Monitor mode | Server mode
Primary system | Secondary system | Primary system | Secondary system | Primary system | Secondary system
Stopped | Stopped | STP | STP | STP | STP
Stopped | Standby* |  |  | STP | SBY
Active | Stopped | ONL | SBY | ONL | STP
Active | Standby | ONL | SBY | ONL | SBY
Stopped | Active | SBY | ONL | STP | ONL
Standby | Active | SBY | ONL | SBY | ONL
Standby* | Stopped |  |  | SBY | STP

Legend:

: Not applicable

* Although the secondary system cannot be started by itself, if Hitachi HA Toolkit Extension is used and the running system is terminated normally while both systems are active, the secondary system does not stop automatically. As a result, only the secondary system remains active.

If the names of the primary and secondary systems cannot fit on one line, the command displays the information about the secondary system's host on the next line. The following shows an example of this:

UNITID  INITIAL-HOST [STATUS]  RESERVED-HOST [STATUS]
aaaa    bb................................................bb      [ccc]
        dd................................................dd      [eee]

Figure 2-4 shows the correspondence between the mode (monitor or server) and the information displayed by the pdls -d ha command.

Figure 2-4 Correspondence between the mode (monitor or server) and the information displayed by the pdls -d ha command

When the standby-less system switchover (1:1) facility is used, the terms primary system, secondary system, executing unit, and standby unit mean the following:
Primary system: Normal BES unit
Secondary system: Alternate BES unit
Executing: Unit that is executing processing (normal BES unit that has not been switched over or alternate BES unit that has been switched over)
Standby: Standby unit (alternate BES unit that has not been switched over or normal BES unit that has been switched over)

When the standby-less system switchover (effects distributed) facility is used

UNITID  INITIAL-HOST [STATUS]  RESERVED-HOST [STATUS]
aaaa    bb...bb      [ccc]     dd...dd       [eee]
  :       :            :          :             :

SVID    UNIT  [STATUS] INITIAL-UNIT
ff...f  gggg  [hhh]    iiii
  :       :     :        :

Explanation

The values of aaaa through eee are the same as when the standby-less system switchover (effects distributed) facility is not used.

ff...f through iiii are sorted by the identifier of the unit that contains servers and are displayed for each server.

ff...f

Server name (up to 8 characters).

This is a server on the unit to which the standby-less system switchover (effects distributed) facility is applicable.

gggg

Identifier of the unit that contains the server (4 characters).

This is the identifier of the unit that contains server ff...f.

If the -u option is specified, this is the specified unit identifier.

If the -a option is specified but the -u option is omitted, this is the identifier of the unit whose status is to be displayed, among all units in the target HA group of server ff...f.

If the -a and -u options are both omitted, this is the identifier of the unit on which server ff...f is running.

If server ff...f is not running in any of the units of the HA group, **** is displayed.

hhh

Server's status (3 characters):

ONL

Executing (online)

SBY

Standby status for a host BES; acceptable status for a guest BES

If the -a option is omitted, this information is not displayed.

STP

If the -a, -u, and -s options are omitted, this value means that the server is not running on any unit in the HA group.

If the -a option is specified, this value means that the server is stopped on the unit gggg.

WIT

Running system start wait status

If the -a option is omitted, this information is not displayed.

iiii

Identifier of the definition target unit (4 characters).

This is the unit identifier specified in the pdstart -u system definition for server ff...f.

Example of display when the standby-less system switchover (effects distributed) facility is used:

The following shows a configuration example when the standby-less system switchover (effects distributed) facility is used:

When the pdls -d ha command is executed in this configuration, the following information is displayed:

When pdls -d ha is executed

SVID  UNIT  [STATUS]  INITIAL-UNIT
BES11 unt1  [ONL]     unt1
BES12 unt1  [ONL]     unt1
BES31 unt1  [ONL]     unt3
BES21 unt2  [ONL]     unt2
BES22 unt2  [ONL]     unt2
BES32 ****  [STP]     unt3

When pdls -d ha -a is executed

SVID  UNIT  [STATUS]  INITIAL-UNIT
BES11 unt1  [ONL]     unt1
BES12 unt1  [ONL]     unt1
BES21 unt1  [SBY]     unt2
BES22 unt1  [SBY]     unt2
BES31 unt1  [ONL]     unt3
BES32 unt1  [STP]     unt3
BES11 unt2  [SBY]     unt1
BES12 unt2  [SBY]     unt1
BES21 unt2  [ONL]     unt2
BES22 unt2  [ONL]     unt2
BES31 unt2  [SBY]     unt3
BES32 unt2  [STP]     unt3
BES11 unt3  [SBY]     unt1
BES12 unt3  [STP]     unt1
BES21 unt3  [SBY]     unt2
BES22 unt3  [SBY]     unt2
BES31 unt3  [SBY]     unt3
BES32 unt3  [STP]     unt3

When pdls -d ha -u unt1 is executed

SVID  UNIT  [STATUS]  INITIAL-UNIT
BES11 unt1  [ONL]     unt1
BES12 unt1  [ONL]     unt1
BES31 unt1  [ONL]     unt3

When pdls -d ha -u unt1 -a is executed

SVID  UNIT  [STATUS]  INITIAL-UNIT
BES11 unt1  [ONL]     unt1
BES12 unt1  [ONL]     unt1
BES21 unt1  [SBY]     unt2
BES22 unt1  [SBY]     unt2
BES31 unt1  [ONL]     unt3
BES32 unt1  [STP]     unt3

When pdls -d ha -s BES12 is executed

SVID  UNIT  [STATUS]  INITIAL-UNIT
BES12 unt1  [ONL]     unt1

When pdls -d ha -s BES12 -a is executed

SVID  UNIT  [STATUS]  INITIAL-UNIT
BES12 unt1  [ONL]     unt1
BES12 unt2  [SBY]     unt1
BES12 unt3  [STP]     unt1

pdls [-d lck] (Display server lock control status)

Function

Displays server lock status.

Format

pdls -d lck [{-a [-s server-name] | -p}]

Options

{-a [-s server-name] | -p}

Specifies whether both occupancy and wait information or the utilization factor of the tables for managing locked resources is to be displayed. When this option is omitted, only the wait information is displayed. If the -a and -p options are both specified, the -p option is effective.

-a

Specifies that both occupancy and wait information are to be displayed. When this option is omitted, only the wait information is displayed.

-s server-name<identifier> ((1-8))

Specifies the name of the server whose wait information only is to be displayed. When this option is omitted, information about all servers is displayed.

-p

Specifies that the utilization factor of the tables for managing locked resources is to be displayed.

Notes

Return code 0 for the pdls -d lck command indicates normal termination, and return code 8 indicates abnormal termination.

Output format

Options omitted or -a and -s options specified:

HOSTNAME : aa...a(bbccdd)
SVID         PID    TID KIND  RESOURCE
 WAIT  MODE  TRNBID              ACTID                LOCK-STATE  DPRIO
ee...e    ff...f gg...g hhhh  ii...i
jj...j kk    ll...l              mm...m-nn...n-oo...o p             qqq   ...1
                        :

Explanation

1 is displayed as many times as there are occupancy and wait information items.

aa...a

Host name (up to 32 characters).

bbccdd

Time of pdls command execution (hour:minute:second).

ee...e

Server name (up to 8 characters).

ff...f

Process ID (32-bit mode: 5 decimal digits; 64-bit mode: 10 decimal digits)

gg...g

Thread ID (5 decimal digits).

hhhh

Resource type (4 hexadecimal digits).

ii...i

Resource name (28 hexadecimal digits).

jj...j

Wait time (5 decimal digits; in seconds).

***** is displayed for the occupancy information.

kk

Lock mode (2 characters).

ll...l

Transaction identifier (16 characters).

If Y is displayed for p (lock hold status of UNTIL DISCONNECT specification), this transaction branch may already have been terminated. Therefore, the pdls -d trn command may not be able to display the status, depending on the timing.

mmmm-nnnn-oo...o

User identification number (up to 16 decimal digits).

p

Lock hold status of UNTIL DISCONNECT specification:

Y

Lock is held

N

Lock is not held

qqq

Deadlock priority value (up to 3 decimal digits).

-p option specified:

HOSTNAME: aa...a(bbccdd)
SVID       TABLE-KIND  TOTAL  KIND  RATE
ee...e       RESOURCE    ff...f    gg...g   hh%                1
:           :          :      :       :

Explanation

1 is displayed as many times as there are servers.

aa...a

Host name (up to 32 characters).

bbccdd

Time of pdls command execution (hour:minute:second).

ee...e

Server name (up to 8 characters).

ff...f

Maximum number of tables for managing locked resources that can be used (32-bit mode: 8 decimal digits; 64-bit mode: 10 decimal digits).

gg...g

Number of tables for managing locked resources currently in use (32-bit mode: 8 decimal digits; 64-bit mode: 10 decimal digits).

hh

Utilization factor of the tables for managing locked resources (%).

pdls [-d mem] (Display server shared memory status)

Function

Displays information about the shared server memory. The command displays the size of the shared memory being used in each unit corresponding to the host.

Format

pdls -d mem

Option

None

Notes

Return code 0 for the pdls -d mem command indicates normal termination, and return code 8 indicates abnormal termination.

Output format

In HP-UX, Solaris, and Linux

HOSTNAME : aa...a(bbccdd)
SHM-ID  GET-SIZE  ACT-SIZE SHM-OWNER          POOL-ID
ee...e    ff...f    gg...g    hh...h           ii...i
  :          :         :         :                :

In AIX 5L (32-bit mode)

HOSTNAME : aa...a(bbccdd)
    SHM-ID   GET-SIZE   ACT-SIZE SHM-OWNER          POOL-ID
    ee...e     ff...f     gg...g    hh...h           ii...i
      :           :          :         :                :

In AIX 5L (64-bit mode)

HOSTNAME : aa...a(bbccdd)
    SHM-ID             GET-SIZE             ACT-SIZE SHM-OWNER          POOL-ID
    ee...e               ff...f               gg...g    hh...h           ii...i
      :                   :                     :         :                :

Explanation

aa...a

Host name (up to 32 characters).

bbccdd

Time of pdls command execution (hour:minute:second).

ee...e

Identifier of shared memory segment (10 decimal digits).

With a version other than AIX 5L, if the value exceeds 6 digits, the subsequent display will be shifted to the right by that number of digits.

ff...f

Allocation size (1-10 decimal digits, or 1-20 decimal digits for AIX 5L in the 64-bit mode) (bytes)

If the value exceeds 9 digits with a version other than AIX 5L, the subsequent display will be shifted to the right by that number of digits.

gg...g

Amount of space being used (1-10 decimal digits, or 1-20 decimal digits for AIX 5L in the 64-bit mode) (bytes)

If the value exceeds 9 digits with a version other than AIX 5L, the subsequent display will be shifted to the right by that number of digits.

hh...h

Attribute of the process that uses shared memory (up to 8 characters).

Type of shared memory | Value of hh...h
Shared memory for unit controller | MANAGER
Shared memory for global buffer | When the standby-less system switchover (effects distributed) facility is applicable to the unit | Unit name enclosed in parentheses
When the standby-less system switchover (effects distributed) facility is not applicable to the unit | HiRDB server name using the corresponding shared memory
Shared memory for utility | UTILITY
Shared memory for security audit information buffer | AUDDEF

ii...i

Pool identifier (up to 16 characters).

Type of shared memory | Value of ii...i
Shared memory for unit controller | Not displayed
Shared memory for global buffer | When the standby-less system switchover (effects distributed) facility is applicable to the unit | Sequence number in the unit
When the standby-less system switchover (effects distributed) facility is not applicable to the unit | Sequence number in the HiRDB server that uses the corresponding shared memory
Shared memory for utility | Unique character string
Shared memory for security audit information buffer | None

Note

The same value (allocation size) is always displayed for ff...f (allocation size) and gg...g (size being used).

pdls [-d org] (Display progress of reflection processing for online reorganization)

Function

When updatable online reorganization is executed, the pdls -d org command displays the progress of reflection processing.

The pdls -d org command is available only if HiRDB Staticizer Option has been installed.

Format

 pdls -d org [-u unit-identifier] [-s server-name] [-a]

Options

-u unit-identifier<identifier> ((4 characters))

Specifies the identifier of the unit whose reflection processing progress is to be displayed.

If this option is specified together with the -s option, the -s option takes effect and the -u option is ignored.

If the -u and -s options are both omitted, the command displays the progress of reflection processing at all servers.

-s server-name<identifier> ((1-8))

Specifies the name of the server whose reflection processing is to be displayed.

-a

Specifies that information about all system log application points used for reflection processing is to be displayed.

Notes

Return code 0 for the pdls -d org command indicates normal termination, and return code 8 indicates abnormal termination.

If the execution status of reflection processing is NONE, the command does not display information about the system log application start point, system log application completed point, or system log application end point, even if the -a option is specified.

If both updatable online reorganization and an updating transaction are executed in parallel, the remaining number of update log records that is input during reflection processing may increase due to the new log information that is output by the updating transaction.

If the execution status of reflection processing is READY or REFLEC, the system log application end point may change as time elapses.

If the pdorend command is not executing reflection processing for online reorganization, nothing is displayed for the file group name of the system log file at the system log application completed point. In this case, 0 is displayed for the run ID, run ID for each server, generation number, system log block number, and system log record number.

Output format

When the pdls -d org command is executed on a unit with no back-end server

UNITID: aaaa(bbccdd)
No target server of Online DB Reorganization

When the -a option is omitted

UNITID: aaaa(bbccdd)
SERVER  STATUS  REMAIN_LOG_RECORD_COUNT
ee...e  ff...f  gg...g

When the -a option is specified

UNITID: aaaa(bbccdd)
SERVER  STATUS  REMAIN_LOG_RECORD_COUNT
ee...e  ff...f  gg...g
  LOG_POINT_KIND LOGGROUP RUNID  SVRRUNID GEN_NO BLOCK_NO RECORD_NO
  START_POINT    hh...h   ii...i jj...j   kk...k ll...l   mm...m   .......1
  REFLEC_POINT   hh...h   ii...i jj...j   kk...k ll...l   mm...m   .......2
  END_POINT      hh...h   ii...i jj...j   kk...k ll...l   mm...m   .......3

Explanation

1 is information about the system log application start point, 2 is information about the system log application completed point, and 3 is information about the system log application end point.

aaaa:

Unit identifier (4 characters)

bbccdd:

Time the pdls command was executed (hour-minute-second)

ee...e:

Server name (up to 8 characters)

ff...f:

Execution status of the current reflection processing (up to 6 characters)

READY: Waiting for the start of reflection processing

REFLEC: Reflection processing is underway

SYNC: Synchronizing paired volumes

NONE: Updatable online reorganization is not underway

gg...g:

Remaining number of update log records that are input during reflection processing (maximum of 20 decimal digits). When ff...f is NONE, ---- is displayed.

hh...h:

File group name of the system log file (up to 8 characters)

ii...i:

Run ID (8 characters)

jj...j:

Run ID for each server (8 characters)

kk...k:

Generation number (up to 8 hexadecimal characters)

ll...l:

Block number of the system log (up to 8 hexadecimal characters)

mm...m:

Record number of the system log (up to 16 hexadecimal characters)

pdls [-d prc] (Display server process status)

Function

Displays server processing status.

Format

pdls -d prc [{-a | -s server-name}] [-c]

Options

{-a | -s server-name}

Specifies -a to display information about all servers in the HiRDB system (including servers used internally by HiRDB), or specifies -s and a server name to display information about the specified server only. When this option is omitted, information about all servers except for servers used internally by HiRDB is displayed.

-a

Specifies that the processing status of all servers in the HiRDB system is to be displayed, including servers used internally by HiRDB.

-s server-name<identifier> ((1-8))

Specifies the name of a server whose processing status is to be displayed.

-c

Specifies that the process's operating status (whether or not the process is scheduled to stop) is to be displayed.

Use this option to check the process's stop status after using the pdpfresh command to refresh the process.

Notes

Return code 0 for the pdls -d prc command indicates normal termination, and return code 8 indicates abnormal termination.

Output format

HOSTNAME:  aa...a(bbccdd)
STATUS PID    UID    GID   SVID  TIME   PROGRAM  C-PID      C-GRP
e      ff...f    gg...g   hh...h  ii...i   jjkkll   mm...m    nn...n(oo...o)  pp
:       :       :       :     :     :       :

Explanation

aa...a

Host name (up to 32 characters).

bbccdd

Time of pdls command execution (hour:minute:second).

e

Server's activity status:

D

Server is engaged in startup or termination processing

L

Server is active

C

Process is stopping or scheduled to stop (displayed when the -c option is specified)

ff...f

Process ID (up to 10 decimal digits).

gg...g

User ID (up to 5 decimal digits).

hh...h

Group ID (up to 5 decimal digits).

ii...i

Server name (up to 8 characters).

jjkkll

Time the service request was accepted (hour:minute:second).

If the server is not connected to a UAP, 999999 is displayed.

mm...m

UAP identification information (up to 30 characters).

The UAP's identification name as specified in PDCLTAPNAME in the client environment definition is displayed.

However, the display is in the following format for servers currently executing the distributed server function for a distributed database:

RDAUSER-AA...A

AA...A

Authorization identifier (up to 8 characters)

This is the authorization identifier specified by the system at the distributed client in order to connect to the HiRDB at the distributed server.

For an object other than a server, ****** is displayed.

If PDCLTAPNAME is undefined, Unknown is displayed.

nn...n

Process ID of the client (UAP or utility) that was connected to the server process (up to 10 decimal digits).

This information is applicable only to the server process that was connected to the client; it is not displayed for a server process that was not connected to the client. This information is not displayed if the version of the client library connected to the UAP is earlier than 04-00.

oo...o

IP address of the client (UAP or utility) that was connected to the server process (up to 15 characters).

This information is applicable only to the server process that was connected to the client; it is not displayed for a server process that was not connected to the client. This information is not displayed if the version of the client library connected to the UAP is earlier than 04-00.

pp

Client group name (up to 2 characters) of the client connected to a server process. Only server processes that are connected to a client can be specified in this operand. Server processes that are not connected to a client are not displayed. Any client libraries linked to a UAP and having a version older than 04-00 are not displayed.

When using one character, specify a user-assigned client group name; when using two characters, specify a HiRDB-supplied client group name by client type. Following is a list of HiRDB-supplied client group names by client type:

Client group name | Client type
XA | X/Open XA interface
DF | Distributed client
PC | PC client
WS | WS client
MF | Mainframe-based client

Notes

If a server process has just been activated, blanks and ****** may be displayed as the server name and the UAP identification information, respectively.

When the status of a HiRDB command process is being displayed, 0 is displayed as both the user ID and the group ID.

pdls [-d ris] (Display log application processing execution status)

Function

When Real Time SAN Replication based on the log-only synchronous method is used, this command displays the execution status of log application processing at the log application site.

Format

 pdls -d ris [{-u unit-identifier|-s server-name}] [-a]

Options

-u unit-identifier

<identifier > ((4 characters))

Specifies the unit for which the execution status of log application processing is to be displayed (applies to all server machines in the unit).

-s server-name

<identifier> ((1-8 characters))

Specifies that server machine for which the execution status of log application processing is to be displayed.

-a

Specifies that all information used for log application processing is to be output.

Notes

Return code 0 for the pdls -d ris command indicates normal termination, and return code 8 indicates abnormal termination.

The pdls -d ris command is executed at the log application site. If the command is executed at the transaction execution site, the KFPS04684-E message is displayed.

The pdls -d ris command can be executed only while HiRDB is running.

Execute the pdls -d ris command at the server machine that contains the single server or where the system manager is located.

If the -u and -s options are both omitted, the command displays the execution status of log application processing executing at all server machines in the system.

The execution result displayed by the pdls -d ris command may not match the most recent status.
The following information is updated when the system starts reading the next generation of the system log file after reading log information through the end of the system log file, or when the system is waiting for new log information to be written after reading up to the most recent log information:

Point information at the end of log application

Number of remaining system log file groups that contain log information that has not been applied

Output format

When all options are omitted

UNITID: aaaa(bbccdd)
SERVER   STATUS       REMAIN_LOG_FILEGROUP_COUNT      ........................1
ee...e   ff...f       gg...g      ............................................1
  :        :            :
UNITID: aaaa(bbccdd)
SERVER   STATUS       REMAIN_LOG_FILEGROUP_COUNT      ........................1
ee...e   ff...f       gg...g      ............................................1
  :       :            :

When only the -u option is specified

UNITID: aaaa(bbccdd)
SERVER   STATUS       REMAIN_LOG_FILEGROUP_COUNT      ........................1
ee...e   ff...f       gg...g      ............................................1
  :       :            :

When only the -s option is specified

UNITID: aaaa(bbccdd)
SERVER   STATUS       REMAIN_LOG_FILEGROUP_COUNT      ........................1
ee...e   ff...f       gg...g      ............................................1

When the -a and -u options are both specified

UNITID: aaaa(bbccdd)
SERVER   STATUS     REMAIN_LOG_FILEGROUP_COUNT      ..........................1
ee...e   ff...f     gg...g      ..............................................1
 SYSTEM LOG APPLY INFORMATION      ..........................................1
 LOG_POINT LOGGROUP RUNID    SVRRUNID GEN_NO   BLOCK_NO      ................1
 CURRENT   hh...h   ii...i   jj...i   kk...k   mm...m      ..................1
 END       oo...o   pp...p   qq...q   rr...r   ss...s      ..................1
 RDAREA HOLD INFORMATION      ...............................................2
 RDAREANAME                       RDAREAID    STATUS            TYPE      ...3
 uu...u                           vv...v      ww...w            xxxx      ...3
   :                                 :           :                :
 RDAREA(HOLD) NOT FOUND      ................................................4
                 :
SERVER   STATUS     REMAIN_LOG_FILEGROUP_COUNT      ..........................1
ee...e   ff...f     gg...g      ..............................................1
 SYSTEM LOG APPLY INFORMATION      ..........................................1
 LOG_POINT LOGGROUP RUNID    SVRRUNID GEN_NO   BLOCK_NO      ................1
 CURRENT   hh...h   ii...i   jj...i   kk...k   mm...m      ..................1
 END       oo...o   pp...p   qq...q   rr...r   ss...s      ..................1
 RDAREA HOLD INFORMATION      ...............................................2
 RDAREANAME                       RDAREAID    STATUS            TYPE      ...3
 uu...u                           vv...v      ww...w            xxxx      ...3
   :                                 :           :                :
 RDAREA(HOLD) NOT FOUND      ................................................4

When the -a and -s options are both specified

UNITID: aaaa(bbccdd)
SERVER   STATUS     REMAIN_LOG_FILEGROUP_COUNT      ..........................1
ee...e   ff...f     gg...g      ..............................................1
 SYSTEM LOG APPLY INFORMATION      ..........................................1
 LOG_POINT LOGGROUP RUNID    SVRRUNID GEN_NO   BLOCK_NO      ................1
 CURRENT   hh...h   ii...i   jj...i   kk...k   mm...m      ..................1
 END       oo...o   pp...p   qq...q   rr...r   ss...s      ..................1
 RDAREA HOLD INFORMATION      ...............................................2
 RDAREANAME                       RDAREAID    STATUS            TYPE      ...3
 uu...u                           vv...v      ww...w            xxxx      ...3
   :                                 :           :                :
 RDAREA(HOLD) NOT FOUND      ................................................4

When only the -a option is specified

UNITID: aaaa(bbccdd)
SERVER   STATUS     REMAIN_LOG_FILEGROUP_COUNT      ..........................1
ee...e   ff...f     gg...g      ..............................................1
 SYSTEM LOG APPLY INFORMATION      ..........................................1
 LOG_POINT LOGGROUP RUNID    SVRRUNID GEN_NO   BLOCK_NO      ................1
 CURRENT   hh...h   ii...i   jj...i   kk...k   mm...m      ..................1
 END       oo...o   pp...p   qq...q   rr...r   ss...s      ..................1
 RDAREA HOLD INFORMATION      ...............................................2
 RDAREANAME                       RDAREAID    STATUS            TYPE      ...3
 uu...u                           vv...v      ww...w            xxxx      ...3
   :                                 :           :                :
 RDAREA(HOLD) NOT FOUND      ................................................4
                 :
SERVER   STATUS     REMAIN_LOG_FILEGROUP_COUNT      ..........................1
ee...e   ff...f     gg...g      ..............................................1
 SYSTEM LOG APPLY INFORMATION      ..........................................1
 LOG_POINT LOGGROUP RUNID    SVRRUNID GEN_NO   BLOCK_NO      ................1
 CURRENT   hh...h   ii...i   jj...i   kk...k   mm...m      ..................1
 END       oo...o   pp...p   qq...q   rr...r   ss...s      ..................1
 RDAREA HOLD INFORMATION      ...............................................2
 RDAREANAME                       RDAREAID    STATUS            TYPE      ...3
 uu...u                           vv...v      ww...w            XXXX      ...3
   :                                 :           :                :
 RDAREA(HOLD) NOT FOUND      ................................................4
                 :
UNITID: aaaa(bbccdd)
SERVER   STATUS     REMAIN_LOG_FILEGROUP_COUNT      ..........................1
ee...e   ff...f     gg...g      ..............................................1
 SYSTEM LOG APPLY INFORMATION      ..........................................1
 LOG_POINT LOGGROUP RUNID    SVRRUNID GEN_NO   BLOCK_NO      ................1
 CURRENT   hh...h   ii...i   jj...i   kk...k   mm...m      ..................1
 END       oo...o   pp...p   qq...q   rr...r   ss...s      ..................1
 RDAREA HOLD INFORMATION      ...............................................2
 RDAREANAME                       RDAREAID    STATUS            TYPE      ...3
 uu...u                           vv...v      ww...w            xxxx      ...3
   :                                 :           :                :
 RDAREA(HOLD) NOT FOUND      ................................................4
                 :
SERVER   STATUS     REMAIN_LOG_FILEGROUP_COUNT      ..........................1
ee...e   ff...f     gg...g      ..............................................1
 SYSTEM LOG APPLY INFORMATION      ..........................................1
 LOG_POINT LOGGROUP RUNID    SVRRUNID GEN_NO   BLOCK_NO      ................1
 CURRENT   hh...h   ii...i   jj...i   kk...k   mm...m      ..................1
 END       oo...o   pp...p   qq...q   rr...r   ss...s      ..................1
 RDAREA HOLD INFORMATION      ...............................................2
 RDAREANAME                       RDAREAID    STATUS            TYPE      ...3
 uu...u                           vv...v      ww...w            xxxx      ...3
   :                                 :           :                :
 RDAREA(HOLD) NOT FOUND      ................................................4

Explanation

If there is no target server, lines 1 through 3 are not displayed.

If the target server is a front-end server, lines 2 and 3 are not displayed.

If log application processing has not started or if the target server does not contain an RDAREA in shutdown status, line 3 is not displayed; instead, line 4 is displayed.

aaaa

Unit identifier (4 characters)

bbccdd

Time the pdls -d ris command was executed (hour minute second)

ee...e

Server name (up to 8 characters)

ff...f

Execution status of the current log application processing (up to 10 characters):

SYNC: Executing log application processing

TAKEOVER: Inheriting the database

IDLE: Waiting for output of log information; or, log application processing has not started

gg...g

Number of remaining system log file groups that contain log information that has not been applied (1 to 3 decimal digits)

If the execution status of log application processing is IDLE, 0 is displayed.

SYSTEM LOG APPLY INFORMATION

Log application information

CURRENT

Point information being applied to the log

If ff...f is SYNC or TAKEOVER, this item displays system log information currently being applied. If ff...f is IDLE, this item displays the most recent system log information that has already been applied to the database.

hh...h

File group name of the system log file (up to 8 characters)

If log application has not started, ******** is displayed.

ii...i

Run ID (up to 8 characters)

If log application has not started, ******** is displayed.

jj...j

Run ID for each server machine (up to 8 characters)

If log application has not started, ******** is displayed.

kk...k

Generation number (up to 8 hexadecimal characters)

If log application has not started, ******** is displayed.

mm...m

System log block number (up to 8 hexadecimal characters)

If log application has not started, ******** is displayed.

END

Point information at the end of log application

oo...o

File group name of the system log file (up to 8 characters)

If log application has not started, ******** is displayed.

pp...p

Run ID (up to 8 characters)

If log application has not started, ******** is displayed.

qq...q

Run ID for each server (up to 8 characters)

If log application has not started, ******** is displayed.

rr...r

Generation number (up to 8 hexadecimal characters)

If log application has not started, ******** is displayed.

ss...s

System log block number (up to 8 hexadecimal characters)

If log application has not started, ******** is displayed.

RDAREA HOLD INFORMATION

RDAREA shutdown information

This item displays shutdown information for an RDAREA on which the log operation has stopped.

uu...u

RDAREA name (identifier consisting of up to 31 characters)

vv...v

RDAREA ID (up to 11 decimal digits)

ww...w

RDAREA status (up to 17 characters)

For details about the RDAREA status, see the description of cc...c under Output format in pddbls (Display status of RDAREAs).

XXXX

RDAREA type (4 characters)

For details about the RDAREA type, see the description of eeee under Output format in pddbls (Display status of RDAREAs).

pdls [-d rpc] (Display server communication control information)

Function

Displays communication control information about a communication-established server. This command can be used when it is necessary to determine whether processing control is on the HiRDB side or on the client side if the client stops responding during UAP operation.

Format

pdls -d rpc [-a]

Options

-a

Displays communication control information about all processes in the HiRDB system. This option can be used to determine details of communication control information.

Notes

Return code 0 for the pdls -d rpc command indicates normal termination, and return code 8 indicates abnormal termination.

Client information (process ID, IP address, UAP information, OS type, group name, XA interface usage status) is not displayed if the version of the client library that is linked with the UAP is earlier than 04-00.

If the -a option is specified, the client OS type, the client group name, and the XA interface usage status are displayed if the server type is F or S, and the client is connected.

Output format

Default option (UAP connected)

[aaaa]
  Client Information :
    PID      ADDR      NAME     OS   GROUP   XA
    bb...b    cc...c      dd...d     e      ff     g
  Server Information :
    PID     SVID    STATUS  SYS_EVENT USR_EVENT  CRITICAL(MASK)  SERVICE  SYS_CALL
    hh...h  ii...i  jj...j  0xkk...k  0xll...l   m(0xnn...n)     oo...o   0xtt...t
       :       :        :         :        :           :            :         :
[aaaa]
  Client Information :
  :

Default option (Utility connected)

[aaaa]
  Server Information :
    PID     SVID     STATUS   SYS_EVENT USR_EVENT    CLITICAL(MASK) SERVICE  SYS_CALL
    hh...h     ii...i          jj...j         0xkk...k     0xll...l          m(0xnn...n)      oo...o       0xtt...t
      :     :        :         :        :              :            :         :
[aaaa]
  Server Information :
  :

The -a option specified

HOSTNAME : ss...s
PID     SVID    STATUS   SYS_EVENT USR_EVENT CLITICAL(MASK) SERVICE OS GROUP XA  ..1
hh...h    ii...i     jj...j      0xkk...k   0xll...l     m(0xnn...n)     oo...o    e   ff    Y  ...2
CLTKIND SVRKIND CLTPID CLTADDR CLTNAME ACTID    SYS_CALL  .........................3
p       q       bb...b   cc...c    dd...d   0xrr...r   0xtt...t  ............................4
:        :        :       :       :         :       :

Explanation

Items 1-4 are displayed in one line each. Items 2 and 4 are displayed repetitively for each process.

aaaa

Item number

Bb...b

Process ID of the client connected to a server process (in decimal, up to 10 digits)

cc...c

IP address of the client connected to a server process (up to 15 characters)

dd...d

UAP identification information for the client connected to a server process (up to 30 characters)

Displays identification information about the UAP specified in the PDCLTAPNAME client environmental variable. If PDCLTAPNAME is not specified, the command displays Unknown.

e

Client operating system

W

Workstation-based client

P

PC-based client

M

Mainframe-based client

ff

Client group name (up to 2 characters) of the client connected to a server process.

When using one character, specify a user-assigned client group name; when using two characters, specify a HiRDB-supplied client group name by client type. Following is a list of HiRDB-supplied client group names by client type:

Client group name | Client type
XA | X/Open XA interface
DF | Distributed client
PC | PC client
WS | WS client
MF | Mainframe-based client

g

Use of X/Open XA interface

Y

Used

N

Not used

hh...h

Server process ID (up to 10 decimal digits)

ii...i

Server name (up to 8 characters)

jj...j

Process status display (up to 12 characters)

ACTIVE

currently processing

SUSPEND (QUE)

processing suspended (service wait state: queued)

SUSPEND (CLT)

processing suspended (waiting for next service)

SUSPEND (SVR)

processing suspended (waiting for other messages)

kk...k

Display of process status details (26 characters)

Displays system internal code.

ll...l

Display of process status details (8 characters)

Displays system internal code.

mm...m

Critical status display

Y

Critical

N

Not critical

n

Critical information display (8 hexadecimal digits)

oo...o

Service name display (up to 32 characters)

Displays internal system information.

p

Client type

C

Client

U

Utility

Blank

Other than above

q

Server type (With -a option, displays a server type only when the client type is C.)

F

Front-end server (FES)

B

Back-end server (BES)

D

Dictionary server (DIC)

S

Single server (SDS)

rr...r

Activity ID (18 characters)

This is not displayed for a process that does not have an activity ID.

ss...s

Host name (up to 32 characters)

tt...t

Internal information used by the system (8 characters)

Example of information verification

SQL not responding

If the STATUS is ACTIVE, the server is processing.

To determine whether current control is with the client or the server:

This can be determined based on the information indicated in the STATUS display on the front-end server (single server). If the STATUS display on the front-end server is SUSPEND (CLT), control is with the client.

pdls [-d rpl] (Display HiRDB Datareplicator linkage status)

Function

Displays the HiRDB Datareplicator linkage status. Also displays the extraction status of the extracted HiRDB Datareplicator system log in the system log file.

Format

pdls -d rpl [-j] [-u unit-identifier] [-s server-name]

Options

-j

Specifies that the extraction status of the extracted HiRDB Datareplicator system log in the system log file is to be displayed. When this option is specified, the following information is displayed:

Whether or not the HiRDB Datareplicator linkage facility is being used

The extraction status of the system log from the system log file of the extracted HiRDB Datareplicator

Internal information used by the system

When this option is omitted, the only information displayed is whether or not the HiRDB Datareplicator linkage facility is being used (the extraction status of the system log and the internal information are not displayed).

-u unit-identifier<identifier> ((4 characters))

Specifies the unit identifier of a unit in order to display the extraction status of the extracted HiRDB Datareplicator system log for that unit. When this option is omitted, this information is displayed for all units in the system. When the -j option is omitted and this option is specified, whether or not the system and the specified unit are using the HiRDB Datareplicator linkage facility is displayed.

-s server-name<identifier> ((1-8))

Specifies a server name in order to display the extraction status of the extracted HiRDB Datareplicator system log for that server. When this option is omitted, this information is displayed for all servers in the system. When the -j option is omitted and this option is specified, whether or not the system and the unit containing the specified server are using the HiRDB Datareplicator linkage facility is displayed.

Notes

Return code 0 for the pdls -d rpl command indicates normal termination, and return code 8 indicates abnormal termination.

When the -j option is specified and the -u and -s options are omitted in a pdls command in which -d rpl is specified, the HiRDB Datareplicator linkage facility status is displayed for all servers of all units in the system.

A pdls command with -d rpl specified can be executed even if the server is inactive.
However, an error results if the extracted HiRDB Datareplicator directory name is not specified in pd_rpl_hdepath in the system definition or if there is no link file for data linkage.

Output format

-j option omitted

SYSTEMID         :aaaa(bbccdd)                           1
Data Replication :e                                     1
UNITID           :ffff(bbccdd)                            2
Data Replication :e                                     2

If the -u option was specified for a HiRDB/Parallel Server, this information is displayed only when the specified unit is the server machine where the system manager is located.

In the case of a HiRDB/Parallel Server, this information is displayed as many times as there are units in the system. If the -u option was specified, this information is displayed only for the specified unit.

Explanation

aaaa

HiRDB identifier (4 characters)

bbccdd

Time (hour:minute:second) when the pdls command was entered

e

One character indicating whether or not the HiRDB Datareplicator linkage facility is being used at the HiRDB system and unit (Y is displayed, indicating that the HiRDB Datareplicator linkage facility is being used, even if there is no database to be linked to all back-end servers in the system and in the unit):

Y

HiRDB Datareplicator linkage facility is being used

N

HiRDB Datareplicator linkage facility is not being used

*

System linkage status cannot be displayed because the system manager is inactive (the status of each unit should be checked; if there is even one unit that is not using the HiRDB Datareplicator linkage facility, it will be shown that the HiRDB Datareplicator linkage facility is not being used by the system)

-

There is no server subject to HiRDB Datareplicator linkage in this unit (the server to be linked is a back-end server in the case of a HiRDB/Parallel Server and the single server in the case of a HiRDB/Single Server)

ffff

Unit identifier (4 characters)

-j option specified

SYSTEMID         :aaaa(bbccdd)                       1
Data Replication :e                                 1
UNITID           :ffff(bbccdd)                         2
Data Replication :e                                  2
SERVER NAME      :gg...g                               2,3
Extract Database :h                                  2,3
Extract Status   :I                                  2,3
System Log Extract Point :                          2,3,4
Run ID Group   Gen No.  Block No.                   2,3,4
jj...j    kk...k    ll...l      mm...m                       2,3,4
System Log Sync info   :                            2,3,4
Run ID  Group   Gen No. Block No.                   2,3,4
nn...n    oo...o    pp...p   qq...q                        2,3,4

If the -u option is specified for a HiRDB/Parallel Server, this information is displayed only if the specified unit is the server machine where the system manager is located.

In the case of a HiRDB/Parallel Server, this information is output for only the number of units in the system.

In the case of a HiRDB/Parallel Server, this information is displayed as many times as there are servers in the unit. If the -s option was specified, this information is displayed only for the specified server. If the pd_rpl_hdepath operand is omitted in the system definition or the linkage file is invalid (for example, because the file is missing), this information is not displayed.

This information is displayed only when the specified HiRDB server contains the target database that is to be extracted. If the -u option was specified, this information is displayed only for the specified unit.

Explanation

aaaa

HiRDB identifier (4 characters)

bbccdd

Time (hour:minute:second) when the pdls command was entered.

e

One character indicating whether or not the HiRDB Datareplicator linkage facility is being used at the HiRDB system and unit (Y is displayed, indicating that the HiRDB Datareplicator linkage facility is being used, even if there is no database to be linked to all back-end servers in the system and in the unit):

Y

HiRDB Datareplicator linkage facility is being used

N

HiRDB Datareplicator linkage facility is not being used

*

System linkage status cannot be displayed because the system manager is inactive (the status of each unit should be checked; if there is even one unit that is not using the HiRDB Datareplicator linkage facility, it will be shown that the HiRDB Datareplicator linkage facility is not being used by the system)

-

There is no server subject to the HiRDB Datareplicator linkage in this unit (the server to be linked is a back-end server in the case of a HiRDB/Parallel Server and the single server in the case of a HiRDB/Single Server)

ffff

Unit identifier (4 characters)

gg...g

Server name (up to 8 characters)

h

Whether or not there is a database to be extracted:

Y

There is a database to be extracted at the indicated HiRDB server

N

There is no database to be extracted at the indicated HiRDB server

i

Internal information used by the system (one character)

The information below is displayed when the HiRDB Datareplicator linkage facility is being used.

Extraction information from extracted HiRDB Datareplicator system log

jj...j

Run ID (run ID of log service when file was used) (8 hexadecimal digits)

kk...k

Group name of system log file currently being extracted (up to 8 characters)

ll...l

Generation number of system log file currently being extracted (8 hexadecimal digits)

mm...m

System log block number currently being extracted (8 hexadecimal digits)

Internal information from extracted HiRDB system log

nn...n

Internal information used by the system (8 characters)

oo...o

Internal information used by the system (up to 8 characters)

pp...p

Internal information used by the system (up to 8 characters)

qq...q

Internal information used by the system (up to 8 characters)

Note

Items j through q are displayed as blanks or zeros when HiRDB Datareplicator linkage does not start after the link file for data linkage is initialized or when the link file for data linkage was initialized during execution of HiRDB Datareplicator linkage.

pdls [-d scd] (Display server schedule status)

Function

Displays server scheduling status.

Format

pdls -d scd [{-a | -s server-name}]

Options

-a

Specifies that the service scheduling status of all servers that are active at the time the pdls command is executed is to be displayed.

-s server-name<identifier> ((1-8))

Specifies the name of a server whose scheduling status is to be displayed.

Notes

Return code 0 for the pdls -d scd command indicates normal termination, and return code 8 indicates abnormal termination.

Output format

HOSTNAME: aa...a(bbccdd)
total server count ee...e                                       1
SVID  ST QUECNT MAXCNT USED_POL FREE_POL MAX_UPOL MAX_FPOL LAST_RECV_TIME  2
ff...f   g  hh...h   ii...i    jj...j      kk...k     ll...l      mm...m  nnooppqqrrss      3
:     :    :        :        :         :       :      :

Explanation

Displayed only when the -s option is specified.

One line of information (headers); displayed in conjunction with 3.

When the -a option is specified and more than one server is operating under the scheduler, this information is displayed for each server. The scheduler controls the scheduling of a requested service and the process.

aa...a

Host name (up to 32 characters).

bbccdd

Time of pdls command execution (hour:minute:second).

ee...e

Number of servers operating under the scheduler (6 decimal digits).

ff...f

Server name (up to 8 characters).

g

Server's activity status:

S:Being prepared

A:Schedulable

E:Engaged in termination processing

hh...h

Number of service requests currently queued (5 decimal digits).

ii...i

Maximum number of service requests that can be queued (5 decimal digits).

jj...j

Amount of transfer data buffer being used (8 decimal digits).

kk...k

Amount of transfer data buffer available for use (8 decimal digits).

ll...l

Maximum size of transfer data buffer that can be used (8 decimal digits).

mm...m

Maximum size of contiguous transfer data buffer that is currently available (8 decimal digits).

nnooppqqrrss

Last date and time messages were retrieved from the message queue (year-month-date-hour-minute-second)

If no messages have been retrieved yet, 000000000000 is displayed.

Note

When E is displayed for g (specified server's activity status), 0 may be displayed for hh...h through mm...m.

Utility status is also displayed, as well as server status.

pdls [-d stj] (Display whether or not statistical data output type by unit and server is specified)

Function

Displays the following types of information:

Whether or not types of statistical information output are specified by the pdstbegin command for each unit or server or by the pdstbegin command for the system common definitions.

Whether or not output of statistical information regarding system operation is specified by the pd_statistics operand for the system common definitions.

Format

pdls -d stj [-s server-identifier]

Option

-s server-identifier

Specifies the name of the server that displays whether or not types of statistical information output are specified. The default is to display all servers.

Note

Return code 0 for the pdls -d stj command indicates normal termination, and return code 8 indicates abnormal termination.

If a file error occurs during output of statistical information, the display of whether the output of statistical information is specified by the pdls -d stj command results in a no statistical information output display.

For a HiRDB/Single Server, this command does not display statistical information about SQL object transfer, external server activities, or external server utilization status.

The headers for fsv and hba are displayed even when HiRDB External Data Access has not been installed.

Output format

HOSTNAME : aa...a(bbccdd)
UNITID      sys
eeee         h
INTERVAL : ff...f
 SVID       sys uap sql buf fil dfw idx sop dop pcd sqh obj fsv hba
 gg...g       i    j   k   l   m   n   o   p   q   r   s   t    u   v
   :                             :

Explanation

aa..a

Host name (up to 32 characters)

bbccdd

Time of execution of pdls -d stj command (hour:minute:second)

eeee

Unit identifier (4 characters)

ff..ff

Displays the time interval at which system activity statistical information is output, in minutes. If the output of system activity statistical information is not specified, a value of 0 is displayed (up to 4 decimal digits).

gg..g

Server name (up to 8 characters)

If no servers are found in the unit, this option displays ********.

For items h-v as follows, if output of the applicable statistical information is specified, the system displays *; otherwise, it displays a blank. For the alternate BES unit when the standby-less system switchover (1:1) facility is used, the system displays - instead of h.

h

System activity statistical information by unit

i

System activity statistical information by server

j

UAP statistical information

k

SQL statistical information

l

Global buffer pool statistical information

m

Statistical information on HiRDB files for database manipulation

n

Deferred write processing statistical information

o

Index statistical information

p

SQL static optimization information

q

SQL dynamic optimization information

r

SQL object execution information

s

SQL statement statistical information

t

Statistics on SQL object transmission

u

Statistical information about external server activities

v

Statistical information about external server utilization status

pdls [-d sts] (Display status file status)

Function

Displays the status of status files.

Format

HiRDB/Single Server

Unit status file

pdls -d sts [{-x host-name | -u unit-identifier}]
           [{-n logical-filename | -f physical-filename|-a|-l|-p}]

Server status file

pdls -d sts -s server-name
          [{-n logical-filename | -f physical-filename|-a|-l|-p}]

HiRDB/Parallel Server

Unit status file

pdls -d sts {-x host-name | -u unit-identifier}
           [{-n logical-filename | -f physical-filename|-a|-l|-p}]

Server status file

pdls -d sts  -s server-name
           [{-n logical-filename | -f physical-filename|-a|-l|-p}]

Options

{-x host-name | -u unit-identifier}

For unit status file status display, specifies the identifier of the unit or the name of the host corresponding to the unit status file. This option can be omitted for a HiRDB/Single Server because the host and unit are fixed.

-x host-name<identifier> ((1-32))

Specifies the name of the host corresponding to the unit status file.

-u unit-identifier<identifier> ((4 characters))

Specifies the identifier of the unit corresponding to the unit status file.

-s server-name<identifier> ((1-8))

Specifies the name of the server corresponding to the status files for the server whose status is to be displayed.

{-n logical-filename|-f physical filename|-a|-l|-p}

Specifies how the status of the status files is to be displayed. When this option is omitted, the command displays the status of all status files being used by the specified unit or server.

-n logical-filename<identifier> ((1-8))

If the status of the status files for a specific logical file is to be displayed, specifies the name of the logical file.

-f physical-filename<path name> ((up to 167 characters))

If the status of the status files for a specific physical file is to be displayed, specifies the absolute path name of the physical file. The physical file name must be specified in the format HiRDB-file-system-area-name/HiRDB-filename.

-a

Specifies that a summary of the status of all status files being used by the unit or server is to be displayed.

-l

Specifies that the status of each logical file being used by the unit or server is to be displayed.

-p

Specifies that the status of each physical file being used by the unit or server is to be displayed.

Notes

Return code 0 for the pdls -d sts command indicates normal termination, and return code 8 indicates abnormal termination.

Executing the pdstsinit or pdstsrm command for a status file whose logical file status is CLOSE, NONE, or BLOCKADE during HiRDB operation does not change the status information displayed by the pdls command. In this case, the current status of the status file can be displayed by executing the pdstsopen command prior to the pdls command.

If you use Real Time SAN Replication based on the log-only synchronous method, the status file to be displayed depends on the site where the command is executed.

At the transaction execution site
The status file for transaction processing is displayed.

At the log application site
The status file for log application processing is displayed.

Output format

HOSTNAME : aa...a(bbccdd)
 Logical file L_Status Factor Available Manage   ...........2
 ee...e         ff...f      ggg    hh...h    ii...i      ...........2
Sy  P_status R_length R_count P_name   .....................1,2
 j   kk...k    ll...l      mm...m  nn...n    .....................1,2
 j   kk...k    ll...l      mm...m  nn...n    .....................1,2

Explanation

1 displays the status of physical files, and 2 displays the status of a logical file.

aa...a

Host name (up to 32 characters).

bbccdd

Time of pdls command execution (hour:minute:second).

ee...e

Name of logical file (up to 8 characters).

ff...f

Status of logical file (up to 8 characters):

ACTIVE

Current file

BLOCKADE

Error shutdown file

CLOSE

Reservation file

NONE

No physical file corresponds to the logical file

STANDBY

Reserve file

ggg

Record utilization in the file (%).

hh...h

Number of available consecutive records in the file (8 decimal digits).

ii...i

Number of management records in the file (8 decimal digits).

j

Whether the physical file is A or B:

A

A

B

B

kk...k

Displays a maximum of 11 characters denoting physical file status information; if fewer than 11 characters are displayed, the displayed characters are right-justified (up to 11 characters):

a

Current file

b

Error shutdown file

c

Closed file

i

Initialized status

l

Logical error

n

No physical file corresponds to the logical file

o

Open file

p

Physical error

r

Recovered from an error

s

Reserve file

u

Used file

ll...l

Record length (8 decimal digits).

mm...m

Number of records (8 decimal digits).

nn...n

Name of physical file (up to 63 characters).

pdls [-d svr] (Display status by unit and server)

Function

Displays unit and server status.

Format

pdls -d svr [-a [-b]]

Option

-a

Specifies that the unit and server status is to be displayed in DAT format.

-b

When the -a option is also specified, specifies that a title line is to be displayed.

Notes

Return code 0 for the pdls -d svr command indicates normal termination, return code 4 indicates warning termination, and return code 8 indicates abnormal termination. When the return code is 8, see the previous message and eliminate the cause of the error.

For a HiRDB/Parallel Server, if a unit that does not contain the system manager is terminated abnormally or forcibly, the command may display the status at the time the unit was terminated until the system manager detects the unit's termination.

When the standby-less system switchover (effects distributed) facility is used, a server switched over to another unit is displayed as the target unit's server.

You can specify the -a [-b] option even if you omit -d svr (example: pdls -a -b).

When the standby-less system switchover (effects distributed) facility is used, a server subject to system switchover may be displayed on both source and target units.

Depending on the host and unit status, unit and server information may not be displayed (if all hosts and units are in error status, specifying the -b option displays only the title line).

Even though an error message is output, an error value return code may not be set. Therefore, you must check for both an error message and a value indicating abnormality in the return code to determine the execution result of the pdls -d svr -a [-b] command.

If HiRDB was started by the pdstart -r command, the pdls -d svr command terminates with return code 4.

If all front-end servers have been terminated by the pdstop -s command since HiRDB started, the pdls -d svr command terminates with return code 0.

Output format

When the -a option is omitted

HOSTNAME(aabbcc)  UNITID   SVID    STATUS  STARTTIME
dd...d            eeee     ff...f     gg...g    hhiijj
:               :       :       :      :

When the -a option is specified

"dd...d","eeee","ff...f","gg...g","hhiijj"
  :      :     :      :      :

When the -a and -b options are both specified

"HOSTNAME","UNITID","SVID","STATUS","STARTTIME"
"dd...d",   "eeee",   "ff...f", "gg...g",  "hhiijj"

Explanation

aabbcc

Time of pdls command execution (hour:minute:second).

dd...d

Host name (up to 32 characters).

eeee

Unit identifier (4 characters).

ff...f

Server name (up to 8 characters).

If the status of a unit is being displayed, ******** is displayed.

gg...g

Status information (up to 8 characters):

ACTIVE

Active

STOP

Stopped (server)

STOP(N)

Terminated normally by the pdstop command

STOP(F)

Terminated forcibly by the pdstop command

(-f option specified)

STOP(A)

One of the following:

Abnormal termination was detected during system operation.

Communication with unit bbbb or data reception from unit bbbb was disabled.

Client connection failed on unit bbbb.

Execute the ps command on unit bbbb to see if the HiRDB process is active.

If the HiRDB process is active:

A communication error or service slowdown may have occurred on unit bbbb. Check the cause of the error on the basis of the message that was output before the KFPS05289-E message, enter the pdstop -z command to terminate the unit, then restart the unit.

If the HiRDB process is not active:

The HiRDB process may have terminated abnormally. Take an appropriate action according to the message output during the abnormal termination. To restart, execute the pdstart -x command.

START(I)

Waiting for execution of the database initialization utility (dictionary not initialized)

SUSPEND

The front-end server is waiting for recovery of the data dictionary RDAREA or startup of the dictionary server (in this case, remove the cause of the wait, and then start the front-end server by entering the pdstart -a command).

Alternatively, Real Time SAN Replication based on the log-only synchronous method is being used, and the server is running as the log application site.

STARTING

Preparing for startup

STOPPING

Preparing for shutdown

TRNPAUSE:

Scheduling of a new transaction is suppressed

Scheduling of a new transaction is suppressed at the corresponding server. If the KFPS01160-E message has been issued, eliminate the cause of the space shortage for the system log. For details about determining the cause of a space shortage for the system log and how to handle the error, see Action to be taken by the HiRDB administrator when the available space is less than the warning value in the HiRDB Version 8 System Operation Guide.

hhiijj

Activation time (hour:minute:second).

pdls [-d trn] (Display server transaction status)

Function

Displays server transaction status

Format

pdls -d trn [-t transaction-identifier] [-{a|c}] [-s server-name]

Options

-t transaction-identifier<alphanumeric> ((16 characters))

Specifies the identifier of a transaction about which information is to be displayed. When this option is omitted, information about all transactions is displayed.

-{a|c}

-a

Specifies that all transaction information is to be displayed.

-c

Specifies that the number of branches in a global transaction is to be displayed.

When this option is omitted, the command displays all transaction information (with some exceptions).

-s server-name<identifier> ((1-8))

Specifies the name of the front-end server or of a back-end server. If the front-end server name is specified, the command displays information about all global transactions managed by the front-end server. If a back-end server name is specified, the command displays information about all transactions branched from global transactions managed by the specified back-end server. When this option is omitted, the command displays information about all transactions managed by the specified unit.

Notes

Return code 0 for the pdls -d trn command indicates normal termination, and return code 8 indicates abnormal termination.

Output format

-a option specified:

HOSTNAME: aa...a(bbccdd)
TRNGID       TRNBID       STATUS    PID    SVID   B-SVID  
eeeeffffgg...g   eeeeffffhh...h   jj...j(k,l)  mm...m   ii...i   nn...n    
            PROGRAM             TIME     SYSINF
            oo...o                ppqqrr   ss...s
            S-PID=tt...t C-PID=uu...u(vv...v)
            TMID=wwww XID=xx...x,yy...y  ENVGRP=zzzz

Explanation

When more than one transaction is to be displayed, this information is displayed for each such transaction. When -a is omitted, TIME, SYSINF, and S-PID through ENVGRP information are not displayed.

aa...a

Host name (up to 32 characters).

bbccdd

Time of pdls command execution (hour:minute:second).

eeeeffffgg...g and eeeeffffhh...h

Transaction identifier (16 characters)

eeee

HiRDB identifier (4 characters)

ffff

Unit identifier (4 characters)

gg...g

Global transaction number (8 decimal digits)

hh...h

Transaction branch number (8 decimal digits)

ii...i

Server name (up to 8 characters).

jj...j

Transaction status 1 (up to 16 characters):

BEGINNING

Engaged in transaction startup processing

ACTIVE

Executing

SUSPEND

Suspended

IDLE

Shifting to synchronization point processing

PREPARE

Engaged in commit (phase 1) processing

READY

Engaged in commit (phase 2) processing

H_COMMIT

Engaged in system-selected¹ commit processing

H_ROLLBACK

Engaged in system-selected¹ rollback processing

COMMIT

Engaged in commit processing

ROLLBACK_ACTIVE

Waiting for rollback processing

ROLLBACK

Engaged in rollback processing

H_FORGETTING

Engaged in system-selected¹ transaction termination processing

FORGETTING

Engaged in transaction termination processing

1 In the event of an error, HiRDB selects a settlement method without waiting for an instruction from the user.

k

Transaction status 2

u

Accessing data by means of a database access process

r

Executing transaction recovery processing by means of a transaction recovery process

p

Waiting for transaction recovery processing by means of a transaction recovery process

l

Transaction status 3

s

Communicating (transferring a transaction settlement instruction between servers)

r

Waiting for communication (waiting to transfer a transaction settlement instruction between servers)

w

Synchronizing (synchronizing the transaction between the transaction manager and the server)

n

Not communicating (neither s nor r)

mm...m

Process ID (up to 10 decimal digits).

If there is no process associated with executing the transaction, such as when the transaction is waiting for transaction recovery processing, 0 is displayed.

nn...n

Name of branch source server (up to 8 characters).

If the local server issued the request, ******** is displayed.

oo...o

UAP identification information (up to 30 characters).

The UAP identification name specified in PDCLTAPNAME in the client definition is displayed.

If PDCLTAPNAME is undefined, Unknown is displayed.

For a utility, the name of the utility command is displayed.

This information may be left blank if the utility was running under a utility server process or if it was impossible to obtain the UAP identification information because of an error.

ppqqrr

Time the service request was accepted (hour:minute:second).

ss...s

Internal information used by the system (up to 32 characters).

tt...t

Process ID of the server that accepted transaction processing as part of the UAP or utility processing (up to 10 decimal digits).

0 may be displayed if the utility was running under a utility server process or if it was impossible to obtain the process ID because of an error.

uu...u

Process ID of the client (UAP or utility) that was connected to the server process (up to 10 decimal digits).

This information is applicable only to the server process that was connected to the client. For a service process that was not connected to the client, 0 is displayed. 0 is also displayed if the version of the client library connected to the UAP is earlier than 04-00.

vv...v

IP address of the client (UAP or utility) that was connected to the server process (up to 15 characters).

This information is applicable only to the server process that was connected to the client. For a service process that was not connected to the client, 0.0.0.0 is displayed. 0.0.0.0 is also displayed if the version of the client library connected to the UAP is earlier than 04-00.

wwww

OLTP identifier of the connected OLTP (up to 4 characters).¹

xx...x, yy...y

Transaction identifier provided by OLTP (33 characters).¹

zzzz

Environment variable group identifier provided by the OLTP system (four characters).¹

This information is displayed when the multi-connection facility is used. When the multi-connection facility is not used, **** is displayed.

1 This information is not output for a utility or if the connected client is not an application complying with X/Open.

-c option or -t and -c options specified:

HOSTNAME: aa...a(bbccdd)
TRNGID              SVID       B-SVNUM
eeeeffffgg...g         hh...h     ii...i

Explanation

When more than one transaction is to be displayed, this information is displayed for each such transaction.

aa...a

Host name (up to 32 characters).

bbccdd

Time of pdls command execution (hour:minute:second).

eeeeffffgg...g

Transaction identifier (16 characters):

eeee

HiRDB identifier (4 characters)

ffff

Unit identifier (4 characters)

gg...g

Global transaction number (8 decimal digits)

hh...h

Server name (up to 8 characters).

ii...i

Number of transactions branched from the corresponding server (5 decimal digits).

pdls [-d ust] (Display unit activity status)

Function

The pdls -d ust command displays a unit's activity status.

This command displays the activity status for only the unit where the command is executed.

Format

pdls -d ust

Option

None

Notes

The following are the pdls -d ust command's return codes:

0

Unit is active (the front-end server can be connected if it is located at the unit where the command is executed).

4

Unit is starting (the front-end server is located at the unit where the command is executed, but the front-end server cannot be connected), or unit is stopping.

8

Restart of the process service was cancelled.

12

Unit is stopped (pdsetup -d command can be executed).

16

OS registration has been deleted.

You should take one of the following actions when the unit status is PAUSE, or when the front-end server status is SUSPEND and does not change to ONLINE, or when the setup status is UNSETUP:

If the unit status is PAUSE, an error has occurred. See the KFPS00715-I message and the previous message output to syslogfile, eliminate the cause of the error, and then execute the pdrpause command.

If the front-end server status is SUSPEND and does not change to ONLINE, an error may have occurred. See the message output to syslogfile, eliminate the cause of the error, and then use the pdstart -a command to release the front-end server from SUSPEND status.

If the setup status is UNSETUP, HiRDB has not been registered in the OS. Before starting HiRDB, execute the pdsetup command and register HiRDB in the OS.

Output format

HOSTNAME  : aa...a(bbccdd)
SYSTEMID  : eeee
UNITID    : ffff
ENTRYHOST : gg...g
PAIRHOST  : hh...h
UNIT-STAT FES-STAT  SETUP-STAT
iiiiiiii       jjjjjjjj     kkkkkkk

Explanation

aa...a

Host name of the primary system (up to 32 characters)

bbccdd

Time the pdls command was executed (hour minute second)

eeee

HiRDB identifier (4 characters)

ffff

Unit identifier (4 characters)

gg...g

Host name of the unit where the pdls command was executed (up to 32 characters)

hh...h

Host name of the remote system (up to 32 characters) when the standby system switchover facility without IP address inheritance or the standby-less system switchover (1:1) facility is used.

Otherwise, this is blank.

iiiiiiii

Unit status (8 characters):

PAUSE: Process server restart suspended

STOP: Stopped

STARTING: Starting

ONLINE: Running

STOPPING: Stopping

: One single-byte space.

jjjjjjjj

Status of the front-end server (8 characters):

STOP: Stopped

STARTING: Starting

SUSPEND: Suspended

ONLINE: Running

STOPPING: Stopping

********: Unit contains no front-end server

: One single-byte space.

For a HiRDB/Single Server, ******** is always displayed.

kkkkkkk

Setup status (7 characters):

SETUP: pdsetup has already been executed.

UNSETUP: pdsetup command has not been executed or the pdsetup -d command has already been executed (overwrite installation is available even when the installation directory is used for operation).

: One single-byte space.

pdmemsv (Save memory space)

Function

In a multi-HiRDB system, the pdmemsv command shares part of the libraries under the installation directories in order to save memory space used by the HiRDBs.

Executor

Super user

Format

pdmemsv  [-{d|s}]

Options

-{d|s}

Specifies whether or not memory space is to be saved in a multi-HiRDB system:

-d

Delete the memory space saving specification

-s

Place the memory space saving specification into effect

When this option is omitted, the command displays whether or not memory space is being saved (whether or not memory space saving has been specified).

Rules

The pdmemsv command can be executed only while HiRDB is inactive.

The pdmemsv command must be executed at the server machine containing the single server or the server machine where the system manager is located.

If the pdsetup command is used to build the HiRDB execution environment in a directory other than the install directory, and then this command is executed, the library in the install directory is shared and memory requirements are reduced. In this case, the existing library is saved in directory $PDDIR/lib/save/. The following install directories exist:
For HiRDB/Single Server: /opt/HiRDB_S/
For HiRDB/Parallel Server: /opt/HiRDB_P/

When the pdmemsv command is to be executed in order to place in effect or to delete memory space saving, the HiRDB registration in the OS should first be deleted with the pdsetup command (-d specified). However, files needed for execution should not be deleted at this time.

If the disk on which an installation directory is located cannot be referenced (because of a hardware error, etc.), the error's effects can be eliminated by specifying deletion of the memory space saving specification (-d option).

When placing memory space saving in effect is specified, all HiRDB systems in the server machine must be of the same version.

When a HiRDB system is reinstalled, it is important to remember to delete the memory space saving specification. Valid operation cannot be assured when the version is upgraded while the memory space saving specification is in effect.

Notes

The execution results of the pdmemsv command can be verified by the return code after the command executes or by executing the pdmemsv command (with no options specified). Return code 0 for the pdmemsv command indicates normal termination, and return code 2 indicates abnormal termination (such as an invalid option).

Output format

Memory saving level: level10

Description

Displays the memory space saving status.

hazard

Error related to memory space saving occurred (in this case, delete memory space saving with the d option, then specify memory space saving with the s option, if necessary)

level10

Memory space is being saved

none

Memory space is not being saved

pdobils (Display SQL object buffer statistics)

Function

The pdobils command displays statistical information about the SQL objects stored in the SQL object buffer. This information enables you to identify SQL objects that take a long time to process or that are input and output frequently; you can also obtain the object reuse status of SQL objects.

Executor

HiRDB administrator

Format

 pdobils [-s server-name] [-r]

Operands

-s server-name<identifier> ((1-8))

Specifies the name of a server (single server or front-end server) whose information is to be displayed or whose statistical information counters are to be initialized.

-r

Specifies that the statistical information counters are to be initialized. For example, this option is specified when overflow occurs in statistical information counters.*

For details about the items for which counters are initialized, see Output format.

* When an SQL object is reused many times, its counter in the SQL object buffer may overflow. When a counter overflows, * is displayed for the corresponding item in the statistical information.

Rules

The pdobils command can be executed only when HiRDB is running.

The pdobils command can be executed at any server machine.

Notes

The execution results of the pdobils command can be confirmed from the return code after the command has executed. Return code 0 indicates normal termination, and return code 4 indicates abnormal termination.

Because the pdobils command manipulates the SQL object buffer, the overhead associated with this manipulation may increase the HiRDB workload.

When the pdobils command is terminated forcibly, SQL processing on the SQL object buffer and post-processing may be placed in wait status for up to 1 minute. For this reason, it is unwise to terminate the pdobils command forcibly.

The amount of time required for an SQL object to execute is recorded in the SQL object buffer when the transaction is completed or the SQL object is released. Figure 2-5 illustrates the SQL object execution time (duration) that is displayed when the pdobils command is executed.

Figure 2-5 SQL object execution time (duration) displayed when the pdobils command is executed

Explanation

The display of the amount of time (duration) it takes an SQL object to execute depends on the timing of execution of the pdobils command. The following table shows the validity of the time that is displayed for each point of execution:

Execution sequence of pdobils command | SQL1 | SQL2 | SQL3 | SQL4
1 | N | N | N | N
2 | Y | Y | N | N
3 | Y | Y | Y | Y

Legend:

Y: The displayed execution duration time is valid for this SQL object.

N: The displayed execution duration time is not valid for this SQL object.

Note 1

When the cursor is used, the displayed execution duration time is the server's total processing time from opening to closing of the cursor.

Note 2

While the pdobils command is executing, the SQL object buffer is used by other UAPs. If there is an SQL object whose transaction is completed during execution of the pdobils command and the corresponding information is available, the information is applied to the output information.

Note 3

The execution time (duration) is displayed in seconds (rounded off to a whole second).

Output format

pdobils VV-RR-ZZ [70]
<< SQL OBJECT CACHE INFORMATION >> DATE: 2004/01/01 TIME: 00:00:00 [1]
HOST NAME                   : node01 [2]
SERVER NAME                 : fes01 [3]
CACHE SIZE(KB)              : 2048 [4]
SQL OBJECT TOTAL SIZE(B)    : 1932556​ [5]

<< SQL OBJECT LIST >>
*SQL OBJECT NO               : 1 [6]
STATUS                      : ACTIVE [7]
TYPE                        : STATIC SQL [8]
SIZE                        : 7792 [9]
EXECUTE COUNT               : 10 [10]
EXECUTE TIME AVG(s)         : 1.234567 [11]
EXECUTE TIME MAX(s)         : 9.000000 [12]
# SERVICE NAME              :          [13]
# UAP NAME                  : Unknown [14]
# CONNECT NO                : 123 [15]
# SQL NO                    : 456 [16]
# RECORD DATE/TIME          : 2004/01/01 00:00:00 [17]
DB REFERENCE GET COUNT       : 55500 [28] AVG 5550 [29] MAX 5600 [30]
DB UPDATE GET COUNT          : 0 [31] AVG 0 [32] MAX 0 [33]
DB READ COUNT                : 800 [34] AVG 80 [35] MAX 85 [36]
DB WRITE COUNT               : 0 [37] AVG 0 [38] MAX 0 [39]
LOB REFERENCE GET COUNT      : 0 [40] AVG 0 [41] MAX 0 [42]
LOB UPDATE GET COUNT         : 0 [43] AVG 0 [44] MAX 0 [45]
LOB READ COUNT               : 0 [46] AVG 0 [47] MAX 0 [48]
LOB WRITE COUNT              : 0 [49] AVG 0 [50] MAX 0 [51]
LIST REFERENCE GET COUNT     : 0 [52] AVG 0 [53] MAX 0 [54]
LIST UPDATE GET COUNT        : 0 [55] AVG 0 [56] MAX 0 [57]
LIST READ COUNT              : 0 [58] AVG 0 [59] MAX 0 [60]
LIST WRITE COUNT             : 0 [61] AVG 0 [62] MAX 0 [63]
WKFILE READ COUNT            : 0 [64] AVG 0 [65] MAX 0 [66]
WKFILE WRITE COUNT           : 0 [67] AVG 0 [68] MAX 0 [69]
PREPROCESSOR USER            : user1 [18]
PREPROCESSOR SOURCE          : abc.ec [19]
SECTION NO                   : 123 [20]
ISOLATION LEVEL              : 2 [21]
OPTIMIZE LEVEL               : 10 [22]
ADDITIONAL OPTIMIZE LEVEL    : 0 [23]
DEFAULT SCHEMA               :   [24]
ROUTINE ID                   : 123 [25]
SQL                          : SELECT GNO,GNAME,KIKAKU,TANKA,SURYO,GENKA FROM ZAIKO [26]

<< SQL OBJECT STATUS COUNT >> [27]
STATUS     | TYPE      STATIC SQL        DYNAMIC SQL       ROUTINE           TOTAL
ACTIVE              :  0                 0                 0                 0
LRU                 :  0                 0                 0                 0
TEMPORARY           :  0                 0                 0                 0
COMPILE/TRANSFER    :  0                 0                 0                 0
PROCESS             :  -                 -                 -                 0
RELEASE             :  -                 -                 -                 0
TOTAL               :  0                 0                 0                 0

Note 1

The information that is displayed depends on the server's type and status.

Note 2

Items 6 through 69 (except for item 27) are repeated for each SQL object. The information that is displayed depends on the type and status. For details, see Notes.

Note 3

When the -s option is omitted, items 1 through 69 are displayed for each single server or front-end server.

Note 4

When the -r option is specified, items 10 through 17 and 28 through 69 are initialized.

Explanation

Statistical information display time
Displays the time the statistical information was displayed.

Host name
Displays the name of the host for which statistical information was acquired.

Server name
Displays the name of the server for which statistical information was acquired.

Size of SQL object buffer
Displays the size of the SQL object buffer (in kilobytes).

Total size of SQL objects
Displays the total size of SQL objects (in bytes) stored in the SQL object buffer. If the SQL object buffer is used by another UAP during execution of the pdobils command, the sum of the sizes of each SQL object may not match the total size of all SQL objects.

SQL object number
Displays the management number of the SQL object.

Status
Displays one of the following, indicating the status of the SQL object:

Status
Description

ACTIVE
A UAP is using the SQL object.

LRU
Although the SQL object is stored in the SQL object buffer, no UAP is currently using it.

TEMPORARY
The SQL object is not shared among processes. This is applicable when either of the following is true:

Creation of the SQL object is specified in the PDVWOPTMODE or PDUAPREPLVL client environment definition.

A dynamic SQL object is stored in the SQL object buffer.

COMPILE/TRANSFER
A static SQL object is being created, or the SQL object is being transferred from the front-end server to the back-end server or dictionary server.

PROCESS
The SQL object is being managed in the process memory.

RELEASE
The SQL object is being released or is no longer valid.

Type
Displays the type of the SQL object:
STATIC SQL: Static SQL object
DYNAMIC SQL: Dynamic SQL object
ROUTINE: Routine SQL object

Size
Displays the size of the SQL object (in bytes).

Execution count⁴
Displays the number of times the SQL object has executed.

Average execution time
Displays the average execution time for the SQL object (in seconds).

Maximum execution time
Displays the maximum execution time for the SQL object (in seconds).

Service name
When UAPs were executed in an OLTP environment, displays the name of the service that recorded the maximum execution time.

UAP name
Displays the name of the UAP that recorded the maximum execution time (not displayed if the UAP name cannot be identified).

CONNECT sequence number⁴
Displays the CONNECT sequence number of the UAP that recorded the maximum execution time.

SQL number⁴
Displays the number of the SQL that recorded the maximum execution time.

Recorded time
Displays the time at which the maximum execution time was recorded.

Preprocessing user's authorization identifier
Displays the authorization identifier of the user who executed preprocessing of the UAP source program. This item is displayed for static SQL objects.

Preprocessed source program name
Displays the name of the source program that was preprocessed (this item is displayed for static SQL objects).

Section number
Displays the section number (this item is displayed for static SQL objects).

Data guarantee level
Displays the data guarantee level (this item is displayed for static and dynamic SQL objects).

SQL optimization option
Displays the SQL optimization option (this item is displayed for static and dynamic SQL objects).

SQL extension optimizing option
Displays the SQL extension optimizing option (this item is displayed for static and dynamic SQL objects).

Default schema name
Displays the assumed authorization identifier when the authorization identifier is omitted from the SQL statement (this item is not displayed when an authorization identifier is specified in the SQL statement) (this item is displayed for dynamic SQL objects).

Routine's object ID
Displays the routine's object ID (this item is displayed for routine SQL objects).

SQL statement
Displays the SQL statement (this item is displayed for static and dynamic SQL objects).

Type and number of SQL objects for each status
Displays for each status the number of SQL objects of each type that are being managed in the SQL object buffer.

Reference count for data, index, and directory pages (total)2, 4
Displays the total number of times that buffer acquisition requests were issued to the global buffer using the SQL object for referencing purposes.

Reference count for data, index, and directory pages (average)1, 2, 4
Displays for the SQL object the average number of times that acquisition requests for referencing were issued to the global buffer.

Reference count for data, index, and directory pages (maximum)2, 4
Displays for the SQL object the maximum number of times that acquisition requests for referencing were issued to the global buffer.

Update count for data, index, and directory pages (total)2, 4
Displays the total number of times that buffer acquisition requests for updating were issued to the global buffer.

Update count for data, index, and directory pages (average)1, 2, 4
Displays for the SQL object the average number of times that acquisition requests for updating were issued to the global buffer.

Update count for data, index, and directory pages (maximum)2, 4
Displays the maximum number of times that buffer acquisition requests for updating were issued to the global buffer.

Real READ count for data, index, and directory pages (total)2, 3, 4
Displays the total number of input operations that were performed on data, index, and directory pages. This value includes the number of input operations performed by the prefetch facility, but does not include input operations performed by the asynchronous READ facility.

Real READ count for data, index, and directory pages (average)1, 2, 3, 4
Displays for the SQL object the average number of input operations that were performed on data, index, and directory pages. This value includes the number of input operations performed by the prefetch facility, but does not include input operations performed by the asynchronous READ facility.

Real READ count for data, index, and directory pages (maximum)2, 3, 4
Displays for the SQL object the maximum number of input operations that were performed on data, index, and directory pages. This value includes the number of input operations performed by the prefetch facility, but does not include input operations performed by the asynchronous READ facility.

Real WRITE count for data, index, and directory pages (total)2, 3, 4
Displays the total number of output operations that were performed on data, index, and directory pages. This value does not include the number of output operations performed by deferred write processing.

Real WRITE count for data, index, and directory pages (average)1, 2, 3, 4
Displays for the SQL object the average number of output operations that were performed on data, index, and directory pages. This value does not include the number of output operations performed by deferred write processing.

Real WRITE count for data, index, and directory pages (maximum)2, 3, 4
Displays for the SQL object the maximum number of output operations that were performed on data, index, and directory pages. This value does not include the number of output operations performed by deferred write processing.

LOB column data page reference count (total)⁴
Displays the total number of times that buffer acquisition requests were issued to reference LOB column data pages.

LOB column data page reference count (average)1, 4
Displays for the SQL object the average number of times that acquisition requests were issued to reference LOB column data pages.

LOB column data page reference count (maximum)⁴
Displays for the SQL object the maximum number of times that acquisition requests were issued to reference LOB column data pages.

LOB column data page update count (total)⁴
Displays the total number of times that buffer acquisition requests were issued to update LOB column data pages.

LOB column data page update count (average)1, 4
Displays for the SQL object the average number of times that buffer acquisition requests were issued to update LOB column data pages.

LOB column data page update count (maximum)⁴
Displays for the SQL object the maximum number of times that buffer acquisition requests were issued to update LOB column data pages.

Real READ count for LOB column data pages (total)⁴
Displays the total number of real READ operations that were performed on LOB column data pages.

Real READ count for LOB column data pages (average) 1, 4
Displays for the SQL object the average number of real READ operations that were performed on LOB column data pages.

Real READ count for LOB column data pages (maximum)⁴
Displays for the SQL object the maximum number of real READ operations that were performed on LOB column data pages.

Real WRITE count for LOB column data pages (total)⁴
Displays the total number of real WRITE operations that were performed on LOB column data pages.

Real WRITE count for LOB column data pages (average)1, 4
Displays for the SQL object the average number of real WRITE operations that were performed on LOB column data pages.

Real WRITE count for LOB column data pages (maximum)⁴
Displays for the SQL object the maximum number of real WRITE operations that were performed on LOB column data pages.

List page reference count (total)⁴
Displays the total number of times that buffer acquisition requests were issued to the global buffer to reference list pages.

List page reference count (average)1, 4
Displays for the SQL object the average number of times that buffer acquisition requests were issued to the global buffer to reference list pages.

List page reference count (maximum)⁴
Displays for the SQL object the maximum number of times that buffer acquisition requests were issued to the global buffer to reference list pages.

List page update count (total)⁴
Displays the total number of times that buffer acquisition requests were issued to the global buffer to update list pages.

List page update count (average)1, 4
Displays for the SQL object the average number of times that buffer acquisition requests were issued to the global buffer to update list pages.

List page update count (maximum)⁴
Displays for the SQL object the maximum number of times that buffer acquisition requests were issued to the global buffer to update list pages.

Real READ count for list pages (total)⁴
Displays the total number of real READ operations that were performed on list pages.

Real READ count for list pages (average)1, 4
Displays for the SQL object the average number of real READ operations that were performed on list pages.

Real READ count for list pages (maximum)⁴
Displays for the SQL object the maximum number of real READ operations that were performed on list pages.

Real WRITE count for list pages (total)⁴
Displays the total number of real WRITE operations that were performed on list pages.

Real WRITE count for list pages (average)1, 4
Displays for the SQL object the average number of real WRITE operations that were performed on list pages.

Real WRITE count for list pages (maximum)⁴
Displays for the SQL object the maximum number of real WRITE operations that were performed on list pages.

READ count for work table files (total)⁴
Displays the total number of READ operations that were performed on work table files.

READ count for work table files (average)1, 4
Displays for the SQL object the average number of READ operations that were performed on work table files.

READ count for work table files (maximum)⁴
Displays for the SQL object the maximum number of READ operations that were performed on work table files.

WRITE count for work table files (total)⁴
Displays the total number of WRITE operations that were performed on work table files.

WRITE count for work table files (average)1, 4
Displays for the SQL object the average number of WRITE operations that were performed on work table files.

WRITE count for work table files (maximum)⁴
Displays for the SQL object the maximum number of WRITE operations that were performed on work table files.

HiRDB version
When there is no ZZ, only VV-RR is displayed.

1 The average value is rounded off. If the total value overflows, **** is displayed as the average value.

2 This does not include accesses to data dictionary tables that store definition information, such as for tables and indexes.

3 Deferred write processing involves writing pages updated in the global buffer to disk when the number of updated pages reaches a specified value, rather than when the COMMIT statement is issued. Deferred write processing outputs updated pages to HiRDB files asynchronously with the database processes.

The prefetch facility enables database processes to read multiple pages of table data on disk volumes in batch mode. The asynchronous READ facility reads multiple pages of table data on disk volumes in batch mode asynchronously with the database processes.

4 The counter may overflow. If an overflow has occurred, * is displayed as the lead digit of the corresponding counter. Counting continues when an overflow occurs.

Notes

Whether or not items 6 through 26 are displayed depends on the combination of type and status. Table 2-5 shows whether or not each of these items is displayed depending on the combination of type and status. The numbers correspond to the numbers in the output format.

Table 2-5 Whether or not each item is displayed depending on the combination of type and status (applicable to static SQL objects)

No. | Type
STATIC SQL | DYNAMIC SQL | ROUTINE
Status | Status | Status
A | L | T | C | P | R | A | L | T | C | P | R | A | L | T | C | P | R
6 | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y
7 | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y
8 | Y | Y |  |  |  |  | Y | Y |  |  |  |  | Y | Y |  |  |  |
9 | Y | Y |  |  |  |  | Y | Y |  |  |  |  | Y | Y |  |  |  |
10 | Y | Y |  |  |  |  | Y | Y |  |  |  |  | Y | Y |  |  |  |
11 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
12 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
13 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
14 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
15 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
16 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
17 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
18 | Y | Y |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
19 | Y | Y |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
20 | Y | Y |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
21 | Y | Y |  |  |  |  | Y | Y |  |  |  |  | N | N |  |  |  |
22 | Y | Y |  |  |  |  | Y | Y |  |  |  |  | N | N |  |  |  |
23 | Y | Y |  |  |  |  | Y | Y |  |  |  |  | N | N |  |  |  |
24 | N | N |  |  |  |  | Y | Y |  |  |  |  |  |  |  |  |  |
25 |  |  |  |  |  |  |  |  |  |  |  |  | Y | Y |  |  |  |
26 | Y | Y |  |  |  |  | Y | Y |  |  |  |  |  |  |  |  |  |
28 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
29 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
30 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
31 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
32 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
33 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
34 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
35 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
36 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
37 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
38 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
39 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
40 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
41 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
42 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
43 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
44 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
45 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
46 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
47 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
48 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
49 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
50 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
51 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
52 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
53 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
54 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
55 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
56 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
57 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
58 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
59 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
60 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
61 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
62 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
63 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
64 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
65 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
66 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
67 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
68 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |
69 | C | C |  |  |  |  | C | C |  |  |  |  | C | C |  |  |  |

Legend:

Y: Displayed

C: Displayed if the value of item 10 is 1 or greater. If the value of item 10 is 0, this information is not displayed.

N: Not displayed

: Not applicable

Statuses:

A: ACTIVE

L: LRU

T: TEMPORARY

C: COMPILE/TRANSFER

P: PROCESS

R: RELEASE

How to interpret statistical information

The following describes how to interpret statistical information.

PROCESS in item 27
If a TOTAL count is provided for SQL objects whose STATUS is PROCESS, the SQL objects are being managed for each process because SQL objects cannot be stored in the SQL object buffer.
If SQL objects are always being counted, you should re-evaluate the size of the SQL object buffer.

DYNAMIC in item 27

Part 1
If a STATIC SQL count is provided for SQL objects whose STATUS is TEMPORARY, UAPs for which the PDUAPREPLVL client environment definition has been set are being executed.
If PDUAPREPLVL is not needed for a UAP, you should delete the PDUAPREPLVL specification and then execute the UAP.

Part 2
If a DYNAMIC SQL count is always provided for SQL objects whose STATUS is TEMPORARY, UAPs for which the PDUAPREPLVL and PDVWOPTMODE client environment definitions have been set are being executed.
If PDUAPREPLVL and PDVWOPTMODE are not needed for a UAP, you should delete the PDUAPREPLVL and PDVWOPTMODE specifications and then execute the UAP.

Identifying the SQL statement that is executing
If the SQL object buffer is adequate, you can identify the SQL statement that is executing by referencing the statistical information by means of the procedure described below. To be able to identify the SQL statement that is executing, you must omit PDUAPREPLVL and PDVWOPTMODE and you must specify REUSE.

Identify the SQL object whose STATUS is ACTIVE.

Reference the SQL object identified in 1. In the case of a static SQL object, you can also identify the UAP that is executing the SQL object. Reference the SQL object's PREPROCESSOR USE and PREPROCESSOR SOURCE. The UAP using the preprocessing source is the one that is executing the SQL statement.

About SQL objects subject to tuning
Reference the items listed below. The SQL statements for which a large value is shown should be considered for tuning.

SQL object's execution count

SQL object's average execution time

SQL object's maximum execution time

Reference count for data, index, and directory pages

Update count for data, index, and directory pages

Real READ count for data, index, an directory pages

Real WRITE count for data, index, and directory pages

READ count for work table files

WRITE count for work table files

For details about tuning, see the discussion of tuning SQL objects that take a long time to execute in the HiRDB Version 8 System Operation Guide.

pdobjconv (Convert SQL objects for 64-bit-mode HiRDB)

Function

When converting HiRDB from 32-bit to 64-bit mode, execute the pdobjconv command. This command converts the information in the following dictionaries to support 64-bit mode. If you do not execute this command after upgrading your HiRDB to 64-bit mode, the existing view tables, procedures, and functions will be unusable.

View analysis information

SQL objects for procedures

SQL objects for functions

Trigger SQL objects

When upgrading from 32-bit to 64-bit mode, HiRDB automatically executes the pdobjconv command (after executing the pdvrup command). Therefore, there is usually no need for the user to execute this command.

Executor

User with the DBA privileges

Format

pdobjconv

Option

None

Rules

You can execute the pdobjconv command while HiRDB is active.

The pdobjconv command must be executed at the server machine that contains the single server or where the system manager is located.

To execute the pdobjconv command, the system RDAREAs must be open and in non-shutdown status.

Notes

If the user executes the pdobjconv command, the SQL object conversion information is created in the current directory. Therefore, the user executing this command must have the file creation privilege.

Do not execute more than one pdobjconv command at any one time.

If both the following conditions are satisfied, the results of searching the user-defined view table may not match before and after execution of the pdobjconv command:

Before migration, the view table was defined by means of the following procedure:
1. The user defines a function.
2. The function defined in step 1 is used to define a view table.
3. The user who performed step 1 also defines another function with the same name and the same number of arguments.

After the view table satisfying the above condition was defined, the pdobjconv command was executed.

You can determine the result of the pdobjconv command with the following return code:

0

The pdobjconv command terminated normally.

4

Although there was a warning error, the pdobjconv command terminated normally.

8

Conversion failed on some SQL objects. Check the message or SQL object conversion information and eliminate the cause of the error.

Alternatively, an execution error occurred on the pdobjconv command.

12

The pdobjconv command terminated abnormally. Check the message or SQL object conversion information and eliminate the cause of the error.

If the pdobjconv command is cancelled with the pdcancel command or an error occurs on the pdobjconv command process, code 12 is returned.

Output format

When you execute the pdobjconv command, the execution result (SQL object conversion information) is output to the following file:

pdobjconv command automatically executed by HiRDB
$PDDIR/spool/pdobjconv.log

pdobjconv command executed by the user
pdobjconv.log in the current directory

The following shows an output example of SQL object conversion information:

<< SQL OBJECT Converter >>  [15]START TIME : YYYY/MM/DD HH:MM:SS
[1]VIEW DEF COUNT               : 1
[2]PROCEDURE COUNT              : 12
[3]FUNCTION COUNT               : 1
[4]TRIGGER COUNT                : 1
[5]             [6]      [7]      [8]
*VIEW*         INVALID : USER01.USER_VIEW01
KFPX21103-I...
[5]             [6]      [7]      [8]
*PROCEDURE*    VALID   : MASTER.REGISTRY_DELETE_CONTEXT  (REGISTRY_DELETE_CONTEXT)
KFPX21102-I...

*PROCEDURE*    VALID   : MASTER.REGISTRY_DELETE_KEY  (REGISTRY_DELETE_KEY)KFPX21102-I...

*PROCEDURE*    VALID   : MASTER.REGISTRY_GET_CONTEXT  (REGISTRY_GET_CONTEXT)KFPX21102-I...

*PROCEDURE*    VALID   : MASTER.REGISTRY_GET_LVALUE  (REGISTRY_GET_LVALUE)KFPX21102-I...

*PROCEDURE*    VALID   : MASTER.REGISTRY_GET_SVALUE  (REGISTRY_GET_SVALUE)KFPX21102-I...

*PROCEDURE*    VALID   : MASTER.REGISTRY_GET_VALUE_SIZE  (REGISTRY_GET_VALUE_SIZE)KFPX21102-I...

*PROCEDURE*    VALID   : MASTER.REGISTRY_NEW_CONTEXT  (REGISTRY_NEW_CONTEXT)KFPX21102-I...

*PROCEDURE*    VALID   : MASTER.REGISTRY_RESET_LVALUE  (REGISTRY_RESET_LVALUE)KFPX21102-I...

*PROCEDURE*    VALID   : MASTER.REGISTRY_RESET_SVALUE  (REGISTRY_RESET_SVALUE)KFPX21102-I...

*PROCEDURE*    VALID   : MASTER.REGISTRY_SET_LVALUE  (REGISTRY_SET_LVALUE)KFPX21102-I...

*PROCEDURE*    VALID   : MASTER.REGISTRY_SET_SVALUE  (REGISTRY_SET_SVALUE)KFPX21102-I...

*PROCEDURE*    INVALID : USER01.USER_PROC01  (USER_PROC01)
KFPX21103-I...
  [5]           [6]      [7]      [8]                  [9]
*FUNCTION*     INVALID : USER01.USER_FUNC01  (FUSER_FUNC010000000028)
KFPX21103-I...
  [5]           [6]      [7]      [8]
*TRIGGER*      INVALID : USER01.(TRIG2002080112300000) ((TRIG2002080112300000))
KFPX21103-I...

  << RESULT REPORT >>       [16]ENDED TIME : 1999/08/13 10:46:17
     [10]          [11]          [12]         [13]          [14]
 = RESOURCE == = SUCCESS === = FAILURE === = PASS ====== = TOTAL =====
 *VIEW*                    1             0             0             1
 *PROCEDURE*               1             0            11            12
 *FUNCTION*                1             0             0             1
 *TOTAL*                   3             0            11            14

Explanation

Number of view tables

Number of procedures

Number of functions

Number of triggers

SQL object ID character string:
VIEW: View table
PROCEDURE: Procedure
FUNCTION: Function
TRIGGER: Trigger

SQL object status:
INVALID: Invalid
VALID: Valid

Authorization identifier

View table name, procedure name, or function name

Specified name

SQL object ID character string:
VIEW: View table
PROCEDURE: Procedure
FUNCTION: Function
TRIGGER: Trigger

Number of SQL objects that were re-registered successfully

Number of SQL objects resulting in a re-registration error

Number of SQL objects that were not re-registered

Total number of SQL objects

pdobjconv command start time

pdobjconv command termination time

pdopen (Open RDAREAs)

Function

The pdopen command opens specified RDAREAs.

Executor

HiRDB administrator

Format

pdopen -r {RDAREA-name[,RDAREA-name]...|ALL} [-q generation-number]

Options

-r {RDAREA-name[,RDAREA-name]...|ALL}

-r RDAREA-name<identifier> ((1-30))

Specifies the name of an RDAREA that is to be opened. You can also use batch specification of RDAREA names. For details about batch specification of RDAREA names, see 1.5.2 Batch specification of RDAREA names in operation commands.

ALL

Specifies that all RDAREAs are to be opened, except for the master directory RDAREA. When the -q option is specified, the command opens the RDAREAs of the same generation.

Rules

An already open RDAREA cannot be opened again.

The same RDAREA name should not be specified more than once; if specified, a duplicate RDAREA name is ignored.

A maximum of 128 RDAREA names can be specified. If more than 128 RDAREA names are specified, the excess names are ignored.

If an RDAREA name is enclosed in double quotation marks ("), the system treats it as being case sensitive; otherwise, the system treats it as all uppercase letters. If an RDAREA name contains a space, enclose the entire name in double quotation marks ("). If the Bourne shell (sh), C shell (csh), or Korn shell (ksh) is used, it is also necessary to enclose the entire set of RDAREA names in single quotation marks (').

When a user RDAREA or user LOB RDAREA is specified, the corresponding data dictionary RDAREA must be in one of the following statuses:

Open and shutdown release status

Open and shutdown status placed by the pdhold command

If you specify data dictionary RDAREAs, user RDAREAs, and user LOB RDAREAs at the same time, make sure that the data dictionary RDAREA names are specified last.

If you are using the inner replica facility, you can also specify original and replica RDAREA names. In this case, you can specify only user RDAREAs and user LOB RDAREAs.

-q generation-number<unsigned integer> ((0-10))

Specifies the generation number of a replica RDAREA.

If you specify this option, make sure that the original RDAREA name is specified in the -r option. An error results if you specify an original RDAREA whose replicas have all been deleted or a normal RDAREA (one without a replica RDAREA).

Rules

The pdopen command can be executed only while HiRDB is active.

The pdopen command must be executed at the server machine containing the single server or the server machine where the system manager is located.

The pdopen command locks each specified RDAREA in the EX mode. If another transaction is accessing a specified RDAREA, the pdopen command goes onto wait status until the other transaction terminates.

If the pdopen command is executed on a shared RDAREA, all back-end servers are locked. If there can be multiple concurrent accesses to the corresponding RDAREA, global deadlock may occur, resulting in a timeout. If global deadlock has occurred, re-execute the pdopen command.

Notes

The result of the pdopen command can be checked by the pddbls command.

The following shows the pdopen command's return codes:
0: Normal termination
4: Warning termination (some RDAREA processing terminated with an error)
8: Abnormal termination
12: Abnormal termination (an event occurred that prevented output of an error message)
If the error code is 12, check the error message in syslogfile at the host where the single server or dictionary server is located, eliminate the cause of the error, and then re-execute the command. If no error message has been output to syslogfile, contact the customer engineer.

pdopsetup (Set up add-on PP)

Function

Installs or uninstalls HiRDB add-on PPs.

Executor

Superusers can execute this command.

Format

pdopsetup [-d] -k add-on-PP HiRDB-operation-directory

Options

-d

Specifies an uninstallation of an add-on PP. The default is to install an add-on PP.

-k add-on-PP <character-string>

Specifies an abbreviation of the add-on PP.

exd: HiRDB External Data Access²

sti: HiRDB Staticizer Option

ldp: HiRDB LDAP Option

aha: HiRDB Advanced High Availability

apt: HiRDB Advanced Partitioning Option

drl: HiRDB Disaster Recovery Light Edition¹

nrf: HiRDB Non Recover FES²

¹ If HiRDB Disaster Recovery Light Edition is installed, execute the pdopsetup command at all server machines both at the transaction execution site and at the log application site.

2 Applicable to a HiRDB/Parallel Server.

Command argument

HiRDB-operation-directory <pathname>

Specifies the HiRDB operation directory where the add-on PP is to be installed or uninstalled.

Rules

The pdopsetup command can be executed only when HiRDB is stopped. This command cannot be executed when HiRDB has been forcibly terminated or has terminated abnormally.

Execute the pdopsetup command for each server machine (except when the HiRDB LDAP Option is installed on a HiRDB/Parallel Server). If you install the HiRDB LDAP Option on a HiRDB/Parallel Server, execute this command at the server machine where the dictionary server is located.

To execute the pdopsetup command, you must add $PDDIR/lib to the SHLIB_PATH# environment variable.

# The environment variable is LD_LIBRARY_PATH for the Solaris and Linux version and LIBPATH for the AIX 5L version.

Note

The following are the pdopsetup command's return codes:
0: Normal termination
4: Privilege error, HiRDB is active, insufficient disk space, uninstalled, or already installed
12: Invalid parameter or path

When HiRDB is upgraded to a new version, any add-on PP registered before the version upgrade will be transferred to the new version, which obviates the need for re-executing this command.

pdorbegin (Commit a database for online reorganization)

Function

The pdorbegin command places specified original RDAREAs and replica RDAREAs of a specified generation in the replica group in online reorganization hold status.

When a table is specified, the command processes all RDAREAs related to that table and places each original RDAREA and the specified generation of replica RDAREAs in the replica group in online reorganization hold status. For details about related RDAREAs, see pdrdrefls. To also process the related areas in the constraint definition, specify the -c option. For details, see the description of the -c option.

Once you execute the pdorbegin command, any transaction that accesses an RDAREA in the replica group that contains the specified original RDAREA is placed in wait status until the pdorchg command has executed.

To release online reorganization hold status, specify the -u option.

You can execute the pdorbegin command only when HiRDB Staticizer Option has been installed and the pd_max_reflect_process_count and pd_inner_replica_control operands have both been specified in the system definition.

Executor

HiRDB administrator

Format

Format 1 (for placing RDAREAs in online reorganization hold status and releasing them from this status):

 pdorbegin {-r original-RDAREA-name[,original-RDAREA-name]...

            |-t [authorization-identifier.]table-identifier

                [-s server-name[,server-name]...][-c constraint-type]}

          [-q generation-number ] [-w lock-release-wait-time] [-e] [-u]

Format 2 (for releasing a shared RDAREA or a shared table from online reorganization hold status (applicable to a HiRDB/Parallel Server only)):

 pdorbegin {-r original-RDAREA-name[,original-RDAREA-name]...

            |-t [authorization-identifier.]table-identifier[-c constraint-type]}

          [-s server-name[,server-name]...]

          [-q generation-number ] [-w lock-release-wait-time] -u

Options

-r original-RDAREA-name[,original-RDAREA-name]...<identifier> ((1-30))

Specifies the names of RDAREAs that are to be placed in online reorganization hold status.

Rules

Specify user RDAREAs and user LOB RDAREAs. An error results if any other type of RDAREA is specified.

An error results if all replica RDAREAs have been deleted or there is no replica RDAREA for a specified RDAREA. If a batch specification of RDAREA names is used and it includes an original RDAREA whose replica RDAREAs have all been deleted or an RDAREA without a replica RDAREA, the command ignores the batch specification of RDAREA names and resumes processing.

If you duplicate an RDAREA name, the command eliminates the RDAREA from processing.

You can use a batch specification of RDAREA names to specify original RDAREA names. When a batch specification of RDAREA names is used, the command ignores any original RDAREA whose replica RDAREAs have all been deleted or any regular RDAREA without a replica RDAREA and then resumes processing. The command can process a maximum of 4,096 RDAREAs by means of a batch specification of RDAREA names. For details about batch specification of RDAREA names, see 1.5.2 Batch specification of RDAREA names in operation commands.

You can specify a maximum of 128 RDAREA names. If more than 128 RDAREA names are specified, an error occurs. When a batch specification of RDAREA names is used, a maximum of 4,096 RDAREAs can be processed.

If an RDAREA name is enclosed in double quotation marks ("), the system treats it as being case sensitive; otherwise, the system treats it as all uppercase letters. If an RDAREA name contains a space, enclose the entire name in double quotation marks ("). If you are using sh (Bourne shell), csh (C shell), or ksh (Korn shell), you must enclose the entire set of RDAREA names in single quotation marks (').

-t [authorization-identifier.]table-identifier

<identifier> ((authorization identifier: 1-8, table identifier: 1-30))

Specifies the name of a table that is to be placed in online reorganization hold status.

The command processes the RDAREAs related to the specified table and places each original RDAREA and the specified generation of replica RDAREAs in the replica group in online reorganization hold status.

When the -t option is specified, the number of RDAREAs storing the specified table must not exceed 4,096.

When the authorization identifier is omitted, the pdorbegin command assumes the authorization identifier set in the PDUSER environment variable at the time of execution. If the PDUSER environment variable has not been set, the command assumes the user name specified in the logon window.

If the authorization identifier or table identifier is enclosed in double quotation marks ("), the command treats it as being case sensitive. If it is not enclosed in double quotation marks ("), the command treats it as in all uppercase letters. If you are using sh (Bourne shell), csh (C shell), or ksh (Korn shell), you must enclose the entire identifier in single quotation marks (').

-s server-name[,server-name]... <identifier> ((1-8))

Specifies servers for which the processing is to be performed. The following guidelines apply to specifying the -s option:

If a table whose rows are partitioned among servers is to be placed in online reorganization hold status, specify the names of the servers that are to be processed.

If a shared RDAREA or shared table is to be placed in online reorganization hold status, specify the names of the servers that are to be processed.

Rules

When this option is omitted, the command processes all servers that contain the RDAREAs to be processed.

If a shared RDAREA is to be placed in online reorganization hold status, specify the -s option together with the -u option because all back-end servers must be processed in the batch mode. When the -u option is omitted, specifying the -s option results in an error.

You can specify a maximum of 128 server names. Specifying more than 128 server names results in an error.

-q generation-number<unsigned integer> ((1-10)) <<1>>

Specifies the generation number of the replica RDAREAs in the replica group that are to be placed in online reorganization hold status.

You cannot specify 0, which is the generation number of original RDAREAs.

-w lock-release-wait-time<unsigned integer> ((0-3600))

Specifies the lock-release wait time in seconds for the online reorganization hold.

When this option is omitted, the command assumes the value of the pd_lck_wait_timeout operand in the system definition. If the value of the pd_lck_wait_timeout operand is 0 in the system definition, the command assumes 3,600.

-u

Specifies that online reorganization hold is to be released. When this option is specified, the -r and -t options must also be specified.

When the processing target includes a shared RDAREA, processing is performed at all back-end servers in the batch mode. If it is not possible to release all the target RDAREAs from online reorganization hold status, an error results. If the shared RDAREA needs to be released from online reorganization hold status for each server for reasons such as a specific back-end server being inactive, you can specify the -s option to release the online reorganization hold.

When you release online reorganization hold, you must specify the same resources as when the processing target was placed in online reorganization hold status (otherwise, an error occurs). The following table shows the relationships between the options specified when the processing target was placed in online reorganization hold status and the options that are specified when it is released from online reorganization hold status:

pdorbegin command options when online reorganization hold is released | pdorbegin command options when the processing target was placed in online reorganization hold status
-r RDAREA | -t table | -t table -c ref
-r RDAREA -u | Y# | N | N
-t table -u | N | Y | N
-t table -c ref | N | N | Y

Legend:

Y: Can be executed

N: Cannot be executed (results in an error)

# If multiple RDAREAs were placed in online reorganization hold status, there is no need to specify all the RDAREAs in the -r option of the pdorbegin command when they are being released from online reorganization hold status.

-c constraint-type

Specifies that the associated RDAREAs in the constraint definition are also to be placed in online reorganization hold status. When you specify this option, you must also specify the -t option. Specifying this option without specifying the -t option results in an error.

ref

Specifies that RDAREAs associated with referential constraints are also to be placed in online reorganization hold status. This refers to RDAREAs that contain a referencing table or a referenced table that must be handled together with generation numbers. For details about how to handle referential constraints, see the manual HiRDB Version 8 Installation and Design Guide.

-e

Specifies that only the updated columns are to be applied during reflection processing for online reorganization when the pdorend command is executed. For notes about the -e option specification, see the manual HiRDB Staticizer Option Version 7 Description and User's Guide.

Rules

The pdorbegin command can be executed only while HiRDB is active.

The pdorbegin command must be executed at the server machine that contains the single server or where the system manager is located.

When you execute the pdorbegin command, the data dictionary RDAREA must be in one of the following statuses:

Open and shutdown release status

Open and command shutdown status

The pdorbegin command processing depends on option specifications, as described below:

When the -r option is specified
The pdorbegin command processes the specified original RDAREAs for each server. If the command is unable to place all the specified original RDAREAs and the specified generation of replica RDAREAs in the replica group in online reorganization hold status, processing for the corresponding server results in an error and the command processes the next server.

When the -t option is specified
The related RDAREAs for the specified table are processed, and each original RDAREA and the specified generation of replica RDAREAs in the replica group are placed in online reorganization hold status. Because all applicable servers are processed in the batch mode, all servers are placed in the same status.

If the server with a specified original RDAREA contains an RDAREA that has already been placed in online reorganization hold status, the pdorbegin command results in an error.

Whether or not the pdorbegin command is executable depends on the status of the original RDAREA. For details, see C.1 RDAREA status transitions. A replica RDAREA must be in command shutdown and closed status.

The pdorbegin command results in an error if a reflection status management table has not been created by the pdorcreate command or a reflection status management table has been created for an original RDAREA specified in the -r option.

If the column recovery restriction specified during table definition is not ALL and the -r option specifies a user LOB RDAREA that contains that table (LOB column), execution of the command for the server containing that user LOB RDAREA will result in an error.

When the processing target includes a shared RDAREA, processing is performed at all back-end servers in the batch mode. Therefore, an error occurs if the command is unable to place all the specified original RDAREAs and the specified generation of replica RDAREAs in the replica group in online reorganization hold status.

When the pdorbegin command is executed, deadlock may occur for a referencing or updating transaction. By specifying pd_deadlock_priority_use=Y in the system definition and a deadlock priority value for the operation command in the pd_command_deadlock_priority operand, you can specify whether the referencing or updating transaction or the operation command is to take control in the event of deadlock. To make the pdorbegin command result in an error, specify a larger deadlock priority value for the operation command. In this case, re-execute the pdorbegin command after a specific period of time because the pdorbegin command results in an error after releasing all the locks that were placed by the command. To give precedence to the pdorbegin command and make the referencing or updating transaction result in an error, specify a smaller deadlock priority value for the operation command.

If the server contains both shared and non-shared RDAREAs that are in online reorganization hold status and you specify the -s option to release online reorganization hold, you must execute the processing for the shared RDAREAs separately from the processing for the non-shared RDAREAs. If an attempt is made to execute the processing for both at the same time, an error results.

Whether or not the pdorbegin command can be executed and the execution range depend on the processing target (table or RDAREA) and the combination of options (t, -r, -s, and -u), as described below:

Processing target | Option | Whether or not executable | Execution range | Command execution format
-t | -r | -s | -u | -c
Table | Non-partitioned table (including shared tables for HiRDB/Single Server) | S |  |  |  |  | Y | All related RDAREAs² | Format 1
S |  |  | S |  | Y
S |  | S |  |  | Y¹ | RDAREAs related to the specified back-end server²
S |  | S | S |  | Y¹
S |  |  |  | S | Y | All related RDAREAs³
S |  |  | S | S | Y
S |  | S |  | S | Y¹ | All RDAREAs related to the specified back-end server³
S |  | S | S | S | Y¹
Row-partitioned table | S |  |  |  |  | Y | All related RDAREAs²
S |  |  | S |  | Y
S |  | S |  |  | Y¹ | RDAREAs related to the specified back-end server²
S |  | S | S |  | Y¹
S |  |  |  | S | Y | All related RDAREAs³
S |  |  | S | S | Y
S |  | S |  | S | Y¹ | All RDAREAs related to the specified back-end server³
S |  | S | S | S | Y¹
Shared table (applicable to a HiRDB/Parallel Server only) | S |  |  |  |  | Y | RDAREAs related to all back-end servers²
S |  |  | S |  | Y | Format 2
S |  | S |  |  | N | Not applicable | Format 1
S |  | S | S |  | Y | RDAREAs related to the specified back-end server² | Format 2
S |  |  |  | S | Y | RDAREAs related to all back-end servers³ | Format 1
S |  |  | S | S | Y | Format 2
S |  | S |  | S | N | Not applicable | Format 1
S |  | S | S | S | Y | RDAREAs related to the specified back-end server³ | Format 2
RDAREA | Non-shared RDAREA only |  | S |  |  |  | Y | Only the specified RDAREAs | Format 1
| S |  | S |  | Y
| S | S |  |  | N | Not applicable
| S | S | S |  | N
| S |  |  | S | N
Shared RDAREA only |  | S |  |  |  | Y | All back-end servers
| S |  | S |  | Y | Format 2
| S | S |  |  | N | Not applicable | Format 1
| S | S | S |  | Y | Specified back-end servers | Format 2
| S |  |  | S | N | Not applicable | Format 1
Both non-shared and shared RDAREAs |  | S |  |  |  | Y | All back-end servers | Format 1
| S |  | S |  | Y | Format 2
| S | S |  |  | N | Not applicable | Format 1
| S | S | S |  | N | Format 2
| S |  |  | S | N | Format 1

Legend:

S: Option is specified

: Option is omitted

Y: Can be executed

N: Cannot be executed

¹

If the specified back-end server does not match the back-end server that contains the related RDAREAs, an error occurs.

²

Relation to the constraint definition is not included.

³

Relation to the constraint definition is included.

Notes

The result of the pdorbegin command can be checked with the pdls -d org command or on the basis of the return code. The return codes are as follows:
0: Normal termination
4: Warning termination (processing was successful at some servers)
8: Abnormal termination
12: Abnormal termination (an event occurred that prevented the command from displaying an error message)
If the return code is 12, check the error message in syslogfile at the host where the single server or dictionary server is located, eliminate the cause of the error, and then re-execute the command. If no error message has been output to syslogfile, contact the customer engineer.

The online reorganization hold is inherited when HiRDB is restarted.

The pdorbegin command places the specified RDAREAs in the EX lock mode. If a specified RDAREA is being accessed by another transaction, the pdorbegin command is placed in wait status until that transaction terminates. Once execution of pdorbegin command begins, all transactions for the specified RDAREAs are placed in wait status due to a lock on the replica group configuration until the pdorchg command is completed.

When the -t option is specified, the pdrdrefls command executes internally. Therefore, when the -t option is specified, a message from the pdrdrefls command may be displayed.

pdorcheck (Check the application conditions for online reorganization)

Function

The pdorcheck command checks whether or not all base tables in specified RDAREAs satisfy the following application conditions:

At least one index has been defined that satisfies one of the following conditions:

Primary key index whose index component columns do not include a VARCHAR or MVARCHAR column with a definition length of 256 bytes or greater or a NVARCHAR column with a definition length of 128 characters or greater

Cluster key index with PRIMARY specified whose index component columns do not include a VARCHAR or MVARCHAR column with a definition length of 256 bytes or greater or a NVARCHAR column with a definition length of 128 characters or greater

Cluster key index with UNIQUE specified whose index component columns do not include a VARCHAR or MVARCHAR column with a definition length of 256 bytes or greater or a NVARCHAR column with a definition length of 128 characters or greater

Index with UNIQUE specified whose index component columns are all NOT NULL and do not include a VARCHAR or MVARCHAR column with a definition length of 256 bytes or greater or a NVARCHAR column with a definition length of 128 characters or greater

The table columns consist of only the following data types:
INTEGER, SMALLINT, [LARGE]DECIMAL, FLOAT, SMALLFLT, CHAR, VARCHAR, NCHAR, NVARCHAR, MCHAR, MVARCHAR, DATE, INTERVAL YEAR TO DAY, TIME, INTERVAL HOUR TO SECOND, TIMESTAMP, BINARY, BLOB, SGMLTEXT

If a LOB column has been defined for the table, the update log acquisition mode defined for the database in the LOB column storage RDAREA is the log acquisition mode (RECOVERY ALL).

The command issues a message identifying a table that does not satisfy the application conditions.

You can execute the pdorcheck command only when HiRDB Staticizer Option has been installed and the pd_max_reflect_process_count and pd_inner_replica_control operands have both been specified in the system definition.

Executor

HiRDB administrator

Format

 pdorcheck -r original-RDAREA-name[,original-RDAREA-name]...

Options

-r original-RDAREA-name[,original-RDAREA-name]...<identifier> ((1-30))

Specifies the names of original RDAREAs that are to be checked for the application conditions.

Rules

Specify user RDAREAs and user LOB RDAREAs.

Specify only RDAREAs for which replica RDAREAs have been defined.

If an RDAREA name is enclosed in double quotation marks ("), the system treats it as being case sensitive; otherwise, the system treats it as all uppercase letters. If an RDAREA name contains a space, enclose the entire name in double quotation marks ("). If you are using sh (Bourne shell), csh (C shell), or ksh (Korn shell), you must enclose the entire set of RDAREA names in single quotation marks (').

Rules

The pdorcheck command can be executed only while HiRDB is active.

The pdorcheck command must be executed at the server machine that contains the single server or where the system manager is located.

Notes

The following shows the pdorcheck command's return codes:
0: The application conditions are satisfied.
4: Some of the resources do not satisfy the application conditions.
8: The command terminated abnormally.

Do not add to, delete, or change definition of a table or index of a specified RDAREA while the pdorcheck command is executing. If an addition, deletion, or definition change occurs, the result may be invalid or the command may terminate abnormally.

pdorchg (Change the current RDAREAs for online reorganization)

Function

The pdorchg command switches current RDAREAs from original RDAREAs in online reorganization hold status (including RDAREAs that have been placed temporarily in command shutdown status) to replica RDAREAs in online reorganization hold status.

After the pdorchg command is completed, a transaction that was accessing an original RDAREA in online reorganization hold status is released from wait status so that it can access the replica RDAREA in online reorganization hold status.

You can execute the pdorchg command only when HiRDB Staticizer Option has been installed and the pd_max_reflect_process_count and pd_inner_replica_control operands have both been specified in the system definition.

Executor

HiRDB administrator

Format

 pdorchg [-s server-name[,server-name]...]

Options

-s server-name[,server-name]...<identifier> ((1-8))

Specifies the names of the servers that contain replica groups where update processing on the replica RDAREAs is to be applied to the original RDAREAs.

Rules

If the -s option is omitted, the command switches the current RDAREAs for all servers that contain RDAREAs in online reorganization hold status.

If a duplicate server name is specified, the command eliminates it from processing.

You can specify a maximum of 128 server names. If you specify more than 128 server names, the command ignores any excess server names.

If you specify in the -t option of the pdorbegin command a table whose rows are partitioned among servers in order to place the table in online reorganization hold status, processing is performed at all applicable servers in the batch mode. Therefore, specify the -s option only when you want to limit the servers on which current swap processing is to be performed.

When the processing target includes a shared RDAREA, processing is performed at all back-end servers in the batch mode. Therefore, if the -s option is specified, an error occurs.

When both the following conditions are satisfied, execute the pdorchg command with the -s option specified. If the command is executed with the -s option omitted, an error results.

The pdorbegin command with the -t option specified has been executed (except when a shared table is specified).

Some HiRDB units or servers are stopped or stopping.

Rules

The pdorchg command can be executed only while HiRDB is active.

The pdorchg command must be executed at the server machine that contains the single server or where the system manager is located.

When you execute the pdorchg command, the data dictionary RDAREA must be in one of the following statuses:

Open and shutdown release status

Open and command shutdown status

The unit of processing for the pdorchg command depends on whether RDAREA or table is specified in the pdorbegin command.

When RDAREA is specified:

The command performs processing for each server. If the command is unable to switch the current RDAREAs from all original RDAREAs in online reorganization hold status to replica RDAREAs in online reorganization hold status at a server, processing for that server results in an error, and the command processes the next server.

When table is specified:

The command performs processing for all RDAREAs related to the specified table in the batch mode. If the command is unable to switch the current RDAREAs from all original RDAREAs in online reorganization hold status to replica RDAREAs in online reorganization hold status, an error results.

Whether or not the pdorchg command can be executed depends on the status of the RDAREAs. For details, see C.1 RDAREA status transitions.

When the processing target includes a shared RDAREA, all back-end servers are processed. If the command is unable to switch the current RDAREAs from all the applicable original RDAREAs in online reorganization hold status to replica RDAREAs, an error occurs.

Notes

The result of the pdorchg command can be checked with the pdls -d org command or on the basis of the return code. The return codes are as follows:
0: Normal termination
4: Warning termination (processing was successful at some servers)
8: Abnormal termination
12: Abnormal termination (an event occurred that prevented the command from displaying an error message)
If the return code is 12, check the error message in syslogfile at the host where the single server or dictionary server is located, eliminate the cause of the error, and then re-execute the command. If no error message has been output to syslogfile, contact the customer engineer.

Execute the pdorchg command after paired volumes are released.

pdorcreate (Create an environment for reflection processing for online reorganization)

Function

The pdorcreate command creates an environment for reflection processing for online reorganization.

You must execute the pdorcreate command before you can execute the pdorbegin command.

The pdorcreate command performs the following environment creation or deletion processing:

Creates a reflection status management table for specified RDAREAs

Creates an index (primary key index) for the reflection status management table for the specified RDAREAs

Deletes a reflection status management table

Deletes the index for a reflection status management table

You can execute the pdorcreate command only when HiRDB Staticizer Option has been installed and the pd_max_reflect_process_count and pd_inner_replica_control operands have both been specified in the system definition.

Executor

HiRDB administrator

Format

 pdorcreate {[-r RDAREA-name[,RDAREA-name]...]

                  -o RDAREA-name

             |-d}

Options

-r RDAREA[,RDAREA]...<identifier> ((1-30))

Specifies the names of RDAREAs contained in the reflection status management table. Each RDAREA contains only information about the reflection status of the server where the RDAREA is located.

Rules

If multiple RDAREAs are specified, the command creates a row-partitioned reflection status management table.

You can specify a maximum of 1023 RDAREA names.

If you specify multiple RDAREAs, make sure that none of the corresponding servers is duplicated.

When the -r option is omitted, the command creates a reflection status management table (non-partitioned table) in the RDAREA specified in the -o option.

The command also creates an index for the reflection status management table for the specified RDAREAs.

To specify an appropriate RDAREA in this command, you must create it in advance as a public user RDAREA in a HiRDB file system area that contains no RDAREAs subject to updatable online reorganization. For details about estimating the required disk space, see Estimating the required disk space below.

If an RDAREA name is enclosed in double quotation marks ("), the system treats it as being case sensitive; otherwise, the system treats it as all uppercase letters. If an RDAREA name contains a space, enclose the entire name in double quotation marks ("). If you are using sh (Bourne shell), csh (C shell), or ksh (Korn shell), you must enclose the entire set of RDAREA names in single quotation marks (').

A shared RDAREA cannot be specified.

To create a reflection status management table for an RDAREA for which a replica RDAREA has been defined, specify the name of the original RDAREA.

Estimating the required disk space

A user RDAREA is used to store a reflection status management table and the index defined for that table. Therefore, the required disk space is the sum of these sizes.

Number of pages required to store the table:

Determine the number of pages required to store the table (with FIX specified) based on the values shown below. For details about how to determine the number of pages required to store a table (with FIX specified), see the HiRDB Version 8 Installation and Design Guide.

Total number of lines in the table (a): Number of servers subject to updatable online reorganization that are stored in the corresponding RDAREA#

Page length of the user RDAREA (b): Value specified when the RDAREA was created (bytes)

Percentage of unused area that is specified with CREATE TABLE (c): 30 (%)

Data length of each column ( di): 70 (bytes)

Segment size of the RDAREA that stores the table (g): Value specified when the RDAREA was created (pages)

Percentage of available pages in the segment that is specified in CREATE TABLE (h): 10 (%)

# If you are estimating for an RDAREA specified in the -r option, the value is 1.

If you are estimating for the RDAREA specified in the -o option, the value is (total number of back-end servers for HiRDB) - (number of RDAREAs specified in the -r option).

Number of pages required to store the index:

Determine the number of pages required to store the index based on the values shown below. For details about determining the number of pages required to store an index, see the HiRDB Version 8 Installation and Design Guide.

Page length of the user RDAREA (b): Value specified when the RDAREA was created (bytes)

Percentage of available space that is specified in CREATE INDEX (b): 30 (%)

Number of key types with no more than 200 duplicate key values (c): Number of servers subject to updatable online reorganization that are stored in the corresponding RDAREA¹ number of concurrent processes²

Average number of duplicate keys with no more than 200 duplicate key values (d): 1

Number of key types with 201 or more duplicate key values (e): 0

Average number of duplicate keys with 201 or more duplicate key values (f): 0

Length of database storage key (g): 12 (bytes)

Number of key types whose value is not null (h):
For an index with UNIQUE specified, the value is the number of servers subject to updatable online reorganization that are stored in the corresponding RDAREA number of concurrent processes.
For an index with UNIQUE not specified, the value is 24.

¹ If you are estimating for an RDAREA specified in the -r option, the value is 1.

If you are estimating for the RDAREA specified in the -o option, the value is (total number of back-end servers for HiRDB) - (number of RDAREAs specified in the -r option).

² This is the value of the pd_max_ferlect_process_count operand in the system definition.

-o RDAREA-name<identifier> ((1-30))

Specifies the RDAREA that stores the reflection status management table of a server, other than the server corresponding to an RDAREA specified in the -r option.

Rules

Make sure that the RDAREAs specified in the -r option are different from the RDAREA specified in the -o option.

To specify an appropriate RDAREA in this command, you must create it in advance as a public user RDAREA in the HiRDB file system area that contains no RDAREAs subject to updatable online reorganization. For details about estimating the required disk space, see the description of the -r option.

If an RDAREA name is enclosed in double quotation marks ("), the system treats it as being case sensitive; otherwise, the system treats it as all uppercase letters. If an RDAREA name contains a space, enclose the entire name in double quotation marks ("). If you are using sh (Bourne shell), csh (C shell), or ksh (Korn shell), you must enclose the entire set of RDAREA names in single quotation marks (').

A shared RDAREA cannot be specified.

To create a reflection status management table for an RDAREA for which a replica RDAREA has been defined, specify the name of the original RDAREA.

-d

Specifies that the reflection environment is to be deleted.

Rules

When you specify the -d option, make sure that you execute the command after all reflection processing (including processing that was suspended) has been completed on HiRDB.

When the -d option is specified, the command checks the reflection processing information that is managed internally by HiRDB. If updatable online reorganization is underway at any of the servers, the command issues the KFPT02023-E interactive message. If this message is issued, check all the RDAREAs at the server where the message was issued to see if they are in online reorganization hold status. If none of the RDAREAs is in online reorganization hold status, enter y; if any of the RDAREAs is in online reorganization hold status, enter n. Note that if you enter y when at least one of the RDAREAs is in online reorganization hold status, the database may be damaged.

When you specify the -d option, you cannot execute the pdorcreate command in the background.

To check the status of RDAREAs, use the pddbls command.

Rules

The pdorcreate command can be executed only while HiRDB is active.

The pdorcreate command must be executed at the server machine that contains the single server or where the system manager is located.

We recommend that you create a reflection status management table as a row-partitioned table for each server (to localize the effects of errors to each server).

When creation of a reflection status management table is completed, the KFPT02020-I message is displayed.

For details about manipulating (creating and deleting) a reflection status management table in an RDAREA for which replica RDAREAs are defined, see the manual HiRDB Staticizer Option Version 7.

A reflection status management table cannot be created in a shared RDAREA.

Notes

The following shows the pdorcheck command's return codes:
0: Normal termination
4: Warning termination
8: Abnormal termination

You can use pddbst's condition analysis for each table to determine the structure of the RDAREA used to store the reflection status management table and whether or not a reflection status management table has been created. For this purpose, specify "ORG_USER"."PDORRFST" as the table name.

Examples

Figure 2-6 shows an example of creating reflection status management tables on BES1, BES2, and BES3. There are three ways to create the tables, but the recommended method is 1.

Figure 2-6 Example of creating a reflection status management table for BES1, BES2, and BES3

Explanation

Command format when the ratio of the number of servers subject to updatable online reorganization to the number of RDAREAs used to store the reflection status management table is 1 to 1:
pdorcreate -r RD01,RD02 -o RD03

Command format when the ratio of the number of servers subject to updatable online reorganization to the number of RDAREAs used to store the reflection status management table is 1 to n:
pdorcreate -r RD01 -o RD03

Command format when the reflection status management table is to be stored in a single RDAREA:
pdorcreate -o RD01

pdorend (Execute reflection processing for online reorganization)

Function

When updatable online reorganization is underway, the pdorend command applies update processing to RDAREAs that have been placed in online reorganization hold status.

Reflection for online reorganization involves the following processing:

When the pdorend command is executed, it starts the online reorganization application process for each server. It then reads the update log information on the replica RDAREAs in online reorganization hold status from the system log and then updates the original RDAREAs.

After completing the application process, the command switches a current RDAREA from a replica RDAREA to an original RDAREA, changes the status of the original RDAREA from online reorganization hold to shutdown release, and then places the replica RDAREA in command shutdown and closed status.

During execution of pdorend, the command locks the replica group configuration of the corresponding RDAREAs in order to synchronize the status of original and replica RDAREAs. If update processing takes place on a replica RDAREA while the lock is in effect, the command applies that update processing to the original RDAREA.

Once the lock is placed, the command places any transaction that attempts to access an RDAREA in the replica group being processed in wait status until the current RDAREA switchover processing is completed. After the current RDAREA has been switched over, the transaction is allowed to access the original RDAREA.

When the -u option is specified, the command stops reflection processing and releases the original and replica RDAREAs from online reorganization hold status. In this case, the current RDAREA remains set to the replica RDAREA.

If the RDAREA subject to online reorganization contains a referenced table, a referencing table, and a check constraint table, the referencing table and check constraint table are placed in check pending status. If the -p option is specified, neither the referencing table nor the check constraint table is placed in check pending status.

You can execute the pdorend command only when HiRDB Staticizer Option has been installed and the pd_max_reflect_process_count and pd_inner_replica_control operands have both been specified in the system definition.

Executor

HiRDB administrator

Format

 pdorend [-s server-name[,server-name]...]

         {[-n maximum-retries-count] [-w maximum-wait-time-for-reflection-processing]

           [-t maximum-wait-time-for-transaction-processing]

           [-m number-of-concurrent-online-reorganization-application-processes] [-z]

           [-f reflection-processing-control-file-name] [-p]

           |[-u]}

Options

-s server-name[,server-name]...<identifier> ((1-8))

Specifies the names of the servers that contains the replica groups in which update processing on replica RDAREAs is to be applied to the original RDAREAs.

Rules

When the -s option is omitted, the command executes reflection processing on all servers that contain RDAREAs in online reorganization hold status.

If a duplicate server name is specified, the command eliminates it from processing.

You can specify a maximum of 128 server names. If you specify more than 128 server names, the command ignores the excess server names.

If you specified in the pdorbegin command a table whose rows are partitioned among servers, processing is performed at all applicable servers in the batch mode. Therefore, you specify the -s option only when you want to limit the servers on which reflection processing is to be performed.

If the processing target includes a shared RDAREA and you specify the -s option, you must also specify the -u option. When the -u option is not specified, specifying the -s option results in an error.

When both the following conditions are satisfied, execute the pdorend command with the -s option specified. If the command is executed with the -s option omitted, an error results.

The pdorbegin command was executed with the -t option specified (except when a shared table is specified).

Some HiRDB units or servers are stopped or stopping.

-n maximum-retries-count<unsigned integer> ((0-10)) <<3>>

In order to synchronize original and replica RDAREAs, the command locks the replica group configuration that contains RDAREAs in online reorganization hold status. This option specifies the maximum number of retries for each server in the event of a timeout on the locking process or on reflection processing after locking.

If the specified maximum number of retries is exceeded, the corresponding server processing terminates with an error. For details about the conditions under which retries occur, see Rules, below.

-w maximum-wait-time-for-reflection-processing<unsigned integer> ((60-3600)) <<600>>

Specifies the maximum wait time in seconds for applying to the original RDAREAs any update processing on the replica RDAREAs.

If the specified maximum wait time for reflection processing is exceeded, the server's processing is terminated with an error. If this occurs, either increase the value of the -w option or reduce the number of online application transactions while pdorend is executing.

-t maximum-wait-time-for-transaction-processing<unsigned integer> ((1-3600))

Specifies the maximum wait time (in seconds) for each server until the replica group configuration that contains the RDAREAs in online reorganization hold status is locked or until the reflection processing is completed after locking the replica group configuration in order to synchronize the original and replica RDAREAs.

When the -t option is omitted, the command assumes the value of the pd_lck_wait_timeout operand in the system definition. For details about the maximum wait time for transaction processing, see Rules, below.

-m number-of-concurrent-online-reorganization-application-processes<unsigned integer> ((1-8)) <<2>>

Specifies the number of concurrent online reorganization application processes for each back-end server that applies update processing on replica RDAREAs to original RDAREAs.

Rules

When the pdorend command is executed, as many online reorganization application processes are started as there is determined by the following formula:

Number of application processes to be started = M S (processes)

M: Value of the -m option
S: Value of the -s option (if the -s option is omitted, the value of S is the number of back-end servers that contain RDAREAs in online reorganization hold status)

Note that you must specify in advance in the pd_max_reflect_process_count operand in the system definition the number of online reorganization application processes that can be guaranteed in the entire HiRDB.

Guidelines for specification value

To determine the value to be specified, use the formula shown below. The system assumes a value of about 8 as the valid maximum number of concurrent processes due to bottlenecks such as reading log data.

Number of concurrent online reorganization application processes =
MIN(8, (NLine PLine/100) Ntrn (m + n)/n TSql )

NLine: Average number of lines updated by a single transaction for updating RDAREAs in a SDS or BES
PLine: Percentage of RDAREA updating subject to this processing in all RDAREA updating in the SDS or BESs (%)
Ntrn: Number of transactions per second for updating RDAREAs in the SDS or BESs
m: Time required for table reorganization (unit is the same as for n)
n: Time required for reflection processing (unit is the same as for m)
TSql: Average SQL execution time per line of RDAREA subject to this processing (seconds)

For example, if NLine = 10, PLine = 20, Ntrn = 50, TSql = 0.003, and reflection processing time is about 1/5 of the time required for table reorganization, then the number of concurrent online reorganization application processes is 2.

To avoid contention, we recommend that you set the number of concurrent processes to 1 in the following cases:

When the ngram index of the table, which is subject to reflection processing, is updated frequently

When an index with UNIQUE specified for a table which is subject to reflection processing is updated frequently

-z

Specifies that in the event of an error, reflection processing is to be executed again from the system log application start point.

Specify the -z option only when an error has occurred on the server. Do not specify this option, however, if you will re-execute the pdorend command after an error has occurred at the server.

Criteria

If an error occurs on the primary volume that contains the original RDAREA while the pdorend command is executing, specify the -z option when you execute reflection processing from the system log application start point that is specified again in the pdorbegin command after you have restored the primary volume.

-f reflection-processing-control-file-name<path name> ((up to 255 characters))

Specifies the absolute path name of the file containing the control statements for reflection processing (reflection processing control file). When the -f option is omitted, the command assumes the default control statements that can be specified in the reflection processing control file.

You can specify the following control statements in the reflection processing control file:

Control statement | Description | Permitted number of statements
reflection | Specifies details of the reflection processing | 1
report | Specifies the file to which the results of reflection processing are to be output | 1

reflection statement

Format

reflection [sql_error={stop|skip}]
[mvcelmwarn={stop|ignore}]

Explanation

sql_error={stop|skip}

Specifies the action to be taken in the event of an SQL error during reflection processing:

stop

Terminate the command with an error in the event of an SQL error. The processing is rolled back and the command is terminated at the previous commit point.

skip

Ignore specific SQL errors# and then resume reflection processing.

If skip is specified, data integrity cannot be guaranteed between the original database obtained after updatable online reorganization and the replica database. Before specifying skip, carefully examine operations.

Skipped SQL information is output to the file specified in the skip_info operand of the report statement. In such a case, the mapping key information is output to the skip information in order to identify the skipped SQL statements. If the mapping key is updated for the same row after the SQL statement was skipped, the mapping key information can no longer be used to identify the skipped row.

# The following SQL errors are ignored:

Key duplication error (SQLCODE=-803, SQLWARN6=blank)

No corresponding row (SQLCODE=100, SQLWARN6=blank)

Number of elements in the column added by the ADD clause of the UPDATE statement exceeds the maximum number of elements (SQLCODE=-806, SQLWARN6=blank)

mvcelmwarn={stop|ignore}

Specifies the action to be taken in the event a warning error is output for an UPDATE statement that is executed during reflection processing because the UPDATE statement's SET or DELETE clause specifies an element number that does not exist in the repetition column:

stop

Terminate reflection processing with an error. The processing is rolled back and the command is terminated at the previous commit point.

ignore

Update only those elements and columns in the repetition column, ignoring updating of any element that is not in the repetition column, and then resumes reflection processing.

When ignore is specified, data integrity cannot be guaranteed between the original database obtained after updatable online reorganization and the replica database. Before specifying ignore, carefully examine operations.

The SQL information whose updating was ignored is output to the file specified in the skip_info operand of the report statement. In such a case, the mapping key information is output to the skip information output file in order to identify the SQL statements whose updating was ignored. If the mapping key is updated for the same row after the corresponding SQL statement was executed, the mapping key information can no longer be used to identify the corresponding row.

report statement

Format

report [skip_info=skipped-information-output-file-name]

Explanation

skip_info=skipped-information-output-file-name<path name> ((up to 235 characters))

When sql_error=skip or mvcelmwarn=ignore is specified in the reflection statement, specifies the absolute path name of the file to which is to be output the information about the skipped SQL statements or the SQL statements for which updating of elements that do not exist in the repetition column was ignored. The name of the actual file that is created is "specified-file-name_server-name_process-ID".#

# server-name: Name of the server (1 to 8 characters) on which the SQL error to be skipped occurred

process-ID: ID of the process (1 to 10 characters) on which the SQL error to be skipped occurred

Rules

The directory to which the skipped information output file is to be output must be the same at all server machines. If there is no applicable directory, a control statement error occurs.

When this operand is omitted, the file is created under the following name:
/tmp/pdskipsql_server-name_process-ID

If the specified skipped information output file is not found, the command creates a skipped information output file and outputs the skipped information. When the specified skipped information output file is found, the command adds the current skipped information to that file.

If an output error occurs in the skipped information output file, the command cancels processing, performs rollback processing, and terminates with an error.

Output information:

The following information is output to the skipped information output file:

YYYY/MM/DD HH:MM:SS  SVR(server-name) PID(process-ID) [1]
**** SKIP SQL INFORMATION **** [2]
 TABLE NAME : "authorization-identifier"."table-identifier" [3]
 SQL KIND : SQL-type [4]
 SQLCODE : SQL-code [5]
 SQLWARN : warning-information [6]
 **** AFTER KEY INFORMATION **** [7]
   COLUMN NAME : "column-name" [8]
     DATA LENGTH : real-data-length [9]
     DATA : data-value [10]
 **** BEFORE KEY INFORMATION **** [11]
   COLUMN NAME : "column-name" [12]
     DATA LENGTH : real-data-length [13]
     DATA : data-value [14]
 **** UPDATE MULTI-VALUE COLUMN INFORMATION **** [15]
   COLUMN NAME : "column-name" [16]
     UPDATE ELEMENT NO : element-number[,element-number]... [17]

Explanation

Items 1 through 14 are output for each skipped SQL statement.

If the SQL type is INSERT or UPDATE, items 7 through 10 are output; items 8 through 10 are output for each mapping key column.

If the SQL type is UPDATE or DELETE, items 11 through 14 are output; items 12 through 14 are output for each mapping key column.

If ignore is specified in the mvcelmwarn option and the SQL type is UPDATE SET (element specification), UPDATE ADD, or UPDATE DELETE, items 15 through 17 are output; items 16 and 17 are output for each repetition column to be updated.

Date and time, server name, and process ID resulting in the SQL error

Header

Authorization identifier and table identifier

Type of skipped SQL statement:
INSERT: Insertion
UPDATE SET, UPDATE ADD, and UPDATE DELETE: Updating
DELETE: Deletion

SQLCODE of the skipped SQL statement

Warning information
The warning information that was generated is output. If there are multiple warning information items, they are separated by the space. If there is no warning information, only SQLWARN: is output.

Header for key information after updating

Column name

Real data length (decimal)

Contents of data (in dump format (hexadecimal + character string display))

Header for key information before updating

Column name

Real data length (decimal)

Contents of data (in dump format (hexadecimal + character string display))

Header for repetition column update information

Name of repetition column

Element number subject to updating
The element number subject to updating is output when the SQL type is one of the following:
UPDATE SET (element specification): Element number subject to updating¹
UPDATE ADD: Start element number of the element to be added²
UPDATE DELETE: Element number subject to deletion¹
If multiple elements are subject to updating, the element numbers are separated by the comma. If there are more than nine element numbers, a linefeed is performed after every ninth element.
¹ If an SQL statement with * specified was executed, the actual element number that was updated is output.
² If an SQL statement with * specified was executed, * is output as the element number subject to updating.

-p

Specifies that the referencing table with a constraint definition for the referenced table in the RDAREA that is subject to online reorganization, the referencing table in the RDAREA that is subject to online reorganization, and the check constraint table in the RDAREA that is subject to online reorganization are not to be placed in check pending status after reflection processing. This option is applicable only when the pd_check_pending operand value is YES in the system definition.

Rules

Specify this option when a data integrity error does not occur after online reorganization. For details about the conditions that result in an integrity error in the referential constraints and check constraints, see the manual HiRDB Version 8 Installation and Design Guide.

When this option is omitted, the command places the generation of the original RDAREA for the tables shown below in check pending status:

Referencing table that has a constraint definition for the referenced table in the RDAREA that is subject to online reorganization

Referencing table in the RDAREA that is subject to online reorganization

Check constraint table in the RDAREA that is subject to online reorganization

If the pdorend command results in an error after placing a table in check pending status, the processing is terminated and the table remains in check pending status.

If check pending status cannot be set, the command displays the KFPT01018-W message and continues processing, ignoring the processing to place the applicable table in check pending status. When the KFPT01018-W message is displayed, check the applicable table for an integrity error according to the administrator's action indicated in the message.

If there is a table in check pending status after reflection processing is completed, use pdconstck to check integrity. The applicable table cannot be accessed until it is released from check pending status. For details about how to check integrity, see the manual HiRDB Version 8 Installation and Design Guide.

If the pd_check_pending operand's value is NOUSE in the system definition, the command does not change the table's check pending status, regardless of this option. When the pd_check_pending operand's value is NOUSE, executing the pdorend command may result in a data integrity error.

Changes in check pending status

The following describes the changes in the check pending status.

For referenced tables:

Table 2-6 shows the changes in the check pending status of the referencing table related to the referenced table in the RDAREA that is subject to online reorganization. The changes shown in Table 2-6 also apply when the referenced table has multiple related referencing tables.

Table 2-6 Changes in the check pending status when there is a referenced table

pd_check_pending operand value | -p option specification | Type of referencing table | Status of RDAREA storing the referencing table related to the referenced table | Referenced table's check pending status
USE | No | Non-partitioned table | Target of online reorganization | Y
Not the target of online reorganization | Y
Partitioned table | All table storage RDAREAs are targets of online reorganization | Y
Some table storage RDAREAs are targets of online reorganization | Y
None of the table storage RDAREAs is a target of online reorganization | Y
Yes | Not applicable | Not applicable |
NOUSE | Not applicable | Not applicable | Not applicable |

Legend:

Y: The table information in all RDAREAs that constitute the referencing table is placed in check pending status.

: The status does not change.

Example:

Table 2-7 shows the targets of check pending status when USE is specified in the pd_check_pending operand, the -p option is omitted in the pdorend command, the referenced table T0 and the referencing tables T1 through T5 have a 1-to-1 referencing relationship with the configuration shown in Figure 2-7, and RDAREAs RD1 and RD2 are subject to online reorganization.

Figure 2-7 Example of configuration of referenced table and referencing tables

Table 2-7 Example of changes in the check pending status of referenced tables (when referenced and referencing tables have a 1-to-1 correspondence)

Name of referencing table | RDAREA name | Check pending status setting
T1 | RD1 | Y
T2 | RD1 | Y
RD2 | Y
T3 | RD1 | Y
RD2 | Y
RD3 | Y
T4 | RD3 | Y
T5 | RD3 | Y
RD4 | Y

Legend:

Y: Placed in check pending status.

For referencing tables:

Table 2-8 shows the changes in the check pending status when a referencing table is in an RDAREA that is subject to online reorganization. The changes shown in Table 2-8 also apply when the referenced table related to the referencing tables is not in the RDAREA subject to online reorganization.

Table 2-8 Changes in the check pending status of referencing tables

pd_check_pending operand value | -p option specification | Type of referencing table | Status of RDAREA storing referencing table | Referencing table's check pending status
USE | No | Non-partitioned table | Target of online reorganization | Y
Not the target of online reorganization |
Partitioned table | All table storage RDAREAs are targets of online reorganization | Y
Some table storage RDAREAs are targets of online reorganization | P
None of the table storage RDAREAs is a target of online reorganization |
Yes | Not applicable | Not applicable |
NOUSE | Not applicable | Not applicable | Not applicable |

Legend:

Y: The table information in all RDAREAs that constitute a referencing table is placed in check pending status.

P: Only the table information in the RDAREAs that constitute a referencing table and that are subject to online reorganization is placed in check pending status.

: The status does not change.

Example:

Table 2-9 shows the targets of check pending status when USE is specified in the pd_check_pending operand, the -p option is omitted in the pdorend command, referencing tables T1 through T5 have the configuration shown in Figure 2-8, and RDAREAs RD1 and RD2 are subject to online reorganization.

Figure 2-8 Example of configuration of referencing tables

Table 2-9 Example of changes in the check pending status of referencing tables

Name of referencing table | RDAREA name | Check pending status setting
T1 | RD1 | Y
T2 | RD1 | Y
RD2 | Y
T3 | RD1 | Y
RD2 | Y
RD3 |
T4 | RD3 |
T5 | RD3 |
RD4 |

Legend:

Y: Placed in check pending status.

: Not placed in check pending status.

For check constraint tables:

Table 2-10 shows the changes in the check pending status when a check constraint table is in an RDAREA that is subject to online reorganization.

Table 2-10 Changes in the check pending status of a check constraint table

pd_check_pending operand value | -p option specification | Type of check constraint table | Status of RDAREA storing check constraint table | Referencing table's check pending status
USE | No | Non-partitioned table | Target of online reorganization | Y
Not the target of online reorganization |
Partitioned table | All table storage RDAREAs are targets of online reorganization | Y
Some table storage RDAREAs are targets of online reorganization | P
None of the table storage RDAREAs is a target of online reorganization |
Yes | Not applicable | Not applicable |
NOUSE | Not applicable | Not applicable | Not applicable |

Legend:

Y: The table information in all RDAREAs that constitute the check constraint table is placed in check pending status.

P: Only the table information in the RDAREAs that constitute the check constraint table and that are subject to online reorganization is placed in check pending status.

: The status does not change.

Example:

Table 2-11 shows the target of check pending status when USE is specified in the pd_check_pending operand, the -p option is omitted in the pdorend command, check constraint tables T1 through T5 have the configuration shown in Figure 2-9, and RDAREAs RD1 and RD2 are subject to online reorganization.

Figure 2-9 Example of configuration of check constraint tables

Table 2-11 Example of changes in the check pending status of check constraint tables

Name of referencing table | RDAREA name | Check pending status setting
T1 | RD1 | Y
T2 | RD1 | Y
RD2 | Y
T3 | RD1 | Y
RD2 | Y
RD3 |
T4 | RD3 |
T5 | RD3 |
RD4 |

Legend:

Y: Placed in check pending status.

: Not placed in check pending status.

-u

Specifies that reflection processing for online reorganization is to be cancelled.

Rules

If you specify the -u option, also specify the -s option. If you omit the -s option, the command cancels reflection processing for online reorganization at all servers.

Note that when the -u option is specified, the command assumes error handling.

If the pdorend command is unable to apply the necessary lock, it waits until the value of the pd_lck_wait_timeout operand in the system definition is reached.

When the processing target includes a shared RDAREA, processing is performed at all back-end servers in the batch mode. Therefore, an error occurs if the command is unable to release all applicable RDAREAs from online reorganization hold status. If online reorganization hold cannot be released for any of the servers, for a reason such as a specific back-end server is inactive, you can specify the -s option to release online reorganization hold.

Criteria

Specify the -u option if an error has occurred on the applicable server. If you specify this option at any other time, reflection processing is disabled and transaction accesses may not be switched to the original RDAREA. If this happens, the system resumes online applications using the replica RDAREA on the secondary volume. To have the online applications access the original RDAREA, you must terminate HiRDB once.

Rules

The pdorend command can be executed only while HiRDB is active.

The pdorend command must be executed at the server machine that contains the single server or where the system manager is located.

To execute the pdorend command, the data dictionary RDAREA must be in the following status:

Open and shutdown release status

Whether or not the pdorend command can be executed depends on the RDAREA status. For details, see C.1 RDAREA status transitions.

Figure 2-10 shows the relationship between the maximum wait time for reflection processing and transaction processing.

Figure 2-10 Relationship between the maximum wait time for reflection processing and transaction processing

Explanation

At the end of reflection processing, the command synchronizes the original and replica RDAREAs. If this synchronization processing results in a timeout, the command retries as many time as specified in the -n option.

The values of the -n, -w, and -o options are monitored for each server.

When the KFPH27040-I message has been displayed, both reflection processing and current RDAREA switchover processing have been completed for the corresponding server.

If the remaining value of the -w option is less than the value of the -t option, the former is replaced with the latter.

When the processing target includes a shared RDAREA, all back-end servers are processed. Therefore, if either of the following is true, an error occurs:

Reflection processing cannot be completed from replica RDAREAs to original RDAREAs at the updatable back-end server that is subject to processing.

The current RDAREAs cannot be changed from replica RDAREAs to original RDAREAs at all back-end servers.

When the pdorend command is executed, deadlock may occur for a referencing or updating transaction. By specifying pd_deadlock_priority_use=Y in the system definition and a deadlock priority value for the operation command in the pd_command_deadlock_priority operand, you can specify whether the referencing or updating transaction or the operation command is to take control in the event of deadlock. To make the pdorend command result in an error, specify a larger deadlock priority value for the operation command. In this case, re-execute the pdorend command after a specific period of time, because the pdorend command results in an error after releasing all the locks that were placed by the command. To give precedence to the pdorend command and make the referencing or updating transaction result in an error, specify a smaller deadlock priority value for the operation command.

Notes

The result of pdorend command can be checked with the pdls -d org command or on the basis of the return code. The return codes are as follows:
0: Normal termination
4: Warning termination¹
8: Abnormal termination
12: Abnormal termination (an event occurred that prevented the command from displaying an error message)²

1 One of the following events occurred:

- The corresponding SQL statement was skipped because processing was successful at some of the servers or an SQL error to be skipped occurred.

- An UPDATE statement with the SET or DELETE clause specified and containing an element number that does not exist in the repetition column was executed and a warning error occurred, but processing continued. For details about the action to be taken in the event of a warning error, see the mvcelmwarn operand of the reflection statement.

- The status of some tables could not be changed to check pending status, but the corresponding processing was ignored and the next processing was executed.

2 Check the error message in syslogfile at the host where the single server or dictionary server is located, eliminate the cause of the error, and then re-execute the command. If no error message has been output to syslogfile, contact the customer engineer.

To synchronize the original and replica RDAREAs, the pdorend command locks the inner replica and replica group configurations for the RDAREAs in online reorganization hold status. If another transaction is accessing an RDAREA in the replica group, the pdorend command waits until that transaction terminates. After reflection processing is completed and the current RDAREA has switched over to the original RDAREA, the inner replica and replica group configurations are unlocked and become accessible again to transactions.

If the pdorend command results in a timeout, increase the values of the -w, -t, and -n options. If the pdorend command still results in timeouts, reduce the number of transactions that access the replica RDAREAs, and then re-execute the command.

In the event of an error during execution of the pdorend -u command, there is no need to re-execute the pdorend command if all RDAREAs at the applicable server have been released from online reorganization hold status. To check the status of RDAREAs at a particular server, use the pddbls command.

If a referenced table is in an RDAREA subject to online reorganization, and an RDAREA containing a referencing table related to that referenced table is not subject to online reorganization, the related referencing table is also placed in check pending status at the extension of the pdorend command. Deadlock may result if another program, such as a UAP, is accessing the referencing table that is to be placed in check pending status. Therefore, if a referenced table is in an RDAREA that is subject to online reorganization, also make the RDAREAs containing the referencing tables related to that referenced table subject to online reorganization. You can use the pdrdrefls -c command to check the RDAREAs that contain the referencing tables related to the referenced table. For details about how to determine whether or not a referenced table has related referencing tables, see the manual HiRDB Version 8 Installation and Design Guide.

If you select utf-8 as the character encoding in the pdsetup command, you can use a file with a BOM as the reflection processing control file for pdorend. Note that even when a file with a BOM is used as the reflection processing control file for pdorend, the BOM is skipped. No BOM is included in the file that is output by pdorend.

pdpfresh (Refresh server process)

Function

The pdpfresh command refreshes the server process. Refreshing means terminating the active process and starting a new process.

This command is applicable to single servers, back-end servers, and dictionary servers.

When executing updatable online reorganization, you can use the pdpfresh command to create the status in which no user server process is accessing a target server's RDAREAs even if the RDAREAs' open attribute is INITIAL or DEFER (status that enables RDAREAs to be disconnected).

Executor

HiRDB administrator

Format

 pdpfresh [-s server-name] [{-f|-c}]

Options

-s server-name<identifier> ((1-8))

Specifies the name of the server to be refreshed.

You can specify a single server for a HiRDB/Single Server or a back-end server or dictionary server for a HiRDB/Parallel Server (you cannot specify a front-end server).

When this option is omitted, the command assumes all servers (except front-end servers).

-f

Specifies that the server is to be refreshed forcibly.

Table 2-12 describes the process termination timing depending on whether or not the -f option is specified and the difference in possible errors.

Table 2-12 Process termination timing depending on whether or not the -f option is specified and difference in possible errors (pdpfresh command)

Process
-f option

Not specified
Specified

Single server, back-end server, or dictionary server process during utility's internal processing
If the pdpfresh command is executed during utility execution, the server process terminates with an error (return code = 6) without being refreshed. This has no effect on the utility's processing.
The server process is forcibly terminated when the transaction ends. In this case, the utility may terminate abnormally.

Processes of the following servers:

Single server locked with UNTIL DISCONNECT

Single server using a holdable cursor or back-end server

Back-end server using local buffer for each AP

The server process is not forcibly terminated. The process is terminated when it no longer satisfies the conditions listed at left or the next time DISCONNECT occurs.
In the case of a single server, a connection error may occur between HiRDB client and HiRDB server. For a back-end server, no error occurs.
Note that server process refreshing is not completed as long as the these processes exist.
The server process is terminated forcibly when the transaction ends. Thereafter, all SQL statements executed on this process will result in a connection error.

Process of the back-end server that is using the BES connection holding facility
If a transaction is being processed, the process is refreshed after the transaction ends. If no transaction is being processed, the process is refreshed after the next transaction ends.
The server process is terminated forcibly when the transaction ends. Thereafter, all SQL statements executed on these processes will result in an SQL connection error.

-c

Specifies that the command is to check whether or not all processes that received the process termination request have terminated. Specify this option when you want to monitor the process refreshing status using a shell.

You can obtain the result from the pdpfresh command's return code (the result is also displayed in the KFPS00730-I message).

To check each process's refreshing status, execute the pdls -d prc -c command.

Rules

The pdpfresh command can be executed only while HiRDB is active.

The pdpfresh command must be executed at the server machine that contains the single server or where the system manager is located.

The pdpfresh command terminates without waiting for server process refreshing to be completed. If an error occurs during refreshing, an error message may be displayed after the pdpfresh command has terminated with return code 0.

If you execute one pdpfresh command and then another before process refreshing is completed, the second pdpfresh command refreshes the process that is active during the re-execution of the command

If the name of a front-end server is specified for a HiRDB/Parallel Server, the command terminates normally without refreshing.

A server process executing a transaction is terminated when the transaction is completed; it is not terminated immediately.

For a HiRDB/Single Server, a connection error may occur between HiRDB client and server during refreshing. To avoid this, add the processing for re-establishing connection to the UAP. If you use the automatic reconnect facility, connection is re-connected automatically; this error is not returned to the UAP. For details about the automatic reconnect facility, see the HiRDB Version 8 UAP Development Guide.

Notes

The result of the pdpfresh command can be checked with the pdls -d prc command or on the basis of the return code from execution of the command. The following table describes the return codes from command execution:

Return code | Execution result | Remarks
0 | -c option specified | Refresh processing has started. | N/A
-c option not specified | There is no process to be refreshed.
1 | -c option specified | N/A | Output only when the -c option is specified.
-c option not specified | A process is being refreshed.
4 | Terminated with warning (error occurred at one ore more servers).* | Output only for a HiRDB/Parallel Server.
6 | Terminated without executing refresh processing because a utility was executing. | Output only when the -f option is not specified.
8 | Abnormal termination | N/A

Legend: N/A: Not applicable

* If there is no response from one or more servers for some reason, the command continues processing for other servers and then terminates itself with return code 4. In such a case, check the status of each server that resulted in an error.

If a server resulting in an error is active, RDAREAs may continue to be accessed by the applicable server process (avoid re-synchronization of paired volumes). If this is the case, re-execute the pdpfresh command specifying the name of that server in the -s option.

The pdpfresh command terminates without waiting for server process refreshing to be completed.

Refreshing is completed if one pdpfresh command with the -c option omitted terminates with return code 0 and then another pdpfresh command with the -c option specified terminates with return code 0.

Termination of the pdpfresh command with the -c option specified with return code 0 means that no process was being refreshed during the command's execution (it does not mean that refresh processing was executed and then was completed). If you execute the pdpfresh command with the -c option specified without executing the pdpfresh command with the -c option omitted, the command terminates with return code 0, but refresh processing does not occur.

When you use the pdpfresh command for server process refreshing, the KFPS01820-E, KFPS04620-I, and KFPS01819-I messages are not displayed.

During refresh processing, the system temporarily sets the number of resident processes to 0. Therefore, do not execute the pdpfresh command on a server while it is being refreshed. If you do, refresh processing may not be completed. If this happens, re-execute the pdpfresh command, wait until refresh processing is completed, and then execute the pdchprc command.

pdplgrgst (Register and delete plug-ins)

Function

Registers plug-ins with HiRDB.
Specifies the plug-in definition and the PIC files for the plug-in to be registered.
Executing the pdplgrgst command registers plug-in-related definition information, as well as abstract data type definitions or index-type definitions, in a dictionary.
Each execution of the pdplgrgst command registers one plug-in.

Deletes a plug-in from HiRDB.
The command deletes the following items:

Definition information about plug-ins that are registered in a data dictionary

Functions, abstract data types, and index data types that are supplied by a plug-in

Upgrades plug-in versions.
Updates the definition information, functions, abstract data type definitions, and index data type definitions of previously registered plug-ins.

Executor

Users with DBA privileges can execute this command.

Format

pdplgrgst [-{d|a} [-u]
         plug-in-definition-filename PIC-filename

Options

-{d|a}

Specify this option when deleting a plug-in or upgrading a plug-in to a new version. The default is to register a plug-in with HiRDB.

-d

This option deletes a plug-in.

-a

This option upgrades a plug-in to a new version.

-u

Specifies that the plug-in's owner is to be set to the executor of the pdplgrgst command (to the authorization identifier specified in PDUSER in the client environment definitions) rather than to MASTER.

When specifying a plug-in owner other than MASTER, note the following:

The pdplgrgst command executor's schema must already be defined.

If the plug-in provides both abstract data and index types, be sure to specify the same owner.

Only a plug-in owner can delete or upgrade his/her plug-in. To delete or upgrade a plug-in, specify the -u option in the pdplgrgst command.

If you change the plug-in owner during upgrading, the functions may become invalid. In such cases, use ALTER ROUTINE to re-create the SQL objects for the functions.

If you delete a plug-in owner's schema, his/her plug-in is also deleted. In this case, do the following:

Delete the pdplugin operand from the system common definitions.

Execute the pdplgset -d command on all server machines to set up the plug-in.

Command arguments

plug-in-definition-filename

Specifies the file name of a plug-in definition file.

Specify a file name in the command input current directory or a file name including its absolute path.

PIC-filename

Specifies the file name of a PIC file.

Specifies a file name in the command input current directory or a file name including its absolute path.

Rules

The pdplgrgst command can be executed only when HiRDB is running.

Execute the pdplgrgst command on an appropriate server machine.

To execute the pdplgrgst command, you must have already set PDHOST, PDNAMEPORT, and PDUSER in the client environment definition. For PDUSER, specify the authorization identifier and password of a user with DBA privileges.

Notes

The results of execution of the pdplgrgst command can be checked by reviewing the return code generated from the command execution process. A command execution return code of 0 indicates normal termination; 8 indicates an abnormal termination.

When executing the pdplgrgst command, be sure to execute it in all the HiRDB utilization environments to complete the plug-in setup process.

To use a plug-in that was registered in the HiRDB system using the pdplgrgst command, code the name of the plug-in used in system common definitions, and then restart the HiRDB system.

When a plug-in is being registered, no other operations can be performed on the schema associated with the plug-in.

If the pdplgrgst command terminates abnormally during plug-in registration, a part of the type definition process may terminate prematurely. If this happens, delete the plug-in by executing the pdplgrgst command with the -d option and re-register the plug-in.

When deleting a plug-in, delete the following items before executing the pdplgrgst command:

Any tables that used this plug-in

Any indexes that used this plug-in

Any functions, procedures, and abstract data types that used the abstract data types, index types, and functions supplied by this plug-in

When deleting a data-type plug-in, if the index-data-type plug-in that supplies the indexing function of the data type is also registered, delete the index-data-type plug-in first. For details, refer to the respective plug-in manuals.

After deleting a plug-in, perform the following processing:

Delete coding of the system common definition pdplugin

Uninstall the plug-in (pdplgset -d) when deleting a file comprising the plug-in

When upgrading a plug-in to a new version, perform the following tasks before using the pdplgrgst command:

Back up the master directory RDAREA, the data dictionary RDAREA, the data directory RDAREA, and the data dictionary LOB RDAREA

Set up the new plug-in

A plug-in cannot be reset to a version older than the plug-in version registered.

When upgrading both a data-type plug-in and an index-type plug-in that supply the indexing function for that data type, upgrade the data-type plug-in first.

If the HiRDB/Single Server structure is changed to a HiRDB/Parallel Server structure by using the database structure modification utility (pdmod), plug-in-supplying functions may become invalidated depending on the specific plug-in registered. If this happens, re-execute the pdplgrgst command by specifying the -a option.

pdplgset (Set up a plug-in)

Function

The pdplgset command sets up a plug-in in the HiRDB environment.

This command copies files stored in the installation directory to the HiRDB environment ($PDDIR/plugin/).

Each execution of the pdplgset command sets up one plug-in.

This command can also uninstall previously set up plug-ins from the HiRDB environment.

Executor

This command can be executed by HiRDB administrators.

Format

pdplgset {plug-in-name installation-directory|-d plug-in-name}

Options

-d plug-in-name

This option uninstalls a previously set up plug-in.

With this option, any files related to the plug-in are deleted from the HiRDB environment, with the exception of the directory conf and what follows in the plug-in operation directory. The installation directory, if specified, will be ignored.

Any libraries associated with the HiRDB Datareplicator (lib-plug-in-name_rpl.sl, lib-plug-in-name_rpl64.sl), if any, are also deleted.

Command arguments

plug-in-name

Specifies the name of the plug-in to be set up.

installation-directory

Specifies the directory containing the plug-in that corresponds to the HiRDB load type (POSIX or non-POSIX library version) installed on the server machine.

If the platform for the plug-in is HP-UX, Solaris, or AIX 5L, the installation directory may be corrected automatically according to the combination of the HiRDB load type and the plug-in type, as shown below:

Structure of plug-in directory | Installation directory specified in pdplgset | HiRDB load type
Value corrected automatically for non-POSIX library version | Value corrected automatically for POSIX library version
./_plugin only | ./_plugin | ./_plugin | Error
./_plugin/posix | ./_plugin | Error
./_plugin/posix only | ./_plugin | Error | ./_plugin/posix
./_plugin/posix | Error | ./_plugin/posix
./_plugin and ./_plugin/posix | ./_plugin | ./_plugin | ./_plugin/posix
./_plugin/posix | ./_plugin | ./_plugin/posix

Rules

The pdplgset command can be executed only when the HiRDB is stopped.

The pdplgset command must be executed at each server machine.

Notes

The results of execution of the pdplgset command can be checked by reviewing the return code generated from the command execution process. A command execution return code of 0 indicates normal termination; 8 indicates an abnormal termination.

The $PDDIR/plugin directory, if it does not exist, is automatically created.

The same plug-in cannot be set up multiple times for one HiRDB environment.

Set up the plug-in to be used by executing the pdplgset command on all the units on which the plug-in is to operate.

If a setup fails before the plug-in specified in the command argument is set up, or a KFPY01204-E message is generated because a setup was executed on a plug-in whose setup failed, uninstall the plug-in and rerun the setup process.

Uninstalling a plug-in causes all the files under the path $PPDIR/plugin/plug-in-name to be deleted. Therefore, back up any needed files before running an uninstallation process.

If the conf directory is already set up under the plug-in operation directory, the execution of the pdplgset command does not update or delete the conf directory files and what follows.

pdprgcopy (Copy a HiRDB update version)

Function

Before the pdprgrenew command is executed, the pdprgcopy command is used to copy HiRDB programs from the HiRDB update version installation directory to the update directory ($PDDIR/renew). For details about upgrading to a HiRDB update version, see the HiRDB Version 8 Installation and Design Guide. The following files are copied to the update directory:

HiRDB update version installation directory (source) | Update directory (target) | Description
installation-directory/bin | $PDDIR/renew/bin | HiRDB operation commands and utilities
installation-directory/lib | $PDDIR/renew/lib | HiRDB libraries, message text files, and system definition analysis files
installation-directory/client | $PDDIR/renew/client | HiRDB client libraries, operation commands, and utilities
installation-directory/include | $PDDIR/renew/include | Header files used during UAP creation

Executor

HiRDB administrator

Format

-  HiRDB-update-version-installation-directory/bin/pdprgcopy-HiRDB-directory-

Command arguments

HiRDB-update-version-installation-directory

<path name> ((Linux version: 1-27; other: 1-128))

Specifies the HiRDB directory of the HiRDB that is to be updated to the HiRDB update version.

Rules

The pdprgcopy command can be executed at any time, whether or not HiRDB is active.

The pdprgcopy command must be executed at the server machine that contains the single server or where the system manager is located.

You cannot execute the pdprgcopy command if the following information does not match between the existing HiRDB and HiRDB update version:

Type of HiRDB (HiRDB/Single Server or HiRDB/Parallel Server)

Version and revision

Addressing mode (32-bit or 64-bit mode)

Notes

The pdprgcopy command creates an update directory ($PDDIR/renew). If this directory already exists, rename it beforehand.

Before executing the pdprgcopy command, make sure that the HiRDB directory has enough space.

Before executing the pdprgcopy command, you must install the HiRDB update version on all units.

The existing HiRDB and the HiRDB update version will have the same character codes type and load type (POSIX or non-POSIX library version).

The result of the pdprgcopy command can be checked on the basis of the return code from execution of the command. A return value of 0 for this command indicates normal termination; 8 indicates abnormal termination. When the return code is 8, see the previous message and eliminate the cause of the error.

pdprgrenew (Update a HiRDB update version)

Function

The pdprgrenew command updates the active HiRDB to the HiRDB update version (HiRDB in the update directory that has been copied by the pdprgcopy command ($PDDIR/renew)). For details about upgrading to a HiRDB update version, see the HiRDB Version 8 Installation and Design Guide.

The command updates the files in the following HiRDB directories on the active HiRDB:

Directory | Description
$PDDIR/renew/bin | HiRDB operation commands and utilities
$PDDIR/renew/lib | HiRDB libraries, message text files, and system definition analysis files
$PDDIR/renew/client | HiRDB client libraries, operation commands, and utilities
$PDDIR/renew/include | Header files used during UAP creation

Executor

HiRDB administrator

Format

-  HiRDB-update-version-installation-directory/bin/pdprgrenew--            [-b] HiRDB-directory-

Options

-b

Specifies that HiRDB is to be restored to the status in effect before the pdprgrenew command was executed, such as when the pdprgrenew command terminates abnormally with KFPS04646-I (return code = 12).

Command arguments

HiRDB-update-version-installation-directory

<path name> ((Linux version: 1-27; other: 1-128))

Specifies the HiRDB directory of the HiRDB that is to be updated to the HiRDB update version.

Rules

The pdprgrenew command can be executed only while HiRDB is active.

The pdprgrenew command must be executed at the server machine that contains the single server or where the system manager is located.

Before executing the pdprgrenew command, you must use the pdprgcopy command to create an update directory ($PDDIR/renew). You cannot execute the pdprgrenew command if you haven't created this directory. Note that the update directory ($PDDIR/renew) is deleted when the pdprgrenew command terminates normally.

Notes

The pdprgrenew command creates a backup directory ($PDDIR/renew_bak). If this directory already exists, rename it beforehand.

When you execute the pdprgrenew command, system log files are swapped. Before executing the pdprgrenew command, make sure that there is enough space for operating with the updated HiRDB. If you execute the pdprgrenew command while there is no swappable system log file, HiRDB displays the KFPS01256-E message and stops (displays abort code Psjnf07 or Psjn381). If HiRDB has stopped, provide a swappable system log file and then execute the pdprgrenew -b command. If there is no swappable system log file, you must add one. For details about how to handle when there is no swappable file, see the HiRDB Version 8 System Operation Guide.

Although system log files are swapped when you execute the pdprgrenew command, no message to that effect is displayed. Therefore, if you need the message log in the message log file, back up the message log file before executing the pdprgrenew command.

If the active HiRDB is in the following status, you may not be able to update your HiRDB:

For a HiRDB/Parallel Server, some of the units or servers have terminated (including units that have not started due to reduced activation).

For a HiRDB/Parallel Server, a communication error has occurred in the network between units.

A transaction or utility remains active 15 minutes after the pdprgrenew command was executed.

The following limitations apply while the pdprgrenew command is executing:

A UAP's response time may be delayed by the pdprgrenew command's execution time.

If you execute another operation command or utility, execution of the pdprgrenew command may fail or an error message indicating that HiRDB has stopped may be displayed.

To update an HiRDB that uses the system switchover facility, you must update both the running system and the standby system.

All files in the HiRDB directory must be in the same HiRDB file system area as the HiRDB directory.

For a client library that is used by a UAP connected to the HiRDB server, use version 07-00 or later. If you are using a library version earlier than 07-00, the current HiRDB client is disconnected.

The result of the pdprgrenew command can be checked on the basis of the return code from execution of the command. A return value of 0 for this command indicates normal termination; 8 indicates abnormal termination (HiRDB status before updating); and 12 indicates abnormal termination (termination of HiRDB).

During execution of the pdprgrenew command, error messages and abort codes relating to HiRDB startup and termination may be displayed. In this happens, there may be a problem in the environment, such as a shortage of resources required for starting the updated HiRDB. Take appropriate action according to the displayed error messages and abort code.

If you are using Real Time SAN Replication based on the log-only synchronous method, and if you used the pdprgrenew command at the transaction execution site to replace HiRDB, also replace HiRDB at the log application site and then execute the preparations for log application. For details about the preparations for log application, see the manual HiRDB Version 8 Disaster Recovery System Configuration and Operation Guide.

pdrbk (Roll back transactions)

Function

The pdrbk command forcibly rolls back transactions when none of the transactions that are part of a global transaction could be concluded (for example, because of a communications error). All the transactions in the global transaction must be rolled back, otherwise they will not be synchronized.

The pdrbk command is used to forcibly roll back transactions that are shown in the status information displayed by the pdls -d trn command as being in READY status (Status 1) and p status (Status 2).

Executor

HiRDB administrator

Format

pdrbk {-x host-name|-u unit-identifier} [-s server-name]
      {-A|-t transaction-identifier}

Options

{-x host-name|-u unit-identifier}

Specifies the identifier of the unit or the name of the host in which the transactions to be rolled back are located.

-x host-name<identifier> ((1-32))

Specifies the name of the host in which the transactions to be rolled back are located.

-u unit-identifier<identifier> ((4 characters))

Specifies the identifier of the unit in which the transactions to be rolled back are located.

-s server-name<identifier> ((1-8))

Specifies the server name when the unit has multiple servers. If this option is omitted, all servers in the object host are subject to the pdrbk command.

-A

Specifies that all transactions in the server specified by the -s option that are in READY status and recovery waiting status are to be rolled back.

-t transaction-identifier<alphanumeric characters> ((16 characters))

Specifies that the transaction identifier of a transaction in READY status and recovery processing waiting status is to be rolled back.

Rules

The pdrbk command can be executed only while HiRDB is active.

The pdrbk command must be executed at each server machine, except that it is not necessary to execute it at a server machine that contains a utility special unit.

Note

The results of the pdrbk command can be checked on the basis of the return code from execution of the pdls command (with -d trn specified) or by checking for any error messages. Return code 0 for the pdrbk command indicates normal termination, and return code 1 indicates abnormal termination (such as an invalid option or rsh error).

Forced rollback may not be possible for a transaction that is connected to a recovery-unnecessary front-end server and executed, even if transaction status 1 is READY and transaction status 2 is p. In such a case, complete the transaction automatically. For details about how to complete a transaction that is in uncompleted status for transaction determination, see the manual HiRDB Version 8 System Operation Guide.

pdrdrefls (Display information about related RDAREAs)

Function

The pdrdrefls command displays information about related RDAREAs.

The pdrdrefls command has the following two functions:

Displaying information about related RDAREAs

Checking the relationships among RDAREAs

Executor

HiRDB administrator

Format

Displaying information about related RDAREAs

 pdrdrefls [-k dsp] -e org

         {-r RDAREA-name[,RDAREA-name]...

           |-t [authorization-identifier.]table-identifier}

         [-s server-name[,server-name]...] [-l [-d delimiter]] [-a][-c constraint-type]

Checking the relations among RDAREAs

 pdrdrefls -k chk -e org -r RDAREA-name[,RDAREA-name]...

         [-s server-name[,server-name]...][-c constraint-type]

Options

-k {dsp|chk}

Specifies the function of the pdrdrefls command that is to be executed.

dsp:

Display information about all RDAREAs that store a specified table or all RDAREAs that are related to a specified resource (table, index, LOB column).

chk:

Check the relationships among RDAREAs. If related RDAREAs are missing, this option displays a message providing information about the missing RDAREAs.

-e org

This option is fixed.

-r original-RDAREA-name[,original-RDAREA-name]...<identifier> ((1-30))

Specifies the names of the RDAREAs to be processed. Specify user RDAREAs or user LOB RDAREAs. If you use updatable online reorganization, specify the name of the original RDAREA.

If an RDAREA name is enclosed in double quotation marks ("), the system treats it as being case sensitive; otherwise, the system treats it as all uppercase letters. If an RDAREA name contains a space, enclose the entire name in double quotation marks ("). If you are using sh (Bourne shell), csh (C shell), or ksh (Korn shell), you must enclose the entire set of RDAREA names in single quotation marks (').

-t [authorization-identifier.]table-identifier}

Specifies the name of a table to be processed.

When the authorization identifier is omitted, the command assumes the authorization identifier of the PDUSER environment variable at the time of command execution. If the PDUSER environment variable has not been set, the command assumes the user name in the logon window.

If an authorization identifier and a table identifier are enclosed in double quotation marks ("), the command treats them as being case sensitive. If they are not enclosed in double quotation marks ("), the command treats them as in all uppercase letters. If you are using sh (Bourne shell), csh (C shell), or ksh (Korn shell), you must enclose this information in single quotation marks (').

-s server-name[,server-name]...<identifier> ((1-8))

Specifies the names of servers to be processed. You can specify a maximum of 128 server names.

When -k dsp is specified, the command displays only information that has been defined in the specified servers.

When -k chk is specified, the command checks to see whether all the RDAREAs specified in the -r option have been defined in the specified servers. If any of the RDAREAs specified in the -r option does not satisfy this condition, the command displays the applicable RDAREA name in a message and then terminates with an error.

You can check the server names to be specified using pddbst's condition analysis in units of RDAREAs (logical analysis) or in units of tables.

-l

Specifies that the output information is to be displayed without linefeeds.

-d delimiter

Specifies a single-byte character as the delimiter for the information that is output when the -l option is specified.

When this option is omitted, the command assumes a space.

To specify a special character as the delimiter, such as a single quotation mark (') or double quotation mark ("), specify \' or \". To specify the escape character as the delimiter, specify \\.

-a

Specifies that all related information (server names, RDAREA names, RDAREA types, and resource information) is to be displayed. When this option is omitted, the command display only the RDAREA names.

-c constraint-type

Specifies that referential RDAREA information associated with referential constraints is to be displayed or checked.

ref

Specifies that the RDAREA information associated with referential constraints is to be displayed or checked. An RDAREA associated with referential constraints is an RDAREA that stores a referencing table or referenced table and that must be handled with the generation number. For details about how to handle referential constraints, see the manual HiRDB Version 8 Installation and Design Guide.

Rules

The pdrdrefls command can be executed only while HiRDB is active.

The pdrdrefls command must be executed at the server machine that contains the single server or where the system manager is located.

Notes

The result of the pdrdrefls command can be checked on the basis of the return code from execution of the command. Return code 0 for the pdrdrefls command indicates normal termination, return code 4 indicates warning termination (there is no resource to be analyzed), and return code 8 indicates abnormal termination.

Do not add to, delete, or change the definition of a table or index for an RDAREA that is to be processed by the pdrdrefls command. If you do so, the command's execution result may be invalid or the command may terminate abnormally.

Output format

Explanation

server-name (maximum of 8 bytes):

Name of a server that contains related RDAREAs.

RDAREA-name (maximum of 32 bytes):

Name of a related RDAREA. The RDAREA name is enclosed in double quotation marks (").

RDAREA-type (maximum of 8 bytes):

Type of RDAREA:

USER: User RDAREA

USER_LOB: User LOB RDAREA

resource-type (3 bytes):

Type of resource:

TBL: Table

IDX: Index

LOB: LOB column

resource-name (maximum of 43 bytes):

Name of the resource that is stored in the corresponding RDAREA. The resource name is enclosed in double quotation marks.

When the resource type is TBL: authorization-identifier.table-identifier

When the resource type is IDX: authorization-identifier.index-identifier

When the resource type is LOB: LOB column name or abstract data type column name of LOB attribute

name-of-related-resource (maximum of 45 bytes):

Name of the resource related to the resource with type IDX or LOB. The related resource name is displayed in the format authorization-identifier.table-identifier and is enclosed in double quotation marks.

name-of-resource-associated-by-constraint (maximum of 47 bytes):

Name of the resource with type TBL that is associated by the constraint definition. This information is displayed only when the -c option is specified. When -c ref is specified, the name of the referenced table is displayed. A constraint-associated resource name is displayed enclosed in double quotation marks (").

Examples

This example displays information about related RDAREAs when updatable online reorganization is used. The example omits the -d option. In the execution result, indicates a single-byte space.

RDAREA configuration

Execution result

When pdrdrefls -e org -r RD01 -a is specified

SERVER NAME : BES1
 RDAREA NAME : "RD01"
 AREA TYPE : USER
   RESOURCE  : TBL : "user1"."TBL1"
                     "user2"."TBL2"
                     "user1"."TBL3"
               IDX : "user1"."IDX1"
                     ("user1"."TBL1")
                     "user1"."IDX3"
                     ("user1"."TBL3")
 RDAREA NAME : "RD02"
   AREA TYPE : USER
   RESOURCE  : TBL : "user2"."TBL2"
                     "user1"."TBL3"
               IDX : "user2"."IDX2"
                     ("user2"."TBL2")
                     "user1"."IDX3"
                     ("user1"."TBL3")
 RDAREA NAME : "RD04"                  -
   AREA TYPE : USER                     |
   RESOURCE  : TBL : "user1"."TBL4"     |-#
                     -><"user1"."TBL1"> |
               IDX : "user1"."IDX4"     |
                    ("user1"."TBL4")   -
 RDAREA NAME : "LOB01"
   AREA TYPE : USER_LOB
   RESOURCE  : LOB : "COL1"
                     ("user1"."TBL1")

# Displayed only when -c ref is specified.

When pdrdrefls -e org -r RD01 is specified

 RDAREA NAME : "RD01"
 RDAREA NAME : "RD02"
 RDAREA NAME : "RD04" #
 RDAREA NAME : "LOB01"

# Displayed only when -c ref is specified.

When pdrdrefls -e org -r RD01 -l -a is specified

BES1"RD01"USERTBL"user1"."TBL1"
BES1"RD01"USERTBL"user2"."TBL2"
BES1"RD01"USERTBL"user1"."TBL3"
BES1"RD01"USERIDX"user1"."IDX1""user1"."TBL1"
BES1"RD01"USERIDX"user1"."IDX3""user1"."TBL3"
BES1zueng020.tif"LOB01"zueng020.tifUSER_LOBzueng020.tifLOBzueng020.tif"COL1"zueng020.tif"user1"."TBL1"
BES1"RD02"USERTBL"user2"."TBL2"
BES1"RD02"USERTBL"user1"."TBL3"
BES1"RD02"USERIDX"user2"."IDX2""user2"."TBL2"
BES1"RD02"USERIDX"user1"."IDX3""user1"."TBL3"
BES1zueng020.tif"RD04"zueng020.tifUSERzueng020.tifTBLzueng020.tif"user1"."TBL4"zueng020.tif
"user1"."TBL1" #
BES1zueng020.tif"RD04"zueng020.tifUSERzueng020.tifIDXzueng020.tif"user1"."IDX4"zueng020.tif
"user1"."TBL4" #

# Displayed only when -c ref is specified.

When pdrdrefls -e org -r RD01 -l is specified

"RD01""RD02""LOB01""RD04" #

# Displayed only when -c ref is specified.

When pdrdrefls -e org -r RD02 -a is specified

SERVER NAME : BES1
 RDAREA NAME : "RD02"
   AREA TYPE : USER
   RESOURCE  : TBL : "user2"."TBL2"
                     "user1"."TBL3"
               IDX : "user2"."IDX2"
                     ("user2"."TBL2")
                     "user1"."IDX3"
                     ("user1"."TBL3")
 RDAREA NAME : "RD01"
   AREA TYPE : USER
   RESOURCE  : TBL : "user1"."TBL1"
                     "user2"."TBL2"
                     "user1"."TBL3"
               IDX : "user1"."IDX1"
                     ("user1"."TBL1")
                     "user1"."IDX3"
                     ("user1"."TBL3")
 RDAREA NAME : "RD04"                  -
   AREA TYPE : USER                     |
   RESOURCE  : TBL : "user1"."TBL4"     |-#
                     -><"user1"."TBL1"> |
               IDX : "user1"."IDX4"     |
                    ("user1"."TBL4")   -
 RDAREA NAME : "LOB01"
   AREA TYPE : USER_LOB
   RESOURCE  : LOB : "COL1"
                     ("user1"."TBL1")

# Displayed only when -c ref is specified.

When pdrdrefls -e org -r RD03 -a is specified

SERVER NAME : BES2
 RDAREA NAME : "RD03"
   AREA TYPE : USER
   RESOURCE  : TBL : "user1"."TBL3
               IDX : "user1"."IDX3"
                     ("user1"."TBL3")

When pdrdrefls -e org -r RD04 -a is specified

SERVER NAME : BES1
 RDAREA NAME : "RD04"
   AREA TYPE : USER
   RESOURCE  : TBL : "user1"."TBL4"
                     -><"user1"."TBL1"> #
               IDX : "user1"."IDX4"
                     ("user1"."TBL4")
 RDAREA NAME : "RD01"                -
   AREA TYPE : USER                   |
   RESOURCE  : TBL : "user1"."TBL1"   |
                     "user2"."TBL2"   |
                     "user1"."TBL3"   |
               IDX : "user1"."IDX1"   |
                     ("user1"."TBL1") |
                     "user1"."IDX3"   |
                     ("user1"."TBL3") |
 RDAREA NAME : "RD02"                 |-#
   AREA TYPE : USER                   |
   RESOURCE  : TBL : "user2"."TBL2"   |
                     "user1"."TBL3"   |
               IDX : "user2"."IDX2"   |
                     ("user2"."TBL2") |
                     "user1"."IDX3"   |
                     ("user1"."TBL3") |
 RDAREA NAME : "LOB01"                |
   AREA TYPE : USER_LOB               |
   RESOURCE  : LOB  : "COL1"          |
               ("user1"."TBL1")      -

# Displayed only when -c ref is specified.

pdrels (Release RDAREAs from shutdown status)

Function

The pdrels command releases specified RDAREAs from shutdown status.

Executor

HiRDB administrator

Format

pdrels -r {RDAREA-name[,RDAREA-name]...|ALL} [-q generation-number] [-o]

Options

-r {RDAREA-name[,RDAREA-name]...|ALL}

-r RDAREA-name<identifier> ((1-30))

Specifies the name of an RDAREA that is to be released from shutdown status. You can also use batch specification of RDAREA names. For details about batch specification of RDAREA names, see 1.5.2 Batch specification of RDAREA names in operation commands.

ALL

Specifies that all RDAREAs are to be released from shutdown status, except the master directory RDAREA. When the -q option is specified, the command processes RDAREAs of the same generation.

Rules

The master directory RDAREA cannot be specified.

The same RDAREA name cannot be specified more than once; if an RDAREA name is duplicated, the duplicate RDAREA name is ignored.

A maximum of 128 RDAREA names can be specified. If more than 128 RDAREA names are specified, the excess names are ignored.

If an RDAREA name is enclosed in double quotation marks ("), the system treats it as being case sensitive; otherwise, the system treats it as all uppercase letters. If an RDAREA name contains a space, enclose the entire name in double quotation marks ("). If the Bourne shell (sh), C shell (csh), or Korn shell (ksh) is used, you must enclose the entire set of RDAREA names in single quotation marks (').

When a user RDAREA or user LOB RDAREA is specified, the corresponding data dictionary RDAREA must be in one of the following statuses:

Open and shutdown release status

Open and shutdown status placed by the pdhold command

If you are using the inner replica facility, you can also specify original and replica RDAREA names. In this case, you can specify only user RDAREAs and user LOB RDAREAs.

-q generation-number <unsigned integer> ((0-10))

Specifies the generation number of a replica RDAREA.

When you specify this option, specify the original RDAREA name in the -r option. An error results if all the replicas of the specified original RDAREA have been deleted, or if a normal RDAREA (that has no replica RDAREA) is specified.

-o

Specifies that the RDAREA is to be opened after being released from shutdown status. When this specification is omitted, the RDAREA is only released from shutdown status.

Rules

The pdrels command can be executed only while HiRDB is active.

The pdrels command must be executed at the server machine containing the single server or the server machine where the system manager is located.

The pdrels command locks each specified RDAREA in the PR mode. If another updating transaction is accessing a specified RDAREA, the pdrels command goes onto wait status until the other transaction terminates.

If an RDAREA is placed in synchronization shutdown status, its data becomes inconsistent because the update buffer is discarded, and inconsistent information is written in the RDAREA. If an RDAREA is placed in synchronization shutdown status, you must write consistent data from the applicable replica RDAREA to this RDAREA in synchronization shutdown status. An RDAREA containing inconsistent information cannot be released from shutdown status.

If the pdrels command is executed on a shared RDAREA, all back-end servers are locked. If there can be multiple concurrent accesses to the corresponding RDAREA, global deadlock may occur, resulting in a timeout. If global deadlock has occurred, re-execute the pdrels command.

Notes

The result of the pdrels command can be checked by the pddbls command.

If the contents of the update buffer take effect on the RDAREA on updatable backup-hold (WAIT mode), the command issues a warning message (KFPH00157-W) when releasing the RDAREA from shutdown status.

The following shows the pdrels command's return code:

0

Normal termination

1

Warning termination

The contents of the update buffer took effect on the RDAREA on updatable backup-hold (WAIT mode). Shutdown release processing terminated normally.

4

Warning termination

At least one of the specified RDAREAs resulted in an error.

8

Abnormal termination

12

Abnormal termination

Check the error message in syslogfile at the host where the single server or dictionary server is located, eliminate the cause of the error, and then re-execute the command. If no error message has been output to syslogfile, contact the customer engineer.

This command cannot release an RDAREA from error shutdown status unless you recover the RDAREA, nor can it release an RDAREA from synchronization shutdown status unless you replace its data. However, you can release an RDAREA from shutdown status if the status was caused by an input or output error during a read or write operation or by a UAP or utility in the no-log mode.

This command cannot release from command shutdown status an RDAREA that contains a falsification prevented table and is in reload-not-completed data status. When you execute table reloading with pdrorg on such a falsification prevented table, the reload-not-completed data status is released. After that, release the RDAREA from shutdown status.

The pdrels command cannot release an RDAREA from online reorganization hold status.

If hybrid is selected as the processing method for Real Time SAN Replication, executing the pdrels command results in a database synchronization wait for the remote site. This may result in an overhead of 2 seconds or more for each RDAREA specified in the -r option. If the database synchronization wait for the remote site fails, you must recover the remote site's database. For details about the error handling when Real Time SAN Replication is used, see the HiRDB Version 8 System Operation Guide.

pdrisechk (Check the configuration of Real Time SAN Replication)

Function

The pdrisechk command checks data integrity of the system definitions required to apply Real Time SAN Replication, and of the pair attributes, pair status, and fence levels of the pair logical volume groups that are provided for HiRDB files.

Before executing this command, make sure that RAID Manager is running.

Executor

HiRDB administrator

Format

 pdrisechk [-d {all|db|sys}] [{-u unit-identifier|-s server-name}] [-l[-n]] [-r]

Options

-d {all|db|sys}

Specifies the types of files to be checked:

all: RDAREAs and system files

db: RDAREAs

sys: System files

-u unit-identifier<identifier> ((4 characters))

Specifies the identifier of a unit that is to be checked. If the -u and -s options are both omitted, the command checks the entire HiRDB.

-s server-name <identifier> ((1-8))

Specifies the name of a server that is to be checked.

-l

Specifies that when the log-only synchronous method is used, the command is to check whether or not the system configuration is correct at the log application site.

-n

Specifies that the status of a status file for log application processing is not to be checked. The -n option can be specified only when the -l option is specified.

-r

Specifies that when the log-only synchronous method is used, the command is to check whether or not the system configuration allows preparation for log application for pair logical volume groups.

Rules

You can execute the pdrisechk command whether or not HiRDB is active.

The pdrisechk command can be executed when all instances of RAID Manager that were specified in the HORCMINST operand of $PDCONFPATH/pdsys are active at the site where the pdrisechk command was executed.

Execute the pdrisechk command at the server machine that contains the single server or where the system manager is located.

The pdrisechk command checks the contents of the system definition file under $PDCONFPATH.
Note that $PDCONFPATH is the value specified in the PDCONFPATH operand in the unit control information definition file (if the operand is omitted, $PDDIR/conf is assumed).

The pdrisechk command queries an instance of RAID Manager that was specified in HORCMINST in the system common definition. If the HORCMINST operand is omitted from the system common definition but the pdrisechk command is executed, the value of the HORCMINST environment variable is used as the instance number of RAID Manager.

Table 2-13 shows the relationship between the file type to be checked and the -d option for the all synchronous, hybrid, and log-only synchronous methods. For the synchronous method, the command checks the configuration for all file types regardless of the -d option value.

Table 2-13 Relationship between the file type to be checked and the -d option

File type | Target pair logical volume group name | -d option value
all or omitted | sys | db
DB | aaaa_bb....bb_DB | Y | N | Y
LOG | aaaa_bb....bb_LOG | Y | Y | N
SPD | aaaa_bb....bb_SPD | Y | Y | N
USTS | aaaa_cccc_USTS | Y | Y | N
SSTS | aaaa_bb....bb_SSTS | Y | Y | N

Legend:

aaaa: HiRDB identifier

bb....bb: Server name

cccc: Unit identifier

Y: Checked

N: Not checked

Table 2-14 shows the relationship between the check items for the pdrisechk command and the processing method for Real Time SAN Replication.

Table 2-14 Relationship between check items for the pdrisechk command and the processing method for Real Time SAN Replication

No.
Check item
Processing method for Real Time SAN Replication

All synchronous method
All asynchronous method
Hybrid method
Log-only synchronous method

1
Whether or not the operands required to use Real Time SAN Replication have been specified
Y
Y

2
Whether or not the optional program products have been set up as required in order to use Real Time SAN Replication
N
Y

3
Whether or not the site is in the following status:

When -l option is specified:

Log application or Preparation

When -l option is omitted:

Transaction execution or Preparation

N
Y¹

4
Whether or not all pair logical volume groups requiring an update copy are available
Y
Y

5
Whether or not the pair logical volume group in 4 above has the volume attribute shown in Table 2-15 List of volume attributes checked by the pdrisechk command (when the -l option is specified) and in Table 2-16 List of volume attributes checked by the pdrisechk command (when the -l option is omitted) at the site where the pdrisechk command was executed
Y
Y

6
Whether or not the pair logical volume group in 4 above has the pair status shown in Table 2-17 List of pair statuses checked by the pdrisechk command at the site where the pdrisechk command was executed
Y
Y

7
Whether or not the pair logical volume group in 4 above has the fence level shown in Table 2-18 List of fence levels checked by the pdrisechk command.
Y
Y

8
Whether or not all status files for log application processing are in initial status
N
Y²

Legend:

Y: Checked

N: Not checked

¹

When the system switchover facility is employed in HiRDB and the pdrisechk command is executed in the secondary system, the site status is not checked because it cannot be identified. The KFPS04692-W message is displayed and processing resumes.

²

The pair logical volume group to be checked is determined by the specification of the -d, -u, and -s options.

Table 2-15 List of volume attributes checked by the pdrisechk command (when the -l option is specified)

Pair logical volume group name | Real Time SAN Replication processing method
All synchronous or hybrid method | All asynchronous method | Log-only synchronous method
-r option specified | -r option omitted
aaaa_bb....bb_DB | S-VOL |  | S-VOL | SMPL
aaaa_bb....bb_LOG | S-VOL
aaaa_bb....bb_SPD
aaaa_cccc_USTS
aaaa_bb....bb_SSTS
aaaa_ALL |  | S-VOL |  |

Legend:

aaaa: HiRDB identifier

bb....bb: Server name

cccc: Unit identifier

: Not applicable

Table 2-16 List of volume attributes checked by the pdrisechk command (when the -l option is omitted)

Pair logical volume group name | Real Time SAN Replication processing method
All synchronous or hybrid method | All asynchronous method | Log-only synchronous method
-r option specified | -r option omitted
aaaa_bb....bb_DB | P-VOL |  | P-VOL | SMPL
aaaa_bb....bb_LOG | P-VOL
aaaa_bb....bb_SPD
aaaa_cccc_USTS
aaaa_bb....bb_SSTS
aaaa_ALL |  | P-VOL |  |

Legend:

aaaa: HiRDB identifier

bb....bb: Server name

cccc: Unit identifier

: Not applicable

Table 2-17 List of pair statuses checked by the pdrisechk command

Pair logical volume group name | Real Time SAN Replication processing method
All synchronous or hybrid method | All asynchronous method | Log-only synchronous method
-r option specified | -r option omitted
aaaa_bb....bb_DB | PAIR |  | PAIR |
aaaa_bb....bb_LOG | PAIR
aaaa_bb....bb_SPD
aaaa_cccc_USTS
aaaa_bb....bb_SSTS
aaaa_ALL |  | PAIR |  |

Legend:

aaaa: HiRDB identifier

bb....bb: Server name

cccc: Unit identifier

: Not applicable

Table 2-18 List of fence levels checked by the pdrisechk command

Pair logical volume group name | Real Time SAN Replication processing method#
All synchronous method | Hybrid method | Log-only synchronous method
Protection mode = | Protection mode = | Protection mode =
data | never | data | never | data | never
-r option specified | -r option omitted | -r option specified | -r option omitted
aaaa_bb....bb_DB | data | never | async | async | data |  | never |
aaaa_bb....bb_LOG | data | data | data | never
aaaa_bb....bb_SPD
aaaa_cccc_USTS
aaaa_bb....bb_SSTS

Legend:

aaaa: HiRDB identifier

bb....bb: Server name

cccc: Unit identifier

: Not applicable

#

In the all asynchronous method, async is set for aaaa_ALL.

The command checks whether or not the status file for log application processing is in initial status. Whether or not this checking takes place depends on the processing method of Real Time SAN Replication and whether or not the option is specified. Table 2-19 shows the conditions for checking the initial status of a status file for log application processing.

Table 2-19 Conditions for checking the initial status of the status file for log application processing

Real Time SAN Replication processing method | Option specification | Checking of status file for log application processing
-d | -l | -r or -n | -s | Status file for log application processing for unit | Status file for log application processing for server
Log-only synchronous method | ALL, SYS, or omitted | Specified | Specified |  | Y | Y
Omitted | Omitted | N | N
Specified | Y | N
Omitted |  |  | Y | Y
DB |  |  |
Other |  |  |  |

Legend:

N: Not checked

Y: Checked

: Not applicable

Notes

Return code 0 for the pdrisechk command indicates normal termination, and return code 8 indicates abnormal termination. When the return code is 8, see the previous message and eliminate the cause of the error.

The result of the pdrisechk command is displayed in the KFPS05815-I message.

Take the appropriate action indicated by the displayed error message and then re-execute the pdrisechk command until OK is displayed in the KFPS05815-I message as the command termination code (end code).

Depending on the detected error, the command cancels checking at the point where the error is detected. A new error message may be displayed even after you have taken the appropriate action indicated in the displayed error message and then re-executed the command.

For a HiRDB that uses a system switchover facility, the pdrisechk command always checks the configuration of Real Time SAN Replication based on the primary system's system definitions. Therefore, the result cannot be guaranteed if the pdrisechk command is executed while the running unit or server is not the primary system. During HiRDB operation, make sure that you execute the pdrisechk command while all running units and servers are the primary system.

If the configuration to be checked contains a floating server, the command may display the KFPS01896-E and KFPS04680-E messages. You may ignore these messages. If you have checked only the pair logical volume group correspondence to the floating server, specify sys in the -d option.

An error results if the -r option is specified when the log-only synchronous method is not used, or when the log-only synchronous method is used but the status is not log application. For details about the preparations for log application, see the manual HiRDB Version 8 Disaster Recovery System Configuration and Operation Guide.

pdrisedbto (Inherit a database in Real Time SAN Replication)

Function

When Real Time SAN Replication based on the log-only synchronous method is used, the pdrisedbto command terminates the log application site and inherits the database from the transaction execution site.

This command can be executed in an environment in which Real Time SAN Replication based on the log-only synchronous method is being used. For details about Real Time SAN Replication, see the manual HiRDB Version 8 Disaster Recovery System Configuration and Operation Guide.

Executor

HiRDB administrator

Format

 pdrisedbto [-f]

Options

-f

Specifies that the database is to be inherited by the remaining units if some units are not running.

When this option is omitted, the database is inherited when all units are running, but is not inherited if any units are not running.

Rules

Execute the pdrisedbto command at the server machine that contains the single server, or where the system manager is located at the log application site.

The pdrisedbto command does not terminate until database inheritance is finished. To check the database inheritance status, use the pdls -d ris command.

When the pdrisedbto command terminates, HiRDB terminates.

Notes

If some units other than the system manager terminate abnormally for any reason (such as machine down) during database inheritance processing, and if the pdrisedbto command is executed after a restart by the pdstart -l command, the database inheritance can be continued at the units that terminated abnormally.

When database inheritance processing is executed by this command with the -f option specified while some units are not running, the database is not inherited at the inactive units.
If HiRDB is restarted as a transaction execution site in this status, you must re-create the RDAREAs in the units where the database has not been inherited. To inherit the database at the units that were inactive, restart HiRDB as a log application site.

While the database is being inherited, the pdstop -l command cannot terminate the log application site.

After database inheritance by the pdrisedbto command is completed, HiRDB determines its start mode according to the termination mode of the HiRDB that was running as the transaction execution site prior to execution of the pdrisedbto command.

When the pdrisedbto command is executed, the unit may terminate abnormally with abort code Polkcrt. If this occurs, take appropriate action according to the operating procedure for each site takeover method. For details about which action to take, see the manual HiRDB Version 8 Disaster Recovery System Configuration and Operation Guide.

Output result

As database inheritance processing terminates normally in each unit, the KFPS04686-I message is displayed for each unit. The command's execution result is displayed in the KFPS04691-I message.

pdriseset (Set the site status in Real Time SAN Replication)

Function

When Real Time SAN Replication based on the log-only synchronous method is used, the pdriseset command sets, releases, or displays the status of the site where the command is executed.

This command can be executed in an environment in which Real Time SAN Replication based on the log-only synchronous method is used. For details, see the manual HiRDB Version 8 Disaster Recovery System Configuration and Operation Guide.

Executor

HiRDB administrator

Format

 pdriseset [{-P|-S|-D}] [-f]

Options

-P

Specifies that the site status is to be set to Transaction execution.

-S

Specifies that the site status is to be set to Log application.

-D

Specifies that the site status is to be set to Initial.

-f

Specifies that the site status is to be changed without issuing a query message to the HiRDB administrator.

Rules

The pdriseset command with options specified can be executed only while HiRDB is not running. The command with no options specified can be executed whether or not HiRDB is running.

Execute the pdriseset command at the server machine that contains the single server or where the system manager is located.

When the command is executed with no options specified, the site status is displayed in the KFPS04687-I message.

The pdriseset command with the -f option specified changes the site status according to the specified -P, -S, or -D option without displaying the KFPS04690-Q message for confirmation of status change.

Notes

Because the HiRDB environments for normal applications and for disaster handling run independently, if the transaction execution site or log application site is set wrong by mistake, Real Time SAN Replication will not run correctly. If HiRDB is started with the wrong settings, the environment settings may be corrupted and re-configuration may be required.

If the standard host name (the standard host name of the current host in an environment in which a system switchover facility is employed) is not specified in the pd_hostname operand in the unit control information definition, the pdriseset command may not function correctly.

When a system switchover facility is used, neither the -P nor the -S option can be specified for the secondary host. If these options are specified, the KFPS05813-E message is displayed.

pdrpause (Restart a process service)

Function

The pdrpause command restarts a process service that has been suspended due to the cancellation of a system start or restart processing. The message KFPS00715-E was issued at the cancellation.

Executor

HiRDB administrator

Format

pdrpause

Option

None

Rules

Before executing the pdrpause command, make sure that HiRDB is terminated and the error indicated by the KFPS00715-E message has been corrected.

Execute the pdrpause command at each server (on the unit that is indicated in the additional information for the KFPS00715-E message).

The pdrpause command reuses the previous OS resources.

If you specify AUTO in the pd_mode_conf operand of the system definitions and execute the pdrpause command, HiRDB automatically starts.

Notes

Return code 0 for the pdrpause command indicates normal termination, and return code 8 indicates abnormal termination (such as an invalid option or rsh error).

pdrplstart (Start HiRDB Datareplicator linkage)

Function

The pdrplstart command starts HiRDB Datareplicator linkage.

Executor

HiRDB administrator

Format

pdrplstart

Option

None

Rules

The pdrplstart command can be executed only while all servers and all units in the HiRDB system are active. For example, this command cannot be executed for a HiRDB/Parallel Server if some units or servers are inactive or are performing processing in order to become inactive. However, you can execute the pdrplstart command if the only inactive units are ones that are not started due to reduced activation.

The pdrplstart command must be executed at the server machine containing the single server or the server machine where the system manager is located.

To execute the pdrplstart command, the HiRDB directory name should be set in the PDDIR environment variable. If the directory name is not set, no error message will be output if a command error occurs.

An error results if the pdrplstart command is entered again while HiRDB Datareplicator linkage is executing.

Once you execute the pdrplstart command, do not execute the pdrplstart, pdrplstop, or pdstop command (except when the -f or -z option is specified) while command processing is underway.

If you execute the pdrplstart command while database updating is underway, the update data may not be applied at the intended time. Execute the pdrplstart command after all transactions have terminated. Do not execute any new transactions until the current pdrplstart command has terminated.

Notes

The results of the pdrplstart command can be checked on the basis of the return code and by whether or not there are any error messages.
A return code of 0 for this command indicates normal termination; a return value of 8 indicates abnormal termination.

If a communication error occurs while the pdrplstart command is executing, some units may be left in a status with HiRDB Datareplicator linkage started, and the command may terminate abnormally with a return value of 8. In such a case, execute the pdrplstop -f command to stop HiRDB Datareplicator linkage at all units, and then re-execute the pdrplstart command.

Agreement between the extraction-side and target-side databases must be maintained when the pdrplstart command is executed. If HiRDB Datareplicator linkage is started with the databases not in agreement, the contents of the target database cannot be guaranteed.

Once the pdrplstart command is entered, pdrplstart and pdrplstop commands must not be entered until the entered pdrplstart command's processing has been completed.

If you execute the pdrplstart command while HiRDB Datareplicator cannot be linked, the unit that cannot start data linkage may terminate abnormally with abort code Psjiz09. Therefore, do not execute the pdrplstart command when linkage to HiRDB Datareplicator cannot be established.

pdrplstop (Stop HiRDB Datareplicator linkage)

Function

The pdrplstop command stops HiRDB Datareplicator linkage.

Executor

HiRDB administrator

Format

pdrplstop [-f]

Option

-f

Specifies that HiRDB Datareplicator linkage is to be stopped forcibly regardless of the system log extraction status. When this option is specified, the command stops HiRDB Datareplicator linkage even if there are inactive units.

Rules

The pdrplstop command can be executed only while HiRDB is active.

The pdrplstop command must be executed at the server machine that contains the single server or where the system manager is located.

To execute the pdrplstop command, the HiRDB directory name should be set in the PDDIR environment variable. If the directory name is not set, no error message is output if a command error occurs.

The pdrplstop command with no option specified terminates HiRDB Datareplicator linkage once extraction by HiRDB Datareplicator of system log information has been completed. This command results in an error if there is an inactive unit. However, if all such inactive units are one that were not started due to reduced activation, the command terminates HiRDB Datareplicator linkage on the active units. For the units that have not been started due to reduced activation, the command terminates their HiRDB Datareplicator linkage the next time the units are started and extraction of system log information is completed.

If data is to be extracted from a HiRDB/Parallel Server, you can execute the pdrplstop -f command, even when other units are inactive, as long as the unit containing the system manager is active. For a unit that is inactive during execution of the pdrplstop -f command, the HiRDB Datareplicator linkage is cancelled the next time the unit is started.

An error results if the pdrplstop command is entered while HiRDB Datareplicator linkage is not executing.

Notes

The result of the pdrplstop command can be checked on the basis of the return code from execution of the command or by checking for error messages. The following table describes the return codes from execution of the command:

Return code
Termination status
Description

0
Normal termination

When the -f option is omitted:
HiRDB Datareplicator linkage was stopped.

When the -f option is specified:
Termination of HiRDB Datareplicator linkage was instructed.

4
Abnormal termination
The command was unable to stop HiRDB Datareplicator linkage for one of the following reasons:

Some units were inactive (except ones that had not been started due to reduced activation)

Some log information was not extracted by HiRDB Datareplicator.

8
Abnormal termination
The command was unable to stop HiRDB Datareplicator linkage due to an error, or the pdrplstop command was executed illegally.

The pdrplstop command does not check the HiRDB server subject to HiRDB Datareplicator linkage for active transactions. Therefore, before executing the pdrplstop command, make sure that there are no active transactions.

If the source database to be extracted is updated during or after execution of the pdrplstop command, inconsistency occurs in the data between the source and target databases. The same also applies if the pdrplstop -f command is executed while there are active transactions or some log information has not been extracted for the source database.
If inconsistency occurs in the data between the source and target databases, execute the pdrplstop command to terminate HiRDB Datareplicator linkage. Use the pdls -d rpl command to make sure that HiRDB Datareplicator linkage has stopped on all units, and then re-create the target database before restarting HiRDB Datareplicator linkage. For details about re-creating the target database, see the manual HiRDB Datareplicator Version 8 Description, User's Guide and Operator's Guide.

Once you have entered the pdrplstop command, do not enter the pdrplstart, pdrplstop, or pdstop command until the pdrplstop command processing terminates.

With a HiRDB/Parallel Server that consists of multiple units, normal termination of the pdrplstop -f command does not mean that HiRDB Datareplicator linkage has ended on all units. Once the pdrplstop command has terminated normally, use the pdls command (-d rpl) to make sure that HiRDB Datareplicator linkage has ended on all units.

Once you have started HiRDB Datareplicator linkage, make sure that you use the pdrplstop command to stop it even if the reason for stopping the linkage is a missing database due to an error in the HiRDB system definitions.

If you are executing the pdrplstop command in order to restart HiRDB Datareplicator linkage, do not update the target database while HiRDB Datareplicator linkage is stopped. If you do, conformity will be lost between the databases. However, reorganization of a database that does not accompany logical updating of data does not cause inconsistency of data between databases even if it is executed while HiRDB Datareplicator linkage is stopped.

The table below describes the conditions and whether or not the pdrplstop command can be executed. If inconsistency occurs between the databases, you must re-create the target database.

Condition during execution of the pdrplstop command | Whether or not executable
-f not specified | -f specified
Unit containing the single server or system manager is inactive | N | N
Active | There is unextracted log data after command execution | YI | YI
There is no unextracted log data | There is unextracted log data at an active back-end server | N | YI
There is no unextracted log data | There is no inactive back-end server | Y | Y
There are inactive back-end servers | Unit contains an inactive back-end server that was not been started because of reduced activation | There is unextracted log data for the inactive back-end server | Y¹ | YI²
There is no unextracted log data | Y³ | Y³
Other | There is unextracted log data for the inactive back-end server | N | YI²
There is no unextracted log data | N | Y³

Legend:

Y: Can be executed without causing inconsistency.

YI: Can be executed, but inconsistency occurs.

N: Cannot be executed (inconsistency does not occur).

1 For a unit that has not been started because of reduced activation, the command ends HiRDB Datareplicator linkage the next time the unit is started and system log data has been extracted.

2 For a unit that has not been started because of reduced activation, the command ends HiRDB Datareplicator linkage the next time the unit is started without waiting for extraction of remaining system log data.

³ For a unit that has not been started because of reduced activation, the command ends HiRDB Datareplicator linkage the next time the unit is started.

pdsetup (Register or delete HiRDB system in OS)

Function

The pdsetup command registers a HiRDB system under the HiRDB directory into the OS so that part of the HiRDB system is started or terminated when the OS is started or terminated. This command can also copy the load module of an installed HiRDB into a specified HiRDB directory.

Executor

Superuser

Format

HiRDB/Single Server

HP-UX (32-bit mode)

/opt/HiRDB_S/bin/pdsetup
  [{-d [-f]|[-c character-code-classification] [-p program-name]
    [-l load-type](-k {on|off})}]
  HiRDB-directory

HP-UX (64-bit mode), Solaris (64-bit mode), AIX 5L (64-bit mode), and Linux

/opt/HiRDB_S/bin/pdsetup
  [{-d [-f]|-c character-code-classification(-k {on|off})}]
  HiRDB-directory

Solaris (32-bit mode) and AIX 5L (32-bit mode)

/opt/HiRDB_S/bin/pdsetup
  [{-d [-f]|[-c character-code-classification] [-l load-type](-k {on|off})}]
  HiRDB-directory

HiRDB/Parallel Server

HP-UX (32-bit mode)

/opt/HiRDB_P/bin/pdsetup
  [{-d [-f]|[-c character-code-classification] [-p program-name][-l load-type](-k {on|off})}]
  HiRDB-directory

HP-UX (64-bit mode), Solaris (64-bit mode), AIX 5L (64-bit mode), and Linux

/opt/HiRDB_P/bin/pdsetup
  [{-d [-f]|-c character-code-classification(-k {on|off})}]
  HiRDB-directory

Solaris (32-bit mode) and AIX 5L (32-bit mode)

/opt/HiRDB_P/bin/pdsetup
  [{-d [-f]|[-c character-code-classification] [-l load-type](-k {on|off})}]
  HiRDB-directory

Options

-d

Specifies that the HiRDB system under the HiRDB directory is to be deleted from the OS. When this option is omitted, the HiRDB system is registered into the OS.

If you specify the -d option, the following message is displayed, asking whether or not to delete the files required for HiRDB execution:

KFPS00036-Q Specify whether to delete files necessary for execution from specified HiRDB home directory ?

[y:Yes , n:No]

If you enter y, the command deletes the files and directories required for HiRDB execution. In this case, the files required for HiRDB execution will be copied from the installation directory the next time the pdsetup command is executed.

If you enter n, the command does not delete the files or directories.

Enter y in the following cases:

The current HiRDB is to be replaced with the installed HiRDB (to upgrade the HiRDB, you need to terminate the HiRDB normally with the pdstop command).

The HiRDB administrator's ID is to be changed.

The files in the HiRDB directory, the directory owner, or file mode was changed or deleted by mistake.

Rules

When the -d option is specified, deletion of the HiRDB directory from the OS may fail if that directory is in use. If this happens, use the rm command to delete the applicable files and directories from the OS.

If you specify -d option and enter y as a response and if there are many HiRDB-created files in the HiRDB directory, command execution may take some time. In this case, use the rm OS command or the pdcspool -d 0 command to delete any unneeded files beforehand.

If you are deleting the HiRDB directory, be sure to terminate any UAP that is using Java Virtual Machine (JVM). Otherwise, the HiRDB directory may not be deleted completely. In this case, use the rm OS command to delete the HiRDB directory.

-f

Specifies registration and deletion of HiRDB from the operating system. The -f option can be specified only in combination with the d option. Even when HiRDB is running or is being abnormally terminated, this option can force the registration and deletion of the HiRDB from the operating system. If this option is omitted, any HiRDB processing is immediately suspended. The load modules stored in the HiRDB directory are not deleted. This option should be specified only when the pdstop -f command cannot be accepted. Normally, the pdsetup -d command should be executed after stopping the HiRDB system using the pdstop command. If the -f option is specified, some of the HiRDB processes may remain unstopped. If this happens, use the ps command of the operating system to locate those processes and use the kill command to delete them. Without this action, the HiRDB system may fail to start when the pdsetup command is executed the next time.

-c character-codes-type

<Other than Solaris or Linux: sjis> or <Solaris or Linux: ujis>

Specifies the type of character codes used by the HiRDB system:

sjis

Shift JIS Kanji codes

chinese

EUC Chinese Kanji codes

ujis

EUC Japanese Kanji codes

utf-8#

Unicode(UTF-8)

lang-c

One-byte character codes

#

According to the ISO/IEC 10646 standard, a range of from 1 to 4 bytes is assigned per character and bytes 5 and 6 are reserved for a future standard. Although HiRDB supports a range of 1 to 6 bytes per character, problems may be introduced in the future if you use the range of bytes from 5 to 6 in which no characters have been assigned.

Rules

If this option is specified when the HiRDB directory and installation directory are different, and if the HiRDB directory already contains lib, the -c option is ignored and the previous character codes setting is inherited.

To change the character codes setting, execute pdsetup -d to delete the HiRDB directory once from the OS, and then re-execute pdsetup -c. Note that the -c and -d options are mutually exclusive. If both of them are specified, the -c option is ignored.

For a HiRDB/Parallel Server, specify the same character codes type for all servers.

To use the HiRDB External Data Access facility, specify SJIS, UJIS, or lang-c.

utf-8 cannot be specifies when the version of HiRDB Text Search Plug-in Version 2 is 02-02 or earlier.

-p program-name

Specifies the name of the program to which HiRDB can link.

OmniBack

Specify this option to use JP1/OmniBack II for backup and recovery purposes.

Rules

If you entered n with the previous pdsetup -d command, this option is ignored, if specified.

If you specify this option, you must execute the pdsetup command specifying this option on all hosts that constitute the HiRDB.

If the HiRDB directory is the installation directory, the -p option always takes effect. If these directories are different and the HiRDB directory has lib, the -p option is ignored, in which case the previous option takes effect. To change the -p option, delete the HiRDB directory once with the pdsetup -d command, then re-execute the pdsetup command.

The -p and -d options are mutually exclusive. If both are specified together, the -p option is ignored.

-l load-type

Specifies the type of load module.

If you entered n with the previous pdsetup -d command, this option is ignored, if specified, in which case the previous option takes effect.

posix

Specifies that the POSIX library version of the load module is to be used. The POSIX library version of the load module is required in order to use Java stored procedures, Java stored functions, the Directory Server linkage facility, and the HiRDB External Data Access facility.

Rules

If the HiRDB directory is the installation directory, the -l option always takes effect. If these directories are different and the HiRDB directory has the /lib directory, the -l option is ignored, in which case the previous option takes effect. To use a POSIX library version of the load module, delete the HiRDB directory once with the pdsetup -d command, then re-execute the pdsetup command. Note that the -l and -d options are mutually exclusive. If both are specified, the -l option is ignored.

-k {on|off}

Specifies the HiRDB termination method when the OS shuts down. Note that this option is not supported by the AIX 5L version of HiRDB.

on:

Terminates HiRDB explicitly and forcibly when the OS shuts down.

off:

Terminates HiRDB normally when the OS shuts down or when HiRDB termination is to depend on forced termination of the OS.

When on is specified, this command terminates HiRDB forcibly regardless of its operating status when the OS shuts down; therefore, if HiRDB is not running, an error message may be displayed.

For details about the HiRDB termination method during OS shutdown, see the manual HiRDB Version 8 System Operation Guide.

Command arguments

HiRDB-directory<path name>

Specifies the HiRDB directory used to install the HiRDB system. In the case of a multi-HiRDB system, this command must be executed for each HiRDB system with the appropriate HiRDB directory specified.

Do not specify a symbolically linked HiRDB directory.

Rules

The pdsetup command can be executed only while HiRDB is shut down. Note that if you specify only the -k option, you can execute the pdrisechk command whether or not HiRDB is active.

The pdsetup command must be executed at each server machine.

Notes

The following are the pdsetup command's return codes:
0: Normal termination
1: Privilege error, file creation error, locking error, etc.

The result of the pdsetup command can be determined by the existence of the HiRDB directory under /etc/inittab.

While the pdsetup command is executing, do not edit /etc/inittab with an editor. Furthermore, do not execute the pdsetup command or OpenTP1's dcsetup command for more than one HiRDB at any one time on the same machine.
If you do, the contents of /etc/inittab may be damaged. If the contents of /etc/inittab are damaged, a backup file named inittabX (X: 1, 2, or 3) is saved under $PDDIR/conf/inittab. In this case, recover /etc/inittab with the following procedure:
1. Log in as the superuser.
2. Copy the files to be recovered from $PDDIR/conf/Inittab to /etc/inittab.
3. Execute /etc/init q.

In the case of HiRDB version 07-03 or later, the jre directory is not created under the HiRDB directory when the pdsetup command is executed because the Java execution environment (JRE) is not included. If you use Java stored routines, you must acquire JRE.

pdstart (Start HiRDB system, unit, or server)

Function

The pdstart command starts a HiRDB system, unit, or server. This command is also used to initiate a restart.

Executor

HiRDB administrator

Format

HiRDB/Single Server

pdstart [{-i|-r|-l|dbdestroy}]

HiRDB/Parallel Server

Starting the HiRDB system

pdstart [{-i|-r|-l|dbdestroy}]

Starting a unit

pdstart {-x host-name|-u unit-identifier}[{-r|-l|dbdestroy}]

Starting a server

pdstart -s server-name

Starting the system by resetting the front-end server from its SUSPENDed status

pdstart -a [-s front-end-server-name]

Starting a unit from a unit

pdstart -q [{-r|-l}]

Starting the alternate system when using the standby-less system switchover (1:1) facility (placing the alternate system in standby status)

pdstart -q -c

Starting a server on the specified target unit when using the standby-less system switchover (effects distributed) facility

pdstart [{-x host-name|-u unit-identifier}] -s server-name

Options

{-i|-r|-l|dbdestroy}

Specifies the startup mode for the HiRDB system. When this option is omitted, the HiRDB system performs normal startup if the previous termination was normal termination or performs a restart if the previous termination was forced or abnormal termination. In the case of a restart, database recovery processing is performed.

-i

If databases have been initialized by the database initialization utility (pdinit), specifies that the databases are to be reinitialized.

-r

Specifies that the master directory RDAREA is to be backed up by the database copy utility (-M x specified). Also specifies that if HiRDB will not start due to an error in the master directory RDAREA, the database recovery utility (pdrstr) is to be executed.

-l:

When Real Time SAN Replication based on the log-only synchronous method is used, specifies that HiRDB is to be started at the log application site.

At the log application site, the system log information sent from the transaction execution site is input to keep the database up-to-date at the log application site. Therefore, the database cannot be accessed from the log application site.

Rules

When Real Time SAN Replication based on the log-only synchronous method is used, the command with the -l option specified can be executed from the log application site. If it is executed from the transaction execution site, an error results.

When log application processing is executed with the -l option specified, the system switchover facility cannot be used. Even if HiRDB terminates abnormally due to a failure during log application processing, system switchover does not take place.
Also note that the pdstart command with the -l option specified cannot be executed at the secondary system. If it is executed, the KFPS05813-E message is displayed.

When log application processing is executed with the -l option specified, neither reduced activation nor a recovery-unnecessary front-end server can be used. This is because the HiRDB at the log application site cannot be started when there are units that have not started.

In the case of a HiRDB/Parallel Server with multiple units to which Real Time SAN Replication based on the log-only synchronous method is applied, the files for storing the site status are placed only in the unit containing the system manager. In other units, the site status is determined by instructions from the system manager unit.
Therefore, in the case of a HiRDB/Parallel Server to which Real Time SAN Replication based on the log-only synchronous method is applied, when you independently start a non-system manager unit as a transaction execution site, do not specify the -l option.
On the other hand, to start the unit independently as a log application site, make sure that you specify the -l option.
The following shows combinations of site status and pdstart command options when a non-system manager unit is started independently:

Site status | Unit to be started | pdstart command's option | Combination of options
-u or -x | -q | -l
Transaction execution | System manager | Y | N | N | Combinable
Y | N | Y | Not combinable
Other than system manager | N | Y | N | Combinable
N | Y | Y | Not combinable
Log application | System manager | Y | N | N | Not combinable
Y | N | Y | Combinable
Other than system manager | N | Y | N | Not combinable
N | Y | Y | Combinable

Legend:
Y: Specified
N: Omitted

dbdestroy

Specifies that HiRDB is to be restarted by forced restart because it would not restart. When HiRDB is restarted with this option specified, all RDAREAs (including system RDAREAs) are destroyed.

{-x host-name|-u unit-identifier} [-r|-l|dbdestroy]

Specifies that a unit is to be started.

-x host-name<identifier> ((1-32))

When a unit is to be started, specifies the name of the host containing the unit. This option cannot be specified together with the -i option.

When the standby-less system switchover (effects distributed) facility is used, the command starts the host and guest BESs on the specified host's unit. The command starts the server specified as the running system by the cluster software as the running system and places the server specified as the standby system in acceptable status. The server started as the running system is in acceptable status when viewed from another unit in the HA group.

-u unit-identifier<identifier> ((4 characters))

Specifies the identifier of the unit to be started. This option cannot be specified simultaneously with the -i option.

When the standby-less system switchover (effects distributed) facility is used, the command starts the host and guest BESs on the specified unit.

The command starts the server specified as the running system by the cluster software as the running system and places the server specified as the standby system in acceptable status. The server started as the running system is in acceptable status when viewed from another unit in the HA group.

For details about -r, -l, and dbdestroy, see the description of {-i|-r|-l|dbdestroy}.

-s server-name<identifier> (1-8))

When a server is to be started, specifies the name of the server.

Notes when the standby-less system switchover (effects distributed) facility is used:

When the -u option is omitted, the command starts the specified servers on all active units in the HA group. Note that only the one server that was specified as the running system by the cluster software is started as the running system and that all other servers are started as being in acceptable status.

When the -u option is specified, the command starts the specified servers on that unit. In this case, the command starts the server specified as the running system by the cluster software as the running system and the server specified as the standby system as being in acceptable status. When viewed from other units in the HA group, the server started as the running system is in acceptable status.

For details about the standby-less system switchover (effects distributed) facility, see the HiRDB Version 8 System Operation Guide.

-a [-s front-end-server-name]

Restarts a front-end server after resolving the cause of its SUSPEND status (waiting for the recovery of the data dictionary RDAREA or the starting of the dictionary server). Regardless of whether the -s option is specified, this option starts all the front-end servers in which an error occurred.

-q [-r]

Specifies that the unit is to be started on a HiRDB/Parallel Server. When the standby-less system switchover facility is used, specify this option to start the standby unit.

When the -q option is specified, the host corresponding to the unit to be started (host with the -x or -c operand specified in the pdunit statement in the system common definition) is directly logged into and the command is executed.

If the -q option is specified, you must start all units before the pd_reduced_check_time operand value in the system definition is reached (when omitted, 20 minutes). If the command cannot start any of the units, HiRDB startup processing is cancelled.

For details about -r, and -l, see the description of {-i|-r|-l|dbdestroy}.

-q -c

When the standby-less system switchover (1:1) facility is used, specifies that the alternate system is to be placed in standby status. Specify this option in the following cases:

If planned switchover is executed using a cluster software command, the alternate system is stopped. In such a case, use the pdstart -q -c command to place the alternate system in standby status as a safeguard in the event of an error.

The alternate system is stopped if you stop the normal BES unit with a command such as pdstop -u and restart the normal BES unit with the pdstart -q command after the alternate system of the corresponding alternate BES unit has stopped. In such a case, use the pdstart -q -c command to place the alternate system in the standby status as a safeguard in the event of an error.

To execute the pdstart -q -c command, directly log onto the host of the alternate system that is to be placed in standby status (host specified in -x of the pdunit operand in the system definition).

Rules

The pdstart command can be executed to start a HiRDB system only while the HiRDB is shut down. To start a unit or server, this command can be executed only while the system manager is active.

The pdstart command must be executed on the server machine that contains the single server or the utility special unit or the server machine where the system manager is located.

If the system manager terminates abnormally on a HiRDB/Parallel Server, the server must be restarted with the pdstart command (with no options specified).

When the -i option is specified, any operation command or any utility command other than for the database initialization utility can be executed after the database initialization utility has terminated normally and the HiRDB system has been placed in startup completed status. The HiRDB system does not check a utility or operation command executed before the database initialization utility has terminated. If executed, subsequent HiRDB system operations cannot be guaranteed.

To place the alternate system in standby status when the standby-less system switchover (1:1) facility is used, you cannot specify the -i option in the pdstart command.

When the -r option is specified, the HiRDB system or unit is started only in order to execute the database copy utility or the database recovery utility. Therefore, when the HiRDB system or unit is started by the pdstart command with the -r option specified, no utility other than the database copy utility or the database recovery utility and no command other than pdls or pdstop should be executed. If executed, subsequent HiRDB system operations cannot be guaranteed.

When the dbdestroy option is specified, all RDAREAs (including system RDAREAs) updated since entry of the pdclose command or since the previous HiRDB startup are destroyed. When a HiRDB forced startup is performed with this option specified, it is necessary to either use the database recovery utility to recover all RDAREAs destroyed or to reload the entire database.
For details about forced startup by specifying the dbdestroy option and for recovery of RDAREAs, see the HiRDB Version 8 System Operation Guide.

If you specify the -r option when the system switchover facility is being used, before you execute the pdstart command, you must activate the disk and start the IP address in a unit to which the standby-less system switchover (effects distributed) facility is not applied. In this case, the action depends on the -q option specification in the pdstart command as described below:

When the -q option is omitted
Check the disk connection status and IP address operating status, and then activate the disk and start the IP address in the primary system.

When the -q option is specified
Check the disk connection status and IP address operating status, and then activate the disk and start the IP address in the system where the pdstart command is executed.

If you use the pdstart -u command in a HiRDB/Parallel Server to start a unit that does not inherit IP addresses from the system switchover facility, the system containing the unit to be started is determined by the following conditions:

If the unit specified in the -u option is inactive and the system manager unit has terminated or restarted, the unit specified in the -u option is always started in the primary system.

If the unit specified in the -u option is inactive and the system manager unit is running, the unit specified in the -u option is started in the system where the unit was running before it was terminated. If the unit was running previously in the primary system, then the unit in the primary system is started; if it was running previously in the secondary system, then the unit in the secondary unit is started.

If you want to start the unit in a different system from the one where the unit was running immediately before it was terminated, execute the pdstart -q command in the system where you want to start the unit.
In the case of a unit to which the system switchover facility in the server mode is applied, and that uses the HA monitor as cluster software, if you start the secondary unit with the pdstart -u command, the unit is placed in wait status until the server in the running system starts.# To start the secondary unit as the running system, execute the HA monitor's monact command.

#

This status is displayed as *SBY* when the HA monitor's monshow command is executed.

If you use the system switchover facility and execute the pdstart -r command, activate the disk in advance and start the IP address in the target unit for system switchover (except for a unit to which the standby-less system switchover (effects distributed) facility is applied). In the case of a HiRDB/Parallel Server, the HiRDB startup method depends on whether or not all units are to be started in the primary system, as described below. If the primary system cannot be started for a reason such as a server machine failure, start each unit separately as described under When some or all units are started in the secondary system below.

When all units are started in the primary system
Check the disk connection status. If the disk in the primary system is not active, activate it. In the case of a unit that inherits IP addresses from the system switchover facility, make sure that the IP address is active in the primary system. If the IP address is not active, start it in the primary system. Check all primary systems to make sure that the disk is active and that the IP address has started, and then execute the pdstart -r command on the unit containing the system manager.

When some or all units are started in the secondary system
Check the disk connection status. If the disk is not active in the system to be started, activate the disk in that system. In the case of a unit that inherits IP addresses from the system switchover facility, make sure that the IP address is active in the system that is to be started. If the IP address is not active, start it in that system. Make sure that the disk is active in all units and that the IP address has started, and then execute the pdstart -q -r command on each unit.

Notes

The following are the pdstart command's return codes:
0: Normal termination
4: A message was displayed because of a timeout.
8: Abnormal termination (an invalid option was specified)

The result of the pdstart command can be checked by the pdls command (with -d prc or -d svr specified).

If you are using Real Time SAN Replication based on the log-only synchronous method, and if the pdstart command has been executed with the -i, -r, or dbdestroy option specified at the transaction execution site, execute the preparations for log application.

The following are possible causes for the KFPS01801-E message (reason code=SETUP) and the actions to be taken; this message may be displayed during execution of the pdstart command:

Causes:

The HiRDB directory set in the PDDIR environment variable has not been registered into the OS by the pdsetup command.

The process server daemon cannot be started due to a shortage of kernel semaphores.

Actions:

Use the pdsetup command to register the HiRDB directory into the OS.

Increase the number of semaphores used in the system definition. Note that the new value does not take effect until the OS is restarted.

Reference:

This event may also occur immediately after OS startup or when another program registered in inittab is placed in response wait status.

pdstbegin (Start output of statistical information)

Function

The pdstbegin command outputs to the statistics log file statistical information about a unit located at the server machine with a specified host name. When output of statistical information is to be stopped, the pdstend command must be executed.

The statistical information is output to the statistics log file named pdstj1 or pdstj2 at each host.

The obtained statistical information can be read by the statistics analysis utility. For details about the statistics analysis utility, see Chapter 14. Statistics Analysis Utility (pdstedit).

Executor

HiRDB administrator

Format

HiRDB/Single Server

pdstbegin [-k statistical-information-type[,statistical-information-type]...]
         [-m interval] [-a|-s server-name[,server-name]...}]

HiRDB/Parallel Server

pdstbegin [-k statistical-information-type[,statistical-information-type]...]
         [-m interval] [{-x host-name|-u unit-identifier}]
         [{-a|-s server-name[,server-name]...}]

Options

-k statistical-information-type<<sys>>

Specifies the type of statistical information to be output:

sys

System activity statistical information

uap

UAP statistical information

sql

SQL statistical information

sqh

SQL statement statistical information (statistical information about issued data manipulation SQL, definition SQL, and the LOCK statement and SQL)

This statistical information is output when the output of SQL statistical information is specified.

buf

Global buffer pool statistical information

fil

Statistical information on HiRDB files for database manipulation

dfw

Deferred write processing statistical information

idx

Index statistical information

sop

SQL static optimization information

dop

SQL dynamic optimization information

pcd

SQL object execution information

obj

Statistics on SQL object transmission (applicable to HiRDB/Parallel Server only)

fsv

Statistical information about the activities of external servers

hba

Statistical information about the utilization status of external servers

all

All statistical information except sqh, pcd, obj, fsv, and hba

-m interval<unsigned integer> ((1-1440)) <<10>>

When system activity statistical information (-k sys specified) is to be output to the statistics log file, specifies in minutes the interval at which the information is to be output.

{-x host-name|-u unit-identifier}

Specifies the identifier of the unit or the name of the host for which statistical information is to be output. If this option is omitted, statistical information for the entire HiRDB system is output to the statistics log file.

-x host-name<identifier> ((1-32))

Specifies the name of the host for which statistical information is to be output. If the standby-less system switchover (1:1) facility is used and the alternate system is in use, the command starts output of statistical information about both hosts, whether the specified host name belongs to the normal BES or to the alternate BES.

-u unit-identifier<identifier> ((4 characters))

Specifies the identifier of the unit for which statistical information is to be output. If the standby-less system switchover (1:1) facility is used and the alternate system is in use, the command starts output of statistical information about both units, whether the specified unit identifier belongs to the normal BES or to the alternate BES.

{-a|-s server-name[,server-name]...}<<-a>>

Specifies the servers for which statistical information is to be output. When this option is omitted, the statistical information to be output depends on the server type, as shown in Tables 2-20 and 2-21.

-a

Specifies that statistical information about the entire system and all servers is to be output.

This option and the -s option are mutually exclusive.

-s server-name[, server-name]<identifier> ((1-8))

Specifies the name of a server for which statistical information is to be output.

This option and the -a option are mutually exclusive. If the standby-less system switchover (1:1) facility is used and the alternate system is in use, the command starts output of statistical information about both servers, whether the normal BES or the alternate BES is specified.

Rules

The pdstbegin command can be executed only while HiRDB is active.

The pdstbegin command must be executed at the server machine containing the single server or the server machine where the system manager is located.

Once output of statistical information begins, it continues until HiRDB is shut down or the pdstend command is executed.

The type of statistical information to be output depends on the specification of the -s option. Table 2-20 (for a HiRDB/Single Server) and Table 2-21 (for a HiRDB/Parallel Server) show the relationship between the statistical information to be output and the specification of the -s option.

Table 2-20 Relationship between statistical information output and s option specification: HiRDB/Single Server

Types of statistical information | Servers specified with -s option (Single Server)
sys | Y
uap | Y
sql | Y
sqh | Y
buf | Y
fil | Y
dfw | Y
idx | Y
sop | Y
dop | Y
pcd | Y
obj |
fsv |
hba |

Y:Statistical information is output.

: statistical information is not output.

Table 2-21 Relationship between statistical information output and -s option specification: HiRDB/Parallel Server

Types of statistical information | Servers specified with -s option
FES | DS | BES
sys | Y | Y | Y
uap | Y |  |
sql | Y |  |
sqh | Y |  |
buf |  | Y | Y
fil |  | Y | Y
dfw |  | Y | Y
idx |  | Y | Y
sop | Y |  |
dop | Y |  |
pcd | Y | Y | Y
obj |  | Y | Y
fsv |  |  | Y
hba |  |  | Y

Y: Statistical information is output.

: Statistical information is not output.

FES: Front-end server

DS: Dictionary server

BES: Back-end server

Notes

The following are the pdstbegin command's return codes:
0: Normal termination
8: Abnormal termination (such as an invalid option or rsh error)

The pdstbegin command can also be executed using pdststart as the command name.

If none of the servers in the unit has started, statistical information about the unit is not acquired.

When acquisition of a server's sys (statistical information about system activities) is started, acquisition of the unit's sys also begins.

When HiRDB is terminated and then restarted, the statistical information output operation is not inherited. To output statistical information after HiRDB has started, you must re-execute the pdstbegin command.

Once a server is terminated, the statistical information output operation is not inherited when the server is started normally. To output statistical information for a server that was terminated, the pdstbegin command must be re-executed after the server has been started normally.

Execute the pdls -d stj command to determine whether statistical information is being output.

UAP-related statistical information is output only for UAPs that executed between the time the pdstbegin command was entered and the time the pdstend command was entered. For UAPs executing in the OLTP environment, UAP-related statistical information is output only for transactions that executed between the time the pdstbegin command was entered and the time the pdstend command was entered.

SQL-related statistical information is output only for SQLs that executed between the time the pdstbegin command was entered and the time the pdstend command was entered.

UAP-related statistical information and SQL-related statistical information may not be in agreement, depending on the timing of the pdstbegin command and pdstend command entry, as shown in Figure 2-11.

Figure 2-11 Relationship between output statistical information and entry of pdstbegin and pdstend commands

Following are the times at which the different types of statistical information are output:

sys

Output at the time interval specified in the -m option

uap

Output when connected to HiRDB and when disconnected from HiRDB

sql

Output when SQL execution starts and when SQL execution terminates

sqh

Output information during PREPARE and during execution of an embedded data-type SQL statement.

buf, fil, dfw, idx

Output at synchronization points

sop

Output when the specified SQL object was not found in the SQL object buffer during dynamic and static SQL preprocessing

dop

Output when an SQL statement other than FETCH or CLOSE was executed

pcd

Output when an SQL object is executed

obj

Output when an SQL object execution request is issued at the dictionary server and back-end server.

fsv

Output when the transaction has terminated.

hba

Output when an SQL statement is executed on an external server.

The statistical information listed below is collected at synchronization points, and the information that exists between synchronization points is edited. Therefore, this statistical information is not collected unless there are at least two synchronization points:

Global buffer pool statistical information

Statistical information on HiRDB files for database manipulation

Deferred write processing statistical information

Index statistical information
To collect this statistical information, synchronization points must be created by executing the pdlogswap command immediately after the pdstbegin command and immediately before the pdstend command.

SQL statement statistical information is output when the output of SQL statistical information is specified.

When the standby-less system switchover (effects distributed) facility is used, if restart occurs after execution of the pdstbegin command but before execution of the pdstend command, the same statistical information is output after the restart as before the restart. If system switchover occurs after execution of the pdstbegin command but before execution of the pdstend command (as in the case of a server that was being used as the running system on the erroneous unit), the same statistical information is output after the switchover at the target accepting unit as before the switchover. To stop output of statistical information, you must execute the pdstend command.

When the standby-less system switchover (effects distributed) facility is used and the -x or -u option is specified, the target of the pdstbegin command execution is different before and after system switchover, as shown below:

Server type | Server status | Target
Host BES | Executing | Y
Standby | N
Guest BES | Executing | Y
Acceptable status | N

Legend:

Y: Can be executed

N: Cannot be executed

You should note the following when the standby-less system switchover (effects distributed) facility is used and the -x or -u option is specified together with the -s option:

Acquisition of statistical information begins if the back-end server specified in the -s option on the unit specified in the -x or -u option is running when the pdstbegin command is executed.

pdstend (Stop output of statistical information)

Function

The pdstend command stops the output of specified statistical information on a unit on the server machine specified in the host name (or unit identifier). If the pdstend command is not executed, the system will continue to output statistical information until the HiRDB system stops.

Executor

HiRDB administrator

Format

HiRDB/Single Server

pdstend [-k statistical-information-type[,statistical-information-type]...]
       [-a|-s server-name[server-name]...]

HiRDB/Parallel Server

pdstend [-k statistical-information-type[,statistical-information-type]...]
       [{-x host-name|-u unit-identifier}]
       [-a|-s server-name[server-name]...]

Options

-k statistical-information-type

Specifies the type of statistical information to be output. The default is to stop the output of all statistical information.

sys

System activity statistical information

uap

UAP statistical information

sql

SQL statistical information

sqh

SQL statement statistical information (statistical information about issued data manipulation SQL, definition SQL, and the LOCK statement and SQL)

This statistical information is output when the output of SQL statistical information is specified.

buf

Global buffer pool statistical information

fil

Statistical information on HiRDB files for database manipulation

dfw

Deferred write processing statistical information

idx

Index statistical information

sop

SQL static optimization information

dop

SQL dynamic optimization information

pcd

SQL object execution information

obj

Statistics on SQL object transmission (applicable to HiRDB/Parallel Server only)

fsv

Statistical information about the activities of external servers

hba

Statistical information about the utilization status of external servers

all

All statistical information except sqh, pcd, obj, fsv, and hba

{-x host-name| -u unit-identifier}

Specifies the host name of the host or the unit identifier of the unit on which statistical information is to be output. The default is to stop the output of statistical information on the entire HiRDB system.

-x host-name<identifier> ((1-32))

Specifies the host name of the host on which statistical information is to be output. If the standby-less system switchover (1:1) facility is used and the alternate system is in use, the command stops output of statistical information about both hosts, whether the specified host name belongs to the normal BES or to the alternate BES.

-u unit-identifier<identifier> ((4 characters))

Specifies the unit identifier of the unit on which statistical information is to be output. If the standby-less system switchover (1:1) facility is used and the alternate system is in use, the command stops output of statistical information about both units, whether the specified unit identifier belongs to the normal BES or to the alternate BES.

{-a|-s [server-name [, server-name] ...]} <<-a>>

Specifies the server on which the output of statistical information is to be stopped. The default is the option -a.

-a

Stops the output of statistical information for system services and all servers. This option and the -s option are mutually exclusive.

-s [server-name [, server-name] ...]<identifier> ((1-8))

Specifies the name of the server for which the output of statistical information is to be stopped. This option and the -a option are mutually exclusive. If the standby-less system switchover (1:1) facility is used and the alternate system is in use, the command stops output of statistical information about both servers, whether the normal BES or the alternate BES is specified.

Rules

The pdstend command can be executed only while HiRDB is active.

The pdstend command must be executed at the server machine containing the single server or the server machine where the system manager is located.

When statistical information is being output, the output continues until HiRDB is shut down unless the pdstend command is executed.

Note

The following shows the pdstend command's return codes:
0: Normal termination
8: Abnormal termination (such as an invalid option or rsh error)

Executing the pdstend command causes statistics log buffer information to be output to the statistics log file. To acquire the most recent statistical information, you must execute the pdstjsync command before you execute the pdstend command.

If you stop acquisition of a server's sys (statistical information about system activities), acquisition of the unit's sys also stops.

SQL statement statistical information is not output if the output of SQL statistical information is specified.

When the standby-less system switchover (effects distributed) facility is used, if restart occurs after execution of pdstend, no statistical information is output after the restart. If system switchover occurs after execution of pdstend, no statistical information is output at the target accepting unit for the server that was being used as the running system on the erroneous unit. To restart output of statistical information, you must execute the pdstbegin command.

When the standby-less system switchover (effects distributed) facility is used and the -x or -u option is specified, the target of the pdstend command execution is different before and after system switchover, as shown below:

Server type | Server status | Target
Host BES | Executing | Y
Standby | N
Guest BES | Executing | Y
Acceptable status | N

Legend:

Y: Can be executed

N: Cannot be executed

You should note the following when the standby-less system switchover (effects distributed) facility is used and the -x or -u option is specified together with the -s option:

Acquisition of statistical information stops if the back-end server specified in the -s option on the unit specified in the -x or -u option is running when the pdstend command is executed.

pdstjswap (Swap statistics log files)

Function

The pdstjswap command swaps statistics log files and restores the management information on the statistics log file that has resulted in an error.

Executor

HiRDB administrator

Format

HiRDB/Single Server

pdstjswap [{-x host-name|-u unit-identifier}]

HiRDB/Parallel Server

pdstjswap {-x host-name|-u unit-identifier}

Options

-x host-name <identifier> ((1-32))

Specifies the host name of the unit that contains the statistics log files.

-x unit-identifier <identifier> ((4 characters))

Specifies the identifier of the unit that contains the statistics log files.

Rules

You can execute the pdstjswap command only when HiRDB is active.

Execute the pdstjswap command at the server machine containing the single server or the server machine where the system manager is located.

Note

The following are the pdstjswap command's return codes:
0: Normal termination
8: Abnormal termination (such as an invalid option or rsh error)

If you execute the pdstjswap command, the immediately preceding generation of the statistics log file is overwritten. If you need this statistics log file, back it up before executing the pdstjswap command.

pdstjsync (Apply statistics log buffer to statistics log file)

Function

The pdstjsync command outputs information from the statistics log buffer to the statistics log file.

Executor

HiRDB administrator

Format

pdstjsync

Option

None

Rules

You can execute the pdstjsync command only when HiRDB is active and statistical information is being acquired.

Execute the pdstjsync command at the applicable server machine (on the unit where you wish to output information from the statistics log buffer to the statistics log file).

When statistical information about system activities is being acquired, the pdstjsync command also outputs to the statistics log file statistical information about the system activity at the time of this command's execution. Figure 2-12 shows the statistics record output timing and the timing of output to the statistics log file.

Figure 2-12 Statistics record output timing and timing of output to the statistics log file

Legend:

sys: Statistical information about system activities

uap: Statistical information about UAP

obj: Statistical information about SQL object transfer

Explanation

1. Statistics log records are output to the statistics log buffer at the interval specified in the pdstbegin -m command.

2. Statistics log records are output to the statistics log buffer when the pdstjsync command is executed.

3. Statistics log records are output to the statistics log buffer when connection is established with HiRDB and when it is released from HiRDB.

4. Statistics log records are output to the statistics log buffer when an SQL object execution request is issued.

5. Information from the statistics log buffer is output to the statistics log file when the statistics log buffer becomes full.

6. Information from the statistics log buffer is output to the statistics log file when acquisition of statistical information is stopped (when the pdstend command is executed).

7. Information from the statistics log buffer is output to the statistics log file when the pdstop command is executed (normal or planned termination).

8. Information from the statistics log buffer is output to the statistics log file when the pdstjsync command is executed.

Note

Nos. 2 and 8 are performed by a single execution of the pdstjsync command.

The statistics log records containing statistical information about system activities are not only output at the interval specified in the pdstbegin command's -m option but also output to the statistics log buffer when the pdstjsync command is executed.

Notes

If you execute the pdstjsync command while statistical information about system activities is being acquired, the amount of statistics log information to be output to the statistics log file increases. Therefore, when determining the value for the pd_stj_file_size operand in the system definition, you must take into account the number of times the pdstjsync command will execute. No other type of statistical information (other than system activity information) increases the amount of statistics log information.

Executing the pdstjsync command has no effect on the editing of statistical information by pdstedit.

For the pdstjsync command, return code 0 indicates normal termination, and return code 8 indicates abnormal termination (invalid option or nonavailability of statistical information).

pdstop (Terminate HiRDB system, unit, or server)

Function

The pdstop command terminates a HiRDB system, unit, or server.

Executor

HiRDB administrator

Format

Normal termination

HiRDB/Single Server

pdstop [-d]

HiRDB/Parallel Server

 pdstop [{-x host-name|-u unit-identifier|-s server-name

            |-u unit-identifier -s server-name}] [-d]

Planned termination

pdstop -P[-d]

Forced termination

HiRDB/Single Server

pdstop -f[{-d|-q}]

HiRDB/Parallel Server

 pdstop {-f [{-x host-name|-u unit-identifier|-s server-name

                |-u unit-identifier -s server-name}[-d]]

          |-z[{-d|-q|-c|-s server-name}]}

Termination of HiRDB at the log application site

pdstop -l [-d]

Options

-p

Specifies that the termination is to be by planned termination.

Difference between planned termination and normal termination is as follows:

Connected to HiRDB | Transaction | Normal termination | Planned termination
No | No | Y | Y
Yes | N | N
Yes | No | N | Y
Yes | N | N

Legend:

Y: Can be executed.

N: Cannot be executed.

-f

Specifies that the termination is to be by forced termination. When this option is omitted, normal termination is executed.

{-x host-name|-u unit-identifier|-s server-name}

Specifies the unit or server that is to be terminated. When this option is omitted, the HiRDB system is terminated.

-x host-name<identifier> ((1-32))

When a unit is to be terminated, specifies the name of the host containing the unit. The host containing the system manager cannot be specified.

When the standby-less system switchover (effects distributed) facility is used, the command terminates the host and guest BESs on the specified host's unit. If the terminated server was the running system, it is released from acceptable status when viewed from another unit in the HA group.

-u unit-identifier<identifier> ((4 characters))

When a unit is to be terminated, specifies the identifier of the unit. The unit identifier of the unit in which the system manager is located cannot be specified.

When the standby-less system switchover (effects distributed) facility is used, the command terminates the host and guest BESs on the specified unit. If the terminated server was the running system, it is released from acceptable status when viewed from another unit in the HA group.

-s server-name<identifier> ((1-8))

When a server is to be terminated, specifies the name of the server.

When the standby-less system switchover (effects distributed) facility is used:

When the -u option is omitted, the command terminates the specified servers on all active units in the HA group.

When the -u option is specified, the command terminates the specified server on that unit. If the terminated server was the running system, it is released from acceptable status as viewed from other units in the HA group.

For details about the standby-less system switchover (effects distributed) facility, see the HiRDB Version 8 System Operation Guide.

-z

Specifies that a unit other than the system manager is to be directly logged into and terminated forcibly; this option is specified when the system manager in a HiRDB/Parallel Server terminates abnormally and cannot be restarted.

If the pdstop command with the -z option specified is executed by mistake during HiRDB system startup or normal termination, the unit may terminate abnormally or the command may not be executed.

-d

Specifies that a dump of shared memory is to be output at the time of termination. If the -s option is specified, this option is ignored. The shared memory dump is output to $PDDIR/spool/pdshmdump/shmdump.

-q

If the system switchover facility is used, this option specifies that the specified system is to be terminated forcibly. You can specify this option if use is specified in the pd_ha operand, and the pd_ha_unit operand is also specified in the system definitions.

-c

When the standby-less system switchover (1:1) facility is being used, specifies that the alternate system is to be terminated forcibly. Specify this option in the following cases:

When Hitachi HA Toolkit Extension is being used and the alternate system is to be switched over to the primary system (specify the pdstop -q -c command in the termcommand operand of Hitachi HA Toolkit Extension).

When only the alternate system is to be terminated forcibly without stopping the alternate BES unit. While the alternate system is running, you can also terminate the alternate system forcibly by executing one of the following commands from the unit that contains the system manager: pdstop -f -u unit-identifier-of-normal-BES-unit or pdstop -f -x host-name-of-normal-BES-unit

To execute the pdstop -q -c command, directly log onto the host of the alternate system that is to be terminated forcibly (host specified in -x of the pdunit operand in the system definition).

-l

When Real Time SAN Replication based on the log-only synchronous method is used, specifies that HiRDB is to be terminated at the log application site.

Rules

The pdstop -l command can be executed at the log application site only. If the command is executed at the transaction execution site, an error results.

The pdstop -l command results in an error if it is executed while there are any inactive units.

Rules

The pdstop command can be executed only while HiRDB is active.

The pdstop command must be executed on the server machine that contains the single server or utility special unit or the server machine where the system manager is located.

Once the HiRDB system has been started by the pdstart command with the -r option specified, it cannot be terminated in units by specifying the -x option. In this case, either all options must be omitted or the -f option must be specified to terminate the HiRDB system.

If the HiRDB system was started by the pdstart command with the -i option specified and the database initialization utility has been terminated, the -x option can be specified to terminate each unit of the HiRDB system. If the database initialization utility has not been terminated, the HiRDB system cannot be terminated in units by specifying the -x option. In this case, the -f option must be specified to terminate the HiRDB system.

When the -z option is specified, the specified unit is stopped forcibly and any other options that are specified are ignored.

When HiRDB is being terminated by the pdstop or pdstop -P command, pdstop -f -x host-name or pdstop -f -u unit-identifier cannot be used to execute forced termination.

While the pdrplstart or pdrplstop command is executing, do not execute the pdstop command (except when the -f or -z option is specified).

While a utility is executing, the pdstop command cannot terminate a system or unit normally. You can use the pdstop command to execute planned or forced termination.

Notes

The following are the pdstop command's return codes:
0: Normal termination
4: Abnormal termination (communication timeout during planned termination)
8: Abnormal termination (invalid option)

The result of the pdstop command can be checked by the pdls command (with -d svr specified).

Executing the pdstop command (with -f specified) during HiRDB startup or termination processing or during transaction processing may result in abnormal termination of the unit.

If the pdstop command is entered with the -z option specified at a unit other than the system manager during normal operation of the system manager, that unit will be terminated abnormally.

If HiRDB is linked to an OLTP system, OLTP must be terminated before HiRDB is terminated; otherwise, normal or planned termination of OLTP may fail because OLTP cannot process transactions.

If planned termination does not end 15 minutes after the execution of the pdstop -P command because either a utility or a transaction was being executed, a KFPS05072-W message appears, indicating that the planned termination process is taking time. The planned termination process continues after the message.

If you have specified the pd_log_auto_unload_path operand in the system definitions and executed the pdstop command while the automatic log unloading facility is running, you cannot terminate HiRDB until all the system log files have been unloaded. If you want to terminate HiRDB immediately, terminate the automatic log unloading facility using the pdlogatul -t command before executing the pdstop command.

While updatable online reorganization is underway, you cannot specify the pdstop command (normal termination). If executed, the command results in an error. To terminate HiRDB while updatable online reorganization is underway, use the pdstop command for planned or forced termination (pdstop -P or pdstop -f).

When you are using Real Time SAN Replication based on the log-only synchronous method, you can use the pdstop -l or pdstop -f command to terminate HiRDB at the log application site.

pdstscls (Close open status file)

Function

The pdstscls command closes an open status file. This command is applicable only to status files defined in the HiRDB system definition and can be executed only while HiRDB is active; it cannot close the current file.

Executor

HiRDB administrator

Format

HiRDB/Single Server

Unit status file

pdstscls [{-x host-name|-u unit-identifier}]
         {-n logical-filename|-f physical-filename}

Server status file

pdstscls -s server-name
        {-n logical-filename|-f physical-filename}

HiRDB/Parallel Server

Unit status file

pdstscls {-x host-name|-u unit-identifier}
        {-n logical-filename|-f physical-filename}

Server status file

pdstscls -s server-name
        {-n logical-filename|-f physical-filename}

Options

{-x host-name|-u unit-identifier}

When a unit status file is to be closed, specifies the identifier of the unit or the name of the host corresponding to the unit status file. In the case of a HiRDB/Single Server, this option can be omitted because the host and unit are fixed.

-x host-name<identifier> ((1-32))

Specifies the name of the host corresponding to the unit status file.

-u unit-identifier<identifier> ((4 characters))

Specifies the identifier of the unit corresponding to the unit status file.

-s server-name<identifier> ((1-8))

When a server status file is to be closed, specifies the name of the server corresponding to the server status file.

-n logical-filename<identifier> ((1-8))

When a status file corresponding to a specific logical file is to be closed, specifies the name of the logical file. Both versions (A and B) of the specified logical file will be closed at the same time. However, to close both files (A and B), one of the following must apply:

One of the files (file A or file B) is in BLOCKADE or STANDBY status

Files A and B are both in BLOCKADE or STANDBY status

-f physical-filename<pathname> ((up to 167 characters))

When the status file corresponding to a specific physical file is to be closed, specifies the absolute path name of the physical file. A physical file name must be specified in the format HiRDB-file-system-area-name/HiRDB-filename. This option is used in the event of an error in order to close the file version in STANDBY status, not the file version in shutdown status.

Rules

The pdstscls command can be executed only while HiRDB is active.

The pdstscls command must be executed at the server machine containing the single server or the server machine where the system manager is located.

Note

The following are the pdstscls command's return codes:
0: Normal termination
8: Abnormal termination (such as an invalid option or rsh error)

The result of the pdstscls command can be checked by the pdls command (with -d sts specified).

If you use Real Time SAN Replication based on the log-only synchronous method, the status file to be closed depends on the site at which the command is executed:

At the transaction execution site
The status file for transaction processing is closed. The status file for log application processing cannot be closed.

At the log application site
The status file for log application processing is closed. The status file for transaction processing cannot be closed.

pdstsinit (Initialize status file)

Function

The pdstsinit command creates a physical file that is to comprise a status file (logical file) in the HiRDB file system and initializes it so that it can be used during HiRDB operation. This command cannot initialize the current or a spare status file being used in the active HiRDB.

Executor

HiRDB administrator

Format

HiRDB/Single Server

Unit status file

pdstsinit [{-x host-name|-u unit-identifier}]
         -f physical-file-name [-l record-length][-c records-count]

Server status file

pdstsinit -s server-name
         -f physical-file-name [-l record-length][-c records-count]

HiRDB/Parallel Server

Unit status file

pdstsinit {-x host-name|-u unit-identifier}
         -f physical-file-name [-l record-length][-c records-count]
         [-D]

Server status file

pdstsinit -s server-name [{-x host-name|-u unit-identifier}]
         -f physical-file-name [-l record-length] [-c records-count]
         [-D]

Options

{-x host-name|-u unit-identifier}

When a unit status file is to be initialized, specifies the identifier of the unit or the name of the host corresponding to the unit status file. For a HiRDB/Single Server, this option can be omitted because the host and unit are fixed.

-x host-name<identifier> ((1-32))

For a unit status file
Specifies the name of the host corresponding to the unit status file.

For a server status file
When the standby-less system switchover (effects distributed) facility is used, specifies the name of the host that contains the disk where the file is to be created. This host must contain a unit that belongs to the HA group to which the server specified in the -s option is to be moved.
When the server specified in the -s option and the system manager are running, this option is ignored, if specified.
When the standby-less system switchover (effects distributed) facility is not used and this option is specified together with the -s option, the command checks the host specified in this option and the primary system's host at the server specified in the -s option to determine if they match. If the host names do not match, an error results.

-u unit-identifier<identifier> ((4 characters))

For a unit status file
Specifies the identifier of the unit corresponding to the unit status file.

For a server status file
When the standby-less system switchover (effects distributed) facility is used, specifies the unit identifier of the host that contains the disk where the file is to be created. This unit must belong to the HA group to which the server specified in the -s option is to be moved.
When the server specified in the -s option and the system manager are running, this option is ignored, if specified.
When the standby-less system switchover (effects distributed) facility is not used and this option is specified together with the -s option, the command checks the primary system's host on the unit specified in this option and the primary system's host at the server specified in the -s option to determine if they match. If the host names do not match, an error results.

-s server-name<identifier> ((1-8))

When a server status file is to be initialized, specifies the name of the server corresponding to the server status file.

-f physical-file-name<pathname> ((up to 167 characters))

Specifies the absolute path name of the physical file to be initialized. A physical file name must be specified in the format HiRDB-file-system-area-name/HiRDB-file-name. A name beginning with pl cannot be specified as an HiRDB filename. If the specified physical file has already been initialized, it will be reinitialized.

-l record-length<unsigned integer> ((1024-32768)) <<4096>>

Specifies in bytes the record length for the status file. If the records are short, the number of I/O operations on the status file increases, but the utilization efficiency becomes high. On the other hand, if the records are long, the number of I/O operations decreases, but the utilization efficiency becomes low. This must be taken into account when the record length is specified.

-c records-count<unsigned integer> ((32-2096107)) <<256>>

Specifies the number of records in the status file.

For details about how to estimate the number of records, see the HiRDB Version 8 Installation and Design Guide. The standard value is the estimated number of records 1.2.

-D

Specifies that a unit or server is to be added by the pdchgconf command.

The command initializes the status files that are required to add a unit or server. When this option is specified, the command does not check the unit identifier or server name.

When you specify this option, make sure that the pdchgconf command is executed on the unit that contains the status file that is to be created.

Rules

The pdstsinit command can be executed at any time, whether or not HiRDB is active (except during HiRDB startup or termination processing).

The pdstsinit command must be executed at the server machine containing the single server or the server machine where the system manager is located.

The physical files A and B comprising one logical file must be initialized so that they have the same number of records and the same record length. When a logical file is to be initialized, the numbers of records need not be the same, but the record length must be the same.

The number of records in a status file depends on the HiRDB system configuration; the value can be checked with the pdls command (with -d sts specified). When the pdls command executes, the record utilization factor is displayed, enabling the number of records to be changed on the basis of the displayed record utilization factor. For example, if the record utilization factor is high, a status file should be initialized to contain more records than the current file.

Note

The result of the pdstsinit command can be determined from the command's return code or the existence of an error message. Return code 0 for this command indicates normal termination, 8 indicates abnormal termination (such as invalid option or rsh error), and 12 indicates abnormal termination (when retry was executed from a standby system in a configuration in which IP addresses are not inherited).

The following table describes how to specify the -u and -s options when the standby-less system switchover (effects distributed) facility is used:

Initialization target | Unit or server status | Host containing the disk where the file was created | Specification of -u and -s options
Unit status file | Active | Host where the unit is located | Specify one of them
Inactive
Server status file | Active | Host containing the running back-end server | Optional
Inactive | Host containing the primary back-end server
Other host | Specify one of them

If you are using Real Time SAN Replication based on the log-only synchronous method, you can specify either of the status files (the status file for transaction processing or the status file for log application processing). The volume on which the status file is to be created must be write-enabled.
In the case of the initial configuration of HiRDB for the log application site, there is no need to use the pdstsinit command to create a status file for log application processing, because initialization is performed by the preparations for log application.

Examples

Create a unit status file and a server status file.

HiRDB/Single Server

pdstsinit -f /svr01/systs01a                         1
         -c 512                                     2
pdstsinit -f /svr01/systs01b                         1
         -c 512                                     2
pdstsinit -s sds1                                    3
         -f /svr02/stsf01a                          4
         -c 512                                     5
pdstsinit -s sds1                                    3
         -f /svr02/stsf01b                          4
         -c 512                                     5

Explanation

Names of the physical files that constitute the unit status file:
/svr01/systs01a,/svr01/systs01b

Number of records per physical file:
512

Name of the server corresponding to these server status files:
sds1

Names of the physical files that constitute the server status file:
/svr02/stsf01a,/svr02/stsf01b

Number of records per physical file:
512

HiRDB/Parallel Server

pdstsinit -x host1                                    1
         -f /svr01/systs11a                          2
         -c 512                                      3
pdstsinit -x host1                                    1
         -f /svr01/systs11b                          2
         -c 512                                      3
pdstsinit -x host2                                    1
         -f /svr01/systs21a                          2
         -c 512                                      3
pdstsinit -x host2                                    1
         -f /svr01/systs21b                          2
         -c 512                                      3
pdstsinit -x host3                                    1
         -f /svr01/systs31a                          2
         -c 512                                      3
pdstsinit -x host3                                    1
         -f /svr01/systs31b                          2
         -c 512                                      3
pdstsinit -s fes1                                     4
         -f /svr01/stsf11a                           5
         -c 512                                      6
pdstsinit -s fes1                                     4
         -f /svr01/stsf11b                           5
         -c 512                                      6
pdstsinit -s ds1                                      4
         -f /svr01/stsf21a                           5
         -c 512                                      6
pdstsinit -s ds1                                      4
         -f /svr01/stsf21b                           5
         -c 512                                      6
pdstsinit -s bes1                                     4
         -f /svr01/stsf31a                           5
         -c 512                                      6
pdstsinit -x bes1                                     4
         -f /svr01/stsf31b                           5
         -c 512                                      6

Explanation

Names of the hosts corresponding to the unit status file:
host1, host2, and host3

Names of the physical files that constitute the unit status file:
/svr01/systs11a,/svr01/systs11b
/svr02/systs21a,/svr02/systs21b
/svr03/systs31a,/svr03/systs31b

Number of records per physical file:
512

Names of the servers corresponding to the server status file:
fes1, ds1, and bes1

Names of the physical files that constitute the server status file:
/svr01/stsf11a,/svr01/stsf11b
/svr02/stsd21a,/svr02/stsd21b
/svr03/stsb31a,/svr03/stsb31b

Number of records per physical file:
512

pdstsopen (Open status file)

Function

The pdstsopen command opens a status file initialized by the pdstsinit command or a status file closed by the pdstscls command. This command is applicable only to status files defined in the HiRDB system definition and can be executed only while HiRDB is active.

Executor

HiRDB administrator

Format

HiRDB/Single Server

Unit status file

pdstsopen [-x host-name|-u unit-identifier}]
         {-n logical-filename|-f physical-filename}

Server status file

pdstsopen -s server-name
         {-n logical-filename|-f physical-filename}

HiRDB/Parallel Server

Unit status file

pdstsopen {-x host-name|-u unit-identifier}
         {-n logical-filename|-f physical-filename}

Server status file

pdstsopen -s server-name
        {-n logical-filename|-f physical-filename}

Options

{-x host-name|-u unit-identifier}

When a unit status file is to be opened, specifies the identifier of the unit or the name of the host corresponding to the unit status file. For a HiRDB/Single Server, this option can be omitted because the host and unit are fixed.

-x host-name<identifier> ((1-32))

Specifies the name of the host corresponding to the unit status file.

-u unit-identifier<identifier> ((4 characters))

Specifies the identifier of the unit corresponding to the unit status file.

-s server-name<identifier> ((1-8))

When a server status file is to be opened, specifies the name of the server corresponding to the server status file.

-n logical-filename<identifier> ((1-8))

When a status file corresponding to a specific logical file is to be opened, specifies the name of the logical file. Both versions (A and B) of the specified logical file will be opened at the same time. However, to open both files (A and B), one of the following must apply:

One of the files (file A or file B) is in CLOSE, NONE, or BLOCKADE status

Files A and B are both in CLOSE, NONE, or BLOCKADE status

-f physical-filename<pathname> ((up to 167 characters))

When the status file corresponding to a specific physical file is to be opened, specifies the absolute pathname of the physical file. A physical filename must be specified in the format HiRDB-file-system-area-name/HiRDB-filename. This option is specified to open a status file that has been placed in shutdown status due to an error or a physical file initialized by the pdstsinit in order to extend its capacity.

When you execute the command at the log application site, the specified physical file cannot belong to a status file. When you execute the command at the transaction execution site, the specified physical file name cannot belong to a status file for log application processing.

Rules

The pdstsopen command can be executed only while HiRDB is active.

The pdstsopen command must be executed at the server machine containing the single server or the server machine where the system manager is located.

If the current status file is in single-operation mode, the physical file version in shutdown status can be used as the current status file by initializing it with the pdstsinit command and then executing the pdstsopen command.

Note

The following are the pdstsopen command's return codes:
0: Normal termination
8: Abnormal termination (such as an invalid option or rsh error)

The result of the pdstsopen command can be checked by the pdls command (with -d sts specified).

If you use Real Time SAN Replication based on the log-only synchronous method, the status file to be opened depends on the site at which the command is executed:

At the transaction execution site
The status file for transaction processing is opened. The status file for log application processing cannot be opened.

At the log application site
The status file for log application processing is opened. The status file for transaction processing cannot be opened.

pdstsrm (Delete status file)

Function

The pdstsrm command deletes a physical file comprising a status file in the HiRDB file system. This command cannot delete the current or a spare physical file being used during HiRDB operation. This command is used to delete a physical file that has been placed in shutdown status due to an error.

Executor

HiRDB administrator

Format

HiRDB/Single Server

Unit status file

pdstsrm [{-x host-name|-u unit-identifier}] -f physical-file-name

Server status file

pdstsrm -s server-name -f physical-file-name

HiRDB/Parallel Server

Unit status file

pdstsrm {-x host-name|-u unit-identifier} -f physical-file-name [-D]

Server status file

pdstsrm -s [{-x host-name|-u unit-identifier}] server-name -f physical-file-name [-D]

Options

{-x host-name|-u unit-identifier}

When a unit status file is to be deleted, specifies the identifier of the unit or the name of the host corresponding to the unit status file. In the case of a HiRDB/Single Server, this option can be omitted because the host and unit are fixed.

-x host-name<identifier> ((1-32))

For a unit status file
Specifies the name of the host corresponding to the unit status file.

For a server status file
When the standby-less system switchover (effects distributed) facility is used, specifies the name of the host that contains the disk where the status file to be deleted was created. This host must contain a unit that belongs to the HA group to which the server specified in the -s option is to be moved.
When the server specified in the -s option and the system manager are running, this option is ignored, if specified.
When the standby-less system switchover (effects distributed) facility is not used and this option is specified together with the -s option, the command checks the host specified in this option and the primary system's host at the server specified in the -s option to determine if they match. If the host names do not match, an error results.

-u unit-identifier<identifier> ((4 characters))

For a unit status file
Specifies the identifier of the unit corresponding to the unit status file.

For a server status file
When the standby-less system switchover (effects distributed) facility is used, specifies the unit identifier of the host that contains the disk where the status file to be deleted was created. This unit must belong to the HA group to which the server specified in the -s option is to be moved.
When the server specified in the -s option and the system manager are running, this option is ignored, if specified.
When the standby-less system switchover (effects distributed) facility is not used and this option is specified together with the -s option, the command checks the primary system's host on the unit specified in this option and the primary system's host at the server specified in the -s option to determine if they match. If the host names do not match, an error results.

-s server-name<identifier> ((1-8))

When a server status file is to be deleted, specifies the name of the server corresponding to the server status file.

-f physical-filename<pathname> ((up to 167 characters))

Specifies the absolute pathname of the physical file to be deleted. A physical filename must be specified in the format HiRDB-file-system-area-name/HiRDB-filename.

If you are using Real Time SAN Replication based on the log-only synchronous method, you can specify either of the status files (the status file for transaction processing or the status file for log application processing). The volume containing the status file must be write-enabled.

-D

Specifies that a unit or server is to be deleted by the pdchgconf command.

To delete a unit or server, the command deletes the unit's or server's status files. When this option is specified, the command does not check the unit identifier or server name.

When you specify this option, make sure that the pdstsrm command is executed on the unit that contains the status files that are to be deleted.

Rules

The pdstsrm command can be executed at any time, whether or not HiRDB is active (except during HiRDB startup or termination processing).

The pdstsrm command must be executed at the server machine containing the single server or the server machine where the system manager is located.

The current status file being used during HiRDB operation must not be deleted.

Notes

The result of the pdstsrm command can be determined from the command's return code or the existence of an error message. Return code 0 for this command indicates normal termination, 8 indicates abnormal termination (such as invalid option or rsh error), and 12 indicates abnormal termination (when retry was executed from a standby system in a configuration in which IP addresses are not inherited).

The following table describes how to specify the -u and -s options when the standby-less system switchover (effects distributed) facility is used:

Initialization target | Unit or server status | Host containing the file storage disk | Specification of -u and -s options
Unit status file | Active | Host where the unit is located | Specify one of them
Inactive
Server status file | Active | Host containing the running back-end server | Optional
Inactive | Host containing the primary back-end server
Other host | Specify one of them

pdstsswap (Swap status files)

Function

The pdstsswap command swaps status files. It changes the current status file to a spare status file and a spare status file to the current status file.

Executor

HiRDB administrator

Format

HiRDB/Single Server

Unit status file

pdstsswap [-x host-name|-u unit-identifier}]

Server status file

pdstsswap -s server-name

HiRDB/Parallel Server

Unit status file

pdstsswap {-x host-name|-u unit-identifier}

Server status file

pdstsswap -s server-name

Options

{-x host-name|-u unit-identifier}

When unit status files are to be swapped, specifies the identifier of the unit or the name of the host corresponding to the unit status files. In the case of a HiRDB/Single Server, this option can be omitted because the host and unit are fixed.

-x host-name<identifier> ((1-32))

Specifies the name of the host corresponding to the unit status files.

-u unit-identifier<identifier> ((4 characters))

Specifies the identifier of the unit corresponding to the unit status files.

-s server-name<identifier> ((1-8))

When server status files are to be swapped, specifies the name of the server corresponding to the server status files.

Rules

The pdstsswap command can be executed only while HiRDB is active.

The pdstsswap command must be executed at the server machine containing the single server or the server machine where the system manager is located.

Note

The following are the pdstsswap command's return codes:
0: Normal termination
8: Abnormal termination (such as an invalid option or rsh error)

The result of the pdstsswap command can be checked by the pdls command (with -d sts specified).

If you use Real Time SAN Replication based on the log-only synchronous method, the status file to be swapped depends on the site at which the command is executed:

At the transaction execution site
The status file for transaction processing is swapped. The status file for log application processing cannot be swapped.

At the log application site
The status file for log application processing is swapped. The status file for transaction processing cannot be swapped.

pdsvhostname (Display server's host name)

Function

The pdsvhostname command displays a specified server's host name in DAT format.

Executor

HiRDB administrator

Format

 pdsvhostname -s server-name [-b]

Options

-s server-name<identifier> ((1-8))

Specifies the name of the server whose host name is to be displayed.

Rules

If the specified server name is not defined in HiRDB, the command outputs the KFPS05041-E message and terminates.

If the specified server is not running (including when the unit is stopped), the command does not display a host name.

The command accepts the name of a single server, front-end server, dictionary server, or back-end server.

-b

Specifies that a title line is to be displayed.

When this option is omitted, the command displays the host name without a title line.

Output format

When -b is omitted

"aa...a"

When -b is specified

"HOSTNAME"
"aa...a"

Explanation

aa...a

Name of the host where the server specified in the -s option is currently running (up to 32 characters).

The command displays one of the following host names:

Host name specified in the -x or -c operand of the pdunit operand in the system definition.

Host name specified in the -x option if the system switchover facility is used without IP address inheritance and the host is running as the primary system, or the host name specified in the -c option if the system switchover facility is used without IP address inheritance and the host is running as the secondary system.

Name of the host whose server is running if the standby-less system switchover (effects distributed) facility is used and the specified server is currently running.

Name of the host that is running in the alternate portion if the standby-less system switchover (1:1) facility is used and the specified server is running in the alternate portion.

Rules

The pdsvhostname command can be executed only when HiRDB is running. If the command is executed while HiRDB is stopped, the command outputs the KFPS01853-W message and terminates.

The pdsvhostname command must be executed at the server machine that contains the single server or where the system manager is located. If the command is executed from a server machine where the system manager is not located, the command outputs the KFPS05037-E message and terminates.

Notes

Depending on the execution timing, the pdsvhostname command may terminate normally even though HiRDB is inactive. This occurs in the following cases:

The system manager's shared memory is available.

When the server stopped, the unit did not detect the stop.

The following are the pdsvhostname command's return codes:
0: Normal termination.
1: Specified server is inactive.
4: HiRDB is inactive.
8: Error termination (including memory shortage),* or the specified server was not found in HiRDB.

* Check the error message in syslogfile or the standard error output, eliminate the cause of the error, and then re-execute the pdsvhostname command

pdtrndec (Settle unsettled transactions forcibly and automatically)

Function

If there are unsettled transactions when HiRDB is restarted after an error or after normal termination (when the KFPS00992-E message is displayed), the pdtrndec command settles those transactions forcibly.

For details about handling unsettled transactions, see the HiRDB Version 8 System Operation Guide.

Executor

HiRDB administrator

Format

 pdtrndec -i input-file-name[,input-file-name]...

         [-r rollback-script-file-name] [-o output-destination-directory-name]

Options

-i input-file-name[,input-file-name]... <path name> ((1-4096))

Specifies the absolute path names of files created in syslogfile from KFPS00990-I messages.

Rules

When you specify multiple files, the total specification length, including the separator commas, cannot exceed 4,096 characters.

The execution results of this command cannot be guaranteed if a specified file was not created from KFPS00990-I messages.

The input file names specification cannot contain any blanks.

If information about an applicable transaction is missing from the input file (including when an invalid input file was specified), the transaction will be placed on hold without being settled.

-r rollback-script-file-name<path name> ((1-4107))

Specifies the output file (pdtrnrbk.bat) from the previous execution of the pdtrndec command.

When this option is specified, the command terminates forcibly only the transactions in the rollback script file that remain to be settled. If the specified file is not a pdtrndec command output file, the command's execution results are not guaranteed.

-o output-destination-directory-name<path name> ((1-4096))

Specifies that an execution history (pdtrndecout) is to be output when the pdtrndec command executes, and specifies the absolute path name of the directory to which the shell script (pdtrnrbk.bat) is to be output.

Rules

When this option is omitted, the current directory is assumed as the output target.

If the specified output target directory already contains the execution history and a shell script, the new execution history is added and the shell script is overwritten.

If the -r option is also specified, the command does not output a shell script.

The specification of the output target directory cannot contain any blanks.

Rules

The pdtrndec command can be executed only when HiRDB is running.

The pdtrndec command must be executed at the server machine that contains the single server or where the system manager is located.

The pdtrndec command is executed when there are any unsettled transactions at the time HiRDB is restarted after an error or after having terminated normally. If you do not know whether or not there are any unsettled transactions, executing this command may settle transactions illegally.

Do not execute the pdtrndec command more than once at a time. If multiple pdtrndec commands are executed concurrently, the execution results cannot be guaranteed.

Notes

When you execute the pdtrndec command, all HiRDB servers (except recovery-unnecessary front-end servers) must be running. If there is any inactive server, start it with the correct procedure.

When you execute the pdtrndec command, make sure that any HiRDB client products (such as OLTP system and HiRDB Datareplicator) are running normally. If there is any inactive HiRDB client product, start it with the correct procedure. You should note the following about settling transactions forcibly while there is an inactive client product:

If you execute the shell script (pdtrnrbk.bat) that is output after command execution, any transaction whose settlement was placed on hold by execution of the command will be rolled back forcibly. If you then start the inactive client product, synchronization may be lost between HiRDB and the client product.

If executing the pdtrndec command with an input file specified still results in an unsettled transaction, execute the shell script (pdtrnrbk.bat) to settle the transaction.

The pdtrndec command's processing may take a long time because it synchronizes with completion of other processing, such as transaction commit and rollback commands.

After executing the pdtrndec command, delete the file under the output target directory specified in the pdtrndec command.

The pdtrndec command's return codes are as follows:
0: Normal termination
4: Warning termination (there is still at least one unsettled transaction)
8: Abnormal termination

If you select utf-8 as the character encoding in the pdsetup command, you can use a file with a BOM as the input file for pdtrndec. Note that even when a file with a BOM is used as the input file for pdtrndec, the BOM is skipped. No BOM is included in the file that is output by pdtrndec.

Output format

Execution history (pdtrndecout)

pdtrndec result                     [1]START TIME:2002/09/05 17:20:08
[2]HOSTNAME [3]TRNGID        [4]TRNBID        [5]SVID   [6]DECISION [7]TIME
host1       HRD1unt100020b4d HRD1unt100020034​ bes1      COMMIT      17:20:08
host1       HRD1unt100020b22 HRD1unt100020035​ bes1      ********    --:--:--
host1       HRD1unt100020b51 HRD1unt100020038​ bes1      FORGET      17:20:09
pdtrndec result                     [1]START TIME:2002/09/05 17:36:47
[2]HOSTNAME [3]TRNGID        [4]TRNBID        [5]SVID   [6]DECISION [7]TIME
host1       HRD1unt100020b22 HRD1unt100020035​ bes1      ********    --:--:--

Explanation

Command start date and time (year/month/date hour:minute:second)

Name of the host that contains an unsettled transaction (up to 32 characters)

Global transaction ID that contains an unsettled transaction (16 characters)

Branch transaction ID that contains an unsettled transaction (16 characters)

Name of the server that contains an unsettled transaction (up to 8 characters)

Settlement type of the unsettled transaction (up to 8 characters)
The types are as follows:

Type
Description
Action

COMMIT
Settlement by forced commit
None

ROLLBACK
Settlement by forced rollback
None

FORGET
Forced termination
None

FAIL
Settlement by forced commit or rollback, or forced termination resulted in an error
Eliminate the cause of the error and then re-execute the pdtrndec command

********
Settlement on hold

For a HiRDB/Single Server, or for a HiRDB/Parallel Server when the pdtrndec command was executed on an input file of the system manager unit
Change the input file and then re-execute the pdtrndec command.

For a HiRDB/Parallel Server when the pdtrndec command was executed on an input file of a unit where the system manager is not located
Specify the shell script (pdtrnrbk.bat) and then re-execute the pdtrndec command.

Time forced settlement was executed (hour:minute:second)

Shell script (pdtrnrbk.bat)

[1]/HiRDB/bin/pdrbk -x host1 -s bes1 -t HRD1unt100020b22

Explanation

Command format for settling the transaction by rollback

pdtrnqing (Start or release the transaction queuing facility)

Function

The pdtrnqing command starts or releases transaction queuing for a back-end server. This command is applicable to a HiRDB/Parallel Server that is using the system switchover facility.

If a transaction is executing when transaction queuing is to start, execution of this command is placed on hold until the transaction terminates. If the back-end server is starting when transaction queuing is to be released (except when the -f option is specified), execution of this command is placed on hold until the server startup processing is completed.

Executor

HiRDB administrator

Format

 pdtrnqing [-d [-f]] -s server-name

Options

-d

Specifies that transaction queuing is to be released. When this option is omitted, startup of transaction queuing is assumed.

-f

When transaction queuing is to be released (when the -d option is specified), specifies that forcible release of transaction queuing is to be performed (such as when an error has occurred). You can execute the pdtrnqing command with this option specified from the following locations:

Inactive back-end server

Inactive unit (such as the unit containing the system manager)

-s server-name<identifier>((1-8))

Specifies the name of the back-end server that is to be the target of transaction queuing startup or release. You must specify a back-end server that is using the standby-less system switchover (effects distributed) facility.

Rules

Whether or not the pdtrnqing command can be executed depends on the options that are specified and server's operating status. Note that the unit must be running.

Specified options | Status of back-end server
Inactive | Standby | Starting | Running | Stopping
None |  |  |  | Y¹ |
-d |  | W2,3 | Y² | Y |
-d -f | Y | Y | Y | Y | Y

Legend:

Y:

Transaction queuing can be started or released.

:

Transaction queuing cannot be started or released.

W:

Waits for completion of server startup processing. If server startup processing is completed in the executing unit within the time specified in the pd_ha_trn_queuing_wait_time operand in the system definition, transaction queuing is released. If the startup processing is not completed, the command terminates with an error.

¹

This command is placed on hold until the transaction in the back-end server specified in -s is completed. If the transaction is not completed within the time specified in the pd_ha_trn_queuing_wait_time operand in the system definition, the command results in an error.

²

If the back-end server specified in -s is in standby status or is starting in the unit where this command is executed, the command waits for completion of the server startup processing. If the server startup processing is not completed within the time specified in the pd_ha_trn_queuing_wait_time operand in the system definition, the command results in an error.

³

When the system switchover facility is being used, if this command is executed from the point in time immediately after the server is switched over to the running system by means of the cluster software command until the server status managed by HiRDB is set to Starting, command execution is placed on hold in order to prevent errors.

The pdtrnqing command can be executed from any server machine.

If error is specified in the pd_ha_transaction operand in the system definition, the command terminates itself without starting or releasing transaction queuing. In such a case, the return code is 4.

Notes

If an attempt is made to start transaction queuing while transaction queuing is already being started, or if transaction queuing is released during normal operation (when transactions are not queued), this command terminates normally without changing the status.

Release of transaction queuing is also executed as an extension of server startup processing.

If transaction queuing is released while the server is in standby wait status, the command waits for completion of the server startup processing. Therefore, release of transaction queuing executed for the wrong unit (a unit in standby status) does not immediately result in an error.

The following are the pdtrnqing command's return codes:
0: Normal termination
4: Warning termination (transaction queuing cannot be achieved because pd_ha_transaction=queuing is not specified in the system definition)
8: Abnormal termination (invalid execution environment, operation error, etc.)
12: Abnormal termination

pdusrchk (Check the Directory Server for user information)

Function

The pdusrchk command checks whether or not the users registered in HiRDB are registered in the Directory Server. The command outputs the result to the standard output.

When user management is changed from HiRDB to the Directory Server or when users are registered into or deleted from the Directory Server, inconsistencies may occur between the users registered in HiRDB and the users registered in the Directory Server. The pdusrchk command is used to achieve consistency in user information.

Executor

HiRDB administrator

Format

pdusrchk [-k display-target-type]

Options

-k display-target-type

Specifies the type of information to be displayed. When this option is omitted, the command displays all information.

usr:

Display whether or not the users registered in the dictionary table SQL_USERS are registered in the Directory Server.

rdp:

Display whether or not the users with RDAREA usage privileges that are registered in the SQL_RDAREA_PRIVILEGES dictionary table are registered in the Directory Server.

tbp:

Display whether or not the users with table access privilege that are registered in the SQL_TABLE_PRIVILEGES dictionary table are registered in the Directory Server.

Rules

The pdusrchk command can be executed only while HiRDB is active.

The pdusrchk command must be executed at the server machine that contains the single server or where the system manager is located.

You can execute the pdusrchk command only while you are using the Directory Server linkage facility.

In the pdusrchk command execution environment, set the LANG environment variable that is appropriate to the character codes type specified in the pdsetup command.

To execute the pdusrchk command, place system RDAREAs in open and shutdown-release status.

Notes

Not all users registered in the Directory Server can connect to HiRDB.

When the pdusrchk command is executed, the data dictionary RDAREAs (SQL_USERS, SQL_RDAREA_PRIVILEGES, and SQL_TABLE_PRIVILEGES) are locked.

The following shows the pdusrchk command's return codes:
0: Normal termination
8: Abnormal termination

If DIR_SRV in the output format is N, register or delete the user as shown below:

When -k usr is specified
Delete from HiRDB a user who does not have the DBA, schema definition, or audit privilege. Also delete a user from HiRDB who does not need to connect to HiRDB. Register into the Directory Server a user who needs to connect to HiRDB.

When -k rdp or -k tbp is specified
Delete from HiRDB a user who does not need to connect to HiRDB. Register into the Directory Server a user who needs to connect to HiRDB.

When it is executed, the pdusrchk locks the following resources in the SR mode:

Dictionary RDAREAs that contains SQL_USERS, SQL_RDAREA_PRIVILEGES, and SQL_TABLE_PRIVILEGES

Dictionary tables (SQL_USERS, SQL_RDAREA_PRIVILEGES, and SQL_TABLE_PRIVILEGES)

Output format

When -k usr is specified

***** SQL_USERS INFORMATION *****
NAME     DBA   SCHEMA   AUDIT    DIR_SRV
aa...a   b     c        d        e
  :      :     :        :        :

Explanation

aa...a:

User ID (up to 8 characters)

b:

Whether or not the user has the DBA privilege:

Y: The user has the DBA privilege.

N: The user does not have the DBA privilege.

c:

Whether or not the user has the schema definition privilege:

S: The user has a schema.

Y: The user has the schema definition privilege.

N: The user does not have the schema definition privilege.

d:

Whether or not the user has the audit privilege:

Y: The user has the audit privilege.

N: The user does not have the audit privilege.

e:

Whether or not the user is registered in the Directory Server:

Y: The user is registered in the Directory Server.

N: The user is been registered in the Directory Server.

When -k rdp is specified

***** SQL_RDAREA_PRIVILEGES INFORMATION *****
NAME     RDAREA_NAME   DIR_SRV
aa...a   bb...b        c
  :         :          :

Explanation

aa...a:

User ID (up to 8 characters)

bb...b:

RDAREA name (up to 30 characters)

c:

Whether or not the user is registered in the Directory Server:

Y: The user is registered in the Directory Server.

N: The user is been registered in the Directory Server.

Note

If there is no information to be output, the command displays ***** SQL_RDAREA_PRIVILEGES INFORMATION NOTHING *****.

When -k tbp is specified

***** SQL_TABLE_PRIVILEGES INFORMATION *****
KIND  NAME    TABLE_NAME  SEL  INS  DEL  UPD  DIR_SRV
a     bb...b  cc...c      d    e    f    g    h
:       :        :        :    :    :    :    :

Explanation

a:

Type of user name:

G: Role name

blank: User ID

bb...b:

User ID, or role name (up to 30 characters)

cc...c:

Table name (up to 30 characters)

d:

Whether or not the user has the SELECT privilege:

G: Table owner

Y: The user has the SELECT privilege.

N: The user does not have the SELECT privilege.

e:

Whether or not the user has the INSERT privilege:

G: Table owner

Y: The user has the INSERT privilege.

N: The user does not have the INSERT privilege.

f:

Whether or not the user has the DELETE privilege:

G: Table owner

Y: The user has the DELETE privilege.

N: The user does not have the DELETE privilege.

g:

Whether or not the user has the UPDATE privilege:

G: Table owner

Y: The user has the UPDATE privilege.

N: The user does not have the UPDATE privilege.

h:

Whether or not the user is registered in the Directory Server:

Y: The user is registered in the Directory Server.

N: The user is been registered in the Directory Server.

Note

If there is no information to be output, the command displays ***** SQL_TABLE_PRIVILEGES INFORMATION NOTHING *****.

pdvrup (Upgrade HiRDB version)

Function

The pdvrup command maintains the master directory RDAREA and data dictionary RDAREAs when the HiRDB version has been upgraded in order to make the database conform to the new version.

You can execute this command only when pd_auto_vrup=N is specified in the system definitions. If you have specified pd_auto_vrup=Y, HiRDB automatically executes the pdvrup command.

Executor

HiRDB administrator

Format

pdvrup

Option

None

Rules

The pdvrup command is executed when HiRDB is started after a new HiRDB version has been installed (by executing the pdsetup command). If pd_auto_vrup=N is specified in the system definitions, the system issues a message requesting an entry of the pdvrup command. An attempt to execute this command at any other time results in an error. For details about how to upgrade, see the HiRDB Version 8 Installation and Design Guide.

The pdvrup command must be executed at the server machine containing the single server or the server machine where the system manager is located.

UAPs and utilities cannot be executed during execution of the pdvrup command.

Note

The execution results of the pdvrup command can be confirmed by the return code after the command has executed and by whether or not there are any error messages. A return code of 0 for this command indicates normal termination; a return value of 4 indicates that the upgrade terminated normally (in this case, restart HiRDB); a return value of 12 indicates abnormal termination.

3. Database Initialization Utility (pdinit)

This chapter describes the database initialization utility (pdinit) that defines a physical structure to permit use of files as a HiRDB database.

This chapter contains the following sections:

Organization of this chapter

3.1 Overview

3.2 Command format

3.3 Control statement

3.4 Rules and notes

3.5 Examples

3.1 Overview

Executor: HiRDB administrator

Organization of this section

3.1.1 Function

3.1.1 Function

The database initialization utility is used to define a physical structure for use of files as a HiRDB database. A HiRDB database consists of various RDAREAs. One RDAREA consists of one or more HiRDB files.

Before executing the database initialization utility, you must initialize the HiRDB file system areas in which HiRDB files are to be created. For details about initialization of HiRDB file system areas, see the pdfmkfs command.

The database initialization utility provides the following two functions:

Initializes RDAREAs and simultaneously creates the master directory and data directory; also creates HiRDB-specific resources in data dictionary RDAREAs and data dictionary tables for managing the various privileges

Defines the database system

Figure 3-1 provides an overview of the database initialization utility (pdinit).

Figure 3-1 Overview of database initialization utility (pdinit)

3.2 Command format

Organization of this section

3.2.1 Format

3.2.2 Options

3.2.1 Format

pdinit -d control-statements-filename [-u authorization-identifier [-p password]]

3.2.2 Options

-d control-statements-filename<pathname> ((up to 255 characters)

HiRDB/Single Server

Specifies the absolute path name of the file that contains control statements for the database initialization utility.

HiRDB/Parallel Server

Specifies the absolute path name of the file that contains control statements for the database initialization utility. The control statements file must be created in the server machine where the dictionary server is located.

-u authorization-identifier <identifier> ((1-8 characters))

Specifies an authorization identifier to which DBA privileges are to be granted and that is to be registered in HiRDB.

When this option is omitted
When this option is omitted, the system assumes that the user name associated with the OS account of the user who is executing the pdinit command is specified in this option. If that OS account has the root privileges, the system then assumes that root is specified in this option.

Rules for option specification
If the authorization identifier contains lowercase letters, enclose the entire identifier in double quotation marks ("); otherwise, the system treats the specification as being in all uppercase letters. If you use the Bourne shell (sh), C shell (csh), or Korn shell (ksh), you must enclose the entire specification in single quotation marks (').

Remarks
This option can also be specified when HiRDB is installed as an extension of open middleware that uses HiRDB.

-p password <identifier> ((1-30 characters))

Specifies the password for the authorization identifier specified in the -u option.

If the password contains lowercase letters, enclose the entire identifier in double quotation marks ("); otherwise, the system treats the specification as being in all uppercase letters. If you use the Bourne shell (sh), C shell (csh), or Korn shell (ksh), you must enclose the entire specification in single quotation marks (').

When this option is omitted, the system registers the authorization identifier character string specified in the -u option as the password.

The following shows the relationship between the -u and -p option values and the authorization identifier and password that are registered in HiRDB:

-u option specification | -p option specification | Authorization identifier registered in HiRDB | Password registered in HiRDB
HIR001 | sytg0421 | HIR001 | sytg0421
HIR001 | Omitted | HIR001 | HIR001
Omitted | Omitted | User name for the OS account (if it has root privileges, root) | User name for the OS account (if it has root privileges, root)

3.3 Control statement

Organization of this section

3.3.1 define system statement

3.3.2 create rdarea statement

3.3.3 Notes

3.3.1 define system statement

This section explains the define system statement's operands. Each number in the table as follows corresponds to each operand.

No.
Operand

1

define system [dicinf {unlimited | limited}]

2

   [dictionary datatype mchar {use | nouse}]

-

 ;

Organization of this subsection

(1) dicinf {unlimited|limited}

(2) dictionary datatype mchar {use|nouse}

(1) dicinf {unlimited|limited}

Specifies whether or not information retrieved when data dictionary tables are accessed is to be restricted on the basis of user's privileges:

unlimited

All information can be retrieved when a data dictionary table is accessed

limited

The information to be retrieved when a data dictionary table is accessed is to be restricted on the basis of the user's privileges (a user with DBA privilege can retrieve all information; a user without DBA privilege can retrieve only the information authorized for his or her privileges)

When limited is specified, the number of UAP access tables for making retrievals from dictionary tables increases. Therefore, the number of simultaneously accessible base tables (the value of pd_max_access_tables) should be increased. Five base tables should be accessible simultaneously for each data dictionary table.

For details about how to set data dictionary table referencing privileges, see the HiRDB Version 8 System Operation Guide.

(2) dictionary datatype mchar {use|nouse}

Specifies whether or not mixed-character data can be used in the data of the dictionary tables:

use

Data type for dictionary table columns is to be MVARCHAR

nouse

Data type for dictionary table columns is to be VARCHAR

Following are guidelines for selecting MVARCHAR or VARCHAR:

Select MVARCHAR when Kanji is used in table or column names.

Select MVARCHAR when DBSHARE/Server 04-00 or a later version is used and Kanji is used in table or column names.

Select VARCHAR in all other cases.

3.3.2 create rdarea statement

This section explains the create rdarea statement's operands. Each number in the following table corresponds to each operand.

No.
Operand

1

create [shared]

2

rdarea RDAREA-name

3
for {masterdirectory|datadirectory|datadictionary [of routines]
|user used by {PUBLIC|authorization-identifier [,authorization-identifier]...}
|LOB used by {HiRDB(dictionary-table-name)|PUBLIC
| authorization-identifier [,authorization-identifier]...}

|list}

4

[server name server-name]

5
[open attribute {INITIAL | DEFER | SCHEDULE}]

6
[page page-length characters]

7
[storage control segment segment-size pages]

8
[max entries maximum-number-of-lists-that-can-be-registered]

9
[extension {use number-of-extension-segments segments | nouse}]

10
file name "HiRDB-file-system-area-name/HiRDB-filename"

11
initial HiRDB-file-segments-count segments

-
[file name "HiRDB-file-system-area-name/HiRDB-filename"

-
initial HiRDB-file-segments-count segments]...

-
;

Note: Items 10 and 11 must not specified at the end of the create rdarea statement.

Organization of this subsection

(1) shared

(2) RDAREA-name<identifier> ((1-30))

(3) for {masterdirectory|datadirectory|datadictionary [of routines]|user used by {PUBLIC|authorization-identifier [,authorization-identifier]...}|LOB used by {HiRDB(dictionary-table-name)|PUBLIC | authorization-identifier [,authorization-identifier]...}|list}

(4) server name server-name<identifier> ((1-8))

(5) open attribute {INITIAL|DEFER|SCHEDULE}

(6) page page-length characters<unsigned integer> ((4096-30720)) <<4096 or 8192>>

(7) storage control segment segment-size pages<unsigned integer> ((1-16000)) <<1 or 50>>

(8) max entries maximum-number-of-lists-that-can-be-registered <unsigned integer> ((500-50000 and a multiple of 500)) <<500>>

(9) extension {use number-of-extension-segments segments|nouse}

(10) file name "HiRDB-file-system-area-name/HiRDB-filename"

(11) initial HiRDB-file-segments-count segments

(1) shared

This operand is applicable only to a HiRDB/Parallel Server.

Specify this operand to create a shared RDAREA.

Rules

If you specify shared, you must specify Y in the pd_sharedrdarea_use operand in the system definition. If this specification is missing, an error occurs.

Specifying shared for a HiRDB/Single Server results in an error.

Only user RDAREAs can be created as shared RDAREAs.

You create a shared RDAREA in a HiRDB file system area for which SDB is specified as the purpose of the character special file whose purpose is SDB.

The created shared RDAREA can be referenced from any server other than one specified in the server name operand (it can be referenced from all back-end servers).

(2) RDAREA-name<identifier> ((1-30))

Specifies the name of an RDAREA to be used by HiRDB. ALL cannot be specified as an RDAREA name. If the RDAREA name is enclosed in double quotation marks ("), it is treated as being case sensitive; otherwise, it is treated as all uppercase letters.

Examples

create rdarea "pdbuser01" for...
pdbuser01 is used as the RDAREA name.

create rdarea pdbuser01 for...

PDBUSER01 is used as the RDAREA name.

(3) for {masterdirectory|datadirectory|datadictionary [of routines]|user used by {PUBLIC|authorization-identifier [,authorization-identifier]...}|LOB used by {HiRDB(dictionary-table-name)|PUBLIC | authorization-identifier [,authorization-identifier]...}|list}

Specifies the type of RDAREA:

masterdirectory

Master directory RDAREA.

datadirectory

Data directory RDAREA.

datadictionary

Data dictionary RDAREA.

of routines

Specifies that the RDAREA stores data dictionary tables related to stored procedures, stored functions, and triggers separately from other data dictionary tables. This operand can be specified for only one data dictionary RDAREA. When this operand is specified, two data dictionary LOB RDAREAs must be specified.

user used by {PUBLIC|authorization-identifier, [authorization-identifier]...}

User RDAREA.

PUBLIC

Specifies that the user RDAREA to be added is a public RDAREA.

authorization-identifier[,authorization-identifier]...<identifier> ((1-8))

Specifies that the user RDAREA to be added is a private RDAREA, and specifies the authorization identifiers of the users who can use the user RDAREA.

Rules

If an authorization identifier is enclosed in double quotation marks ("), it is treated as being case sensitive; otherwise, it is registered in the HiRDB system as all uppercase letters.

If you specify an authorization identifier, you can assign RDAREA usage privileges to the private RDAREA.

You can specify a maximum of 255 authorization identifiers.

You cannot specify PUBLIC, MASTER, HiRDB, or ALL as an authorization identifier.

LOB used by {HiRDB (data dictionary-table-name)|PUBLIC|authorization-identifier [,authorization-identifier]...}

Data dictionary LOB RDAREA or user LOB RDAREA

HiRDB (data-dictionary-table-name)

Specifies that the RDAREA is a data dictionary LOB RDAREA; SQL_ROUTINES must be specified as the data dictionary table name.

Rules

If you use stored procedures or stored functions, be sure to define this RDAREA.

There are separate RDAREAs for storing stored procedure and stored function definition source statements and for storing stored procedure and stored function objects; therefore, you need to specify this operand twice (by specifying two separate create rdarea statements specifying these RDAREAs). Stored procedure and stored function definition source statements are stored in the first RDAREA, and stored procedure and stored function objects are stored in the second RDAREA.

If you have not defined these RDAREAs during the execution of the database initialization utility, but need to use stored procedures and stored functions, use the database structure modification utility to add these RDAREAs.

PUBLIC

Specifies that the user LOB RDAREA to be added is a public RDAREA.

authorization-identifier[,authorization-identifier]...<identifier> ((1-8))

Specifies that the user LOB RDAREA to be added is a private RDAREA, and specifies the authorization identifiers of the users who can use the user LOB RDAREA.

Rules

If an authorization identifier is enclosed in double quotation marks ("), it is treated as being case sensitive; otherwise, it is registered in the HiRDB system as all uppercase letters.

If you specify an authorization identifier, you can assign RDAREA usage privileges to the private RDAREA.

You can specify a maximum of 255 authorization identifiers.

You cannot specify PUBLIC, MASTER, HiRDB, or ALL as an authorization identifier.

list

Specifies that the RDAREA is for lists.

(4) server name server-name<identifier> ((1-8))

HiRDB/Single Server

This operand cannot be specified for a HiRDB/Single Server.

HiRDB/Parallel Server

Specifies the name of the server that is to manage the RDAREA.

For the master directory RDAREA, the data directory RDAREA, a data dictionary RDAREA, or a data dictionary LOB RDAREA, the name of the dictionary server must be specified. If any other server's name is specified, the name of the dictionary server is assumed.

For a user RDAREA or a user LOB RDAREA, the name of a back-end server must be specified. If any other server's name is specified, an error results.

When a shared RDAREA is created, the server specified in this operand becomes the updatable back-end server.

When multiple RDAREAs are to be managed by a single server, as many create rdarea statements as there are RDAREAs must be specified consecutively for that server name. Examples:

Example 1

create rdarea A ... server name BES1 ...;
create rdarea B ... server name BES1 ...;
create rdarea C ... server name BES2 ...;

This specification does not result in an error, because the two create rdarea statements with the same server name (BES1) are specified consecutively.

Example 2

create rdarea A ... server name BES1 ...;
create rdarea B ... server name BES2 ...;
create rdarea C ... server name BES1 ...;

This specification results in an error, because the create rdarea statements with the same server name (BES1) are not specified consecutively.

(5) open attribute {INITIAL|DEFER|SCHEDULE}

Specifies the RDAREA's open timing.

Criteria

Usually specify INITIAL unless a special operation mode is used.

If HiRDB startup takes time because there are many RDAREAs, specify DEFER to avoid the startup process.

Rules

This operand takes effect only when Y is specified in the pd_rdarea_open_attribute_use operand.

You can specify this operand for user RDAREAs, user LOB RDAREAs, and list RDAREAs. If specified for any other RDAREA, this operand is ignored (the RDAREA open timing for all other RDAREA types is INITIAL).

If this operand is omitted, the system assumes the value of the pd_rdarea_open_attribute operand.

If the HiRDB file system area allocated in the corresponding RDAREA is shared by another RDAREA, all such sharing RDAREAs must have the same open timing. Otherwise, expected results may not be obtained from those RDAREAs.

INITIAL

The RDAREA's HiRDB file system area is to be opened at the time of HiRDB startup and the RDAREA information is to be made resident in memory; thus, high-speed operation is available from the first SQL.

Notes

The RDAREA's initial status at system startup is open and remains unchanged until an operation command is executed, unless it is placed in error shutdown status due to an error.

The INITIAL open attribute does not permit access to a closed RDAREA.

DEFER

The RDAREA's HiRDB file system area is not to be opened at the time of HiRDB startup; rather, it is to be opened and its RDAREA information is to be made resident in memory the first time an RDAREA in the HiRDB file system area is accessed. Thus, high-speed operation is available beginning with the second access to the HiRDB file system area.

Notes

The RDAREA's initial status at system startup is closed and changes to open the first time an RDAREA in its HiRDB file system area is accessed. The HiRDB file system area's RDAREAs remain in open status thereafter until an operation command is executed, unless they are placed in error shutdown status due to an error.

The DEFER attribute permits access to an RDAREA in closed status.

SCHEDULE

The RDAREA's HiRDB file system area is not to be opened at the time of HiRDB startup; rather, it is to be opened and the RDAREA information is to be made resident in memory the first time an RDAREA in the HiRDB file system area is accessed from within a transaction. When an HiRDB file system area has been opened by a transaction, it is closed when the transaction terminates. When this attribute is used, transaction workload increases because open processing must be performed on the HiRDB file system area even after the first-time access.

Notes

The RDAREA's initial status at system startup is closed and changes to open when an RDAREA in its HiRDB file system area is first accessed by a transaction. When the transaction is terminated, all the RDAREAs opened by it are closed; however, the pdopen command can be used to keep RDAREAs in open status until they are placed in shutdown close status. You can also use other operation commands to change the RDAREA status. If an error is detected, RDAREAs are placed in error shutdown status.

The SCHEDULE attribute permits access to an RDAREA in closed status.

(6) page page-length characters<unsigned integer> ((4096-30720)) <<4096 or 8192>>

Specifies in bytes as a multiple of 2048 the page length for the HiRDB files that are to comprise the RDAREA. If you specified the sector length when you created the HiRDB file system area, specify a multiple of 2,048 that is also a multiple of the sector length.

Master directory or data directory RDAREA
4096 must be specified for the master directory or data directory RDAREA; if any other value is specified, 4096 is assumed.

Data dictionary LOB or user LOB RDAREA
8192 must be specified for a data dictionary LOB or user LOB RDAREA; if any other value is specified, 8192 is assumed.

For details about the page lengths of other types of RDAREAs, see the HiRDB Version 8 Installation and Design Guide and specify the appropriate value. The page length specified in this operand is used as the smallest unit for I/O operations performed on the RDAREA by HiRDB.

(7) storage control segment segment-size pages<unsigned integer> ((1-16000)) <<1 or 50>>

Specifies in pages the size of one segment.

Master directory or data directory RDAREA
50 must be specified for a data dictionary LOB or user LOB RDAREA; if any other value is specified, 50 is assumed.

Data dictionary LOB or user LOB RDAREA
1 must be specified for a data dictionary LOB or user LOB RDAREA; if any other value is specified, 1 is assumed.

For details about the segment sizes of other types of RDAREAs, see the HiRDB Version 8 Installation and Design Guide and specify the appropriate value.

(8) max entries maximum-number-of-lists-that-can-be-registered <unsigned integer> ((500-50000 and a multiple of 500)) <<500>>

Specifies the maximum number of lists that can be created in the list RDAREA, expressed as a multiple of 500. If the specified value is not a multiple of 500, the system rounds it up to the nearest multiple of 500.

If this operand is specified for an RDAREA other than the list RDAREA, an error results.

(9) extension {use number-of-extension-segments segments|nouse}

Specifies whether or not to apply automatic extension of RDAREA.

Automatic extension of RDAREA is a facility that is applied in the event of an RDAREA space shortage; it extends the RDAREA automatically if the HiRDB file system area has sufficient space. If you specify this facility for the RDAREA and a shortage of segments occur, unused segments are allocated to the RDAREA. These unused segments are added to the last HiRDB file that constitutes the RDAREA.

Prerequisites

The -e option (extension count) must be specified for the HiRDB file system area where the RDAREA is located.

The HiRDB file system area must have enough space to contain the last HiRDB file constituting the RDAREA.

use number-of-extension-segments

Applies automatic extension of RDAREA.

Automatic extension of RDAREA is applicable to data dictionary RDAREAs, data dictionary LOB RDAREAs, user RDAREAs, and user LOB RDAREAs. For other RDAREAs, the system assumes nouse even if use is specified.

For an RDAREA other than a LOB RDAREA, automatic extension occurs when there are no more used free segments or used segments in the RDAREA. For a LOB RDAREA, it occurs when there are no more unused segments.

number-of-extension-segments <unsigned integer> ((1-64000))

Specifies the number of extension segments.

There can be a maximum of 24 extents for HiRDB files. Exceeding this results in an error. The maximum number of extensions per HiRDB file system area is determined by the value specified when the HiRDB file system area is created. Therefore, you should take into account the number of files in the HiRDB file system area and an extension frequency when defining the maximum number of extensions.

nouse

Specifies that automatic extension of RDAREA is not to be applied.

Notes

If the system is unable to allocate unused segments due to insufficient space in the HiRDB file system area, extend or re-initialize the RDAREA or reorganize the table with the database reorganization utility.

If the number of extensions exceeds the maximum value, either integrate the extensions in the HiRDB file system area where the RDAREA is located or add another HiRDB file system area's HiRDB files to the RDAREA. To integrate extensions, make a backup copy with pdfbkup, initialize the HiRDB file system area with pdfmkfs, then restore the extensions from the backup copy using pdfrstr.

The last file is locked from the start to the end of automatic RDAREA extension processing.

(10) file name "HiRDB-file-system-area-name/HiRDB-filename"

((up to 167 characters))

Specifies a file that is to be allocated to the RDAREA, in terms of the name of the HiRDB file system area and the name of the HiRDB file. HiRDB-file-system-area-name/HiRDB-filename must be enclosed in double quotation marks.

Rules

Do not specify linefeed characters inside the double quotation marks.

You can allocate a maximum of 16 HiRDB files to one RDAREA.

Make sure that HiRDB-file-system-area-name/HiRDB-filename is not duplicated in the same HiRDB system.

For a list RDAREA, use a HiRDB file system area with the WORK purpose.

If the master directory RDAREA consists of multiple HiRDB files, use the name specified in the pd_master_file_name operand of the system definitions as the name of the first HiRDB file.

HiRDB-file-system-area-name<pathname>

Specifies the name of a HiRDB file system area.

HiRDB-filename<HiRDB filename> ((1-30 characters))

Specifies the name of a HiRDB file. This name cannot begin with pl.

(11) initial HiRDB-file-segments-count segments

Specifies the number of segments in the particular RDAREA file. The size of a HiRDB file cannot exceed 2 GB, regardless of the number of segments. The total number of segments in all HiRDB files comprising each RDAREA must not be fewer than the applicable value in the following table:

RDAREA type | Minimum number of segments
Master directory RDAREA | 4 + total number of RDAREAs 800 (+ 1 if HiRDB Staticizer Option is installed)
Data directory RDAREA | 1
Data dictionary RDAREA¹ | 177³
Data dictionary LOB RDAREA² | 1
User RDAREA | 1
User LOB RDAREA | 1
List RDAREA | 1

¹ When there is more than one data dictionary RDAREA, one data dictionary table is stored in each RDAREA, one at a time, starting with the RDAREA that has the most segments. The index for a data dictionary table is stored in the same RDAREA that stores the data dictionary table. The minimum number of segments when there are multiple data dictionary RDAREAs is the number of stored data dictionary tables and the number of indexes for those tables.

Storage order | Name of data dictionary table | Number of indexes
1 | SQL_PHYSICAL_FILES | 2
2 | SQL_RDAREAS | 2
3 | SQL_TABLES | 2
4 | SQL_COLUMNS | 3
5 | SQL_INDEXES | 3
6 | SQL_USERS | 1
7 | SQL_RDAREA_PRIVILEGES | 2
8 | SQL_TABLE_PRIVILEGES | 2
9 | SQL_DIV_TABLE | 3
10 | Table used by the system | 2
11 | SQL_INDEX_COLINF | 2
12 | SQL_TABLE_STATISTICS | 1
13 | SQL_COLUMN_STATISTICS | 1
14 | SQL_INDEX_STATISTICS | 2
15 | SQL_VIEW_TABLE_USAGE | 3
16 | SQL_VIEWS | 2
17 | Table used by the system | 2
18 | SQL_DIV_INDEX | 2
19 | SQL_DIV_COLUMN | 2
20 | SQL_REFERENTIAL_CONSTRANTS | 3
21 | SQL_ALIASES | 1
22 | SQL_DATATYPES | 3
23 | SQL_DATATYPE_RESOURCES | 2
24 | SQL_TABLE_RESOURCES | 3
25 | SQL_PLUGINS | 3
26 | SQL_PLUGIN_ROUTINES | 4
27 | SQL_PLUGIN_ROUTINE_PARAMS | 3
28 | SQL_INDEX_TYPES | 2
29 | SQL_INDEX_RESOURCES | 2
30 | SQL_INDEX_DATATYPE | 2
31 | SQL_INDEX_FUNCTION | 2
32 | SQL_TYPE_RESOURCES | 3
33 | SQL_INDEX_TYPE_FUNCTION | 1
34 | SQL_EXCEPT | 3
35 | SQL_FOREIGN_SERVERS | 0
36 | SQL_USER_MAPPINGS | 1
37 | Table used by the system | 0
38 | SQL_IOS_GENERATIONS | 0
39 | SQL_TRIGGERS | 4
40 | Table used by the system | 2
41 | SQL_TRIGGER_COLUMNS | 2
42 | SQL_TRIGGER_DEF_SOURCE | 2
43 | SQL_TRIGGER_USAGE | 4
44 | SQL_PARTKEY | 1
45 | SQL_PARTKEY_DIVISION | 1
46 | SQL_AUDITS | 3
47 | Table used by the system | 2
48 | SQL_KEYCOLUMN_USAGE | 2
49 | SQL_TABLE_CONSTRAINTS | 2
50 | SQL_CHECKS | 2
51 | SQL_CHECK_COLUMNS | 2
52 | SQL_DIV_TYPES | 1
53 | SQL_SYSPARAMS | 1
54 | Table used by the system | 1
55 | SQL_ROUTINES | 4
56 | SQL_ROUTINE_RESOURCE | 4
57 | SQL_ROUTINE_PARAM | 3

² If no data dictionary LOB RDAREAs are specified, SQL_ROUTINES, SQL_ROUTINE_RESOURCES, and SQL_ROUTINE_PARAMS are not created. If there are data dictionary RDAREAs for storing data dictionary tables related to stored procedures and stored functions (RDAREAs for which of routines is specified), SQL_ROUTINES, SQL_ROUTINE_RESOURCES, and SQL_ROUTINE_PARAMS are stored in those data dictionary RDAREAs.

³ This is the total of the number of data dictionary tables and data dictionary table indexes created by HiRDB.

The formula total number of pages/segment size is used to obtain the number of segments. For details about how to estimate the total number of pages, see the HiRDB Version 8 Installation and Design Guide.

3.3.3 Notes

A comment specified in a control statement must be enclosed between /* and */.

When specifying the define system and the create rdarea statements at the same time, specify the define system statement first.

The following table shows the specification order and the permitted numbers of create rdarea statements:

Specification order | RDAREA type | Number of statements
1 | Statement for master directory RDAREA | 1
2 | Statement for data directory RDAREA | 1
3 | Statements for data dictionary RDAREAs | 1 to number of data dictionary tables*
4 | Statements for data dictionary LOB RDAREAs | 0 or 2
5 | Statements for user RDAREAs, user LOB RDAREAs, and list RDAREAs | Any number

Note 1

Check that the number of RDAREAs does not exceed the maximum permissible number of RDAREAs, as specified in the system common definition (value of pd_max_rdarea_no). Also check that the number of HiRDB files that constitute the RDAREAs do not exceeds the maximum permissible number of HiRDB files that can constitute RDAREAs (value of pd_max_file_no).

Note 2

A created shared RDAREA is counted as if it has been created at every back-end server. Therefore, if the number of RDAREAs or the number of HiRDB files constituting the RDAREAs exceeds the permitted maximum value at any back-end server, the shared RDAREA cannot be created.

* When there are data dictionary RDAREAs for which of routines is specified, the maximum number of data dictionary RDAREAs that can be specified is (number of data dictionary tables - 2).

3.4 Rules and notes

Organization of this section

(1) Rules

(2) Note

(1) Rules

The database initialization utility can be executed only while HiRDB is in end-of-initialization wait status (waiting after issuing the KFPS05201-Q message). HiRDB is placed in end-of-initialization wait status when no master directory RDAREA has been initialized or when HiRDB is started by the pdstart command with the -i option specified.

The database initialization utility must be executed at the server machine that contains the single server or the server machine where the system manager is located.

If an error occurs while the database initialization utility is executing, processing is cancelled immediately. The error must be corrected on the basis of the error messages output to the standard error output and to the message log file and then the database initialization utility must be re-executed.

If the database initialization utility is terminated abnormally (aborted or placed in process shutdown status), the initialization status file (pdinit) may remain in $PDDIR/spool. This file must be deleted before the database initialization utility is re-executed.

If the standby-less system switchover (1:1) facility is used and the alternate BES is placed in standby status, pdinit cannot be executed. To execute pdinit while using the standby-less system switchover (1:1) facility, start all normal BESs as running systems.

(2) Note

The following are the pdinit utility's return codes:
0: Normal termination
4: Normal termination (warning-level error occurred, but processing terminated normally)
8: Normal termination (initialization terminated normally, but the communication about termination of initialization resulted in an error)
12: Abnormal termination

The pdinit results can be checked by the following methods:
pddbls command (-r ALL -a specified)
Retrieval of data dictionary table
Database condition analysis utility

If you selected utf-8 as the character encoding in the pdsetup command, you can use a control statements file that contains a BOM. However, only ASCII characters are permitted for comments in the control statements file. If character encoding other than ASCII is used, pdinit may not function correctly.

If Real Time SAN Replication based on the log-only synchronous method is used and pdinit was executed at the transaction execution site, you must execute the preparations for log application.

3.5 Examples

Example 1 shows an example of the use of the database initialization utility.

Example 1

Create the following RDAREAs:

PDBMAST (master directory RDAREA)

PDBDDIR (data directory RDAREA)

PDBDDIC (data dictionary RDAREA)

PDBDICL1 (data dictionary LOB RDAREA)

PDBDICL2 (data dictionary LOB RDAREA)

PDBUSER01 (user RDAREA)

PDBULOB01 (user LOB RDAREA)

PDBUSER02 (user RDAREA)

The following HiRDB file system areas have already been created:

/svr01 (character special files)

/svr02 (character special files)

/dbarea/area1 (regular files)

HiRDB/Single Server

Overview

Command execution

pdinit -d /usr/seifile/infl01

Contents of control statement file (/usr/seifile/infl01)

/* Definition of master directory RDAREA */
create rdarea PDBMAST   ...............................1
              for masterdirectory   ...................2
              page 4096 characters   ..................3
              storage control segment 50 pages   ......4
              file name "/svr01/rdmaster"
                  initial 10 segments ;   .............5

/* Definition of data directory RDAREA */
create rdarea PDBDDIR   ...............................6
              for datadirectory   .....................7
              page 4096 characters   ..................8
              storage control segment 50 pages   ......9
              file name "/svr01/rdddir"
                  initial 5 segments ;   ..............10

/* Definition of data dictionary RDAREA */
create rdarea PDBDDIC   ...............................11
              for datadictionary   ....................12
              page 4096 characters   ..................13
              storage control segment 30 pages   ......14
              file name "/svr01/rdddic"
                  initial 150 segments ;   ............15

/* Definition of data dictionary LOB RDAREA */
create rdarea PDBDICL1   ..............................16
              for LOB used by HiRDB(SQL_ROUTINES)   ...17
              page 8192 characters   ..................18
              storage control segment 1 pages   .......19
              file name "/svr01/rddicl1"
                  initial 200 segments ;   ............20

/* Definition of data dictionary LOB RDAREA */
create rdarea PDBDICL2   ..............................21
              for LOB used by HiRDB(SQL_ROUTINES)   ...22
              page 8192 characters   ..................23
              storage control segment 1 pages   .......24
              file name "/svr01/rddicl2"
                  initial 2000 segments ;   ...........25

/* Definition of user RDAREA */
create rdarea PDBUSER01   .............................26
              for user used by PUBLIC   ...............27
              page 4096 characters   ..................28
              storage control segment 150 pages   .....29
              file name "/svr02/rduser01"
                  initial 50 segments ;   .............30

/* Definition of user LOB RDAREA */
create rdarea PDBULOB01   .............................31
              for LOB used by PUBLIC   ................32
              page 8192 characters   ..................33
              storage control segment 1 pages   .......34
              file name "/svr02/rdulob01"
                  initial 50 segments ;   .............35

/* Definition of user RDAREA */
create rdarea PDBUSER02   .............................36
              for user used by USERID   ...............37
              page 4096 characters   ..................38
              storage control segment 50 pages   ......39
              file name "/dbarea/area1/rduser02"
                  initial 100 segments ;   ............40

Explanation

Name of RDAREA: PDBMAST

Type of RDAREA: Master directory RDAREA

Page length: 4096 bytes

Segment size: 50 pages

HiRDB file comprising the RDAREA:

Name: /svr01/pdmaster

Number of segments: 10

Name of RDAREA: PDBDDIR

Type of RDAREA: Data directory RDAREA

Page length: 4096 bytes

Segment size: 50 pages

HiRDB file comprising the RDAREA:

Name: /svr01/rdddir

Number of segments: 5

Name of RDAREA: PDBDDIC

Type of RDAREA: Data dictionary RDAREA

Page length: 4096 bytes

Segment size: 30 pages

HiRDB file comprising the RDAREA:

Name: /svr01/rdddic

Number of segments: 150

Name of RDAREA: PDBDICL1

Type of RDAREA: Data dictionary LOB RDAREA (stores stored procedure definition source statements)

Page length: 8192 bytes

Segment size: 1 page

HiRDB file comprising the RDAREA:

Name: /svr01/rddicl1

Number of segments: 200

Name of RDAREA: PDBDICL2

Type of RDAREA: Data dictionary LOB RDAREA (stores stored procedure objects)

Page length: 8192 bytes

Segment size: 1 page

HiRDB file comprising the RDAREA:

Name: /svr01/rddicl2

Number of segments: 2000

Name of RDAREA: PDBUSER01

Type of RDAREA: User RDAREA (public)

Page length: 4096 bytes

Segment size: 150 pages

HiRDB file comprising the RDAREA:

Name: /svr02/rduser01

Number of segments: 50

Name of RDAREA: PDBULOB01

Type of RDAREA: User LOB RDAREA (public)

Page length: 8192 bytes

Segment size: 1 page

HiRDB file comprising the RDAREA:

Name: /svr02/rdulob01

Number of segments: 50

Name of RDAREA: PDBUSER02

Type of RDAREA: User RDAREA (private)
Authorization identifier: USERID

Page length: 4096 bytes

Segment size: 50 pages

HiRDB file comprising the RDAREA:

Name: /dbarea/area1/rduser02

Number of segments: 100

HiRDB/Parallel Server

Overview

Command execution

pdinit -d /usr/seifile/infl01

Contents of control statement file (/usr/seifile/infl01)

/* Definition of master directory RDAREA */

create rdarea PDBMAST   ..........................................1
              for masterdirectory   ..............................2
              server name dics   .................................3
              page 4096 characters   .............................4
              storage control segment 50 pages   .................5
              file name "/svr01/rdmaster"
                  initial 10 segments ;   ........................6

/* Definition of data directory RDAREA */

create rdarea PDBDDIR   ..........................................7
              for datadirectory   ................................8
              server name dics   .................................9
              page 4096 characters   .............................10
              storage control segment 50 pages   .................11
              file name "/svr01/rdddir"
                  initial 5 segments ;   .........................12

/* Definition of data dictionary RDAREA */

create rdarea PDBDDIC   ..........................................13
              for datadictionary   ...............................14
              server name dics   .................................15
              page 4096 characters   .............................16
              storage control segment 30 pages   .................17
              file name "/svr01/rdddic"
                  initial 150 segments ;   .......................18

/* Definition of data dictionary LOB RDAREA */

create rdarea PDBDICL1   .........................................19
              for LOB used by HiRDB(SQL_ROUTINES)   ..............20
              server name dics   .................................21
              page 8192 characters   .............................22
              storage control segment 1 pages   ..................23
              file name "/svr01/rddicl1"
                  initial 200 segments ;   .......................24

/* Definition of data dictionary LOB RDAREA */
create rdarea PDBDICL2   .........................................25
              for LOB used by HiRDB(SQL_ROUTINES)   ..............26
              server name dics   .................................27
              page 8192 characters   .............................28
              storage control segment 1 pages   ..................29
              file name "/svr01/rddicl2"
                  initial 2000 segments ;   ......................30

/* Definition of user RDAREA */
create rdarea PDBUSER01   ........................................31
              for user used by PUBLIC   ..........................32
              server name bes1   .................................33
              page 4096 characters   .............................34
              storage control segment 150 pages   ................35
              file name "/svr02/rduser01"
                  initial 50 segments ;   ........................36

/* Definition of user LOB RDAREA */

create rdarea PDBULOB01   ........................................37
              for LOB used by PUBLIC   ...........................38
              server name bes1   .................................39
              page 8192 characters   .............................40
              storage control segment 1 pages   ..................41
              file name "/svr02/rdulob01"
                  initial 50 segments ;   ........................42

/* Definition of user RDAREA */

create rdarea PDBUSER02   ........................................43
              for user used by USERID   ..........................44
              server name bes2   .................................45
              page 4096 characters   .............................46
              storage control segment 50 pages   .................47
              file name "/dbarea/area1/rduser02"
                  initial 100 segments ;   .......................48

Explanation

Name of RDAREA: PDBMAST

Type of RDAREA: Master directory RDAREA

Name of server to manage the RDAREA: dics

Page length: 4096 bytes

Segment size: 50 pages

HiRDB file comprising the RDAREA:

Name: /svr01/pdmaster

Number of segments: 10

Name of RDAREA: PDBDDIR

Type of RDAREA: Data directory RDAREA

Name of server to manage the RDAREA: dics

Page length: 4096 bytes

Segment size: 50 pages

HiRDB file comprising the RDAREA:

Name: /svr01/rdddir

Number of segments: 5

Name of RDAREA: PDBDDIC

Type of RDAREA: Data dictionary RDAREA

Name of server to manage the RDAREA: dics

Page length: 4096 bytes

Segment size: 30 pages

HiRDB file comprising the RDAREA:

Name: /svr01/rdddic

Number of segments: 150

Name of RDAREA: PDBDICL1

Type of RDAREA: Data dictionary LOB RDAREA (stores stored procedure definition source statements)

Name of server to manage the RDAREA: dics

Page length: 8192 bytes

Segment size: 1 page

HiRDB file comprising the RDAREA:

Name: /svr01/rddicl1

Number of segments: 200

Name of RDAREA: PDBDICL2

Type of RDAREA: Data dictionary LOB RDAREA (stores stored procedure objects)

Name of server to manage the RDAREA: dics

Page length: 8192 bytes

Segment size: 1 page

HiRDB file comprising the RDAREA:

Name: /svr01/rddicl2

Number of segments: 2000

Name of RDAREA: PDBUSER01

Type of RDAREA: User RDAREA (public)

Name of server to manage the RDAREA: bes1

Page length: 4096 bytes

Segment size: 150 pages

HiRDB file comprising the RDAREA:

Name: /svr02/rduser01

Number of segments: 50

Name of RDAREA: PDBULOB01

Type of RDAREA: User LOB RDAREA (public)

Name of server to manage the RDAREA: bes1

Page length: 8192 bytes

Segment size: 1 page

HiRDB file comprising the RDAREA:

Name: /svr02/rdulob01

Number of segments: 50

Name of RDAREA: PDBUSER02

Type of RDAREA: User RDAREA (private)
Authorization identifier: USERID

Name of server to manage the RDAREA: bes2

Page length: 4096 bytes

Segment size: 50 pages

HiRDB file comprising the RDAREA:

Name: /dbarea/area1/rduser02

Number of segments: 100

4. Database Definition Utility (pddef)

This chapter describes the database definition utility (pddef) that permits modifications of schema definitions and contents.

This chapter contains the following sections:

Organization of this chapter

4.1 Overview

4.2 Command format

4.3 Handling of continuation lines

4.4 Rules and notes

4.5 Examples

4.1 Overview

Organization of this section

4.1.1 Function

4.1.2 Executor

4.1.1 Function

The database definition utility (pddef) defines schemas and modifies existing schema definitions.

This utility executes a definition SQL entered from the standard input, defines or changes schema information, then outputs the execution result to the standard output. The definition information is stored in data dictionary tables.

Before executing the database definition utility, you need to specify the client environment definitions. Specify at least PDHOST, PDNAMEPORT, and PDUSER. The following shows an example:

% setenv PDHOST=host1
% setenv PDNAMEPORT=20001
% setenv PDUSER='"k916321"/"k916321"'
       :

For details about the client environment definitions, see the HiRDB Version 8 UAP Development Guide.

Note that the Linux client version for AP8000 does not support the database definition utility.

Figure 4-1 provides an overview of the database definition utility (pddef).

Figure 4-1 Overview of database definition utility (pddef)

4.1.2 Executor

User with the CONNECT privilege. However, the privilege required depends on the SQL to be executed. For details about the privileges required to execute SQLs, see the HiRDB Version 8 SQL Reference.

4.2 Command format

Organization of this section

4.2.1 Format

4.2.2 Options

4.2.1 Format

pddef [-e] [-s] [-R] {definition-SQL|input-file}

4.2.2 Options

-e

Specifies that END_FUNC; (for CREATE FUNCTION), END_TYPE; (for CREATE TYPE), or END_TRIG (for CREATE TRIGGER) is to be added to demarcate the end of the SQL statement.

For CREATE FUNCTION:

The system treats a line of code through END_PROC; or END_FUNC; as one SQL statement.

For CREATE TYPE:

The system treats a line of code through END_PROC; or END_TYPE; as one SQL statement.

For CREATE TRIGGER:

The system treats a line of code through END_PROC; or END_TRIG; as one SQL statement.

For the handling of continuation lines for SQL statements, see 4.3 Handling of continuation lines.

-s

Specifies that an input wait prompt is to be displayed when a definition SQL is entered directly.

There are two different prompts that are displayed according to the input status:

COMMAND?: Indicates a prompt for a normal entry.

NEXT?: Indicates a prompt for a continuation line of an SQL statement.

The following shows examples:

pddef -s
COMMAND ? +----2----+----3----+----4----+----5----+----6----+----7----+

CREATE TABLE T1 (
NEXT ?    +----2----+----3----+----4----+----5----+----6----+----7----+

C1 INT,
NEXT ?    +----2----+----3----+----4----+----5----+----6----+----7----+

C2 CHAR(64)
NEXT ?    +----2----+----3----+----4----+----5----+----6----+----7----+

);
KFPA12000-I Processing of SQL completed
COMMAND ? +----2----+----3----+----4----+----5----+----6----+----7----+

{definition-SQL|input-file}
Specifies a definition SQL statement.
You can directly enter definition SQL statements or use an input file that contains definition SQL statements. For details about the definition SQL, see the HiRDB Version 8 SQL Reference.

Directly entering SQL statements:

When pddef is executed, the utility waits for entry of definition SQL statements, which should then be entered. You cannot enter an SQL statement immediately after pddef. Specify a semicolon (;) at the end of each SQL statement.

To terminate pddef, press the CTRL + D keys.

Specifying an input file:

Create an input file containing definition SQL statements. Redirect the standard input to this input file.

Example

pddef <infile

R

Specifies that the pddef return code is to be set to 4 if the SQLCODE for any SQL statement that executes is a negative value (including abnormal termination during HiRDB connection). You specify this option when you wish to detect errors in SQL statements during execution of pddef.

4.3 Handling of continuation lines

Organization of this section

(1) SQL other than CREATE PROCEDURE, CREATE FUNCTION, CREATE TYPE, or CREATE TRIGGER

(2) CREATE PROCEDURE, CREATE FUNCTION, CREATE TYPE, and CREATE TRIGGER

(3) EOF detected in an SQL statement

(1) SQL other than CREATE PROCEDURE, CREATE FUNCTION, CREATE TYPE, or CREATE TRIGGER

If a line ends with a semicolon (;), the system treats the line of code as one SQL statement (the system ignores any space or control character following the semicolon). A line that does not end with a semicolon is assumed to be continued on the next line.

Example

CREATE TABLE T1 (C1 INT,        (Continued)
            C2 CHAR(10),       (Continued)
            C3 CHAR(10));      (End of SQL statement)

If a line ends with a semicolon that is enclosed in double quotation marks ("), the system treats it as the end of the SQL statement.

(2) CREATE PROCEDURE, CREATE FUNCTION, CREATE TYPE, and CREATE TRIGGER

Table 4-1 shows the handling of continuation lines with CREATE PROCEDURE, CREATE FUNCTION, CREATE TYPE, and CREATE TRIGGER. If a line ends with a character string indicated in Table 4-1, the system treats the line of code up to that character string as an SQL statement (the system ignores any space or control character following the semicolon).

Table 4-1 Handling of continuation lines with CREATE PROCEDURE, CREATE FUNCTION, CREATE TYPE, and CREATE TRIGGER

SQL statement | -e option
Not specified | Specified
CREATE PROCEDURE | END_PROC; | END_PROC;
CREATE FUNCTION | END_PROC; | END_PROC; or END_FUNC;
CREATE TYPE | END_PROC; | END_PROC; or END_TYPE;
CREATE TRIGGER | END_PROC; | END_PROC; or END_TRIG;

The system assumes that CREATE PROCEDURE, CREATE FUNCTION, CREATE TYPE, or CREATE TRIGGER is continued on to the next line, even if it ends with a semicolon.

Example

CREATE PROCEDURE P1                        (Continued)
BEGIN                                      (Continued)
 INSERT INTO VALUES(10);                  (Continued)
 UPDATE T1 SET C1 = 0 WHERE C1 < 0;       (Continued)
END                                        (Continued)
END_PROC;                                  (End of SQL statement)

If a line ends with END_PROC; that is, enclosed in double quotation marks ("), the system treats it as the end of the SQL statement.

(3) EOF detected in an SQL statement

If the system detects EOF in an SQL statement (before detecting a semicolon), the system treats it as the end of the SQL statement and executes the SQL statement read so far.

Example

CREATE TABLE T1(C1 INT,             (Continued)
               C2 CHAR(10)         (Continued)
EOF                                 (End of command)

4.4 Rules and notes

Organization of this section

(1) Rules

(2) Note

(3) Information that is output in the event of an SQL error

(4) Handling of comments

(5) Using a file that contains a BOM

(1) Rules

The database definition utility can be executed only while HiRDB is active.

The database definition utility can be executed from any server machine.

When a definition SQL is executed, commit processing is executed for each SQL statement.

A maximum of 2 MB of SQL statements can be executed.

Multiple definition SQL statements cannot be specified on the same line.

When CREATE INDEX is executed by the database definition utility, the index is created in the batch mode at the time of execution if there is row data in the table for which the index is being created. If PDDBLOG=NO is specified in the client environment definition at this time, the index is created in the batch mode without collecting database updating log information. Therefore, the HiRDB administrator must perform operations in the no-log mode. For details about operations in the no-log mode, see the HiRDB Version 8 System Operation Guide

ALTER TABLE and DROP TABLE must not be executed for an extracted database subject to data linkage. If either of these commands is executed in such a case, database agreement is not guaranteed. However, the definition on the HiRDB side can be changed if the tables or columns in a database subject to data linkage are not being updated and all update information has already been transferred to the target side. If the HiRDB Datareplicator is then reactivated after using the hdeprep command to re-analyze the extraction definition of tables or columns to be extracted by the HiRDB Datareplicator side, database agreement is guaranteed. For details about the procedures, see the HiRDB Datareplicator Version 8 Description, User's Guide and Operator's Guide.

When executing pddef, make sure that the character codes are the same as for the HiRDB server in which the definitions are registered. You must also use the specified character codes for entering data.
Table 4-2 shows how to set the LANG environment variable, PDLANG client environment definition, and PDCLTCNVMODE during execution of pddef.

Table 4-2 Setting LANG, PDLANG, and PDCLTCNVMODE during execution of pddef

Input character codes
Character codes set for the HiRDB server used to register definitions¹
Character codes in the pddef execution environment

LANG²
PDLANG³
PDCLTCNVMODE³

SJIS (Shift JIS Kanji codes)
SJIS
SJIS
Linux version: SJIS
Other: Omitted
Omitted

UJIS (EUC Japanese Kanji codes)
UJIS
UJIS
Omitted

C (single-byte character codes)
C
C
Omitted

chinese (EUC Chinese-language Kanji codes)
chinese
chinese
CHINESE

UTF-8 (Unicodes)
UTF-8
Any (C is recommended)
UTF-8

¹ This is the value set in the -c option of the pdsetup command.

² The value of the LANG environment variable depends on the OS. For details about the character codes specified in LANG, see the HiRDB Version 8 UAP Development Guide.

³ For details about PDLANG and PDCLTCNVMODE, see the HiRDB Version 8 UAP Development Guide.

(2) Note

The results of the database definition utility can be checked by the return code set by the utility or by referencing a data dictionary table. The return codes are as follows:

When the -R option is omitted

Return code | Meaning | Action | HiRDB operation
0 | Normal termination (including when an SQL statement resulted in an error) | Not applicable | Not applicable
8 | Memory shortage | Re-execute after another process has terminated, or increase memory. | Cancels processing and terminates pddef
Option specification error | Specify the correct option.

When the -R option is specified

Return code | Meaning | Action | HiRDB operation
0 | Normal termination | Not applicable | Not applicable
4 | HiRDB connection error | Check and, if necessary, revise the specified environment variables. | Cancels processing and terminates pddef
SQL error | Check and, if necessary, revise the executed SQL statement. | Resumes processing
8 | Memory shortage | Re-execute after another process has terminated, or increase memory. | Cancels processing and terminates pddef
Option specification error | Specify the correct option.

Note

If return code 4 is followed by return code 8, the system cancels processing and terminates with final return code 8.

(3) Information that is output in the event of an SQL error

If any of the SQL statements listed below results in an error, the GET DIAGNOSTICS statement can be executed to display error information (if the SQL statement contains a comment, ERROR_POSITION will display the values only without the comment):

CREATE PROCEDURE

CREATE FUNCTION

CREATE TYPE

ALTER PROCEDURE

ALTER ROUTINE

CREATE TRIGGER

Figure 4-2 shows the format of error information.

Figure 4-2 Format of error information

(4) Handling of comments

The system regards any data beginning with /* in an SQL statement as a comment. All characters following /* (including semicolons) are handled as part of the comment. The system regards the first */ that follows /* as the end of the comment.

The following shows examples:

Example 1:
CREATE TABLE T1 (C1 INT) ; /* CU ADDRESS TABLE */   ...Start and end of comment

Example 2:
CREATE TABLE T1 /* CU ADDRESS TABLE */ (C1 INT) ;   ...Start and end of comment

Example 3:
CREATE TABLE T1 /* CU ADDRESS   ...Start and continuation of comment
TABLE */ (C1 INT) ;   ...............End of comment

Example 4:
CREATE TABLE T1 /* CU ADDRESS TABLE * (C1 INT) ;   ...Start and continuation of comment

Example 5:
CREATE TABLE T1 /* CU /* ADDRESS */ TABLE */ (C1 INT) ;
 ...Start and end of comment

Data from /* to */ that is enclosed in double quotation marks (") or single quotation marks (') is not handled as a comment. For details about specifying comments, see the description of the SQL specification format in the manual HiRDB Version 8 SQL Reference. Note that this utility's handling of comments is different from the interactive SQL execution utility (pdsql).

(5) Using a file that contains a BOM

If you selected utf-8 as the character encoding in the pdsetup command, you can use a file with a BOM as the input file for pddef. Note that even when a file with a BOM is used as the input file for pddef, the BOM is skipped.

4.5 Examples

Example 1 shows an example of the use of the database definition utility.

Example 1

Define the following table and index:

Table: STOCK

Index: I1

The following RDAREAs have already been created:

PDBUSER01

PDBUSER02

PDBUSER03

PDBUSER04

Overview

Command execution

Entry of definition SQL from standard input

pddef
 CREATE SCHEMA;                                                 1
 CREATE TABLE STOCK(PCODE CHAR(4),PNAME NCHAR(8),               2
                    COLOR NCHAR(1),PRICE INTEGER
                    SQUANTITY INTEGER)
              IN((PDBUSER01) PCODE<'302S',
                 (PDBUSER02) PCODE>='302S');
 CREATE INDEX I1 ON STOCK(PCODE) IN ((PDBUSER03),(PDBUSER04));  3
<End by pressing CTRL + D >

Explanation

Definition of schema.

Definition of table (STOCK).

Definition of index (I1).

Entry of definition SQL from input file

pddef < /usr/crfile

Explanation

Specification of input file /usr/crfile.

Contents of input file /usr/crfile

CREATE SCHEMA;                                                   1
CREATE TABLE STOCK(PCODE CHAR(4),PNAME NCHAR(8),                 2
                   COLOR NCHAR(1),PRICE INTEGER
                   SQUANTITY INTEGER)
              IN((PDBUSER01) PCODE<'302S',
                (PDBUSER02) PCODE>='302S');
CREATE INDEX I1 ON STOCK(PCODE) IN ((PDBUSER03),(PDBUSER04));    3

Explanation

Definition of schema.

Definition of table (STOCK).

Definition of index (I1).

5. Database Load Utility (pdload)

This chapter describes the database load utility (pdload) that stores user-provided data in a table.

This chapter contains the following sections:

Organization of this chapter

5.1 Function

5.2 Typical examples of data loading

5.3 List of references by purpose

5.4 Command format

5.5 Input data file

5.6 Error information file

5.7 Column structure information file

5.8 Null value/function information file

5.9 Null and default values during data loading

5.10 Using a UOC to load a table

5.11 Rules and notes

5.12 Database status in the event of an error and recovery methods

5.13 Examples

5.1 Function

The database load utility (pdload) loads user-provided data to a table.

Organization of this section

5.1.1 What is data loading?

5.1.2 Loading data to a table with LOB columns

5.1.3 Loading data to a table with abstract data type columns (LOB attribute) provided by a plug-in

5.1.4 Data loading using a utility special unit

5.1.5 Data loading with the synchronization point specification

5.1.6 RDAREAs containing a table subject to data loading

5.1.7 Log acquisition mode during execution of pdload

5.1.8 Executor

5.1.1 What is data loading?

The database load utility reads user-provided data and stores it in a table. This is called data loading. Figure 5-1 shows an overview of data loading.

Figure 5-1 Overview of data loading

Organization of this subsection

(1) Input data file

(2) Control information file

(3) Table

(4) Data loading method by table attribute

(1) Input data file

An input data file contains user-provided data. The database load utility supports four different formats of files. Basically, one of the following two formats is used:

DAT format

In the DAT format, column data is described in characters. This format is generally referred to as the CSV format.

pdload converts column data to the internal HiRDB format before storing it; therefore, the DAT format is suitable for creating a table from data imported from a non-HiRDB system.

Example of data in the DAT format:

Jones,36,1958-10-15,Chicago
           .
           .

Additionally, there is the extended DAT format that enables you to use extended functions. Although the format is basically the same as the DAT format, the extended DAT format supports the extended functions, such as changing the enclosing characters.

Binary format

In the binary format, column data is stored in the internal HiRDB format.

The binary format is excellent in terms of performance, because it matches the internal HiRDB format, thereby requiring no format conversion. This format is suitable when high performance is required, such as for storing a large amount of data.

Example of data in the binary format:

928691ba814081408140000000243f8000000008796f6b6f68616d61
<------------------><------><------><------------------>
       Jones         36       1         Chicago
     :

Note

The upper row of the input data indicates the data and the lower row indicates data contents.

Additionally, you can use a format in which fixed-size data is specified on each line, or a format that is output by pdrorg, shown as follows:

Fixed-size data format

In the fixed-size data format, all lines have the same length and all the data items in a column begin at the same location (the same offset from the beginning of the line). Input data can be specified either in the DAT format or in the binary format.

The fixed-size data format is suitable for a table created from text data that is not delimited by separator characters, or created from binary-format data with a data storage sequence that needs to be changed.

pdrorg-generated binary format

This is an unload data file that is output by pdrorg, specifying the -W option.

The pdrorg-generated binary format is used to migrate data from another HiRDB system.

(2) Control information file

A control information file contains the pdload control statements. These control statements specify an input data file, index information, LOB column information, and other information.

(3) Table

You need to define a table before you can perform data loading.

(4) Data loading method by table attribute

(a) Index defined for the table

You can create an index at the same time as data loading. Or, you can output only the index information during data loading and use pdrorg to create the index later.

(b) Row-partitioned table

You can execute data loading in units of tables or RDAREAs.

5.1.2 Loading data to a table with LOB columns

Organization of this subsection

(1) Data loading method

(2) Input data

(1) Data loading method

If a table contains LOB columns, you can load data to the LOB column structure base table and LOB columns at the same time or separately. A LOB column structure base table is the part of the table without the LOB columns. A LOB column contains BLOB data.

When a table consists of multiple LOB columns, loading data only to the LOB columns later is achieved by a facility for concurrently executing data loading to multiple LOB columns. A database is not stable if data loading has been completed in a LOB column structure base table, but has not been completed in the LOB columns. Make sure that such tables are not updated in any manner, including execution of the PURGE TABLE statement. If you are executing data loading separately, we recommend that you place the applicable RDAREA in command shutdown status to suppress updating of the table by other users.

Figure 5-2 shows the method for loading data to a table with LOB columns.

Figure 5-2 Method for loading data to a table with LOB columns

Explanation

Loading data to the LOB column structure base table and LOB columns at the same time
pdload executes 1 through 4 during the first data loading.

Loading data to the LOB column structure base table and LOB columns separately
Execute steps (a) and (b) in this order:

(a) Loading data to the LOB column structure base table (1 and 2)

Execute data loading to the LOB column structure base table. In this case, load data to the LOB column structure base table and output information about the LOB data from the input data to the LOB middle data.

(b) Loading data to the LOB columns (3 and 4)

Execute data loading on the LOB columns. In this case, also load the information about LOB data from the LOB middle file, which was obtained in (a) previously.

A LOB input file is provided for each column and each row. This means that there must be as many LOB input files as there are LOB columns rows.

A LOB column input file is provided for each column. This means that there are as many LOB column input files as there are LOB columns.

(2) Input data

To load data to a table with LOB columns, you need to provide the input data in one of the following forms:

Input data file | LOB input file
Containing the data other than the LOB columns, and the LOB input file names | As many LOB input files as there are data items to be stored
Containing the data other than the LOB columns, and the LOB data | Not needed

5.1.3 Loading data to a table with abstract data type columns (LOB attribute) provided by a plug-in

Organization of this subsection

(1) Data loading method

(2) Input HiRDB Datareplicator linkage facility

(1) Data loading method

If a table contains abstract data type columns (LOB attribute) provided by a plug-in, load data to the LOB column structure base table and LOB columns at the same time.

(2) Input HiRDB Datareplicator linkage facility

To load data to a table with abstract data type columns (LOB attribute) provided by a plug-in, you need to provide the input data in one of the following forms:

Input data file | LOB parameter file
Containing the data other than the LOB-attribute abstract data type columns, and the LOB parameter file names | As many LOB parameter files as there are data items to be stored
Containing the data other than the LOB-attribute abstract data type columns, and the LOB parameters | Not needed

A LOB parameter is the LOB data used as an input parameter for the constructor function that generates the values to be stored in abstract data type columns.

5.1.4 Data loading using a utility special unit

When executing data loading with a HiRDB/Single Server, you can use a utility special unit to place an input data file.

Figure 5-3 shows data loading using a utility special unit.

Figure 5-3 Data loading using a utility special unit

5.1.5 Data loading with the synchronization point specification

When loading data, usually a transaction is settled after all data has been stored. If the utility terminates abnormally during the processing, the transaction rolls back to the start point, in which case data loading must be re-executed from the beginning.

The data loading method with the synchronization point specification enables a transaction to be settled each time a specified number of data items has been stored. This method is suitable for loading a large amount of data because it reduces the rollback time, as well as the data loading time, in the event of an abnormal termination of the utility.

Data loading with synchronization point specification is not applicable to index creation (batch index creation mode) or LOB column data loading. In such cases, the transaction is settled after all processing is completed.

To execute data loading with the synchronization point specification, specify the option statement (job operand). Figure 5-4 shows an overview of data loading with the synchronization point specification.

Figure 5-4 Overview of data loading with the synchronization point specification

Explanation

At the initial execution, the transaction rolls back after the occurrence of an error. This rollback is to the point of two million data items because the transaction has settled at that point.

The re-execution skips to the point of two million data items and starts storing the remaining data.

5.1.6 RDAREAs containing a table subject to data loading

To protect the UAP from unnecessarily being placed in wait status while accessing a table subject to data loading, you should use the pdhold command to shut down the RDAREAs that contain the table (and the RDAREAs containing indexes if the indexes are also defined for the table).

Parallel execution of data loading into the RDAREAs of a row-partitioned table reduces the length of time the table is locked (time required for data loading is reduced). If an input data file is not available for each RDAREA (only input data files for the table are available), specify the src_work statement. This statement creates an input data file for each RDAREA so that it is possible to perform parallel execution of data loading into the RDAREAs for the row-partitioned table. The files created by this statement are called divided-input data files. For details about the specifiable options and control statements, see 5.11(3) Whether or not options and control statements can be specified when pdload functions are used.

5.1.7 Log acquisition mode during execution of pdload

When you execute pdload, we recommend that you use pre-update log acquisition (-l p) as the log acquisition mode.

In the pre-update log acquisition mode, the utility does not acquire an database update log after update processing, thereby reducing the processing time. Compared to when the log acquisition mode is used, you can shorten the utility's execution time.

5.1.8 Executor

Basically, a table creator executes data loading.

To enable another user execute data loading, you must grant the privileges shown below as appropriate to the data loading mode. For an audit trail table, only its auditor, who is the owner of the table, can execute data loading.

Addition mode (-d option omitted)

A user with the INSERT privilege can execute the data loading.

Creation mode (-d option specified)

A user with the INSERT and DELETE privileges can execute the data loading.

When the Directory Server linkage facility is used, the system permits data loading when the pdload executor's privileges and the executor's role privileges are consistent with the applicable condition above.

5.2 Typical examples of data loading

This section presents three typical examples of data loading:

Loading data to a table with indexes defined

Loading data to a table with LOB columns

Loading data to a table with abstract data type columns provided by a plug-in

Organization of this section

5.2.1 Loading data to a table with indexes defined

5.2.2 Loading data to a table with LOB columns

5.2.3 Loading data to a table with abstract data type columns provided by a plug-in

5.2.1 Loading data to a table with indexes defined

Figure 5-5 shows data loading into a table for which indexes are defined.

Figure 5-5 Loading data to a table with indexes defined

Organization of this subsection

(1) Command to be executed

(2) Control information file

(3) Input data file

(4) Inconsistent order of columns between input data and table

(1) Command to be executed

The following explains the options specified with pdload:

PRODUCT

This is the identifier of the table subject to data loading.

control_file:

This is the name of the control information file.

For the omitted options, the system assumes the following values:

-d omitted: Addition mode

{-a|-b} omitted: Input data file in the DAT format

-i omitted: Batch index creation mode

-l omitted: Pre-update log acquisition mode

(2) Control information file

(a) source statement

The source statement specifies the input data file named /usr/inputfile.

(b) index statement

The index statement specifies the index information file named /usr/idxfile.

(3) Input data file

This example specifies the input data file in the DAT format.

(4) Inconsistent order of columns between input data and table

If the order of columns does not match between the input data file and the table, you can specify a column structure information file to define the correspondence of columns between input data and table.

You can use the column structure information files only when the input data file is in DAT, fixed-size data, or pdrorg-generated binary format (non-FIX).

The following shows an example:

Explanation

The order of input data items does not match the order of table columns.

In this case, use a column structure information file to specify column names in the order of input data items.

5.2.2 Loading data to a table with LOB columns

Figure 5-6 shows data loading into a table with LOB columns.

Figure 5-6 Loading data to a table with LOB columns

Organization of this subsection

(1) Command to be executed

(2) Control information file

(3) Input data file

(1) Command to be executed

The following explains the options specified with pdload:

PPICTURE

This is the identifier of the table subject to data loading.

control_file:

This is the name of the control information file.

For the omitted options, the system assumes the following values:

-d omitted: Addition mode

{-a|-b} omitted: Input data file in the DAT format

-i omitted: Batch index creation mode

-l omitted: Pre-update log acquisition mode

-k omitted: f (Provide as many LOB input files as there are LOB columns rows and specify the names of these LOB input files in the input data file.)

(2) Control information file

(a) source statement

The source statement specifies the input data file named /usr/inputfile.

(b) index statement

The index statement specifies the index information file named /usr/idxfile.

(c) lobdata statement

The lobdata statement specifies the LOB input file's directory named /usr/lobdata. This directory name is specified in such a manner that it results in the absolute path name when combined with the LOB input file name specified in the input data file.

(d) lobmid statement

The lobmid statement specifies the LOB middle file named /usr/lobmid_file.

(3) Input data file

This example specifies the input data file in the DAT format.

Additionally, the example provides separate LOB input files and specifies their names in the input data file.

5.2.3 Loading data to a table with abstract data type columns provided by a plug-in

Figure 5-7 shows data loading into a table with an abstract data type provided by a plug-in. This example uses the HiRDB Text Search Plug-in.

Figure 5-7 Loading data to a table with abstract data type columns provided by a plug-in

Organization of this subsection

(1) Command to be executed

(2) Control information file

(3) Input data file

(4) Column structure information file

(1) Command to be executed

The following explains the options specified with pdload:

-c column_file:

This is the name of the column structure information file.

MEDICINE_MANAGEMENT_TABLE

This is the identifier of the table subject to data loading.

control_file:

This is the name of the control information file.

For the omitted options, the system assumes the following values:

-d omitted: Addition mode

{-a|-b} omitted: Input data file in the DAT format

-i omitted: Batch index creation mode

-l omitted: Pre-update log acquisition mode

-k omitted: f (Provide the LOB parameter files and specify their file names in the input data file.)

(2) Control information file

(a) source statement

The source statement specifies the input data file named /usr/inputfile.

(b) index statement

The index statement specifies the index information file named /usr/idxfile.

(c) lobdata statement

The lobdata statement specifies the LOB parameter file's directory named /usr/lobdata. This directory name is specified in such a manner that it results in the absolute path name when combined with the LOB parameter file name specified in the input data file.

(3) Input data file

This example specifies the input data file in the DAT format.

Additionally, the example provides separate LOB parameter files and specifies their names in the input data file.

(4) Column structure information file

This example specifies the column structure information file named column_file.

MEDICINE_ID

This is a column name for the first data item in the input file.

OPERATION_MANUAL

This is a column name for the second data item in the input file.

func=(SGMLTEXT,param=blob)

This specifies information about the constructor function used to generate the values that are stored in the abstract data type columns.

SGMLTEXT: Name of the constructor function

blob: Type of argument that is passed to the constructor function

5.3 List of references by purpose

The options, control statements, and files to be specified depend on the data loading mode (type of table and type of data loading to be conducted).

sections 5.3.1 Required information through 5.3.4 Information to be specified depending on the data loading method present the tables of items and related options, control statements, and files, along with the corresponding sections. For options, see (1) through (23) in section 5.4.2 Options.

Figure 5-8 shows the relationship among options, control statements, and files.

Figure 5-8 Relationship among options, control statements, and files

Organization of this section

5.3.1 Required information

5.3.2 Information to be specified depending on the attribute of the table subject to data loading

5.3.3 Information to be specified depending on the type of input data file

5.3.4 Information to be specified depending on the data loading method

5.3.1 Required information

To execute pdload, you need to specify the following information. For details, see the sections indicated.

Item | Reference target
Option | Control statement or file
Name of the table subject to data loading | [authorization -identifier.]table-identifier | (22) | source statement | 5.4.4
File containing control statements | control-information-filename | (23)
Format of input data file | DAT format | Omitted | (2) | Input data file | 5.5.1
Binary format | -b | (2) | Input data file | 5.5.2
pdrorg-generated binary format | -b | (2) | Input data file | 5.5.2
-W | (5)
Fixed-length data format | -a | (2) | Input data file | 5.5.3
|  | column name statement | 5.7.1

: Not applicable

5.3.2 Information to be specified depending on the attribute of the table subject to data loading

For details about an applicable item, see the section indicated.

Item | Reference target
Option | Control statement or file
Index is defined | -i | (3) | index statement | 5.4.5
-x | (11) | idxwork statement | 5.4.6
-o | (18) | sort statement | 5.4.7
There are LOB columns | Using LOB input file | -k | (6) | lobdata statement | 5.4.8
lobmid statement | 5.4.10
Using LOB column input file | -k | (6) | lobcolumn statement | 5.4.9
lobmid statement | 5.4.10
LOB input file by the column | 5.5.5
There are abstract data type columns (LOB attribute) provided by a plug-in | -k | (6) | lobdata statement | 5.4.8
There are repetition columns |  |  | array statement | 5.4.12
Input data file | 5.5.4
There are variable-length character strings with columns that have no corresponding input data, and data with a length of 0 is to be stored* | -z | (16) |  |
The inner replica facility is used | -q | (21) |  |
There are constraint definitions |  |  | constraint statement | 5.4.15
Partition storage conditions were changed |  |  | option statement | 5.4.16

: Not applicable

* If you specified WITH DEFAULT during table definition, a space equivalent to one byte or one character is stored. Otherwise, the null value is stored.

5.3.3 Information to be specified depending on the type of input data file

Organization of this subsection

(1) DAT format

(2) Binary format

(3) Fixed-size data format

(1) DAT format

For details about an applicable item, see the section indicated.

Item
Reference target

Option
Control statement

There is no correspondence between input data and table columns
-c
(7)
column name statement
5.7.1

Some of the input data is not to be stored in the table
-c
(7)
skipdata statement
5.7.2

Information about a constructor function is specified to generate values for the abstract data type columns
-c
(7)
column name statement
5.7.1

Separator used in the input data is not a comma (,)
-s
(13)

Code for a space is to be converted in the national character string or mixed character string type input data

option statement
5.4.16

If the input data to be stored in character string or BINARY type column is longer than the defined column length, an input data error is to be detected

option statement
5.4.16

The input data file in DAT format satisfies one of the following conditions:

Data to be stored contains linefeed codes or NULL characters.

Character data is enclosed by a character that is not the double quotation mark (").

extdat statement
5.4.13

Data containing a decimal point is to be stored in INTEGER and SMALLINT columns

extdat statement
5.4.13

: Not applicable

(2) Binary format

For details about an applicable item, see the section indicated.

Item | Reference target
Option | Control statement
There is no correspondence between input data and table columns* | -c | (7) | column name statement | 5.7.1
Some of the input data is not to be stored in the table* | -c | (7) | skipdata statement | 5.7.2
Input data is converted to a null value, or information about a constructor function is specified to generate values for the abstract data type columns | -v | (8) | column number statement | 5.8.1
Code for a space is to be converted in the national character string or mixed character string type input data |  |  | option statement | 5.4.16

: Not applicable

* Applicable if the input data file was created by pdrorg and data loading is to be on a non-FIX table.

(3) Fixed-size data format

For details about an applicable item, see the section indicated.

Item | Reference target
Option | Control statement
There is no correspondence between input data and table columns | -c | (7) | column name statement | 5.7.1
Some of the input data is not to be stored in the table | -c | (7) | skipdata statement | 5.7.2
Input data is converted to a null value, or information about a constructor function is specified to generate values for the abstract data type columns | -c | (7) | column name statement | 5.7.1
The double quotation mark (") is to be stored as input data |  |  | column name statement | 5.7.1
Code for a space is to be converted in the national character string or mixed character string type input data |  |  | option statement | 5.4.16

: Not applicable

5.3.4 Information to be specified depending on the data loading method

For details about an applicable item, see the section indicated.

Item | Reference target
Option | Control statement or file
Database update log is acquired or not acquired | -l | (4) |  |
Synchronization points are specified to load a large amount of data |  |  | option statement | 5.4.16
The pdload execution time is to be monitored |  |  | option statement | 5.4.16
Default value for the DEFAULT clause is to be stored in a table for which the DEFAULT clause is specified |  |  | option statement | 5.4.16
EasyMT is used | -f | (12) | mtguide statement | 5.4.3
emtdef statement | 5.4.3
UOC is used |  |  | srcuoc statement | 5.4.11
Processing is to be cancelled if invalid input data is detected¹ | -e | (14) | Error information file | 5.6
-r | (15) | option statement | 5.4.16
When invalid input data is detected, data loading is to be ignored |  |  | option statement | 5.4.16
Percentage of free table space is to be changed during data loading² | Storing data to unused area | -y | (17) |  |
Storing data in unused area based on the specified percentage of free space |  |  | option statement | 5.4.16
Data loading status message is to be output in units of lines other than 100,000 | -m | (19) |  |
Response time for server-to-server communication is to be monitored | -x | (20) |  |
Batch output data loading is to be conducted using a local buffer, not a global buffer³ | -n | (9) |  |
Authorization identifier of the user who executes data loading is to be changed to a value other than the one specified in the PDUSER environment variable⁴ | -u | (10) |  |
Tuning information is to be collected during the execution of pdload |  |  | report statement | 5.4.17
The input data files for a table are to be divided into input data files that enable parallel data loading into each RDAREA |  |  | src_work statement | 5.4.14

: Not applicable

¹ Suppose that data loading is executed on a table with repetition columns using an input data file in the DAT format. The input data is created in VV format, but it is treated as being in FF format if the elmtype operand is omitted, in which case all input data results in an error, thereby creating an unneeded error information file and error data file. In this case, processing should be cancelled when an error is detected to avoid creating unneeded files or executing unneeded operations.

² During additional data loading, data is usually stored in unused pages according to the percentage of free table space. If the system runs out of unused pages, an error results, and rollback occurs. If this occurs, you must reorganize the table with the database reorganization utility or add or extend RDAREAs with the database structure modification utility before re-executing the data loading. In this case, if you change the percentage of free table space during data loading, you may be able to complete the processing without having to take such actions.

³ If you specify the number of batch output pages, the system outputs the specified number of pages in batch mode, thereby reducing the number of input/output operations.

⁴ If you specify nothing, the value of the PDUSER environment variable takes effect. If you have not specified the PDUSER environment variable, the system assumes the user name of the login window.

5.4 Command format

Organization of this section

5.4.1 Format

5.4.2 Options

5.4.3 mtguide and emtdef statements (specification of MT information)

5.4.4 source statement (specification of input data file information)

5.4.5 index statement (specification of index information file information)

5.4.6 idxwork statement (specification of index information file directory)

5.4.7 sort statement (specification of sort work directory information)

5.4.8 lobdata statement (specification of LOB input file information)

5.4.9 lobcolumn statement (specification of LOB column input file information)

5.4.10 lobmid statement (specification of LOB middle file information)

5.4.11 srcuoc statement (specification of UOC storage library information)

5.4.12 array statement (specification of an array data format for a table containing repetition columns)

5.4.13 extdat statement (specification of information in the extended DAT format)

5.4.14 src_work statement (specification of the output destination of divided-input data files)

5.4.15 constraint statement (specification of check pending status)

5.4.16 option statement (specification of data processing information)

5.4.17 report statement (specification of a file to which pdload tuning information is output)

5.4.1 Format

This section describes the command format of the database load utility. The numbers in the table below correspond to the numbers in the explanation of the options.

Options in bold are important or mandatory.

No.
Format

1

pdload [-d]

2

    [{-a|-b}]

3

    [-i index-creation-method]

4

    [-l log-acquisition-method]

5

    [-W]

6

    [-k LOB-creation-type]

7

    [{-c column-structure-information-filename

8

      |-v null-value/function-information-filename}]

9

   [-n [batch-output-local-buffer-sectors-count],[div],
       [local-buffer-sectors-count-for-random-access]]

10

    [-u authorization-identifier]

11

    [-x]

12

    [-f input-data-file-or-LOB-input-file]

13

    [-s separator-character]

14

    [-e]

15

    [-r input-begin-line]

16

    [-z]

17

    [-y]

18

    [-o]

19

    [-m progress-message-output-interval]

20

    [-X response-monitoring-time-for-server-to-server-communication]

21

   [-q generation-number]

22

    [authorization-identifier,] table-identifier

23

    control-information-filename

Note

Be sure to specify [authorization-identifier,]table-identifier and control-information-filename as the last options.

5.4.2 Options

Organization of this subsection

(1) -d

(2) {-a|-b}

(3) -i index-creation-method

(4) -l log-acquisition-method

(5) -W

(6) -k LOB-creation-type

(7) -c column-structure-information-filename

(8) -v null-value/function-information-filename

(9) -n [batch-output-local-buffer-sectors-count],[div],[local-buffer-sectors-count-for-random-access]

(10) -u authorization-identifier

(11) -x

(12) -f input-data-file-type-or-LOB-input-file-type

(13) -s separator-character

(14) -e

(15) -r input-begin-line

(16) -z

(17) -y

(18) -o

(19) -m progress-message-output-interval

(20) -X response-monitoring-time-for-server-to-server-communication

(21) -q generation-number

(22) [authorization-identifier.] table-identifier

(23) control-information-filename

(1) -d

<<addition mode>>

Specifies that the database load utility is to be executed in the creation mode. If you omit this option, the system assumes the addition mode.

In the creation mode, all existing data is deleted from the table that is to be loaded, and then the input data is stored in the table.

In the addition mode, the input data is added to the existing data in the table.

Rules

In the addition mode, the input data is stored in the pages following the last data in the table. If you use the addition mode to load data on a table with a cluster key defined, the additional data is not stored in the order of cluster key values.

In the addition mode, data is always stored in unused pages. If the system cannot allocate unused pages, an error results. Normally, the system will not use available space in used pages that contain data. However, if you specify the -y option, the system will use used pages that already contain data.

If you execute data loading in units of RDAREAs in the creation mode, the existing table data is deleted only in the specified RDAREA.

During data deletion, the system does not allow a NOWAIT search, even if nowait=yes is specified in the option statement.

Once data loading with the synchronization point specification terminates abnormally, the creation mode is ignored during the re-execution, if specified.

If you execute data loading on a LOB column that is stored in an RDAREA in frozen update status or on a table that contains an abstract data type column with the LOB attribute, specifying the creation mode results in an error because data cannot be deleted. Even when you execute data loading only on a LOB column structure base table, specifying the creation mode results in an error.

For a falsification prevented table, data loading in the creation mode is not permitted.

(2) {-a|-b}

<<DAT format>>

Specifies the format of the input data file.

Omitted: DAT format

-a: Fixed-size data format

-b: Binary format

For details about the input data files, see section 5.5 Input data file.

(3) -i index-creation-method

<<c>>

Specifies the index creation method. There are four ways to create indexes:

c

This indicates the batch index creation mode. If you specify this mode, the system creates indexes in batch mode after creating the table.

When row data is being stored, the system outputs index creation information to an index information file without actually creating an index. The system creates indexes after storing the row data.

Criterion

When a large amount of data is loaded, this method can create indexes at high speed.

Notes

For data loading in the addition mode, the system outputs all index information, including both existing data and added data, to the index information file; therefore, all index entries are re-created.
For additional data loading involving a plug-in index, the system outputs only the index information on the additional data. Therefore, the plug-in index is created only for the index entries that have been added.

If you execute data loading with the synchronization point specification in the batch index creation mode, the processing performance decreases for the following reasons:
For a B-Tree index, the system stores all data and then searches the data pages again to create an index information file.
For a plug-in index, the system starts the index creation process each time the transaction is settled, thereby alternately executing data loading and index creation.

n

This indicates the index information output mode. If you specify this mode, the system outputs only the index information to an index information file.

When row data is being stored, the system outputs index creation information to an index information file without actually creating an index.

Criterion

You can use the index information file obtained to achieve high-speed index creation by executing multiple batch index creation processes concurrently with the database reorganization utility. This method is especially effective for a table that is partitioned and stored in the multiple servers that constitute a HiRDB/Parallel Server.

Notes

If a table is partitioned into multiple RDAREAs in a server and a part of the partitioned table is created by data loading in units of RDAREAs, the system assumes the index information output mode for the non-partitioning key index that is not row-partitioned in the server.

You cannot specify the index information output mode for a table for which a plug-in index is defined.

When you specify the index information output mode, you need to use the database reorganization utility to create the index in batch mode after completing the data loading.

s

This indicates the index update mode. If you specify this mode, the system updates indexes each time a row of data is stored.

Criterion

Use the index update mode when loading a small amount of data to a table that already contains a large amount of data, or when a unique key index or primary key index has been defined and the key values of the data to be stored may be duplicated.

x

This indicates the index information output suppression mode. If you specify this mode, the system does not update indexes nor output index information to an index information file.

Criterion

Use this mode when executing data loading in multiple segments. For example, you should use the index information output suppression mode if data loading needs to be executed n times because there are n volumes of MT.

Notes

If you are executing data loading using the -ix option, specify -ice (batch index creation mode) or -in (index information output mode) at the final execution. If you specify -in, you need to execute batch index creation (-k imp) later using the database reorganization utility.
If you have loaded all data using the -ix option, you need to re-create indexes (-k irk) later using the database reorganization utility.

You cannot specify the index information output suppression mode for a table for which a plug-in index is defined.

If you execute data loading using the -ix option, the system does not update indexes, leaving indexes in uncreated status.

(a) Notes about the creation of an index

If you execute pdload in a mode other than the index update mode (-i s), the system creates an index in batch mode after storing all row data in a table. If a duplicate key error or an out-of-limit duplicate key error occurs during the index creation process, a mismatch may result between the table and the index.
To avoid this problem, create a backup copy in either of the following cases, irrespective of which log-acquisition mode is used:

Tables with a unique key index or primary key index defined

Tables with an index defined on a repetition column

Figure 5-9 shows the index creation method for a row-partitioned index and a non-partitioned index. If a table is partitioned and stored in multiple RDAREAs in a server, there are a row-partitioned index that is stored in as many index storage RDAREAs as there are table storage RDAREAs and a non-partitioned index that is stored in a single index storage RDAREA.
The row-partitioned index is partitioned and stored in the same manner as with the table that is partitioned in the server (RDAREAs INDEX1_1 and INDEX1_2 in the figure).
The non-partitioned index is stored in a single RDAREA in the server, regardless of the number of table storage RDAREAs (RDAREAs INDEX1_3, INDEX2_1, and INDEX2_2 in the figure).

Figure 5-9 Index creation method for partitioning key index and non-partitioning key index

Explanation

After completion of data loading, the system creates indexes according to the specified -i option. If data loading is executed on TABLE1_1 in units of RDAREAs, row-partitioned index INDEX1_1 is created (there is no effect on INDEX1_2). To create non-partitioned index INDEX2_1, however, information about both TABLE1_1 and TABLE1_2 is required. Therefore, in this case, the non-partitioned index is not created (only the index information file for TABLE1_1 is created). To create the non-partitioned index, you need to execute data loading on TABLE1_2 also to create the index information file for TABLE1_2, then execute prong's batch index creation process using the index information files for TABLE1_1 and TABLE1_2.

After table data has been stored, the corresponding indexes are unfinished and unavailable until the batch index creation process is completed.

If you specify -i c or -i n, but there is no data in the input data file, the system outputs index information only for the existing data to the index information file. You can use this file as an input to pdrorg to re-create the index. In this case, be sure to execute pdload in the addition mode (-d option omitted). If you execute it in the creation mode (-d option specified), pdload deletes the table data at first, thereby losing the index information.

If you execute data loading using the -i n option and then use ALTER TABLE to add RDAREAs before executing prong's batch index creation process (-k imp), the index information file output by the -i n option becomes unusable. If you are adding RDAREAs with ALTER TABLE, be sure to complete prong's batch index creation process beforehand. If you have already added RDAREAs using ALTER TABLE, execute prong's index re-creation process (-k ixrc).

When you specify -i c or -i n, the utility creates as many index information files as the number of indexes RDAREAs storing the table. Because these files are opened at the same time during data loading, they may exceed the maximum number of files permitted per process. If this maximum number of files is exceeded, increase the value of the pd_max_open_fds operand in the system definition. However, if the maximum value of the pd_max_open_fds operand is exceeded, either check and, if necessary, revise the number of table partitions per server and the number of defined indexes or specify -i s.

(b) Notes about the creation of a plug-in index

If a plug-in index is defined, you cannot specify the index information output mode nor the index information output suppression mode. In these cases, specify either the batch index creation mode or the index update mode.

For a B-tree structure index, execution of data loading in the batch index creation mode creates all indexes. For a plug-in index, an index is created only on the additional data. Therefore, if you execute data loading involving 0 data records, a B-tree structure index is re-created, but not a plug-in index. However, for a plug-in index, loading 0 data records after re-initializing the index storage RDAREA results in the re-creation of an index. Use this option to repair an index in the event of abnormal termination during an index creation process, or if the index has been damaged due to a disk error.

(c) Notes about specifying -i c or -i n

When -i c or -i n is specified and the index or idxwork statement is omitted, the utility outputs the index information file to the /tmp directory using the following naming conventions:

/tmp/INDEX-index-name-index-storage-RDAREA-name-unique-character-string

If pdload terminates abnormally, this file is not deleted. If you re-execute pdload as is, a new file with a different name is created; this may result in a space shortage in the /tmp directory. If the idxwork statement is specified, the utility also outputs the index information file to the directory specified in the idxwork statement using the same naming conventions. In this case also, if pdload terminates abnormally, the file is not deleted. You should use the rm OS command to delete unneeded index information files.

(4) -l log-acquisition-method

<<p>>

Specifies the method for acquiring the database updating log when pdload is executed.

If pdload terminates abnormally during execution, the database is not restored to its status before pdload was executed even when the update log has been acquired. For details about what to do in the event of abnormal termination of pdload, see 5.12 Database status in the event of an error and recovery methods.

a

This indicates the log acquisition mode. This method collects database updating log information required for rollback and rollforward.

Criteria

This mode is suitable for loading a small amount of data.

When you execute data loading in the log acquisition mode, there is no need to make backups before and after execution of pdload, but performance is lower than in the other modes.

p

This indicates the pre-update log acquisition mode. This method collects database updating log information required for rollback, but it does not collect database updating log information required for rollforward.

Criteria

This mode is suitable for loading a large amount of data.

When you execute data loading in the pre-update log acquisition mode, the execution time is shorter than in the log acquisition mode. However, to handle possible media errors, you should back up the RDAREAs that store tables and indexes after executing pdload.

In the event of an error during execution of pdload, pdload restores the database to the synchronization point immediately before the occurrence of the error. This protects the RDAREAs from being placed in no-log shutdown status; however, the target table is not restored to its status before execution of pdload.

Notes

If data loading is executed on a table for which an abstract data type provided by a plug-in is defined, whether or not the p option (pre-update log acquisition mode) takes effect on the log output by the plug-in depends on the installed plug-in. If the plug-in does not support the p option, the a option (log acquisition mode) is assumed.

n

This indicates the no-log mode. The system does not update the database updating mode information.

Criteria

If only the table subject to data loading and its indexes are defined in the RDAREA, this mode is suitable for loading a large amount of data.

Data loading in the no-log mode is faster than in the other modes. However, to restore the database from its backup in the event of an error during utility execution or from its backup copy and log information in the event of an error on a medium, you must back up the RDAREAs storing the table and indexes both before and after executing the database load utility.

In the event of an error, you can restore the database only up to the point at which the backup was made.

Notes

If an error occurs while executing pdload in the no-log mode, you must either use a backup copy to restore the RDAREAs that were shut down due to the error or re-initialize them.

You cannot use the no-log mode for data loading with the synchronization point specification.

(a) Notes

If you specify n and the database can be restored from the previously acquired backup copy and log information or from the input data (if the table subject to data loading contains no data and only this table is to be stored in applicable RDAREAs), there is no need to make a backup copy prior to execution of pdload.

For details about how to operate when p or n is specified (database updating log information is not collected), see the HiRDB Version 8 System Operation Guide.

A transaction log is always collected by a transaction (T) created by pdload, regardless of the -l option's specification. The system creates the following amount of transaction log information per server; therefore, the formula for determining the amount of log information during execution of pdload is as shown below:

Amount of log information = (1328 + 176 3) T + A (bytes)

T = (x 2) + (y 2) + (z 2)

x: Number of tables*
y: Number of RDAREAs storing LOB columns (LOB attribute)
z: Number of indexes number of RDAREAs storing indexes (not required if -i s is specified)

* The value is the number of synchronization points in the case of data loading with synchronization point specification; otherwise, the value is 1.

A: Amount of system log information that is output according to the database manipulation (amount of database updating log information). This value depends on the value of the -l option. For details about determining the amount of system log information, see the HiRDB Version 8 Installation and Design Guide.
If p or n is specified, the system collects ENQ log information in lock mode. The following is the amount of ENQ log information collected per server:

ENQ log information = (p + q + r) T

p: Number of RDAREAs storing the table
q: Number of RDAREAs storing LOB columns (LOB attribute)
r: Number of RDAREAs storing indexes
Therefore, the amount of system log information the system outputs is the system log file record length ENQ log information.

If Real Time SAN Replication based on the log-only synchronous method is used, and pdload with -l p or -l n specified was executed at the transaction execution site, you must execute the preparations for log application.

(5) -W

Specifies that the file output in binary format by the database reorganization utility with the -W option specified is to be used as the input data file.

Data loading fails if the table definitions, such as the column data types, are different between the unloaded table and the table subject to data loading. However, if you specify a column structure information file, you can load data to a non-FIX table with the column definition sequence and number of columns changed. When you use a UAP or UOC to change the contents of the input data file, you must edit the data in the format in which there are no spaces between the row length, column data offset, and row data.

If you specify this option, make sure that the -b option is also specified.

(6) -k LOB-creation-type

<<f or d>>

Specifies the data input method for storing LOB data in a LOB column, if a LOB parameter is used as an argument of the constructor function that generates the values to be stored in an abstract data type column. When this option is omitted, f is assumed, except that d is assumed when the -W option is specified.

f

Specify this option to prepare a file for each unit of LOB data. These files are called LOB input files.

c

Specify this option to prepare one file for all LOB data contained in one LOB column. This file is called a LOB column input file.

A column-unit LOB column input file is created when data is migrated from another database using a program.

You cannot specify this option for LOB data that is specified as an input parameter of the function that creates data for an abstract data type column. Therefore, if a table contains an abstract data type column that uses LOB as an input parameter, you cannot use a LOB column input file even for another LOB column that is not the abstract data type.

v

For the data to be stored in a BLOB column, provide a LOB input file for each set of LOB data to be stored in the column. Specify the data (LOB parameter) that serves as an input parameter for the constructor function that generates the values for the abstract data type columns if it is to be stored in an input file.

This specification takes effect only when the input data file is a binary-format file.

d

Specify this option to specify LOB data and LOB parameter data for abstract data type columns directly in an input data file.

This specification takes effect only when the input data file is a binary-format file.

When you specify -k d, you cannot execute data loading using UOC.

(a) Criteria

Determine the -k option according to whether or not there are LOB columns and LOB parameters for abstract data type columns and the format of input data file as follows:

LOB column | Format of input data file | Abstract data type column
No | Yes
Without LOB parameter | With LOB parameter
No | DAT format |  |  | -k f
Binary format | -k v or -k d
Fixed-size data format | -k f
pdrorg-generated binary format |  |  | -k d
Yes | DAT format | -k f or -k c | -k f or -k c | -k f
Binary format | -k f, -k c, or -k d | -k f, -k c, or -k d | -k v or -k d
Fixed-size data format | -k f or-k c | -k f or -k c | -k f
pdrorg-generated binary format | -k d | -k d | -k d

: There is no need to specify the -k option.

(b) Rules

If you are creating a LOB column structure base table separately from LOB columns, specify the same options when creating them.

The contents of an input data file and LOB input files depends on the -k option specification as shown as follows:

-k option | Input data file | LOB input file
Data stored in LOB column | Abstract data type LOB parameter | Data stored in LOB column | Abstract data type LOB parameter
f | Specify the name of the LOB input file | Specify the name of the LOB input file | Provide as many files as there are data items to be stored | Provide as many files as there are data items to be stored
c | Specify dummy data |  | Provide as many files as there are columns |
v | Specify the name of the LOB input file | Specify the contents of LOB parameter | Provide as many files as there are data items to be stored | Not required
d | Specify the contents of LOB data | Specify the contents of LOB parameter | Not required | Not required

: Not applicable

For data loading with the synchronization point specification, specify d in the -k option.Neither f, nor c, nor v can be specified.

(7) -c column-structure-information-filename

Specifies the name of a column structure information file.

For details about the column structure information file, see section 5.7 Column structure information file. Specify a column structure information file in the following cases:

The order of columns in the input data file does not match the order of columns in the table.

The number of columns in the input data file does not match the number of columns in the table.

Data in the input data file is to be converted to the data type of the table columns before being stored.

Any column data in the input data file that matches the null comparison value is to be stored as the null value.

A constructor function is used to generate the values for the abstract data type columns.

The number of repetition column elements in the input data file is less than the maximum number of elements specified during table definition.

(a) Rules

If an input data file is in fixed-size data format, be sure to specify a column structure information file. Specification of a column structure information file is optional for an input data file in DAT or pdrorg-generated binary format. For an input data file in the pdrorg-generated binary format, you can specify a column structure information file to load data to a non-FIX table. An attempt to load data to a FIX table using a column structure information file results in an error. To modify the column structure of a FIX table using a column structure information file, treat the corresponding file as the input data file in the fixed-size data format.

If an input data file is in the DAT format and satisfies all the following conditions, there is no need to specify a column structure information file:

Columns of input data are in the same order as the order in which the table columns are defined.

Input data has the same number of columns as the columns in the table.

The constructor function that generates the data to be stored in the abstract data type has the same name as the column data type, and only one constructor function is used.

The number of input data elements to be stored in a repetition column is the same as the maximum number of elements specified for the applicable columns during table definition.

Provide the column structure information file in the host where the database load utility is executed (the pdload command is entered).

A column structure information file and a null value/function information file are mutually exclusive.

(8) -v null-value/function-information-filename

Specifies the name of a null value/function information file.

You can use a null value/function information file to convert input data to a value that represents a null value or to specify information about a constructor function that generates values for the abstract data type columns.

For details about the null value/function information file, see section 5.8 Null value/function information file.

(a) Rules

You can specify a null value/function information file if the input data file is in the binary format, not in the DAT or fixed-size data format.

A null value/function information file and a column structure information file are mutually exclusive.

(9) -n [batch-output-local-buffer-sectors-count],[div],[local-buffer-sectors-count-for-random-access]

Specifies that a local buffer is to be used for loading data into the table. Specifying this option reduces the number of input/output operations because the system uses the local buffer for batch output to access the database.

When this option is omitted, the system uses the global buffer to output one page at a time.

batch-output-local-buffer-sectors-count<unsigned integer> ((2-4096))

Specifies the number of local buffer sectors for batch output. The batch output local buffer is used for data pages.

For the number of batch output local buffers, we recommend a value in the range 16-32. A guidelines is 64 kilobytes/page length.

div

Specify div when all the conditions listed below are applicable. If div is not specified when these conditions are all applicable, the number of input/output operations may increase, thereby affecting performance adversely.

Data is to be loaded by table into a row partitioned table.

Data is to be loaded into a row partitioned table that uses a hash function (HASH0-HASH6), or the key values of the input data that is stored in a table partitioned by key ranges are distributed randomly.

There are multiple RDAREAs at one server in which the table is stored

When div is specified, the required memory size increases because the system allocates as many buffer sectors as there are table partitions in the server.

local-buffer-sectors-count-for-random-access<unsigned integer> ((4-125000))

Specifies the number of local buffer sectors for random access. The random access local buffer is used for index pages.

It is recommended that you change the combination of the number of batch input/output local sectors and the number of random access local buffer sectors according to the table definition. Table 5-1 shows the recommended -n option specification.

Table 5-1 Recommended -n option specification (pdload)

Table type | Column definition | Table partitioning in server
Yes | No
FIX table |  | -n x, div | -n x
Non-FIX table | Variable-length character string whose column length exceeds 256 bytes or a BINARY column is defined | -n, ,y
Abstract data type column is defined | -n x, div, y | -n x, ,y
Repetition column is defined
Other | -n x, div | -n x

Legend:

x: Number of batch output local buffer sectors

y: Number of random access local buffer sectors

: Not applicable

(a) Buffer used by pdload

When the -n option is omitted, the system uses the global buffer. In this case, the transaction performance of a UAP that uses the global buffer drops because a large amount of global buffer space is used during data loading. Specifying the -n option eliminates such buffer contention. Figure 5-10 show the relationship between pdload and buffer.

Figure 5-10 Relationship between pdload and buffer

Explanation:

If only the global buffer is used (-n option is omitted), buffer contention occurs between pdload and the UAP.

When both local and global buffers are used (-n option is specified), buffer contention does not occur between pdload and the UAP. However, for data loading to LOB columns, the system uses the global buffer even when the -n option is specified.

If only the number of batch output local buffer sectors is specified in the -n option, the system uses a single batch output local buffer per RDAREA. If there are multiple RDAREAs, buffer contention occurs because only one batch output local buffer is used. If buffer contention occurs, the number of input/output operations increases, thereby affecting performance adversely. In such a case, specify div. When div is specified, buffer contention will not occur because the system allocates as many batch output local buffers as there are RDAREAs (one batch output local buffer per RDAREA).

Even when the batch output local buffer is specified, the system may use the global buffer depending on the conditions. Table 5-2 describes the relationships between the conditions and the buffer that is used.

Table 5-2 Relationship between conditions and the buffer that is used (pdload)

Condition | Specification of random access local buffer
Not specified | Specified
Global buffer | Batch output local buffer | Global buffer | Batch output local buffer | Random access local buffer
Data page | RDAREA storing LOB column structure base table | FIX table | N | Y | N | Y | N
Non-FIX table | When variable-length character strings or BINARY columns whose column length exceeds 256 bytes are defined | Y | N | Y | N | N
When abstract data type columns or repetition columns are defined and a row of data cannot fit in one page | Y | N | Y | N | N
Other | N | Y | N | Y | N
RDAREA for storing LOB columns | Y | N | Y | N | N
RDAREA for storing LOB attributes | Y | N | Y | N | N
Index page | When key values are searched from the table (-i c or n is specified) | N | Y | N | Y | N
When indexes are created concurrently (-i s is specified) | Y | N | N | N | Y
When batch index creation is executed (-i c is specified) | Y | N | N | N | Y
Directory page | Y | N | Y | N | N

Legend:

Y: Used

N: Not used

(b) Rules

If the global buffer is not sufficient for a rebalancing table, performance may drop considerably. Therefore, if there is no column whose definition length exceeds 256 bytes, we recommend that you specify the number of batch output pages.
If the local buffer specification is not effective for a reason such as the existence of a column whose definition length is 256 bytes or greater, allocate at least the following number of global buffer sectors:
Number of buffer sectors required per RDAREA
= 1024 (number of table storage RDAREAs) 2+ 3

For a rebalancing table with FIX hash partitioning, the system allocates a buffer equivalent to the specified number of pages for each hash group, thereby consuming more memory than for a table that is not partitioned or partitioned by other conditions.

(10) -u authorization-identifier

Specifies the authorization identifier of the user executing the database load utility.

For the default value, see (b) Default value.

When this option is specified, a message requesting password entry is displayed. If no password is required, enter null in response to the message. The utility checks the authorization identifier entered and password to verify that the user is authorized to establish connection with the HiRDB system and to access the table.

(a) Criterion

Specify this option to use an authorization identifier that is not defined in the PDUSER environment variable.

(b) Default value

When this option is omitted, the system assumes the authorization identifier and password as follows:

The system assumes the value of the PDUSER environment variable during the execution of database load utility. Be sure to specify PDUSER if you are executing the utility in the background with & attached by the shell, or in a remote shell environment in which a password cannot be entered. Following are examples of the PDUSER environment variable:

Examples for C shell:

Specifying a password:

setenv PDUSER '"authorization-identifier"/"password"'

Not specifying a password:

setenv PDUSER '"authorization-identifier"'

If the PDUSER environment variable is not set, the system assumes the login window's user name. Enter the password when a message is displayed requesting password entry. If no password is required, enter null in response to the message.

(c) Rules

Do not specify this option if you are executing the utility in the background with & attached by the shell, or in a remote shell environment in which a password cannot be entered.

If you enclose an authorization identifier in double quotation marks ("), the system treats it as being case sensitive; otherwise, the system treats it as in all uppercase letters. If you use the Bourne shell (sh), C shell (csh), or Korn shell (ksh), you need to enclose the authorization identifier in single quotation marks (').

(11) -x

When a cluster key has been defined for the table, this option specifies that data loading is to be performed in the order of the input data without checking to see whether the input data is in ascending or descending order of the cluster key values.

When this option is omitted, the utility performs cluster key checking and treats any out-of-order input data as an error.

(a) Criterion

If you know that the input data is sorted by the cluster key, specify this option to reduce the overhead of cluster key checking.

(b) Note

For a table for which a UNIQUE cluster key has been defined, checking of duplicate keys is not available; therefore, an attempt to store data with a duplicate key will result in an error (rollback).

This option enables input data that is not sorted by the cluster key to be stored in a table for which a cluster key has been defined; however, it does not provide the clustering effect.

(12) -f input-data-file-type-or-LOB-input-file-type

Specifies easymt if the input data files or the LOB input files are EasyMT.

(a) Rules

If you are creating a LOB column structure base table and LOB columns at the same time, you need MTguide for mounting operations to use EasyMT.

If the input data files are EasyMT and the LOB input files are regular files (or vice versa), you need to perform data loading separately for the LOB column structure base table and the LOB columns.

When data is loaded to a table containing abstract data type columns, if LOB data is present as a parameter for the function that generates the data to be stored in an abstract data type column, the LOB input file cannot be assigned to EasyMT. In this case, you cannot specify this option.

(13) -s separator-character

<character string>

For an input data file in DAT format, this option specifies the separator character to be used as the delimiter between data items. When this option is omitted, the comma (,) is assumed.

In the binary or fixed-size data format, this option is ignored, if specified.

(a) Criterion

Specify this option to use a character other than the comma (,) as the separator between data items in the input data.

(b) Rules

You can specify the tab symbol and the pipe symbol (|) as separator characters if they do not occur in the input data. However, so they can be recognized by the shell that processes command line input, these special characters should be enclosed in double quotation marks (").

None of the following characters can be specified as the separator character:

Uppercase letters (A-Z) and lowercase letters (a-z)

Numeric characters (0-9)

The following characters that are used as reserved characters by the utility:
Asterisk (*), double quotation mark ("), underline (_)

The following characters are not suitable for use as separator characters because they can occur in input data codes. Separator characters are single-byte codes; therefore, you cannot specify a double-byte code as a separator character.

Signs for numeric data input (+ or -)

Characters that can occur as Japanese input character codes:
|, \, [, ], (, ), {, },zueng045.tif

The hyphen (-) for date data input

The colon (:) for time data input

The period (.) for time and date interval data input

(14) -e

Specifies that processing is to be cancelled if an error is detected in the input data.

To cancel processing and ignore the storage processing that had been performed up to that point (to roll back), specify the dataerr operand in the option statement.

If you omit both the -e option and the dataerr operand in the option statement, the utility continues processing and stores only normal data in the database even if it detects invalid input data.

When the -e option is specified, the system outputs the cause of error to the error information file only for the first data item resulting in an error. When the -e option is omitted, the system outputs the cause of error for all data resulting in an error.

(a) Criteria

You can cancel processing when the first error is detected in the input data.

Suppose that you are loading data to a repetition column using an input data file in DAT format. Although the input data is created in VV format, it is treated as FF format if the elmtype operand is omitted from the array statement, in which case all input data results in an error and the system creates an unneeded error information file as well as an error data file. In this case, if you specify the -e option, the system cancels the processing when it detects the first error, thereby avoiding the creation of unneeded files.

(b) Rules

If the following conditions are satisfied, the utility cancels processing and rolls back regardless of the specification of this option:

Condition | Reason
In a binary-format input data file, the length field of variable-length data is a negative value. | In a binary-format with no delimitation between rows, row data must be identified because data is divided by the column length. Because data cannot be divided by a negative value, the utility cannot continue processing.
The dataerr operand is specified in the option statement. | When the dataerr operand is specified, the utility rolls back processing. Therefore, continuing with the processing serves no purposes.

The name of an error information file is specified in the control information file. If there is no such specification, the database load utility creates the file in the /tmp directory at the host that contains the input data file. In this case, the database load utility assigns a file name and displays it in a message.

If the server where an input file was prepared using a HiRDB/Parallel Server (the server specified in the source statement) is different from the server containing the table subject to data loading, or an input file is prepared on a utility special unit on a HiRDB/Single Server, the system cannot cancel the processing when it detects any of the following errors:

Duplicate key error on a unique index key or a primary key index

Invalid value for an abstract data type column

If you specify the -e option to execute data loading in units of tables into a table that is divided into multiple servers on a HiRDB/Parallel Server, the system cannot guarantee the extent to which input row data has been stored in a table in the event of an error. Therefore, do not specify the -e option if all of the following conditions are met:

HiRDB/Parallel Server

Data loading in units of tables into a table divided into multiple servers

Tables with a unique key index or primary key index defined, or tables containing columns of abstract data type

If the dataerr operand is specified in the option statement and error data is detected, the utility cancels processing even when the -e option is omitted.

(15) -r input-begin-line

<unsigned integer> ((2-4294967295)) <<1>>

Specifies that data input is to begin at the specified line, not the beginning of the input data file.

(a) Criteria

If the data loading process specifying the -e option is cancelled, specify this option to restart the data loading.

(b) Notes

When a UOC is used for data loading (to read the input data file), the -r option if specified, is ignored.

If you re-execute data loading with a synchronization point specified using the -r option after the initial data loading rolled back due to abnormal termination, the system determines the input begin line as follows:

Status
Input begin line during re-execution

-r input-begin-line
> Line saved during the data loading with a synchronization point specified
-r input-begin-line

-r input-begin-line
= Line saved during the data loading with a synchronization point specified
Line saved during the data loading with a synchronization point specified*

-r input-begin-line
< Line saved during the data loading with a synchronization point specified
Line saved during the data loading with a synchronization point specified*

* The KFPL00810-I message is displayed, indicating the re-execution of pdload.

(16) -z

Specifies that variable-length character string data, variable-length national character string data, and variable-length mixed character string data with a length of 0 is to be stored.

(a) Criteria

Specify this option to avoid storing the null value or single-byte space (one space character) for variable-length character string data, variable-length national character string data, or variable-length mixed character string data.

(b) Notes

For data in the DAT format, the system handles data with a length of zero as follows:
..., " ", ... (Treated as data with a length of 0)
...,, ... (Treated as the null value)

For data in the binary format, the system sets 0 as the actual data length and treats data without the actual data section as having a length of 0.

(17) -y

Specifies that data is to be stored in unused area in used pages during data loading if all unused pages become completely full. When this option is specified, the system displays the KFPH26010-I message before storing data in the unused area.

(a) Criteria

Normally, when the unused pages are used up during data loading, an error results and the processing is rolled back. To avoid this, specify this option so that data loading can be completed by storing data in unused area.

(b) Rules

You cannot specify p (pre-update log acquisition mode) with the -l option.

Once an unused page has been completely used, the specified percentage of unused space per page is not applicable to the data storage.

The -n option, if specified, has no effect after an unused page has been used up.

(18) -o

Specifies that the index information file specified in the index statement is to be deleted automatically after batch index creation terminates normally. Note that the directory specified in the idxwork statement and the index information file in the /tmp directory that was created automatically by pdload are deleted after batch index creation terminates normally, regardless of the specification of this option.

(a) Criterion

An index information file created for plug-in indexes tends to be large and requires a large amount of disk space, if kept on the disk. To make sure that this index information file is deleted, you can specify the -o option to automatically delete index information files after the batch index creation process.

(b) Rules

For data loading in units of RDAREAs, it is necessary to execute pdrorg (-k ixmk) using the index information file output after data loading for the following indexes. Therefore, the -o option, if specified, is ignored in this case.

There are multiple table storage RDAREAs in a single server, but there is only one index storage RDAREA for them.

(19) -m progress-message-output-interval

<unsigned integer> ((1-1000)) <<10>>

Specifies, in units of 10,000 lines, an interval at which a message is displayed indicating the progress of the current process.

(a) Criterion

If the default value, which is 10,000 lines, is too many or too few, specify a desired value.

(b) Rule

During batch index creation, the system ignores this option and displays messages only when the index creation begins and ends.

(20) -X response-monitoring-time-for-server-to-server-communication

<unsigned integer> ((1-65535)) <<300>>

If an error (such as a communication error) occurs at the server where the command was executed, the command may stop responding and the application may stop. To help you detect errors, pdload enables you to monitor the response time for communication during dictionary manipulation performed by the command.

The -X option specifies the response monitoring time for dictionary manipulation (in seconds). If the execution time during dictionary manipulation exceeds the value set in the -X option, pdload assumes a dictionary access error and cancels processing with return code 8.

Criteria

If you want to detect an error in less time than 300 seconds in the event of a no-response from the server due to a communication error or unit down, specify a value that is smaller than 300 in the -X option.

If the system switchover facility is used, the command may keep waiting for a response even though system switchover has been completed. In such a case, you can terminate the command immediately by reducing the monitoring time.

The specified monitoring time may result in a timeout if a response from the dictionary is delayed and the utility's preprocessing is not completed within 300 seconds (which is the default value for the -X option). This can happen when many applications and utilities are executing concurrently. In such an environment, specify a value greater than 300 in the -X option.

(21) -q generation-number

<unsigned integer> ((0-10))

Specifies the generation number of the RDAREA subject to data loading when the inner replica facility is used.

Specify the generation number as follows:

0: Original RDAREA is to be subject to data loading.

1 to 10: Replica RDAREA generation that is to be subject to data loading.

(a) Criteria

Specify this option if you are using the inner replica facility and loading data to an RDAREA other than the current RDAREA.

(b) Rules

When the inner replica facility is not used, this option cannot be specified.

When this option is omitted, the current RDAREA becomes subject to data loading.

If a replica RDAREA is subject to data loading, specify the name of the original RDAREA in the source statement and the generation number subject to data loading in the -q option.

pdload checks the RDAREA subject to data loading for its generation. It performs the following checking; if the utility detects an error, it displays a message and terminates with return code 8.

Checking as to whether the generation numbers match between row-partitioned tables:

When data loading is executed on a row-partitioned table, the utility checks the generation of the target RDAREA.

When the -q option is specified, the utility checks each storage target for the RDAREA of the specified generation. When the -q option is omitted, the utility checks each current RDAREA at the storage target to determine whether their generation numbers match.

Checking as to whether the generation numbers of the RDAREAs for storing the table and index match:

The utility checks the generation numbers of the RDAREAs for storing the table and index.

When the -q option is specified, the utility checks the RDAREAs subject to data loading for the specified generation. When the -q option is omitted, the utility checks all current RDAREAs subject to data loading to determine whether their generations are the same.

Checking as to whether the replica status of the target RDAREAs is the same:

When the -q option is specified, the utility checks the target RDAREAs to determine whether the current RDAREAs are intermixed with non-current RDAREAs.

The following table describes whether or not each file can be used depending on the use of the inner replica facility:

File output condition | Whether or not the file can be used
When inner replica facility is not used | When inner replica facility is used
Original RDAREA | Replica RDAREA
Same generation* | Different generation
Index information file | When inner replica facility is not used | Y | Y | N | N
When inner replica facility is used | Original RDAREA | Y | Y | N | N
Replica RDAREA | N | N | Y | N
LOB middle file | When inner replica facility is not used | Y | Y | N | N
When inner replica facility is used | Original RDAREA | Y | Y | N | N
Replica RDAREA | N | N | Y | N

Y: File can be used.

N: File cannot be used.

* The generation information during file output is the same as the generation information specified in the -q option. When the -q option is omitted, the generation information during file output is the same as the generation information for the current RDAREA.

(22) [authorization-identifier.] table-identifier

Specifies the table identifier of the table subject to data loading. When the authorization identifier is omitted, the system assumes the user name used to establish connection with HiRDB.

(a) Rule

If you enclose an authorization identifier in double quotation marks ("), the system treats it as case sensitive; otherwise, the system treats it as in all uppercase letters. If you use the Bourne shell (sh), C shell (csh), or Korn shell (ksh), you need to enclose the authorization identifier in single quotation marks (').

(23) control-information-filename

Specifies the name of the control information file that contains the control statements of the database load utility.

You can specify any of the control statements listed below in the control information file. For details about the control statements, see sections 5.4.3 through 5.4.17.

mtguide statement (specification of MT information)

emtdef statement (specification of MT information)

source statement (specification of input data file information)

index statement (specification of index information file information)

idxwork statement (specification of index information file directory information)

sort statement (specification of sort work directory information)

lobdata statement (specification of LOB input file information)

lobcolumn statement (specification of LOB column input file information)

lobmid statement (specification of LOB middle file information)

srcuoc statement (specification of UOC storage library information)

array statement (specification of array data format for a table containing repetition columns)

extdat statement (specification of information about the extended DAT format)

src_work statement (specification of the output destination of divided-input data files)

constraint statement (specification of check pending status)

option statement (specification of data processing information)

report statement (specification of a file to which pdload tuning information is output)

(a) Number of specifiable control statements

The following table shows the maximum number of control statements permitted in a control information file:

Control statement | Maximum number of control statements
mtguide statement | 1
emtdef statement | 1
source statement | 1
index statement | Number of indexes number of storage RDAREAs
idxwork statement | Number of index storage servers
sort statement | Number of index storage servers
lobdata statement | 1
lobcolumn statement | Number of LOB columns
lobmid statement | 1
srcuoc statement | 1
array statement | 1
extdat statement | 1
src_work statement | 1
constraint statement | 1
option statement | 1
report statement | 1

(b) Relationship between control statements and options

The following shows the relationship between control statements and options.

Creating an index
Specify the following control statements in the -i option

Control statement | Specification of -i option
c | n | s | x
source statement | R | R | R | R
index statement | O | O |  |
idxwork statement | O | O |  |
sort statement | O |  |  |

R: Required

O: Optional

: Not required

Entering LOB data and parameters
When you enter LOB data and parameters, the control statements to be specified depend on whether or not the LOB column structure base table and LOB columns are created at the same time.

Control statement | Unit of data loading
Loading data to LOB column structure base table and LOB columns | Loading data to LOB column structure base table | Loading data to LOB columns
-k f | -k c | -k v | -k d | -k f | -k c | -k f | -k c
source statement | R | R | R | R | R | R |  |
lobdata statement | R | R | R |  |  |  | R | O
lobcolumn statement |  | R |  |  |  |  |  | R
lobmid statement | R* | R | R* |  | R* | R | R* | R

R: Required

O: Optional

: Not required

* For a LOB parameter to a constructor function that generates data for abstract data type columns, this statement, if specified, is ignored.

Using EasyMT
Specify the following control statements in the -f option:

Control statement | Coding | Specification of -f option
easymt | None
mtguide statement | EasyMT information | O |
emtdef statement | EasyMT information | O |
source statement | Input data file information | R | R

R: Required

O: Optional

: Not required

(c) Files and directories specified in the control statements

The following rules apply to specifying files and directories in the control statements:

Access privileges must be granted to the HiRDB administrator. If some control statements or operands are omitted, the utility may assume that directories or files are to be created in the /tmp or /usr/tmp directory; therefore, you must also grant access privileges to the /tmp or /usr/tmp directory.

5.4.3 mtguide and emtdef statements (specification of MT information)

The mtguide and emtdef statements are specified when EasyMT and MTguide are used for the input data file or the LOB input file.

Specify the mtguide and emtdef statements before the source or lobdata statement.

For details about EasyMT and MTguide, see the following manuals:

EasyMT
EasyMT Version 3 or EasyMT

MTguide
MTguide

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

 mtguide {use|nouse}
 mtdef MT-attribute-definition-filename

(2) Explanation

(a) mtguide {use|nouse}

When magnetic tape is used for the input data file or the LOB input file, this option specifies whether MTguide is to be used for the magnetic tape mounting operation.

When mounting is already completed during the data loading with synchronization point specification, you need to mount from volume 1 again before re-executing.

use

Specify this option if you are using MTguide.

If you perform data loading on the LOB column structure base table and on a LOB column at the same time, specify use.

nouse

Specify this option if you are not using MTguide.

(b) emtdef MT-attribute-definition-filename

<path name>

Specifies the name of the file for which EasyMT is defined as the MT attribute. The following items specified in this file take effect during EasyMT processing:

bufno: Number of I/O buffer sectors

magazin: MT unit allocation pattern

job: Application name

However, if the same item is specified in the source or lobdata statement, the source or lobdata statement specification takes precedence.

HiRDB/Single Server

Create the MT attribute definition file at the server machine that contains the single server.

HiRDB/Parallel Server

Create the MT attribute definition file at the server machine where the system manager is located.

5.4.4 source statement (specification of input data file information)

The source statement specifies information about the input data file.

Criterion

Be sure to specify this statement unless you are loading data only to the LOB columns of a table.

Rule

Specify the source statement in single line (with a maximum length of 1023 bytes). You can specify the source statement only once in a control information file.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

source [RDAREA-area] [{server-name|host-name}:]
     {input-data-filename[,input-data-filename]... |(uoc)}
     [error=error-information-filename]
     [errdata=error-data-filename[, output-rows-count]]
     [errwork=work-buffer-size-for-error-data-file-creation]
     [maxreclen=input-data-length]
     [EasyMT-information]
     [validate sign {date|days-count}]

(2) Explanation

(a) RDAREA-name

<identifier> ((1-30))

When data loading is to be performed by RDAREA on a row-partitioned table, this option specifies the name of the RDAREA to be subject to data loading.

Rules

For a table partitioned by key ranges or FIX hash values, HiRDB checks the data to determine whether or not it can be stored in the RDAREA. If the data falls beyond the specified storage range, an error results. However, for a table partitioned by flexible hash values, HiRDB stores the data as is without checking.

The system treats an RDAREA name that is enclosed in double quotation marks (") as case sensitive; otherwise, the system treats it as all uppercase letters. If an RDAREA name contains a space, you must enclose it in double quotation marks.

If you are specifying a replica RDAREA, specify the original RDAREA name for RDAREA-name and the target generation number in the -q option.

(b) {{server-name|host-name}

Specifies the name of the server or host containing the input data file(s).

server-name <identifier> ((1-8))

HiRDB/Single Server

Do not specify this option for a HiRDB/Single Server.

HiRDB/Parallel Server

Specify the name of the front-end server or back-end server containing the input data file.

If you specified an RDAREA name, you can omit this information, in which case the system assumes the name of the server where the specified RDAREA is stored. If you omitted the RDAREA name, be sure to specify this option.

host-name <identifier> ((1-32))

HiRDB/Single Server

Specify the name of the host containing the input data file. This is the name of the host where the single server is located or the name of the utility special unit.

You can omit this option regardless of whether or not an RDAREA name is specified. When it is omitted, the system assumes the name of the host where the database load utility (pdload command) was executed.

If you are using the system switchover facility, specify the primary system's host name.

HiRDB/Parallel Server

Do not specify this option for a HiRDB/Parallel Server.

(c) input-data-filename

<pathname>

Specifies the absolute pathname of an input data file containing data to be input.

If there are multiple input data files, separate each file by a comma (,). For details about the input data file, see section 5.5 Input data file.

HiRDB/Single Server

Create the input data file(s) in the server machine where the single server is located or in the server machine for the utility special unit.

HiRDB/Parallel Server

Create the input data file(s) in the front-end server or a back-end server.

Rule

With EasyMT, you can specify only up to two input data files.

When using an MTguide, you can specify the symbolic device name or device group name controlled by the MTguide in place of a path name.

The system checks the specified input data file for its accessibility before starting data loading. If access is denied, the system does not execute data loading.

A file containing a byte order mark (BOM) cannot be used as an input data file. For pdload, use files that do not have a BOM.

(d) (uoc)

Specifies that a UOC is to be used to input/output the input data file. For details about UOCs, see section 5.10 Using a UOC to load a table.

(e) error=error-information-filename

<pathname>

Specifies the absolute pathname of the file to which error information is to be output. If an error is detected in the input data, the system outputs the error information to the error information file.

For details about the error information file, see section 5.6 Error information file.

HiRDB/Single Server

Create the error information file in the server machine that contains the input data file.

HiRDB/Parallel Server

Create the error information file in the server that contains the input data file (front-end server or back-end server).

When this option is omitted, the database load utility creates the file with a unique name in the /tmp directory.

If the -e option is specified, the utility creates the error information file only when there is an error in the input data.

(f) errdata=error-data-filename [, output-rows-count]

Specifies that erroneous rows of data are to be output, if detected.

You can correct the rows of data that are output to the error data file and load them again as an input data file.

If the -e option is specified, the system ignores the specification of an error data file.

error-data-filename <pathname>

Specifies the absolute pathname of the file to which erroneous row data is to be output. You need to create this file at the same server as the input data file. If omitted, the system does not output erroneous rows of data.

output-rows-count <unsigned integer> ((1-4294967295)) <<100>>

Specifies the maximum number of erroneous rows of data that can be output. If the number of erroneous rows exceeds the specified value, the system continues processing but outputs only the specified number of erroneous rows of data.

Rules

The following limitations apply to the output results of the error data file:

Input data file in the DAT format

If the actual data is larger than the value specified in the maxreclen operand, the system does not output any data. If the maxreclen operand is omitted and there is at least 32 KB of data, the system does not output the data.

Input data file in the binary format

If the system is unable to edit one line of data due to erroneous length information in the variable-length character string data, the system outputs only the part of the data that was edited successfully. The system does not output fixed-length column data that is less than the defined length.

LOB column input file

The system outputs only the erroneous rows of data from the input data file to the error data file. To re-load data after correcting the input data file, you need to correct the LOB column input file according to the output sequence of the input data file.

An index key value duplication error is not output to the error data file in the following cases:

It is created in the batch index creation mode.

For a HiRDB/Single Server, it is in the index update mode and the input data file is located at the utility special unit. For a HiRDB/Parallel Server, the processing is in the index update mode, the input data file is located at a server other than the server containing the table storage RDAREAs, and a buffer shortage occurred during the creation of the error data file.

Output of an error data file is not applicable when data loading is executed on LOB columns or the input data file used is in binary format created by pdrorg.

Even if an error occurs in a variable-length character string in a binary-format input data file, only the columns up to the one immediately preceding the error are output to the error data file. Note these points when checking the error data file.

(g) errwork=work-buffer-size-for-error-data-file-creation

((0-2097152))

When specifying the errdata operand, specify the buffer size for creating an error data file in KB.

If the KFPL25222-W message is issued during the data loading specifying the errdata operand, and a part of the error data is not output to the error data file, specify this option to re-execute data loading.

If you specify a value of 0 in the errwork operand, neither key duplication errors nor invalid value errors for abstract data type columns are output, but data loading performance improves.

A KFPL25222-W message is issued when all of the following conditions are met:

In a HiRDB/Parallel Server, the server name specified in the source statement is different from the name of the back-end server in which a table storage RDAREA is defined; in a HiRDB/Parallel Server, a table is partitioned by row and stored in multiple back-end servers; or a utility special unit is used in a HiRDB/Single Server.

A unique key index or primary key index is defined for the table subject to data loading, or the table contains columns of abstract data type.

One of the following is true:

The input data file contains data that is not to be stored in the database (data in a column structure information file for which a skipdata statement is specified; data that is longer than a defined column length; or data that matches a null comparison value and is treated as a null value).

Data is to be stored in a column of VARCHAR, NVARCHAR, MVARCHAR, BINARY, or BLOB data type.

Data is to be stored in an abstract data type for which the input parameter type of the constructor function is VARCHAR, NVARCHAR, MVARCHAR, BINARY, or BLOB.

Estimation formula

The following shows a formula for estimating the size of the work buffer for the error data file. This formula provides a value in bytes, but round it up to the nearest KB to specify the option.

Buffer size = {zueng010.tif X/(average length of database storage row + Y) zueng010.tif}
            average length of input data row 2
            number of servers  for which table
              storage RDAREAs are defined

X: Value of pd_utl_buff_size in the system common definitions 1024

Y: FIX table: 24

Non-FIX table: (number of columns + 1) 4 + 24

For details about the average length of database storage row (how to calculate the number of table storage pages), see the HiRDB Version 8 Installation and Design Guide.

Note that the previous estimation formula is based on the average row length. Therefore, a buffer shortage may occur depending on the actual arrangement of row data. If there is enough memory, you can ensure output to an error data file by revising the formula as follows:

For non-FIX tables, set the average length of a database storage row to 0.

Set the average length of an input data row to the maximum length of input data.

(h) maxreclen=input-data-length

This option is applicable to an input data file created in DAT format, extended DAT format, binary format, or pdrorg-generated binary format. When you are using the input data file in the fixed-length data format or a streaming tape device, this operand is ignored, if specified.

When the input data file is in DAT or extended DAT format<unsigned integer> ((0, 32-524288)) <<32>>

For the input data file in the DAT format, if a row of data exceeds 32 KB, this operand specifies the maximum data length per row in the input data file in KB.

If this operand is omitted and the input data file contains a row of data that is 32 KB or greater, or that is greater than the specified operand value, the system cancels the processing.

Rules

If this operand is omitted or a streaming tape device is used, each row of data in the input data file (DAT format) must not exceed 32 kilobytes.

If you are using an unload data file in DAT format that was output with the -W dat option specified in pdrorg, the maximum length is displayed in the KFPL22222-I message.

If you specify 0 in this operand, pdload calculates the row length on the basis of the definition of the table subject to processing. Because the utility uses the table definition, if the input data file contains data that is not to be stored in the table, the value obtained by the utility does not match the input data length, resulting in an error. In this case, specify a non-zero value as the input data length.

Data type or parameter type | Calculation value (bytes) | Formula
INTEGER | 12 | Sign + number of digits + separator character
SMALLINT | 7 | Sign + number of digits + separator character
DECIMAL(m, n) | m + 3 | Sign + number of digits + decimal point + separator character
FLOAT | 24 | Sign + mantissa part + decimal point + e + sign + exponent part + separator character
SMALLFLT | 17 | Sign + mantissa part + decimal point + e + sign + exponent part + separator character
DATE | 11 | Specification format + separator character
TIME | 9 | Specification format + separator character
INTERVAL YEAR TO DAY | 11 | Sign + number of digits + comma + separator character
INTERVAL HOUR TO SECOND | 9 | Sign + number of digits + comma + separator character
TIMESTAMP(p) | 19 + (p + 1) + 1 | Specification format + separator character
CHAR(n), MCHAR(n), VARCHAR(n), or MVARCHAR(n) | n + 3 | Number of characters + double quotation marks + separator character
NCHAR(n), or NVARCHAR(n) | (n 2) + 3 | Number of characters + double quotation marks + separator character
BINARY(n) | n + 3 | Number of characters + double quotation marks + separator character
BLOB | 1025 | Maximum length of path name + separator character

When the input data file is in binary format or the pdrorg-created binary format<unsigned integer> ((0, 32-2097152)) <<0>>

If you are executing data loading on a table with a BINARY column, specify the maximum row length in the input data in kilobytes. If you are executing data loading on a table with no BINARY columns, this operand is ignored, if specified.

Rules

If this operand is omitted or 0 is specified, pdload obtains the maximum row length from the table definition and uses that value for processing. Note that if you have specified the input data length, but the value obtained from the table definition by pdload is smaller, the utility still uses the latter for processing.

If the actual maximum data length is less than the maximum row length obtained by pdload from the table definition, specify this operand to minimize the area to be allocated.

(i) EasyMT-information

[file=filename]

[{,vol=volume-name|,vol=(volume-name[,volume-name]...)}]

[,bufno=buffer-sectors-count][,fileno=file-sequence-number]

Specify this operand if the input data file is an EasyMT file.

By specifying a file name and volume name, you can check to see if the actual input file and volume have the specified names. If you do not want to check the file or volume name, omit this operand.

If omitting a file name, do not specify a comma before the first specified item.

file=filename ~ <alphanumerics> ((1-17))

Specifies the name of the file.

[{,vol=volume-name|,vol=(volume-name[,volume-name]...)}]

~ <alphanumerics> ((1-6))

Specifies the names of the volumes containing the file. You can specify up to 255 volume names as long as they fit in one line.

bufno=buffer-sectors-count ~ <unsigned integer> ((1-256)) <<10>>

Specifies the number of buffer sectors to be used by EasyMT.

fileno=file-sequence-number ~ <unsigned integer> ((1-9999))

Specifies the position of the data file on the magnetic tape. If you omit this operand, the system reads the file located at the next position.

(j) validate sign {date|days-count}

For the EasyMT input data file, this operand specifies the creation date of the input data file or the number of days from the utility execution date during which a read operation is permitted. Note that HP-UX (IPF), Solaris, and Linux do not support this operand.

You cannot specify this operand if the MT label does not contain the creation date in the forms of year (YYYY) and Julian date (DDD), or if the date checking range falls before 1970 or after 2037.

sign

Value depends on whether a date or a days-count is specified:

If date is specified:

Specify = or > as the sign.

=:

Processing is cancelled if the input file's creation date is not the same as the specified date.

>:

Processing is cancelled if the input file's creation date falls before the specified date.

If days-count is specified:

Specify = as the sign.

date

Specifies a date in the format YYYY-MM-DD.

days-count

Specifies a number of days as 0 or a positive integer:

0:

Processing is cancelled if the pdload activation date is not the same as the input file's creation date.

Positive integer:

Processing is cancelled if the pdload activation date is more than the specified number of days since the input file's creation date.

Example

Following are examples of execution status based on the relationship between the value specified in validate and the MT creation date; these examples assume that pdload was activated on February 14, 1996:

Specification example | MT creation date
1996-02-12 | 1996-02-13 | 1996-02-14
validate=1996-02-13 | C | E | C
validate > 1996-02-13 | C | C | E
validate=1 | C | E | E

E: Data loading is executed.

C: Data loading is cancelled.

5.4.5 index statement (specification of index information file information)

When executing data loading in the batch index creation or index information output mode, use the index statement to specify information about the index information file to which index information is to be output.

Criteria

Specify the index statement, if possible, so as to avoid a space shortage in the /tmp directory.

If there are many indexes or index storage RDAREAs, you should specify the idxwork statement.

Rules

Specify as many index statements as there are (the number of indexes number of index storage RDAREAs).

When the index statement is omitted, the system creates an index information file under the directory specified in the idxwork statement. If the idxwork statement is also omitted, the system creates an index information file in the /tmp directory on the server that contains the index storage RDAREAs.

If you specify both index and idxwork statements, the index statement takes effect.

If no index has been defined for the target table, do not specify the index statement.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

index index-identifier [RDAREA-name] index-information-filename

(2) Explanation

(a) index-identifier

Specifies the identifier of the index.

The system treats an index identifier enclosed in double quotation marks (") as case sensitive; otherwise, the system treats it as all uppercase letters. Enclose an index identifier in double quotation marks if it contains a space.

(b) RDAREA-name

<identifier> ((1-30))

For a row partitioned table, this operand specifies the name of the RDAREA containing the index.

If you are specifying a replica RDAREA, specify the original RDAREA name for RDAREA-name and the target generation number in the -q option.

The system treats an RDAREA name enclosed in double quotation marks as case sensitive; otherwise, the system treats it as all uppercase letters. Enclose an RDAREA name in double quotation marks if it contains a space.

(c) index-information-filename

<pathname>

Specifies the absolute pathname of the index information file to which index information is to be output.

This index information file must be in the server machine or back-end server where the index storage RDAREA is located.

5.4.6 idxwork statement (specification of index information file directory)

When the index statement is omitted, the idxwork statement specifies the name of the directory in which an index information file is created automatically.

Criterion

Specify the idxword statement, if possible, so as to avoid a space shortage in the /tmp directory.

Rules

If the index and idxword statements are both omitted, the system creates an index information file in the /tmp directory on the server where the index statement RDAREAs are located.

You can specify as many idxwork statements as follows:
HiRDB/Single Server:
Specify only one idxwork statement.
HiRDB/Parallel Server:
Specify as many idxwork statements as there are servers in which the partitioned indexes are stored for a row-partitioned table. For a table that is not partitioned, or when loading data in units of RDAREAs for a partitioned table, specify only one idxwork statement.

If both index and idxwork statements are specified, the index statement takes effect, in which case the system ignores the idxwork statement.

If no index has been defined for the target table, do not specify the idxwork statement.

Organization of this subsection

(1) Format

(2) Explanation

(3) Notes

(1) Format

idxwork [server-name] directory-name

(2) Explanation

(a) server-name

<identifier> ((1-8))

Specifies the name of the server at which the index information file is to be created.

HiRDB/Single Server

Do not specify this operand for a HiRDB/Single Server. The name of a single server is ignored, if specified.

HiRDB/Parallel Server

Specify the name of the server at which the index information file is to be created.

(b) directory-name

<pathname> ((1-255))

Specifies the absolute pathname of the directory in which the index information file is to be created.

(3) Notes

This subsection shows the name of the index information file that is created automatically.

(a) When the inner replica facility is not used

directory-name/INDEX-index-name-index-storage-RDAREA-name
-unique-character-string

Example:

If the directory name is /hd400, index name is IDX1, and the name of the index storage RDAREA is USER01 in the idxwork statement, the index information file is created under the following name:

/hd0400/INDEX-IDX1-USER01-aaaa00001

(b) When the inner replica facility is used

directory-name/INDEX-index-name
-index-storate-RDAREA-name-GNgeneration-number-unique-character-string

Example:

If the directory name is /hd400, the index name is IDX2, the names of the index storage RDAREA is USER01, and the generation of the target RDAREA is 2 in the idxwork statement, the index information file is created under the following name:

/hd0400/INDEX-IDX2-USER01-GN2-aaaa00002

5.4.7 sort statement (specification of sort work directory information)

When loading data in the batch index creation mode for B-tree indexes, you can use the sort statement to specify the directory for a sort work file.

Criterion

Specify the sort statement, if possible, so as to avoid a space shortage in the /tmp directory.

Rules

When the sort statement is omitted, the utility assumes the /tmp directory in the server where the index storage RDAREAs are located.

If only a plug-in index is defined for the table, the sort statement, if specified, is ignored.

You can specify as many sort statements as follows:
HiRDB/Single Server:
Specify only one sort statement.
HiRDB/Parallel Server:
Specify as many sort statements as there are servers in which the partitioned indexes are stored for a row partitioned table. Even with the indexes of a row partitioned table, if data loading is executed in units of RDAREAs, specify only one sort statement.

If no index has been defined for the target table, do not specify the sort statement.

Organization of this subsection

(1) Format

(2) Explanation

(3) Note

(1) Format

sort [server-name] directory-name[,buffer-size-for-sorting]

(2) Explanation

(a) server-name

<identifier> ((1-8))

Specifies the name of the server in which the sort work file is to be created.

HiRDB/Single Server

Do not specify this operand for a HiRDB/Single Server. A single server name is ignored, if specified.

HiRDB/Parallel Server

Specify the name of the server in which the sort work file is to be created.

(b) directory-name

<pathname>

Specifies the absolute pathname of the directory under which the sort work file is to be created.

(c) buffer-size-for-sorting

<unsigned integer> ((128-2097152)) <<1024>>

Specifies in KB the amount of memory that is to be used as the buffer.

For a HiRDB/Single Server, the system reserves this buffer at the single server; for a HiRDB/Parallel Server, the system reserves it at a back-end server.

The sort processing creates a temporary work file in a specified directory. You can use the formula shown below to minimize the size of this file. Note that this is just a guideline. If there is not enough memory or most data is sorted in the order of index key values, do not specify a value that is larger than necessary. This formula provides the value that minimizes the file size; it does not minimize the sorting time. If there is enough memory, specify a buffer whose size is several megabytes to several dozens of megabytes.

n

Number of data items (sum of existing data items in the table and the data items to be added). For a repetition column, this is the number of elements, not the number of rows.

k

Key length (calculated based on the maximum value). For the formula for determining the key length, see a sample calculation of index storage pages in the HiRDB Version 8 Installation and Design Guide.

x

10, if all key structure columns are fixed length; 12, if some of the key structure columns are variable length.

c

Number of columns comprising the index.

y

2 in Linux; 1 otherwise.

z

c 4 for a variable-length multicolumn index; 0 otherwise.

K

k + c + 8 for a variable-length multicolumn index; k + 12 otherwise.

N

(c 2) + y for a variable-length multicolumn index; 3 + y otherwise.

R

k + x + z

A

R + (K + 8) + 28 for 32-bit mode HiRDB; R + (K + 8) + 56 for 64-bit mode HiRDB.

B

R + (K + 8) + 56 for 32-bit mode HiRDB; R + (K + 8) + 104 for 64-bit mode HiRDB.

C

2092/(N 32) + (K + 8) for 32-bit mode HiRDB; 2112/(N 32) + (K + 8 for 64-bit mode HiRDB.

(3) Note

Do not allocate NFS to the directory that is specified in the sort statement. If NFS is so allocated, the size of the work file for sorting becomes twice as large as when local files are used. Other problems that arise include the fact that work files for sorting remain.

5.4.8 lobdata statement (specification of LOB input file information)

When loading data to a table containing LOB columns or entering LOB data as an input parameter for a constructor function, you can use the lobdata statement to specify the LOB information.

Criteria

Specify the lobdata statement when loading data to a table with LOB columns (except when loading data only to the LOB column structure base table).

You can also specify the lobdata statement when loading data to a table with abstract data type columns using LOB data as an input parameter to a constructor function.

Rules

You can specify the lobdata statement if you also specify the -k f, -k c, or -k v option.

You can load data to both LOB column structure base tables and LOB columns at the same time or to the LOB column structure base tables first and then to the LOB columns.
If you are loading data only to the LOB column structure base table, do not specify the lobdata statement. The lobdata statement is required to store data in both LOB column structure base tables and LOB columns at the same time or to the LOB columns later.

If you are providing a LOB input file for each LOB column and LOB parameter (LOB data as an input parameter to the constructor function), specify the file name in the data section corresponding to the LOB column in the input data file.
If you specify the absolute path name of this file, the size of the input data file increases, resulting in complicated coding.
If all LOB input files are stored in one directory, you should specify the directory name in the lobdata statement and the file names in the input data file, in which case the utility combines the specified directory name and file name to obtain the absolute path name. Note that this directory name specification is valid only when the names of LOB input files are specified in the input data file; otherwise, the utility ignores the directory name, if specified.

If the target table contains no LOB column or the input parameter of the constructor function for creating values to be stored in the abstract data type is not LOB data, do not specify the lobdata statement.

Organization of this subsection

(1) Format

(2) Explanation

(3) Notes

(1) Format

lobdata [{LOB-input-filename[,LOB-input-filename]
|LOB-input-file-directory-name}]
[EasyMT-information]

(2) Explanation

(a) {LOB-input-filename[,LOB-input-filename]| LOB-input-file-directory-name}

If LOB input files are EasyMT files, this operand specifies the names of the LOB input files; otherwise, this operand specifies the name of the directory that contains the LOB input files.

LOB-input-filename[,LOB-input-filename] <path name>

If the LOB input file is an EasyMT file, specify the absolute path name of that file. You can specify a maximum of two LOB input files.

When using MTguide, you can specify the symbolic device name or device group name controlled by MTguide.

LOB-input-file-directory-name <path name>

If all LOB input files are placed in a specific directory, specify the absolute path name of the directory.

Specify this path name along with the LOB columns' file names in the input data file using the source statement or the LOB column input file name using the lobcolumn statement in such a manner that they result in the absolute path name of the LOB input file when combined.

Notes

The absolute path name created can be no greater than 1,023 bytes.

If you specify the absolute path name of the LOB input file in the input data file using the source statement or the LOB column input file using the lobcolumn statement, you can omit the directory name of the LOB input files.

(b) EasyMT-information

[{vol=volume-name|vol=(volume-name[,volume-name]...)}]

[,bufno=buffer-sectors-count]

Specify this operand if the LOB input files are EasyMT files.

By specifying a volume name, you can check to see if the actual volume has the specified name. If you do not want to check the volume name, omit this operand. If omitting a file name, do not specify a comma before the first specified item.

{vol=volume-name|vol=(volume-name[,volume-name]...)}

<alphanumerics> ((1-6))

Specify the name of the file.

You can specify up to 255 volume names as long as they fit in one line.

bufno=buffer-sectors-count <unsigned integer> ((1-256)) <<10>>

Specify the number of buffer sectors to be used by EasyMT.

(3) Notes

The following table describes the data loading method depending on whether or not there is a LOB column, an abstract data type column with the LOB attribute, or a lobdata statement. This example uses SGMLTEXT type as the abstract data type column with the LOB attribute.

Table definition | lobdata statement
Specified | Not specified
With LOB column | With SGMLTEXT type columns | Data is loaded to the LOB column structure base table, SGMLTEXT type columns, and LOB columns at the same time. | Data is loaded to the LOB column structure base table and SGMLTEXT type columns at the same time. Data is then loaded to LOB columns.
Without SGMLTEXT type columns | Data is loaded to the LOB column structure base table and LOB columns at the same time. | Data is first loaded to the LOB column structure base table and then to LOB columns.
With no LOB column | With SGMLTEXT type columns | Data is loaded to the abstract data type column structure base table and SGMLTEXT type columns at the same time.
Without SGMLTEXT type columns | Results in an error. | Data is loaded to the table without a LOB column or SGMLTEXT type column.

5.4.9 lobcolumn statement (specification of LOB column input file information)

When loading data to a table containing LOB columns, if you use LOB column input files, you can use the lobcolumn statement to specify the file information.

Criteria

Specify the lobcolumn statement to use a LOB column input file to load data to a table with LOB columns.

A LOB column input file is created, for example, when data is migrated from another database using a program.

Rules

You can specify the lobcolumn statement only when you also specify the -k c option.

If the table to be loaded contains multiple LOB columns, you need to create the lobcolumn statement for each column. However, when loading LOB columns by RDAREA, you need only one lobcolumn statement.
If the input data file of the LOB column structure base table is in DAT format and not all the columns are specified in this file, but only the corresponding columns are specified in the column structure information file, then you can omit the lobcolumn statement for those LOB columns that are not specified. In this case, the lobcolumn statement, if specified, is ignored, and the KFPL16325-W message is issued. The system then creates the LOB specified data as null values or default values, depending on the LOB column specification made during the table definition.

There is no need to specify the lobcolumn statement when loading data only for the LOB column structure base table.

You cannot specify the lobcolumn statement for a table that contains columns of abstract data type.

If the target table contains no LOB column, do not specify the lobcolumn statement.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

lobcolumn [LOB-column-name]
          LOB-column-input-filename [,LOB-column-input-filename]...

(2) Explanation

(a) LOB-column-name

Specifies the name of a LOB column in the table subject to data loading.

You can omit this operand if there is only one LOB column or the LOB columns are to be loaded in units of RDAREAs.

Rules

If the table contains multiple LOB columns, be sure to specify this operand.

The system treats a LOB column name enclosed in double quotation marks (") as case sensitive; otherwise, the system treats it as all uppercase letters. Enclose a LOB column name in double quotation marks if it contains a space.

(b) LOB-column-input-filename [,LOB-column-input-filename]...

<pathname>

Specifies the names of the LOB column input files.

Specify each file name in such a manner that it results in the absolute pathname when combined with the directory name specified with the lobdata statement. If you omit the directory name in the lobdata statement, specify the absolute pathnames in this operand.

Rules

The maximum length of the file name for a LOB column input file is 1,023 characters.

When specifying multiple file names, make sure that each file name corresponds to the right column in the input data file for the LOB column structure base table.

If a file is created in EasyMT, specify only the file name used in EasyMT.

Place the LOB column input files at the following location:

HiRDB/Single Server

Place the LOB column input files at the host of the single server or the utility special unit. To specify the host name, use the lobmid statement.

HiRDB/Parallel Server

Place the LOB column input files at the front-end server or a back-end server. To specify the server name, use the lobmid statement.

5.4.10 lobmid statement (specification of LOB middle file information)

When loading data to a table containing LOB columns, you can use the lomid statement to specify information about the LOB middle files.

During the creation of a LOB column structure base table, the system outputs information needed for data loading to LOB columns to LOB middle files.

Criteria

When loading data to a table with LOB columns, if you specify the -k d option, be sure to specify the lobmid statement. However, the lobmid statement, if specified, is ignored for a LOB input parameter to a constructor function that generates values to be stored in the columns of abstract data type.

Rules

Specify the lobmid statement if you also specify the -k f, -k c, or -k v option.

The contents of a LOB middle file depend on the specification of the -k option. If you are creating a LOB column structure base table separately from LOB data, you must specify the same -k option.

When creating the LOB column structure base table and LOB columns at the same time, the source statement has precedence; therefore, there is no need to specify the server name, host name, or error information file name. If specified, they are ignored.

If the target table contains no LOB column, do not specify the lobmid statement.

Organization of this subsection

(1) Format

(2) Explanation

(3) Notes about the LOB middle files

(1) Format

lobmid  [RDAREA-name][server-name|host-name]:
         LOB-middle-filename[,LOB-middle-filename]...
        [error=error-information-filename]

(2) Explanation

(a) RDAREA-name

<identifier> ((1-30))

Specifies the name of the user LOB RDAREA.

If you omit this operand, the system loads the entire contents of the specified LOB middle files.

If you are specifying a replica RDAREA, specify the original RDAREA name for RDAREA-name and the target generation number in the -q option.

The system treats an RDAREA name in double quotation marks as case sensitive; otherwise, the system treats it as all uppercase letters. Enclose an RDAREA name in double quotation marks if it contains a space.

(b) [server-name|host-name]

Specifies the name of the server or host where the LOB middle files are located.

server-name <identifier> ((1-8))

HiRDB/Single Server

Do not specify this information for a HiRDB/Single Server.

HiRDB/Parallel Server

Specify the name of the front-end server or back-end server where the specified LOB middle files are located.

If you specified an RDAREA name, you can omit this operand (be sure to specify either the RDAREA name or the server name).

If the server name is omitted, the system assumes the name of the server where the specified RDAREA is located.

host-name <identifier> ((1-32))

HiRDB/Single Server

Specify the name of the host where the specified LOB middle files are located.

This must be the host name of the single server or the utility special unit.

You can omit this operand whether or not you specified an RDAREA name. If omitted, the system assumes the name of the host where the database load utility (pdload command) is executed.

HiRDB/Parallel Server

Do not specify this information for a HiRDB/Parallel Server.

(c) LOB-middle-filename

<pathname>

Specifies the absolute pathname of a LOB middle file.

During the creation of a LOB column structure base table, the system outputs the information required for loading LOB column data to this LOB middle file. During the data loading to LOB columns, the system retrieves necessary information from this LOB middle file.

(d) error=error-information-filename

<pathname>

Specifies the absolute pathname of the file to which error information is to be output.

This file must be located at the server machine or server where the LOB middle files are located.

If omitted, the database load utility creates a file with a unique name in the /tmp directory. For details about the error information file, see 5.6 Error information file.

(3) Notes about the LOB middle files

If you are creating a LOB column structure base table separately from LOB columns, note the following when creating the LOB columns:

If you created a LOB column structure base table by executing pdload more than once using the same input data files, you can specify all the LOB middle files output by pdload in the lobmid statement when creating the LOB columns. In this case, make sure that each specified LOB middle file corresponds to the right line number in the input data file for the LOB column structure base table.
If the order of the specified LOB middle files is wrong, an error results because the system cannot establish a correspondence with the LOB column input files.

If you created a LOB column structure base table by executing pdload more than once using different input data files, you cannot specify more than one LOB middle file output by pdload in the lobmid statement at any one time when creating the LOB columns.
If you specify more than one such LOB middle file at the same time, an error results because the system cannot establish a correspondence with the LOB column input files. Therefore, when creating the LOB columns, provide a LOB column input file corresponding to each input data file and execute pdload separately.

5.4.11 srcuoc statement (specification of UOC storage library information)

To use UOC to edit data and then store the data in a database, you can use an srcuoc statement to specify the UOC information. For details about UOCs, see section 5.10 Using a UOC to load a table.

Criterion

Specify the srcuoc statement to execute data loading using a UOC.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

srcuoc library-name entry=function-name [param='user-parameters']

(2) Explanation

(a) library-name

<pathname>

Specifies the absolute pathname of the shared library where the UOC is stored.

(b) entry=function-name

Specifies the name of the function in the library that is to be called.

(c) param='user-parameters'

<character string> ((1-1,023 bytes))

Specifies user parameters to be passed to the UOC (because the user cannot use the command line to pass parameters directly to the UOC).

The character string specified in this operand is passed as is to the UOC via the interface area.

Do not include any space or tab in the user parameters character string.

5.4.12 array statement (specification of an array data format for a table containing repetition columns)

For a table containing repetition columns, you can use the array statement to specify the handling of the array data format and null values specified in the input data file.

Criteria

Specify the array statement to execute data loading on a table containing repetition columns.

When this statement is omitted, the system assumes the FF format for array data in the DAT or fixed-size data format file or the VV format for array data in the binary format file. For the null value option, the system assumes c.

Rules

Specify this control statement for all repetition columns contained in the table. If you need to modify a specification on a column-by-column basis, specify this statement in a column structure information file or in a null value/function information file.

The following terminology is used in the explanation of data loading into a table containing a repetition column:
Maximum number of elements:
This is the number of elements specified for a given column during table definition.

Specified number of elements:
This is the number of elements specified in the input data file from the maximum number of elements. You can specify this value in a column structure information file or in a null value/function information file.

Current number of elements:
This is the effective number of elements specified in the input data file.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

array [elmtype=array-data-format] [nullset=null-value-option]

(2) Explanation

(a) elmtype=array-data-format

Specify either ff, fv, or vv.

When the elmtype operand is omitted, the array data takes the FF format for a DAT or fixed-size data format file; it takes the VV format for a binary-format file.

For details about the array data formats, see section 5.5.4 Arrayed data format for tables containing repetition columns.

ff

This refers to a fixed field fixed element (FF) format.

For this format, always specify a fixed number of element data items without specifying a current number of elements (the effective number of elements specified in the input data file) in the input data.

Criterion

The FF format is useful for storing data in a repetition column without specifying the current number of elements in the input data.

Rules

The number of element data items specified in the input data must be no greater than the number of elements specified in the table definition.

You can specify the FF format for the following input data formats:
DAT format
Binary format
Fixed-size data format

The utility determines whether or not the specified data is to be stored in the database on the basis of whether the following conditions are met:
Whether specified data represents null values
How null values are to be handled

fv

This refers to a fixed field variable element (FV) format.

For this format, specify the current number of elements along with the element data in the input data. This input data must contain as many element data items as there are elements specified in the table definition, column structure information file, or null value/function information file.

Criterion

Because the FV format allows the processing of data in fixed length, it facilitates the creation and modification of data by UAPs, but at the expense of an increase in file size.

Rules

You can specify the FV format for the following input data formats:
Binary format
Fixed-size data format

The FV format specifies input data in terms of a fixed-length data type. Therefore, for a variable-length data type (VARCHAR, MVARCHAR, or NVARCHAR), the valid data length must be specified at the beginning of each element data item. Following the valid data, the remaining portion of data must be padded with fill characters up to the length defined in the table, so that the input data always has the length defined for the table.

vv

This refers to a variable field variable element (VV) format.

For this format, specify the current number of elements along with the element data in the input data. The number of specified element data items must be equal to the current number of elements.

Criteria

Because the VV format requires the specification of a minimum length of data, the file size can be smaller than in the FV format. However, because it supplies data only in the current number of elements, this format makes the task of data modification by a UAP more complicated when compared with the FF or FV formats.

Rules

For a variable-length data type, specify data equal in length to the valid data length specified at the beginning of each element data item.

You can specify the VV format for the following input data formats:
DAT format
Binary format

You must specify the array data format described previously in one of the following files according to specification units:

Specification units | File to be specified | Description
Tables | Control information file | Specify with the elmtype operand of the array statement.
Columns | DAT or fixed-size format | Column structure information file | Specify with the elmtype operand.
Binary format | Null value/function information file | Specify with the elmtype operand.

(b) nullset=null-value-option

<<c>>

With the FF array data format, this operand specifies how null value storage is to be handled if null values are specified in an element through the end of the specified elements.

When specified with a format other than the FF format, this option is ignored.

Specify one of the following values for the null value option:

c: Nothing is to be stored in a specified element.

e: Null values are to be stored in a specified element.

5.4.13 extdat statement (specification of information in the extended DAT format)

You can use the extdat statement to use the following extended functions with input data files in the DAT format:

When you specify the extdat statement, then, whether or not the operands are specified, you can change the enclosing character and use all extended functions other than capability to store decimal-point data in INTEGER or SMALLINT columns.

Entering the null character (0x00), linefeed symbol (0x0a), and carriage-return symbol (0x0d0a) in character, national character string, and mixed character string data types

Entering data with an enclosing character (") specified in the numeric, date interval, and time interval data types

Deleting single-byte spaces and tabs from the input data section of columns of the numeric, date, date interval, time, and time interval data types

Changing the enclosing character

Entering the enclosing character itself (two consecutive enclosing characters are treated as one data item)

Storing decimal-point data in INTEGER and SMALLINT columns

The enclosing character is the character specified in the enclose operand of the extdat statement. When this operand is omitted, the double quotation mark (") is used as the enclosing characters.

If the data immediately before or after a separator character is closed in the enclosing characters, the enclosing characters are not input. However, any enclosing character contained in the character string that is enclosed in the enclosing characters is input.

In the DAT format, the double quotation marks are used as the enclosing characters (you cannot change this enclosing character).

Criterion

Specify the extdat statement to use the above extended functions for a DAT-format input data file.

Organization of this subsection

(1) Format

(2) Explanation

(3) Description of the extended functions

(1) Format

 extdat [enclose=enclosing-character]

        [decin={yes|no}]

(2) Explanation

(a) enclose=enclosing-character

<character string> ((1 byte))

Specifies the enclosing character to be used to enclose each column value of the input data.

Rules

If data immediately before or after the separator character is enclosed by the enclosing characters, those enclosing characters are not input.

To treat an enclosing character as data, specify the enclosing character twice in succession. For example, if the single quotation mark (') is the enclosing character, specify two consecutive single quotation marks ('').

There are differences in the handling of enclosing characters between the DAT and extended DAT formats. For details about the entry of input data and handling of enclosing characters, see 5.5.1 DAT format.

None of the following characters can be specified as the enclosing character:
- Space, tab, asterisk (*)
- Character used as the separator character

In the case of Shift JIS Kanji codes, the following characters are not suitable for the enclosing character because they may duplicate input data codes:
- Characters used in the data in the input data file
- Characters that can occur as Japanese input character codes

Double-byte codes cannot be specified, because the enclosing character must be a single-byte code.

(b) decin={yes|no}

Specifies whether or not data with a decimal point is to be stored in INTEGER and SMALLINT columns.

yes:

Store data with decimal point.

When yes is specified, the extdat statement treats all characters up to the first decimal point as data and ignores all subsequent characters; it does not check the format. The value that is actually stored is the integer with all decimal places discarded.

no:

Do not store data with decimal point.

When no is specified, the extdat statement treats any data with decimal point as erroneous data and does not store it in an INTEGER or SMALLINT column.

(3) Description of the extended functions

(a) Entering the null character (0x00), linefeed code (0x0a), and carriage-return code (0x0d0a) in character string data, national character string data, mixed character string data, or BINARY type

If the input data of the character string data, national character string data, mixed character string data, or BINARY type is enclosed in the enclosing character, the utility treats the null character (0x00), linefeed code (0x0a), and carriage-return code (0x0d0a) as data. If the input data is not enclosed in the enclosing character, the utility treats the null character, linefeed code, and carriage-return code as delimiters for data or the end of line.

For example, suppose CHAR(16) data is "California\0Napa". If you specify the extdat statement, California\0Napa is entered; otherwise, you cannot enter this data.

(b) Entering data with the enclosing character (") specified in the numeric, date interval, and time interval data types

You can enter data of the numeric, date interval, and time interval data types even when the data contains an enclosing character ("). In the DAT format, you cannot enter such data.

(c) Deleting single-byte spaces and tabs from the input data section of columns of the numeric, date, date interval, time, and time interval, and time stamp data types

The utility deletes all single-byte spaces and tabs from the input data section of columns of the numeric, date, date interval, time, and time interval, and time stamp data types. For details about the handling when the entire data is single-byte spaces or tabs, see 5.9 Null and default values during data loading.

(d) Changing the enclosing character

The utility treats the character specified in the enclose operand as the enclosing character.

(e) Entering the enclosing character itself

The utility treats any two consecutive enclosing characters as a single data item. This rule also applies to multi-byte codes. If a code assigned to a Gaiji character matches an enclosing character, the code may result in an input data error. In such a case, you must change the enclosing character.

5.4.14 src_work statement (specification of the output destination of divided-input data files)

When you perform data loading in units of RDAREAs, you can use the src_work statement to create from the table input data files a separate input data file for each RDAREA (divided-input data files). The src_work statement is specified in advance of data loading in order to create divided-input data files; you do not specify it during data loading.

Figure 5-11 shows an overview of creating divided-input data files.

Figure 5-11 Overview of creating divided-input data files

Criteria

Specify the src_work statement when you intend to perform data loading in parallel for the RDAREAs of a row-partitioned table, but you have not prepared an input data file for each RDAREA.

The src_work statement eliminates the need for the user to create an input data file for each RDAREA.

Organization of this subsection

(1) Prerequisites

(2) Format

(3) Explanation

(4) Notes

(5) Examples

(1) Prerequisites

For the input data files, you can use DAT-format (including extended DAT format) and fixed-length data-format files. The divided-input data files are output in the same format.

To create divided-input data files, you must have the INSERT privilege for the table.

The target table must be a row-partitioned table (there are no restrictions with respect to the partitioning method or column structure).

A divided-input data file must be a regular file on a single volume. If the file already exists, it is overwritten; a new file is not created.

The divided-input data files are created on the host that contains the input data files.

The utility performs some data checking during creation of divided-input data files; however, checking for the following data errors is not performed:

Invalid cluster key order

Key duplication error

Invalid LOB column storage data¹

Invalid abstract-data type storage data²

1 One of the following:

The LOB input file is not accessible.

The LOB column's data length is greater than the length defined for the LOB column.

2 One of the following:

There is invalid data that results in an error during plug-in function data checking.

BLOB-type argument error (same as the errors for ¹).

Divided-input data files are created under the following names:

For a HiRDB/Single Server
directory-name-specified-in-src_work-statement + input-data-file-name + RDAREA-name

For a HiRDB/Parallel Server
directory-name-specified-in-src_work-statement + input-data-file-name + server-name + RDAREA-name

You must ensure that the absolute path name plus file name do not exceed the maximum length supported by the OS.
When multiple input data files are specified, input-data-file-name represents the first file name.
RDAREA-name represents the name of the table storage RDAREA (if the inner replica facility is used, the original RDAREA name).

pdload with the src_work statement specified does not access the target table (the target table is not locked).

(2) Format

 src_work divided-input-data-file-output-target-directory

(3) Explanation

(a) divided-input-data-file-output-target-directory

Specifies the absolute path name of the directory to which the divided-input data files are to be output.

The specified directory must be located at the server or host that contains the input data files. Access privileges for the specified directory must have been granted to the HiRDB administrator.

(4) Notes

Names of the divided-input data files
If pdload is executed using an input data file name that is duplicated for multiple tables defined in the same table storage RDAREA, the names of the divided-input data files will also be duplicated and the file contents will not be reliable. For this reason, you must ensure that directory-name-specified-in-src_work-statement or input-data-file-name is unique.

Table containing LOB columns
Creation of divided-input data files is simply a matter of subdividing the input data files; it does not involve accessing any LOB input files. In the case of a table with a LOB column, you must place the LOB input file at a location that can be referenced by a method such as NFS from the host where pdload is executed.

Handling of DECIMAL-type data in fixed-size data format input data files
When the facility for conversion to a decimal signed normalized number is used, the DECIMAL-type values that are output to the divided-input data files are normalized.

If there is no data to be stored in a particular RDAREA, the utility creates a divided-input data file whose length is 0 bytes.

(5) Examples

(a) Example of creating divided-input data files and performing data loading in units of RDAREAs

This example performs parallel data loading into a row-partitioned table (T1) in units of RDAREAs. Because an input data file (inputfile) is available for the table, the example creates divided-input data files in order to execute data loading in units of RDAREAs. The example then shows execution of parallel data loading in units of RDAREAs.

1. Defining the table

CREATE FIX TABLE T1 (C1 DEC,
                     C2 CHAR(10))
                    IN ((RDAREA1) C1 > 1000,(RDAREA2) C1 < -1000,(RDAREA3));

2. Creating divided-input data files

pdload command

pdload T1 control_file

Explanation

T1: Name of the target table

control_file: Name of the control information file

Contents of the control information file (control_file)

source FES:/hirdb/inputfilec:\hirdb\pdload\inputfile error=/hirdb/errfilec:\hirdb\pdload\errfile    [1]
src_work /divworkc:\hirdb\divwork    [2]

Explanation

Specifies the names of the input data file and error information file.

Specifies the name of the directory where the divided-input data files are to be created.

3. Executing parallel data loading in units of RDAREAs

As a result of 2. Creating divided-input data files, the following three divided-input data file are created:

/divwork/inputfile_BES1_RDAREA1

/divwork/inputfile_BES2_RDAREA2

/divwork/inputfile_BES3_RDAREA3

These files are used as the input data files in executing parallel data loading in units of RDAREAs.

(b) Example of using an input data file in the all-column fixed-length binary format

Binary-format input data files cannot be used to create divided-input data files. However, if all columns in the table are of the fixed-length data type,* the table can be handled as if it were in the fixed-size data format.

* Applicable data types are as follows:

INTEGER, SMALLINT, DECIMAL, FLOAT, SMALLFLT, DATE, TIME, INTERVAL YEAR TO DAY, INTERVAL HOUR TO SECOND, CHAR, NCHAR, MCHAR, TIMESTAMP

1. Defining the table

CREATE FIX TABLE T2 (C1 DEC(7),
                     C2 CHAR(10)) FIX HASH HSAH6 BY C1
                    IN (RDAREA1,RDAREA2);

2. Creating divided-input data files

pdload command

pdload -a -c column_file T2 control_file

Explanation

-a: Specifies that the input data file is in the fixed-size data format

T2: Specifies the target table

column_file: Name of the column structure information file

control_file: Name of the control information file

Contents of the column structure information file (column_file)

C1,type=dec(7)
C2,type=char(10)

Explanation

Specifies the table component columns C1 and C2 and their data types.

Name of the control information file (control_file)

source FES:/hirdb/inputfilec:\hirdb\pdload\inputfile error=/hirdb/errfilec:\hirdb\pdload\errfile    [1]
src_work /divworkc:\hirdb\divwork    [2]

Explanation

Specifies the names of the input data file and error information file.

Specifies the name of the directory where the divided-input data files are to be created.

3. Executing parallel data loading in units of RDAREAs

As a result of 2. Creating divided-input data files, the following two divided-input data file are created:

/divwork/inputfile_BES1_RDAREA1

/divwork/inputfile_BES2FES_RDAREA2

These files are used as the input data files in executing parallel data loading in units of RDAREAs.

5.4.15 constraint statement (specification of check pending status)

The constraint statement specifies settings for check pending status.

When you perform data loading on a table for which check constraints or referential constraints have been defined, pdload may store data whose constraint integrity cannot be guaranteed because the utility does not check data integrity. To restrict data manipulation on a table until its integrity has been verified by pdconstck, the constraint statement places a table that is subject to data loading and referencing tables related to such a table in check pending status.

You can also specify a control statement that will prevent a table's check pending status from being changed. For details about check pending status, see the manual HiRDB Version 8 Installation and Design Guide.

Criteria

If either of the following is applicable, you should specify the constraint statement:

When data loading is performed on a table for which check constraints or referential constraints have been defined, the table's check pending status should not be changed (set).

When data loading is performed on a referenced table, the check pending status of a referencing table related to that referenced table should not be changed (set).

Rules

This control statement is applicable only when the value of the pd_check_pending operand in the system definition is USE. If any of the following is applicable, the constraint statement is ignored and the table's check pending status is not changed:
The pd_check_pending operand's value in the system definition is NOUSE.
No constraint has been defined for the table.
A divided-input data file is to be created (the src_work statement is specified).

Organization of this subsection

(1) Format

(2) Explanation

(3) Notes

(4) Range of check pending status settings

(5) Example of whether or not check pending status can be set

(6) Timing of setting check pending status

(1) Format

 constraint [pending=no]

          [ref_pending=no]

(2) Explanation

(a) pending=no

Specifies that when data loading is to be performed on a referencing table or check constraint table, the table's check pending status is not to be changed. For details about the default value that is assumed when this operand is omitted, see (4) Range of check pending status settings.

Criteria

Specify pending=no when either of the following is applicable:

When data loading is performed on a table for which a referencing table or check constraints have been defined, the integrity of the data that is to be stored in columns has been guaranteed by prior user checking.

Data loading is performed with a data count of 0 in order to re-create the indexes for a table for which a referencing table or check constraints have been defined.

(b) ref_pending=no

Specifies that when data loading is to be performed on a referenced table, the check pending status of a referencing table related to the referenced table is not to be changed. For details about the default value that is assumed when this operand is omitted, see (4) Range of check pending status settings.

Criteria

Specify ref_pending=no when either of the following is applicable:

When data loading is performed on a referenced table in the creation mode, the integrity of the data in the referenced table and referencing table has been guaranteed by prior user checking.

Data loading is performed with a data count of 0 in order to re-create the indexes for a referenced table.

(3) Notes

For notes about setting related referencing tables in check pending status when data loading is performed on a referenced table, see C. RDAREA Status During Command Execution.

The current RDAREA is placed in check pending status when the inner replica facility is being used and the following are applicable: data loading is performed on a referenced table, the referencing table related to the referenced table is to be placed in check pending status, and the replica RDAREA storing the referencing table is not in the generation specified in the -q option.

When check pending status is set, the related resources are locked. Once setting of the check pending status has been completed, the resources are unlocked. For details about the lock, see B.2 Lock mode for utilities.

(4) Range of check pending status settings

Table 5-3 shows the range of check pending status settings for check constraints. Table 5-4 shows the range of check pending status settings for referential constraints.

Table 5-3 Range of check pending status settings for check constraints

Data loading execution condition
Check pending status for check constraint

pd_check_pending operand value in system definition
Unit of execution
Data dictionary table
Table information in RDAREA

SQL_TABLES table
CHECK_PEND2 column
SQL_CHECKS table
CHECK_PEND2 column
Check constraint status

USE
Table
C
C
T#

RDAREA
C
C
D#

NOUSE
Table
N
N
N

RDAREA
N
N
N

Legend:

T: Sets table information (check constraint status) in all RDAREAs that store the table.

C: Sets the check pending status.

D: Sets table information (check constraint status) in the RDAREA subject to data loading.

N: Does not change the check pending status (the current status is maintained).

#

If the inner replica facility is used, the following generations are subject to check pending status setting:

If the -q option is specified, the generation specified in the -q option is subject to setting.

If the -q option is omitted, the current generation is subject to setting.

Table 5-4 Range of check pending status settings for referential constraints

Data loading execution condition | Table subject to data loading
pd_check_pend operand value in system define | -d option spec | Unit of exe | Referenced table | Referencing table
Check pending status of the referencing table related to referenced table | Check pending status of referencing table
Data dictionary table | TIRDA | Data dictionary table | TIRDA
SQLTC | SQLRC | REFCS | SQLTC | SQLRC | REFCS
USE | Spec'd | Table | C | C | T# | C | C | T#
RDAREA | C | C | T# | C | C | D#
Omitted | Table | N | N | N | C | C | T#
RDAREA | N | N | N | C | C | D#
NOUSE | Spec'd | Table | N | N | N | N | N | N
RDAREA | N | N | N | N | N | N
Omitted | Table | N | N | N | N | N | N
RDAREA | N | N | N | N | N | N

Legend:

T: Sets table information (check constraint status) in all RDAREAs that store the table.

C: Sets the check pending status.

D: Sets table information (check constraint status) in the RDAREA subject to data loading.

N: Does not change the check pending status (the current status is maintained).

pd_check_pend operand value in system define: pd_check_pending operand value in system definition

-d option spec: -d option specification

Spec'd: Specified

Unit of exe: Unit of execution

TIRDA: Table information in RDAREA

SQLTC: SQL_TABLES table CHECK_PEND column

SQLRC: SQL_REFERENTIAL_CONSTRAINS table CHECK_PEND column

REFCS: Referential constraint status

#

If the inner replica facility is used, the following generations are subject to check pending status setting:

If the -q option is specified, the generation specified in the -q option is subject to setting. However, if data loading is to be performed on a referenced table and the replica RDAREA storing the related referencing table is not in the generation specified in the -q option, the current RDAREA generation becomes subject to setting.

If the -q option is omitted, the current RDAREA generation is subject to setting.

(5) Example of whether or not check pending status can be set

This subsection describes whether or not check pending status can be set for tables T1 through T5 when the pending and ref_pending operands are specified in the constraint statement.

Description of the tables

T1: Table with the primary key (referenced table for T2)

T2: Table with the primary key and the foreign key that references T1's primary key (referencing table for T1 and referenced table for T3)

T3: Table with the foreign key that references T2's primary key (referencing table for T2)

T4: Table for which check constraints have been defined

T5: Table with no constraint definition

Table 5-5 shows the table's check pending status when data loading is performed on tables T1 through T5.

Table 5-5 Table's check pending status when data loading is performed

Table subject to data loading and whether or not there are constraint definitions | Operand specification in the constraint statement | Check pending status for table
Table name | Referential constraint | Check constraint | pend | ref_ pend | T1 | T2 | T3 | T4 | T5
Referenced table | Referencing table
T1 | Y | N | N | Omit'd | Omit'd |  | P |  |  |
Spec'd |  | N |  |  |
Spec'd | Omit'd |  | P |  |  |
Spec'd |  | N |  |  |
T2 | Y | Y | N | Omit'd | Omit'd |  | P | P |  |
Spec'd |  | P | N |  |
Spec'd | Omit'd |  | N | P |  |
Spec'd |  | N | N |  |
T3 | N | Y | N | Omit'd | Omit'd |  |  | P |  |
Spec'd |  |  | P |  |
Spec'd | Omit'd |  |  | N |  |
Spec'd |  |  | N |  |
T4 | N | N | Y | Omit'd | Omit'd |  |  |  | P |
Spec'd |  |  |  | P |
Spec'd | Omit'd |  |  |  | N |
Spec'd |  |  |  | N |
T5 | N | N | N | Omit'd | Omit'd |  |  |  |  |
Spec'd |  |  |  |  |
Spec'd | Omit'd |  |  |  |  |
Spec'd |  |  |  |  |

Legend:

pend: pending

ref_ pend: ref_pending

Y: Defined

N: Not defined

Omit'd: Omitted

Spec'd: Specified

P: Check pending status is set.

N: Check pending status is not changed (the current status is maintained).

: Not applicable (pending and ref_pending operands are ignored).

(6) Timing of setting check pending status

The timing of setting check pending status for a target table subject to data loading and for referencing tables related to that target table depends on the data loading mode. Table 5-6 shows the relationship between the data loading mode and when check pending status is set.

Table 5-6 Check pending status setting timing

Data loading mode | When check pending status is set
Creation mode | Before data deletion processing begins
Addition mode | Before data loading begins

If pdload rolls back due to an error after it has set the table's check pending status, the table is still placed in check pending status because setting of the check pending status has been completed (commit is completed).

5.4.16 option statement (specification of data processing information)

The option statement specifies the optional data processing functions for data loading.

Criteria

Specify the option statement to use any of the following optional functions:

Specification of the space conversion level (spacelvl operand)

Change to the percentage of free space during data loading (tblfree operand)

Change to the percentage of free space during index creation (idxfree operand)

Data loading with the synchronization point specification (job operand)

Output of warning messages in the event of data truncation (cutdtmsg operand)

Execution of NOWAIT search on a table subject to data loading (nowait operand)

Specification of LOB columns or LOB parameters in the binary-format input data file generated by pdrorg (bloblimit operand)

Monitoring of pdload execution time (exectime operand)

Method for storing data when data is loaded into a table with the DEFAULT clause specified and the input data is the null value (null_string operand)

Specification for ignoring the storage processing up to the point where an input data error is detected (dataerr operand)

Specification for detecting an input data error when the input data length in the DAT-format input data file is greater than the defined column length (lengover operand)

Suppression of error data information (divermsg operand)

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

option [spacelvl = {0|1|3}]
       [tblfree = {percentage-of-unused-space
       |([percentage-of-unused-space]
          ,percentage-of-free-pages-in-segment)}]
       [idxfree = percentage-of-unused-area]
       [job = [job-name], [rows-count-between-synchronization-points]
              [,CLR]]
       [cutdtmsg = {on|off}]
       [nowait = {yes|no}]
       [bloblimit = area-allocation-size]
       [exectime = pdload-execution-monitoring-interval]
       [null_string = {null | default}]
       [dataerr=rollback]
       [lengover=err]
       [divermsg=off]

(2) Explanation

(a) spacelvl = {0|1|3}

Specifies whether or not to execute space conversion on the input data.

Available space conversion levels are 0, 1, and 3.

When the spacelvl operand is omitted, the system executes space conversion according to the value of the pd_space_level operand in the system common definitions.

0

The system does not execute space conversion on the input data.

1 or 3

The system executes space conversion on the input data. Values of 1 and 3 have the same effect.

If the table columns subject to data loading are of the national or mixed character string type, the system converts the input data and stores the data in the database as follows:

National character string type
The system converts two consecutive single-byte spaces in the input data to one double-byte space, in units of two bytes from the top.

Mixed character string type
The system converts each double-byte space in the input data to two consecutive single-byte spaces.
When the character codes are utf-8, the system converts one double-byte space (3 bytes) to two single-byte spaces. For MCHAR, the system adds trailing single-byte spaces up to the definition length. For MVARCHAR, the data length remains shortened.

If the data is to be stored via a constructor function for the columns of abstract data type and the data for the corresponding constructor function's argument has the national or mixed character string type, the system executes space conversion before passing the input data as an argument to the constructor function.

Criteria

Specify this operand to make all spaces in the table data either single- or double-byte characters.

For details about how to make all spaces in table data either single- or double-byte characters, see the HiRDB Version 8 System Operation Guide.

Note

When executing space conversion using the spacelvl operand or the system common definitions, note the following:

The system checks the order of cluster key values after the data conversion; therefore, the cluster key sequence checking may result in an error even if the data was sorted by the cluster key values before conversion. In this case, specify the -x option to skip the cluster key sequence checking. To store data in the order of cluster key values, reorganize the data after data loading is completed.

If the column used as the unique key index or primary key index is subject to space conversion, duplicate key values may result in the index. In this case, take one of the following actions:
Unique key index: Either remove the unique index specification beforehand or modify the corresponding data in the input data.
Primary key index: Modify the corresponding data in the input data.

A comparison value for the null value specified in the column structure information file or null value/function information file is not subject to space conversion. In this case, the comparison value for the null value is compared to the input data before space conversion.

The length of the input data before space conversion is used for checking the input data length.

(b) tblfree = {percentage-of-unused-space|([percentage-of-unused-space], percentage-of-free-pages-in-segment)}

Specify this operand to change the percentage of free space specified with CREATE TABLE (value of PCTFREE) for storing data during data loading.

percentage-of-unused-space

You can specify a value in the range from 0 to 99.

percentage-of-free-pages-in-segment

You can specify a value in the range of 0 to 50.

Criteria

If you have specified a non-zero value as the percentage of free space during table definition, a shortage of RDAREA may occur while data is stored because the defined percentage of free space takes effect during data loading. If you specify the tblfree operand in this case, you can complete the data loading without having to extend the RDAREA temporarily.

Note

It is more advantageous to specify this operand than the -y option to store data in free space for the following reasons:

Batch input/output operations take effect even when data is stored in free space.

You can specify p in the -l option.

(c) idxfree = percentage-of-unused-area

If you are creating indexes in batch index creation mode, specify this operand to change the percentage of unused area specified with CREATE INDEX (value of PCTFREE).

The permitted value range is from 0 to 99.

Criteria

If you have specified a non-zero value as the percentage of unused space during index definition, a shortage of RDAREA may occur while indexes are stored because the defined percentage of free area takes effect during batch index creation processing. If you specify the idxfree operand in this case, you can complete the batch index creation processing without having to extend the RDAREA temporarily.

(d) job = [job-name], [rows-count-between-synchronization-points] [, CLR]

Specify this operand to execute data loading with the synchronization point specification.

Data loading with the synchronization point specification is a method of data loading in which a transaction is settled each time the specified number of data items are stored. If an error occurs while data is stored, this method enables you to restore the database in a short period of time without having to store data from the beginning.

job-name <alphanumerics> ((1-3))

Specify the name of the job that executes data loading with the synchronization point specification.

This job name is used during re-execution in the event the utility terminates abnormally during data loading. If this job name is the same as another pdrorg job name, re-execution results in a malfunction. Therefore, be sure to specify a unique job name.

rows-count-between-synchronization-points ((1-1000)) <<100>>

Specify the number of data items as an interval at which a transaction is to be settled. For example, a value of 100 sets a synchronization point at every one million data items.

A small value settles a transaction after a small number of data items; therefore, rollback processing would take a short time in the event of abnormal termination. However, transaction generation and settlement and process restart occur frequently, resulting in a large overhead. On the other hand, a large value has a little effect on the performance, but the error recovery time would be long.

An error results if you specify only the number of rows between synchronization points without specifying a job name.

CLR

Specify this operand if there is no need to re-execute pdload or if pdload is to be re-executed after clearing the current synchronization point information in the data base.

If the utility terminates abnormally, the synchronization point information remains in the database. If this information is retained during the next execution, the utility may not function correctly.

Note that if you specify CLR, the system clears all synchronization point information, whether it was specified by another user or utility.

To determine if the synchronization point information is present in the database, use the database condition analysis utility (pddbst) to execute condition analysis in units of tables.

Criterion

This operand is useful for loading a large amount of data that will take a considerable amount of time to store the data. However, this has adverse effects on performance due to synchronization point processing. Additionally, more data pages are required than in normal data loading because data storage begins on a new page at each synchronization point.

Example of job operand specification

Loading data with a synchronization point specified for every one million data items
job=JOB,100 or job=JOB

Clearing the current synchronization point information and specifying new synchronization points at every one million data items to execute data loading
job=JOB,100,CLR or job=JOB,,CLR

Clearing the current synchronization point information and executing normal data loading
job=,,CLR

Notes

Synchronization point information is managed by the job name. Suppose that pdload(A) that was executing data loading with the synchronization point specification terminates abnormally. If you execute pdrorg(B) specifying the same job name for the same table, pdrorg(B) uses the synchronization point information that was left by pdload(A). Therefore, the job names must be controlled so that they are not duplicated.

If data loading with the synchronization point specification terminates abnormally, you cannot execute the normal data loading (without the synchronization point specification) on the same table until you re-execute the data loading with the synchronization point specification having the same job name.

The synchronization point information is managed in units of RDAREAs. For a row-partitioned table, inconsistency occurs on the synchronization point information for the entire table in the following cases:
Only some of the RDAREAs were re-initialized.
Error occurred during data loading with the synchronization point specification in units of RDAREAs.
If the job name is the same, but the number of lines does not match, you cannot use the synchronization point information managed by each RDAREA for re-execution. If some of the RDAREAs have synchronization point information while the others do not, you can re-execute data loading using the retained synchronization point information. The following shows how the system handles data loading when the job name for synchronization point information is the same but the number of lines does not match:

Retained synchronization point information (number of lines between synchronization points) | Input begin line for data loading with synchronization point specification in units of tables
RDAREA 1 | RDAREA 2 | RDAREA 3
0 | 0 | 0 | Item 0
0 | n | 0 | Item n
n | 0 | m | Cannot be executed.
n | m | p | Cannot be executed.

0: No synchronization point information retained
n, m, p: Retained number of lines between synchronization points:

If data loading with the synchronization point specification terminates abnormally, you cannot modify the index creation method during re-execution (-i option).

If EasyMT is remounted before data loading with synchronization point specification terminates abnormally, mount volume 1 again during the re-execution.

If data loading with the synchronization point specification terminates abnormally, and if you re-initialize RDAREAs or execute the PURGE TABLE statement before re-execution, the existing synchronization point information is deleted.

If data loading with the synchronization point specification terminates abnormally during the batch creation of a plug-in index, and the corresponding plug-in index supports the batch plug-in index creation partial recovery facility, execute pdrorg to create the plug-in index that resulted in an error, then re-execute pdload. If you re-execute pdload without executing pdrorg, the entire plug-in index is re-created.

The maximum number of data items that can be controlled during data loading with the synchronization point specification is 4,294,960,000. To load more data items than this, use multiple input data files and execute pdload more than once.

(e) cutdtmsg = {on|off}

If you are storing character string data from the DAT-format input data file into the columns with the following data types during data loading, and the input data is longer than the defined column length, the excess part of the data is discarded:

Character string data type (CHAR, VARCHAR)

National character string data type (NCHAR, NVARCHAR)

Mixed character string data type (MCHAR, MVARCHAR)

BINARY data type

This operand specifies whether or not to output a warning message (KFPL31090-W) to the error information file when this data truncation occurs.

on: Output warning messages.

off: Do not output warning messages.

Rules

If the -e option is specified, the system assumes cutdtmsg=off.

For an input data file other than in the DAT format, this operand, if specified, is ignored.

If cutdtmsg=on is specified and data truncation occurs, pdload returns code 4, even when all data has been stored.

A warning message is output for each data item resulting in truncation (each column and element), not for each line. Therefore, if you are specifying cutdtmsg=on, check the disk space, because many warning messages may be output.

The system outputs warning messages to the error information file, but it does not output the corresponding input data to the error data file.

(f) nowait = {yes|no}

Specifies whether or not a NOWAIT search is to be conducted on the table subject to data loading. The NOWAIT search is an SQL function for executing a search process with the NOWAIT lock option specified.

yes: Execute NOWAIT search.

no: Do not execute NOWAIT search.

Rules for nowait=yes

You cannot specify the batch index creation mode (-i c). Specify the index update mode (-i s).

You cannot use the local buffer (-n option).

The system does not support data loading in units of RDAREAs.

In the creation mode (-d option specified), you cannot execute a NOWAIT search on the table while data is being deleted (if executed, processing is placed in lock-release wait status). You can execute a NOWAIT search while data is being stored.

For a table with columns of abstract data type provided by a plug-in, you can execute a NOWAIT search if the plug-in provides the no-lock search facility. To see if the plug-in provides the no-lock search facility, see the applicable plug-in manual.

When loading data only to the LOB column of a table, you can reference the LOB column structure base table but not the LOB columns, regardless of this operand specification. To reference the LOB columns, execute data loading on both the LOB column structure base table and LOB columns at the same time.

In the event of a pdload rollback due to abnormal termination, segments will not be released once they are allocated during data loading. These segments are reused by pdload during re-execution, but not by a UAP's INSERT or UPDATE statement. Therefore, if you execute a UAP's INSERT or UPDATE statement prior to re-execution of pdload, the segments that are not reusable by pdload or UAP will be retained until the corresponding RDAREA runs out of all unused segments. To release such segments, you need to reorganize the table with pdrorg. To avoid this, place the RDAREA in reference-possible shutdown status, then execute pdload. (No UAP will be able to access the table even if pdload terminates abnormally.)

If specified, yes is ignored for a shared table (no is assumed).

(g) bloblimit = area-allocation-size

<unsigned integer> ((1-2,097,152)) <<1024>>

If you are executing the following type of data conversion using a pdrorg-generated binary-format input data file, you may need to retain data in memory:

Converting data for BLOB parameter with abstract data type to a BLOB-type column

Converting BLOB data to an abstract data type column with BLOB parameter

In this case, specify the size of the memory area to retain data in KB. The system compares this operand value with the BLOB parameter or the defined length for BLOB type and allocates the area based on the smaller size.

Criteria

Specify this operand if either one of the following conditions is true:

When converting data for a BLOB parameter with abstract data type to a BLOB-type column, the data for the BLOB parameter is followed by the data to be stored in the abstract data type column with BLOB parameter.

When converting BLOB data to an abstract data type column with BLOB parameter, the BLOB data is preceded by the data to be stored in the BLOB-type column.

Rules

This operand takes effect only when the -W option is specified.

If there is a data item that exceeds the specified size, an error results.

(h) exectime=pdload-execution-monitoring-interval

<unsigned integer> ((1-35791394)) <<0>>

Specifies an interval in minutes for monitoring the pdload execution time. If this operand is omitted, pdload does not monitor the execution time. If pdload does not terminate within the specified interval, the system terminates the pdload process forcibly and acquires error information in order to determine the cause of the no-response.

This operand's value takes precedence over the value of the pd_utl_exec_time operand in the system definition.

Criterion

If you specify a monitoring interval for processing such as nighttime batch processing, the processing will terminate abnormally if an error such as a communication error (including a transient error) or a disk error occurs during execution of pdload and pdload is placed in no-response status. This enables you to detect the abnormality and start recovery processing at an early stage.

Guidelines for the specification value

The purpose of this operand is to detect a no-response error, not to monitor the execution time of a long-running transaction. Therefore, the operand value must be large enough for the applicable table processing. For example, to monitor the execution time of a pdload that should terminate within 7- 8 minutes, specify exectime=20, not exectime=10. When you are executing data loading in the addition mode, specify a larger value because the execution time will vary depending on the number of base data items even when there is a predefined number of data items in the input data file (in the case of a table whose data increases monotonously, you should check and, if necessary, revise the specified value).

(i) null_string={null|default}

Specifies whether the default value set in the DEFAULT clause or the null value is to be stored when the input data is the null value ("*" or omitted) during data loading on a table with the DEFAULT clause specified.

This operand is applicable to a DAT-format input data file. An error results if this operand is specified for an input data file in the binary, fixed-length data, or pdrorg-generated binary format.

null: Store the null value.

default: Store the default value set in the DEFAULT clause.

(j) dataerr=rollback

Specifies that data storage processing (rollback) is to be ignored when an input data error (logical error) is detected.

Table 5-7 shows the relationship between the -e and dataerr operands. Table 5-8 provides notes about specifying the dataerr operand together with other options and control statements.

Table 5-7 Relationship between the -e and dataerr operands

-e option | dataerr operand in the option statement | pdload operation when input data error is detected | Transaction settlement method | pdload's return code
Omitted | Omitted | Skips database storage processing for the erroneous data and resumes processing. | Commit | 4
Specified | Cancels processing when the erroneous data is detected. | Rollback | 8
Specified | Omitted | Cancels processing when the erroneous data is detected. | Commit | 4
Specified | Cancels processing when the erroneous data is detected. | Rollback | 8

Table 5-8 Notes about specifying the dataerr operand together with other operands and control statements

Option and control statement
Note about specifying together with the dataerr operand

-d
A control statement error occurs.

-l
Specify either a or p.

-i
If all the following conditions are satisfied, index unfinished status results after rollback; therefore, specifying this option together with the dataerr operand results in a control statement error:

Loading of data is in units of RDAREAs

There is a non-partitioning key index

The value of the -i option is not s

Consider changing the pdload options, control statements, or index definition so that not all the above conditions are satisfied.

If a key duplication error may occur during data loading, specify s. If any other value is specified, data stored in the table will not be rolled back even if a key duplication error is detected.

-k
If f, v, or c is specified, the unneeded LOB middle file remains after rollback. Before re-executing pdload, delete this LOB middle file.

If f, v, or c is specified and an error is detected during data loading on a LOB column, the LOB column structure base table is committed and the LOB column is rolled back, regardless of the dataerr operand specification. In this case, correct the LOB data and re-execute data loading.

-e
Regardless of the option specification, processing is cancelled and then rolled back when erroneous data is detected.

Other option
None

job operand in the option statement
A control statement error occurs.

RDAREA name in the source statement
If all the following conditions are satisfied, the index unfinished status results after rollback; therefore, specifying this option together with the dataerr operand results in a control statement error:

Loading of data is in units of RDAREAs

There is a non-partitioning key index

The value of the -i option is not s

Consider changing the pdload options, control statements, or index definition so that not all the above conditions are satisfied.

error operand in the source statement
Information about the detected error is output and then processing is rolled back.

errdata operand in the source statement
A control statement error occurs.

Other control statements
None

(k) lengover=err

Specifies that an input data error is to be detected when the input data in a DAT-format (including extended DAT format) input data file that is to be stored in any of the following data-type columns is longer than the defined column length:

CHAR

VARCHAR

NCHAR

NVARCHAR

MCHAR

MVARCHAR

BINARY

Table 5-9 shows the relationships among the input data length, defined column length, and the lengover operand. Table 5-10 provides notes about specifying the lengover operand together with other options and control statements.

Table 5-9 Relationships among input data length, defined column length, and lengover operand

Relationship between input data length and defined column length
lengover omitted
lengover specified

m=n
Stores the input data as is.

m<n
Discards the trailing end of the input data beginning at location m + 1 and then stores the remaining part of the input data.
Sets an input data error.

m>n

CHAR, NCHAR, and MCHAR:

Pads the trailing end of the input data with spaces beginning at location n + 1 and then stores the input data.

VARCHAR, NVARCHAR, MVARCHAR, and BINARY:

Stores the input data as is.

Table 5-10 Notes about specifying the lengover operand together with other operands and control statements

Option and control statement
Note about specifying together with the lengover operand

-a, -b
A control statement error occurs because the lengover operand is applicable to the DAT format.

Other option
None

cutdtmsg operand in the option statement
The KFPL31090-E message is displayed even when the cutdtmsg operand is not specified.

dataerr operand in the option statement
An input data error subject to rollback is detected.

extdat statement
The extended DAT-format input data files are also supported.

error operand in the source statement
The number of times the KFPL31090-W/E message is displayed changes as follows:

When the lengover operand is specified:

The message is displayed only for the first column in which an invalid data length is detected.

When the lengover operand is omitted:

The message is displayed for all columns in which an invalid data length is detected.

errdata operand in the source statement
The applicable data is output to the error data file.

Other control statements
None

(l) divermsg=off

Specifies suppression of a type of error data information. When data loading is performed in units of RDAREAs on a table whose partition storage condition have been changed, and the input data contains row data that does not satisfy the RDAREA storage conditions, the utility displays error data information. This operand is used to suppress output of this error data information.

This operand is applicable if the table subject to data loading is a row-partitioned table and data loading is performed in units of RDAREAs. If this operand is specified under any other conditions, it is ignored.

Table 5-11 shows the relationship between the divermsg operand and each item when the input data contains row data that does not satisfy the partition storage conditions.

Table 5-11 Relationship between the divermsg operand and each item when input data contains row data that does not satisfy the partition storage conditions

Item | divermsg operand
Specified | Omitted
pdload's return code | 0* | 4
Error information file | KFPL31009-E message is not output. | KFPL31009-E message is output.
Error data file | Error data is not output. | Error data is output.
-e option | Disabled | Enabled

* In the event of a data format error, the return code is 4.

5.4.17 report statement (specification of a file to which pdload tuning information is output)

The report statement specifies a file to which the tuning information is to be output during the execution of pdload.

Criterion

Specify the report statement if you want to output the tuning information.

Rules

You can specify only one report statement.

The system does not output the tuning information unless the report statement is specified.

Organization of this subsection

(1) Format

(2) Explanation

(3) Output format

(1) Format

report file=process-results-filename

(2) Explanation

(a) process-results-filename

<pathname>

Specifies the absolute pathname of the file to which the tuning information is to be output.

This file must be located at the host where pdload is executed.

(3) Output format

The following shows the tuning information to be output:

pdload VV-RR(Object Option) *** DB LOAD *** 2003-03-31 11:11:27 ..................1

*** statistics report ***

execute time :   0: 1:52 .........................................................2
prepare time :   0: 0: 0 .........................................................3

*** shell/server information ***

name       cpu svrup(first) reciv  wait  sort  send delet dtlod ixlod dtins ......4
---------------------------------------------------------------------------
pdload       0     0(    0) ***** ***** ***** ***** ***** ***** ***** *****
pdloadm      5     4(    4)    28 ***** ***** 5.76k ***** ***** ***** *****
bes1        21 *****(*****)     7     0     2 2.88k     1    26    67    27
bes2        22 *****(*****)     4     0     1 2.88k     1    28    67    29
---------------------------------------------------------------------------
total       48     4(    4)    39     0     3 11.5k     2    54   134    56 ......5

*** buffer information ***

server   maxio minio sumio brreq bwreq bfhit hitrt  read write lrreq lbrht lbrrt
lwreq lbwht lbwrt lread lwrit flush bfupd bfred bfwrt cinsm cafls cafwr cfmax
cfavg ldirc ldiuc ldihc ldird ldiwt lbfshc .......................................6
--------------------------------------------------------------------------------
-----------------------------------------------------------------------------
------------------------------------------
bes1         0     0    71 64.5k 44.3k 52.4k 81.1%     3 12.2k     0     0 *****
   0     0 *****     0     0 10.6k     0     0     0     0     0     0     0
1.00k 11.4k 11.4k     0     0 11.4k 10.6k
bes2         0     0    71 64.5k 44.3k 52.4k 81.1%     3 12.2k     0     0 *****
   0     0 *****     0     0 10.6k     0     0     0     0     0     0     0
1.00k 11.4k 11.4k     0     0 11.4k 10.6k
--------------------------------------------------------------------------------
-----------------------------------------------------------------------------
------------------------------------------
total        0     0   142  129k 88.6k  105k 81.1%     6 24.3k     0     0 *****
   0     0 *****     0     0 21.3k     0     0     0     0     0     0     0
1.00k 22.8k 22.8k     0     0 22.8k 21.3k

pdload terminated, return code=0 .................................................7

Explanation

Header information (version number and pdload start time)

pdload processing time

pdload preprocessing time

Information about each server:
name: Shell name or server name
cpu: CPU processing time (seconds)
svrup(first): Server startup time (initial server access time) (seconds)
reciv: Total wait time for communication from other processes (seconds)
wait: Total time required for allocating locked resources (seconds)
sort: Sorting time (seconds)
send: Number of communications to other processes
delet: Data deletion time (seconds)
dtlod: Data loading time (seconds)
ixlod: Index creation time (seconds)
dtins: Communication message processing time (seconds)

Total value for information about each server

Information about each buffer:
server: Name of back-end server
maxio: Maximum input/output time (seconds)
minio: Minimum input/output time (seconds)
sumio: Total input/output time (seconds)
brreq: Number of READ requests for data and index buffer
bwreq: Number of WRITE requests for data and index buffer
bfhit: Data and index buffer hit count
hitrt: Data and index buffer hit ratio (%)
read: Data and index buffer READ count
write: Data and index buffer WRITE count
lrreq: Number of READ requests for LOB buffer
lbrht: LOB buffer READ hit count
lbrrt: LOB buffer READ hit ratio (%)
lwreq: Number of WRITE requests for LOB buffer
lbwht: LOB buffer WRITE hit count
lbwrt: LOB buffer WRITE hit ratio (%)
lread: LOB buffer READ count
lwrit: LOB buffer WRITE count
flush: Buffer flush count
bfupd: READ wait count during buffer updating
bfred: READ wait count during buffer READ
bfwrt: WRITE wait count during buffer WRITE
cinsm: Internal information used by the system
cafls: Internal information used by the system
cafwr: Internal information used by the system
cfmax: Internal information used by the system
cfavg: Internal information used by the system
ldirc: Number of times index pages were referenced using the random access local buffer
ldiuc: Number of times index pages were updated using the random access local buffer
ldihc: In bfhit, the buffer hit count for index pages in the random access local buffer
ldird: In read, the number of real READs for index pages in the random access local buffer
ldiwt: In write, the number of real WRITEs for index pages in the random access local buffer
ldfshc: In flush, the buffer flush count in the random access local buffer

pdload's return code

Notes

Each item is displayed with a maximum length of three digits. If a value exceeds three digits, the system rounds up the fourth digit and displays the value with a decimal point and one of the units shown as follows:
K: Kilo ( 10³ for time and count)
M: Mega ( 10⁶ for time and count)
G: Giga ( 10⁹ for time and count)

If there is no corresponding output information, the system displays *****.

The processing time less than one second is rounded off. This means that a value less than one second is displayed as 0 second.

5.5 Input data file

This section describes the input data files.

DAT format
In this format, column data is specified in characters.
For details, see 5.5.1 DAT format.

Binary format
This format is based on the internal HiRDB format.
For details, see 5.5.2 Binary format.

Fixed-size data format
This format allows data specification in characters, as in the DAT format, or in internal HiRDB format, as in the binary format.
For details, see 5.5.3 Fixed-size data format.

Arrayed data format for a table containing repetition columns
If a table subject to data loading contains repetition columns, the input data file must contain data in the arrayed data format according to the repetition columns. The data can be specified in either DAT, binary, or fixed-size data format.
For details, see 5.5.4 Arrayed data format for tables containing repetition columns.

LOB column input file
In the LOB column input file, as many LOB data items are specified as there input lines.
For details, see 5.5.5 LOB column input file.

Organization of this section

5.5.1 DAT format

5.5.2 Binary format

5.5.3 Fixed-size data format

5.5.4 Arrayed data format for tables containing repetition columns

5.5.5 LOB column input file

5.5.1 DAT format

In the DAT format, both input data and the input parameters for a constructor function are specified as character string data.

Organization of this subsection

(1) Specification format

(2) Rules

(3) Example

(1) Specification format

Each column data item must be separated by a separator character.

Table 5-12 shows the specification format of column data and parameters for a construction function by the data type (DAT format).

Table 5-12 Specification format of column data and parameters by data type (DAT format)

Data type
Specification format of column data and parameter

General data
Null value or default value¹

Numeric data
INTEGER

Specify a numeric value in characters.

For a negative value, add a minus sign (-).

Specify a decimal point as integer fraction.

Specify a floating point as mantissa-e-exponent.

Integer (Example: -1234...0...1234)
Decimal point (Example: -1.56...0...1.56)
Floating point (Example: -2.4e+9...0e0...2.4e+9)
* or not specified

SMALLINT

DECIMAL

FLOAT

SMALLFLT

Character string data
CHARACTER
Specify as characters or a character string enclosed in double quotation marks (").
(Example: abcdef, ABCDEF)
(Example: "abcd", "ABCD")
Not specified

VARCHAR

National character string data
NCHAR

NVARCHAR

Mixed character string data
MCHAR

MVARCHAR

Date data
DATE
Specify in the numeric format yyyy-mm-dd.
yyyy: Year. mm: Month. dd: Day.
(Example: January 1, 1995 1995-01-01)
* or not specified

Date interval data
INTERVAL YEAR TO DAY
Specify in the numeric format [-]yyyymmdd. For a negative value, add a minus sign (-).
(Example: 1111 years, one month, and one day 11110101​)

Time data
TIME
Specified in the numeric format hh:mm:ss.
hh: Hour. mm: Minute. ss: Second.
(Example: 12:01:01 12:01:01)

Time interval data
INTERVAL HOUR TO SECOND
Specified in the numeric format [-]hhmmss. For a negative value, add a minus sign (-).
(Example: 1 hour, 1 minute, and 1 second 010101)

Time stamp data
TIMESTAMP
Specified in the numeric format YYYY-MM-DD hh:mm:ss[.nnnnnn].
For the fraction part of the second, specify a value with a length of 0 to 6 digits. If the fraction part is less than the defined length, the system assumes 0; if it is longer than the defined length, the system discards the excess portion. If the fraction part consists of more than 6 digits, an error (KFPL31002-E) results.²

Binary data
BINARY
Specifies the binary data or binary data enclosed in the enclosing characters.
(Examples: abc 123 or "abc 123")
Not specified

Large object data
BLOB
-k f specified:
Specify the name of the LOB input file.
(Example: lobfile01)
-k c specified:
Specify a character string with a length of 1-1,023 bytes without any separator characters. This character string is ignored when LOB data is loaded.
(Example: @)

Notes

The system handles the null values for each data type as follows:

For the fixed-length character string, national character string, mixed character string, binary, and large object data types, the system treats the following specification as the null value or default value:
..., , ...
..., " ", ...

For the variable-length character string, national character string, mixed character string, and binary data types with the -z option specified, the system treats the following specification as the null value or default value:
..., , ...
..., " ", ... is treated as data with a length of 0.

For the other data types, the system treats the following specification as the null value or default value:
..., , ...
..., " ", ...
..., *, ...

If the enclose operand is specified in the extdat statement, the double quotation mark (") becomes the enclosing character specified in the enclose operand.

1 The value to be stored depends on the null_string operand value specified in the option statement.

2 The following table describes the storage method when the length of the fraction part for seconds is specified for the TIMESTAMP type:

Defined digits | Length of the fraction part of the second in input data
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 or more
0 | Stored as is.¹ | Discards excess digits. | Error (KFPL31002-E)
2 | Adds zeros up to the defined length.² | Stored as is.¹ | Discards excess digits.
4 | Adds zeros up to the defined length.² | Stored as is.¹ | Discards excess digits.
6 | Adds zeros up to the defined length.² | Stored as is.¹

1 The input data is converted to the TIMESTAMP type and then stored as is.

2 The real data is in bytes. If the defined length consists of an odd number of bytes, as many zeros as equals the defined length + 1 are added.

(2) Rules

One line in the file corresponds to one line of table data (each line must end with the linefeed code).

When coding input parameters that are passed to a constructor function, delimit each parameter with a separator character.

Neither the null character (0x00), linefeed code (0x0a), nor carriage return at the end of a line (0x0d0a) is treated as data. To treat them as data, specify the extdat statement and enclose the input data in the enclosing character.

The maximum length of one line is 32 KB. However, if you specify the source statement with the maxreclen operand, the system accepts more than 32 KB of data per line during data loading.

If you are using EasyMT to create a table containing LOB columns, make sure that only LOB input files in EasyMT are specified as the input data files for the LOB column structure base table.

If an input value begins with the enclosing character, consecutive enclosing and separator characters are treated as the end of the column. To specify an input value consisting of the consecutive enclosing and separator characters, use the -s option to change the separator character.

If character string data immediately before or after a separator character is enclosed in the enclosing character ("), the enclosing characters are not subject to the input operation. If the separator character is encountered in a character string that is enclosed in the enclosing character, the separator character is treated as data. Table 5-13 shows how character string data and enclosing characters are handled.

Table 5-13 Handling of character string data and enclosing characters

Character string data in input data file | Data stored in table
DAT format | Extended DAT format
...,ABCD,... | ABCD | ABCD
...,AB"CD,... | AB"CD | Input data error
...,AB""CD,... | AB""CD | AB"CD
...,"ABCD",... | ABCD | ABCD
...,"AB"CD",... | AB"CD | Input data error
...,"AB""CD",... | AB""CD | AB"CD
...,""ABCD"",... | "ABCD" | Input data error
...,"""ABCD""",... | ""ABCD"" | "ABCD"
...,,... | Null value or default value* | Null value or default value*
...,"",... | Null value or default value* | Null value or default value*
...,"""",... | "" | "
...,"AB,CD",... | AB,CD | AB,CD
...,AB\0CD,... | Input data error | Input data error
...,AB\nCD,... | Input data error | Input data error
...,"AB\0CD",... | Input data error | AB\0CD
...,"AB\nCD",... | Input data error | AB\nCD

Legend:

,: Separator character

": Enclosing character

\0: Null character (0x00)

\n: Linefeed code

* The value to be stored depends on the null_string operand value specified in the option statement.

Table 5-14 shows the format of character string data that is converted to numeric data. For the limitations to the specification of character string data for a numeric data type in input data, see the limitations on the use of numeric literals in the manual HiRDB Version 8 SQL Reference.

Table 5-14 Format of character string data converted to numeric data

Numeric value expressed as character string data
Notation

Specification format
Example (specification stored value)

Integer
[{+ | -}] natural-number
A natural number is a string of numeric characters 0-9.
+10 10
-009 -9
0 0

Decimal number
[integer].[fraction]
A fraction is an unsigned integer. Either the integer or the fraction must be specified.
.05 0.05
-0.8 -0.8
1.0 1.0
+1. 1.0

Floating point number
mantissa-e[exponent]
Mantissa is expressed as an integer or decimal number. E may be specified for e. Exponent is expressed as a one-digit or two-digit integer.
.3e 0.310
2.4e-02 2.4 10-2
67e-5 67 10-5

: Indicates an optional space.

Table 5-15 shows the handling of storage data when the length of input data does not match the data length in table.

Table 5-15 Handling of storage data when the length of input data doesn't match the data length in table

Data length in table (m)
Data length of input data (n)

Fixed-length character string data
Variable-length character string data or binary data

m = n
Input data is stored as is.

m < n
When the lengover operand is omitted in the option statement, the portion of the input data following (m + 1) is discarded.*
When the lengover operand is specified in the option statement, the input data is not stored because it is regarded as an input data error.

m > n
Input data is padded with spaces after (n + 1).
Input data is stored as is.

* If cutdtmsg=on is specified in the option statement and data truncation occurs, the system outputs warning messages to the error information file.

If a data section in the input data contains separator characters (or code that is the same as the separator characters), the system treats the data as separator characters unless the entire data item is enclosed in double quotation marks (").

Table 5-16 describes the data to be stored and how to specify the null value when enclose=" is specified in the extdat statement.

Table 5-16 Data to be stored and how to specify the null value when enclose=" is specified in the extdat statement

Data type | Input data | Data to be stored in table | How to specify null value or default value*
Numeric data | INTEGER | "1234" | 1234 | *, "", "*", or not specified
SMALLINT | "1234" | 1234
DECIMAL(6,1) | "000001" | 00001.0
FLOAT | "2.225075e-308" | +2.225075000000000​E-308
SMALLFLT | "1.175495e-38" | +1.175495051471520​E-38
Character string data | CHAR | "ABCDE" | ABCDE | "" or not specified
VARCHAR | "ABCDE" | ABCDE
National character string data | NCHAR | "" |
NVARCHAR | "" |
Mixed character string data | MCHAR | "ABCDE" | ABCDE
MVARCHAR | "ABCDE" | ABCDE
Date data | DATE | "2000-05-31" | 2000-05-31 | *, "", "*", or not specified
Date interval data | INTERVAL YEAR TO DAY | "+00000000​." | 00000000​
Time data | TIME | "09:00:00" | 09:00:00
Time interval data | INTERVAL HOUR TO SECOND | "+000000." | 000000
Time stamp data | TIMESTAMP(6) | "2002-08-0820:25:43.39" | 2002-08-08 20:25:43.390000
Binary data | BINARY | "ABCDE" | ABCDE | "" or not specified
Large object data | BLOB | "LOB-input-file-name" | Contents of the LOB input file

Legend: : Single-byte space

* The value to be stored depends on the null_string operand value in the option statement.

Table 5-17 shows examples of space deletion when enclose=" is specified in the extdat statement.

Table 5-17 Examples of space deletion when enclose=" is specified in the extdat statement

Data type | Input data | Data to be stored in table
Numeric data | INTEGER | "1234" | 1234
SMALLINT | "" | Null value
DECIMAL(6,1) | "000001" | 00001.0
FLOAT | "2.225075e-308" | +2.225075000000000​E-308
SMALLFLT | "1.175495e-38" | +1.175495051471520​E-38
Date data | DATE | "2000-05-31" | 2000-05-31
Date interval data | INTERVAL YEAR TO DAY | "+00000000​." | 00000000​
Time data | TIME | "09:00:00" | 09:00:00
Time interval data | INTERVAL HOUR TO SECOND | "+000000." | 000000
Time stamp data | TIMESTAMP | "2002-08-0820:25:43.39" | 2002-08-08 20:25:43.39

Legend: : Single-byte space

(3) Example

Figure 5-12 shows a specification example of DAT-format data.

Figure 5-12 Specification example of DAT-format data

Note

The data types are, from left to right, NCHAR, INTEGER, DATE, and VARCHAR.

5.5.2 Binary format

In the binary format, the input data is specified in the format stored in the database.

Organization of this subsection

(1) Specification format

(2) Rules

(3) Example

(4) Coding LOB data and LOB parameters when v or d is specified in the -k option

(1) Specification format

(a) Specification format of column data

Table 5-18 shows the specification format of column data and parameters by the data type (binary format).

Table 5-18 Specification format of column data and parameters (binary format)

Data and parameter types
Column data specification format

Numeric data
INTEGER, SMALLINT

DECIMAL(m, n)
1 m 29
0 n 29
m n

FLOAT, SMALLFLT

Character string, national character string, and mixed character string data
CHARACTER(n), VARCHAR(n), MCHAR(n), MVARCHAR(n)

NCHAR(n), NVARCHAR(n)

Date data
DATE

Date interval data
INTERVAL YEAR TO DAY

Time data
TIME

Time interval data
INTERVAL HOUR TO SECOND

Time stamp data
TIMESTAMP(p)

BINARY data, BINARY attribute data
BINARY

LOB data, LOB attribute data
BLOB

* Only when the -z option is specified, does the system set the actual data length to 0 and treats the part without the actual data as 0-length data.

(b) Input parameter specification format

The following describes the input parameter specification format:

Code the input parameters for a constructor function for generating values that are stored in an abstract data type using the same structure as the function's parameter type.

Specify the input parameters in the same order as the arguments for the constructor function.

If the target storage column is an abstract data type column, the constructor function must have a name identical to the abstract data type. If there are multiple constructor functions with the same name or if you are using a constructor function with a name that is different from the name of abstract data type, specify the name of the function in the null value/function information file.

If there are multiple input parameters, specify parameter values one after another, without placing any space between them.

(2) Rules

If you are using a magnetic tape unit to create input data in the variable-length block mode, set the block length to 32 KB or less.

In input data, columns must have the same sequence as the columns in the table definition.

There must be no space between column data items. For a variable-length character string, if the actual data is shorter than the defined length, specify the data with its actual length and move up the subsequent data item.

If you are using EasyMT to create a table containing LOB columns, make sure that only LOB input files in EasyMT are specified as the input data files for the LOB column structure base table.

If the input data contains any of the following data, you should not use data loading with the synchronization point specification. If the input data contains the following data, the system stores all up to the synchronization point in the event of an error:

Repetition column

Variable-length data (VARCHAR, NVARCHAR, MVARCHAR, BINARY, BLOB)

Variable-length data for an argument of abstract data type

In the binary format, the default value cannot be stored because input data is written directly. To store the default value, directly write the default value when you create the input data file.

(3) Example

Figure 5-13 shows a specification example of binary-format data.

Figure 5-13 Specification example of binary-format data

Notes

The upper row of the input data indicates the data, and the lower row indicates the values to be stored.

The data types are, from left to right, NCHAR(5), INTEGER, SMALLFLT, and VARCHAR.

National character data is in shift JIS or EUC Chinese Kanji codes.

(4) Coding LOB data and LOB parameters when v or d is specified in the -k option

(a) -k v

When specifying v in the -k option, directly code the input file name for LOB data and the data for the LOB parameter in the data input file.

When compared with specifying f in the -k option, this method can reduce input/output time for the LOB input file.

Rules

Specify the LOB data and the LOB parameter in a format in which a given column in row data has a 4-byte length section, such that the data section is coded following the row data. Specify these items in the column order of the row data.

If the LOB data or the LOB parameter is the null value, specify a value of -1 in the length section. The system ignores any null comparison values produced by a null value/function information file or a function information file. Do not specify the data section.

If the LOB data or the LOB parameter has 0 bytes, specify a value of 0 in the length section without specifying a data section.

Example

Table with a column of abstract data type with BLOB input:
Table definition: CREATE TABLE T1 (C1 INTEGER, C2 SGMLTEXT, C3 DEC(7,0))

Table with two columns of abstract data type with BLOB input:
Table definition: CREATE TABLE T2 (C1 SGMLTEXT, C2 INTEGER, C3 SGMLTEXT)

Table having a column of abstract data type with input of a LOB column and BLOB:
Table definition: CREATE TABLE T1 (C1 INTEGER, C2 BLOB (100), C3 SGMLTEXT)

(b) -k d

When specifying d in the -k option, specify the data itself, not the name of the LOB data storage file, in the input data file.

Rules

Specify the LOB data and the LOB parameter data in a format in which a given column in row data has a 4-byte length section, such that the data section is coded following the row data.

Specify the input data file in the following order:

[row data]  [LOB parameter data]  [LOB data]
 1                2                 3

Explanation:

1. Specify the length section in the row data in the order of column definition.

2. Specify the LOB parameter data immediately after the row data in the order of column definition.

3. Specify the LOB data immediately following item B in the order of column definition.

If the LOB data or the LOB parameter data is the null value, specify a value of -1 in the 4-byte length section. The system ignores any null comparison values produced by a null value/function information file or a function information file. Do not specify the data section. There is no data section.

If the LOB data or the LOB parameter has 0 bytes, specify a value of 0 in the length section without specifying a data section.

Example

Table with one LOB column
Table definition: CREATE TABLE T1 (C1 BLOB(100),C2 INTEGER);

Specification method:

Specify the LOB data's length section (4 bytes) before the row data.

Specify the LOB data following item 1.

Table with two LOB columns
Table definition: CREATE TABLE T2 (C1 BLOB(100),C2 INTEGER,C3 BLOB(100));

Specification method:

Specify the LOB data's length section (4 bytes) in the row data in the order of column definition (which is LOB data length (C1) and LOB data length (C3)).

Specify the LOB data following item 1 in the order of column definition (which is LOB data (C1) and LOB data (C3)).

Table with two LOB columns and an abstract data type column with LOB input
Table definition: CREATE TABLE T3(C1 BLOB(100),C2 INTEGER,C3 SGMLTEXT,C4 BLOB(100));

Specification method:

Specify the LOB data and LOB parameter length section (4 bytes) in the row data in the order of column definition (which is LOB data length (C1), LOB parameter length section (C3), and LOB data length (C4)).

Specify the LOB parameter data immediately after the row data in the order of column definition (which is LOB parameter data (C4) only).

Specify the LOB data following item 2 in the order of column definition (which is LOB data (C1) and LOB data (C4)).

5.5.3 Fixed-size data format

For an input data file in fixed-size data format, specify the input data in characters or in the format stored in the database. When using a constructor function to generate the data to be stored in an abstract data type, code the input parameter either in character string data or in the data type of the function argument.

Organization of this subsection

(1) Specification format

(2) Rules

(3) Example

(1) Specification format

For details about how to specify input data in characters, see 5.5.1 DAT format. For details about how to specify input data in the format stored in the database, see 5.5.2 Binary format.

(2) Rules

Each line has a fixed length.

All the values in a column must begin at the same location. Character strings to be converted to numeric values may be left justified or right justified, but character strings to be stored as characters must be left justified (variable-length character strings must be padded with blanks so that the next column begins at the correct location).

The null value depends on the specification in the column structure information file.

If you input fixed-length character string data for CHAR, VARCHAR, NCHAR, NVARCHAR, MCHAR, or MVARCHAR (by specifying type=char(n)), the system deletes any consecutive single-byte spaces, tab characters, or \0s at the end of a column value except for the first byte. The system them compares the null comparison value and stores the data in the database. Therefore, you cannot store tab characters or \0s in a CHAR or MCHAR column. You cannot store single-byte spaces, tabs, or \0s in a VARCHAR, NCHAR, NVARCHAR, or MVARCHAR column. If you input data containing single-byte spaces, tabs, or \0s to a data type that does not accept single-byte spaces (NCHAR and NVARCHAR), the system handles the input as follows:

(a) Data consisting of only single-byte spaces, tabs, or \0s

Only the first byte remains after deleting all single-byte spaces, tabs, and \0s. For the NCHAR or NVARCHAR type, this results in an invalid data error because it requires an even number of bytes for the data length.

(b) Data consisting of single-byte spaces, tabs, or \0s, and other data

If the length of data without any consecutive single-byte spaces, tabs, or \0s at the end of the column value is an odd number of bytes, an invalid data error results in the same manner as with (a) previously. If the data length obtained is an even number of bytes, the system stores the data in the database.

Therefore, you should use double-byte spaces instead of single-byte spaces, tabs, or \0s as the characters to pad the trailing end of fixed-length character string data that is stored in the NCHAR or NVARCHAR type. For a table with the NCHAR data type, if the input data is shorter than the length defined for the table due to the presence of data that is excluded from input, the system assumes double-byte spaces as the trailing part of the data.

Be sure to use the column structure information file to specify the column data in the input data file.

If the length of the input character string data does not match the length defined for the storage table, the system handles the input data as fixed-length data in a DAT-format file. However, the data is not stored for variable-length character string data with a length greater than the length specified in the column structure information file. If the length of variable-length character string data is a negative value, the system continues processing.

To specify input data in the format in which it is stored in the database, use the binary format. For details about the binary format, see 5.5.2 Binary format.
For specifying input data using the character string data format, see Table 5-19.

Table 5-19 Data storage when the input data is specified in the character string data format (fixed-size data format)

Data type of table column or parameter data type of constructor function | Specification of column name statement | Data specified in the input data file | Storage data
INTEGER, SMALLINT, DECIMAL, FLOAT, and SMALLFLT | type=char(3) | 1 | 1 of each data type
1
1
CHAR(7) and MCHAR(7) | type=char(7) or type=char(7),mode=text | ABC | ABC
"ABC"
"ABC"
""ABC"" | "ABC"
""
type=char(7),mode=bin | ABC | ABC
"ABC" | "ABC"
"ABC" | "ABC"
""ABC"" | ""ABC""
"" | ""
NCHAR(3) | type=char(6) |  |
"" | ""
"" |
"""" | ""
"" | ""
VARCHAR(7) and MVARCHAR(7) | type=char(7) or type=char(7),enclose_del=yes | ABC | ABC (3 bytes)
"ABC"
"ABC" | ABC (5 bytes)
""ABC"" | "ABC" (5 bytes)
| (1 byte)
"" | (0 byte)
type=char(7),enclose_del=no | ABC | ABC (3 bytes)
"ABC" | "ABC" (5 bytes)
"ABC" | "ABC" (7 bytes)
""ABC"" | ""ABC"" (7 bytes)
| (1 byte)
"" | "" (2 bytes)
NVARCHAR(3) | type=char(6) |  | (6 bytes)
"" | "" (6 bytes)
"" | (4 bytes)
"""" | "" (4 bytes)
| (6 bytes)
"" | "" (6 bytes)
DATE | type=char(12) | 2003-12-31 | 2003-12-31
2003-12-31
2003-12-31
INTERVAL YEAR TO DAY | type=char(11) | 00010101​. | +00010101​.
00010101​.
00010101​.
TIME | type=char(10) | 08:45:00 | 08:45:00
08:45:00
08:45:00
INTERVAL HOUR TO SECOND | type=char(9) | 010101. | +010101.
010101.
010101.
TIMESTAMP | type=char(21) | 1991-01-01_11:22:33 | 1991-01-01_11:22:33
1991-01-01_11:22:33
1991-01-01_11:22:33
BLOB | type=char(13) | /tmp/file01 | Data in /tmp/file01
/tmp/file01 | Error
/tmp/file01
BINARY(7) | type=char(7) |  |

Legend:

: Single-byte space (0x20)

: Double-byte space

(3) Example

Figure 5-14 shows an example of coding data in the fixed-size data format.

Figure 5-14 Example of data in fixed-size data format

5.5.4 Arrayed data format for tables containing repetition columns

This section describes the method for specifying arrayed data in an input data file for tables containing repetition columns.

The format that the input data file takes depends on the input data format (DAT format, binary format, or fixed-size data format), on the arrayed data format (FF, FV, or VV), and whether the data consists of a variable-length data type.

Organization of this subsection

(1) Specification format

(2) Handling of null values for columns and elements

(3) Relationship between the number of elements in input data and the number of elements specified in table definition

(4) Specification example

(1) Specification format

Table 5-20 shows the methods for specifying arrayed data in an input data file for tables containing repetition columns.

Table 5-20 Methods for specifying arrayed data in an input data file for tables containing repetition columns

Description | File format | Arrayed data format
FF | FV | VV
Specifying current number of elements in input data |  | Not specified | Specified
Method for specifying current number of elements |  |  | For DAT format, specify in characters. For fixed-size data or binary format, specify in 2-byte numeric values (hexadecimal).
Number of element data items specified in input data |  | A number less than or equal to the number of elements specified in table definition. See (3) Relationship between the number of elements in input data and the number of elements specified in table definition. | Current number of elements
Number of elements stored in database |  | Depends on how null values are treated. See (2) Handling of null values for columns and elements. | Current number of elements
Specifiable input data formats | DAT format | Specifiable | Not specifiable | Specifiable
Binary format | Variable length not specifiable | Specifiable
Fixed-size data format | Specifiable | Not specifiable (because all row data are fixed length)
Null value specification method (for elements) | DAT format | Specify by using consecutive delimiters as in normal columns. See section 5.5.1 DAT format. |
Binary format | Specify null-equivalent values in null-value/information file as in normal columns.
Fixed-size data format | Specify null-equivalent values in column structure information file as in normal columns. |
Null-value specification method (for columns) |  | Specify a null value in all elements. Either a null value can be assigned to all elements or a column can be specified as a null value. See (2) Handling of null values for columns and elements. | Specify 0 as the current number of elements.
Number of elements stored in database |  | Depends on how null values are treated. See (2) Handling of null values for columns and elements. | Stores as many data items as there are specified current elements.
Variable-length data type specification method | DAT format | Same as normal column |  | Same as normal column
Binary format | Not specifiable | Specify valid data length (no fill characters).
Fixed-size data format | Specify data equal to table definition length and fill the remainder. |
Element data delimiters for DAT-format files |  | Same as column delimiters |  | Same as column delimiters
Element data error checking |  | As with normal columns, perform data-type specific checking; for FF and VV formats, check the current number of elements. For FF and VV formats, specify data for the part other than the effective elements, but do not check the data following the effective element data.

: Not applicable

(a) DAT format

In a DAT-format file, you can specify arrayed data in FF or VV format.

FF format

Specify as many data items as there are specified elements by separating each data item by a delimiter. If you omit a column structure information file or the number of elements in the column structure information file, the system assumes the maximum number of elements as the specified number of elements.

VV format

Specify the current number of elements in the range from 0 to the maximum number of elements at the beginning of the element data, then specify as many data items as there are current elements by separating each data item by a delimiter.

(b) Binary format

In the binary format, you can specify arrayed data in FF, FV, or VV format.

FF format

Specify as many data items as there are specified elements in the format shown in Table 5-18. If you omit the null value/function information file itself or the number of elements in the null value/function information file, the system assumes the maximum number of elements as the specified number of elements.

FV format

Specify the current number of elements, expressed as a 2-byte binary value, at the beginning of the element data, then specify as many data items as there are current elements, as shown in Table 5-18. If you omit the null value/function information file itself or the number of elements in the null value/function information file, the system assumes the maximum number of elements as the specified number of elements.

VV format

Specify the current number of elements, expressed as a 2-byte binary value, at the beginning of the element data, then specify as many data items as there are current elements, as shown in Table 5-18.

(c) Fixed-size data format

In the fixed-size data format, you can specify arrayed data in FF or FV format.

If you omit the column structure information file or null value/function information file or the number of elements in these files, the system assumes the maximum number of elements as the specified number of elements.

If you specify data in binary format, and elements specified in VARCHAR, NVARCHAR, or MVARCHAR are less than the defined length, you need to pad the data with fill characters up to its defined length.

FF format

Specify as many data items as there are specified elements in the format shown in Table 5-18.

FV format

Specify the current number of elements, expressed as a 2-byte binary value, at the beginning of the element data, then specify as many data items as there are specified elements, as shown in Table 5-18.

(d) Specification examples of arrayed data in fixed-size data format

Figure 5-15 shows specification examples of arrayed data in fixed-size data format.

These examples are based on columns of CHAR(3) ARRAY[5]. The 3-byte null is specified as the null value.

Figure 5-15 Specification examples of arrayed data in fixed-size data format

(e) Specification examples of arrayed data in variable-length data type

When specifying a variable-length data type (VARCHAR, MVCHAR, or NVARCHAR) in the fixed-size data or binary format, always specify the defined length of data in the FF or FV format.

Pad the valid data with any fill characters at the end. In the VV format, data is not padded with fill characters.

Figure 5-16 shows specification examples of arrayed data in the variable-length data format. These examples are based on columns of VARCHAR(3) ARRAY[3]. The 3-byte character null is specified as the null value.

Figure 5-16 Specification examples of arrayed data in variable-length data format

(2) Handling of null values for columns and elements

A repetition column can have a null value as a column or a null value as an element. The database load utility can store either type of data in a database.

When data is loaded into a repetition column, element null values in the input data file can occur in the following pattern. Figure 5-17 shows input data for a repetition column and available types of null value.

Figure 5-17 Input data for a repetition column and available types of null value

In the example shown in Figure 5-17, you can specify how to handle null values in the null value option (with the null value option in the array statement or with the nullset operand in a column structure information file and a null value/function information file) as follows: treat the entire column as a null value if all element data are null values; or, do not treat the consecutive null values at the trailing end of the element data as valid data, so that they are not stored in the database (not included in the number of elements).

Table 5-21 shows the handling of null values by the database load utility (pdload) when data is loaded into a repetition column.

Table 5-21 Handling of null values by the database load utility (pdload) during data loading into a repetition column

Item | Handling of null values
FF format | FV and VV format
Null value testing method | DAT format | Tested as with a regular column (such as by reading consecutive delimiters); the elements passing the test are treated as null values.
Binary format | Tested as with a regular column (by specifying null-equivalent values in a column structure information file); the elements passing the test are treated as null values.
Fixed-size data format | Tested as with a regular column (by specifying null-equivalent values in a null value/function information file); the elements passing the test are treated as null values.
Storing null values in database | Specifying a null value as a column | Intermediate null values are stored in the database. For the treatment of consecutive trailing null values or when all specified elements are null values, see (a) Handling of null values in FF format. | If the specified number of elements is 0, the system stores the column null values. Even if all element data is null values, the system assigns null values equal to the current number of elements without treating them as column null values.
Specifying a null value as an element | Intermediate null values are stored in the database. For the treatment of consecutive trailing null values or when all specified elements are null values, see (a) Handling of null values in FF format. | If both intermediate null values and consecutive trailing null values are within the current number of elements specified in input data, the system stores the null values in the database.

(a) Handling of null values in FF format

With the FF format, the current number of elements is not specified in input data. Therefore, if there are consecutive trailing null values, you can use the following operands to treat the null values as invalid element data so that they are not stored in the database:

nullset operand in the array statement in the control information file

nullset operand in the column structure information file

nullset operand in the null value/function information file

In a column structure information file or a null value/function information file, specifications are made for each column; in the array statement in a control information file, specifications are made for each table. If you specify all three options, the specifications in the column structure information file or the null value/function information file take precedence.

If the nullset operand is omitted, the system assumes nullset=c.

Table 5-22 shows null value option specification values and methods for storing null values in a database.

Table 5-22 Null value option specification values and methods for storing null values in a database using the FF format

Null value type | Null value option specification value
c (default) | e
Intermediate null value | The system stores a null value in applicable elements. | The system stores a null value in applicable elements.
Consecutive trailing null values (preceded by at least one valid element data item) | The system treats applicable elements (consecutive trailing null values) as invalid data and does not store them in database. | The system stores a null value in applicable elements (consecutive trailing null values).*
Consecutive trailing null values (all element data null) | The system treats the column as null. | The system stores a null value in all elements.*

Note

When using the FF format, the number of element data items in the input data file may be less than the number of elements specified in the table definition, in some cases. In this case, no data is specified beyond the current number of elements in the input data file. This means that the element data is not present, not that it has null values; therefore, the system does not store null values in the database, even when nullset=e is specified.

* Specifying nullset=e causes null values equal to the number of element data items in the input file to be stored in the database. Therefore, you should specify nullset=c for database storage efficiency. You can use the nullset=e operand to control the number of null values.

(3) Relationship between the number of elements in input data and the number of elements specified in table definition

For the FF or FV format, you can specify a desired number of element data items in the input data up to the maximum number of elements specified in the table definition. You can use the following operand to specify the number of element data items (current number of elements) in the input data:

DAT format and fixed-size data format

element operand in the column structure information file

Binary format

element operand in the null value/function information file

If the number of elements in the input data is equal to the number of elements specified in the table definition, there is no need to specify the previous operand, in which case the system assumes the number of elements specified in the table definition.

Table 5-23 shows what is stored and what is not stored in the database if the number of elements specified for a repetition column in the input data is different from the number of elements specified in the table definition.

Table 5-23 What is stored and what is not stored in the database if the number of elements specified for a repetition column in input data differs from the number of elements specified in table definition

Number of repetition element data items in input data: Number of repetition elements specified in table definition | Arrayed data format for repetition column
FF format | FV format (current number of elements specified in data) | VV format (current number of elements specified in data)
Number of elements in input data > number of elements in table definition | Error | Error | Error
Number of elements in input data = number of elements in table definition | Data is stored normally | Data stored normally (element data equal to the number of elements specified in input data is stored in database) | Data is stored normally
Number of elements in input data > number of elements in table definition | Data is stored normally (data equal to the number of elements specified in element operand is stored in database; any subsequent elements are not stored) | Data is stored normally (element data equal to the number of elements specified in input data is stored in database) | Data is stored normally

(4) Specification example

(a) DAT format

Figure 5-18 shows a specification example of DAT-format data.

Table definition:

CREATE TABLE T1 (C1 INTEGER, C2 CHAR(1) ARRAY[10])

Figure 5-18 Specification example of DAT-format data (repetition column)

(b) Binary format

Figure 5-19 shows a specification example of binary-format data.

Table definition:

CREATE TABLE T1 (C1 CHAR(4), C2 CHAR(10), C3 CHAR(5) ARRAY[10])

Figure 5-19 Specification example of binary-format data (repetition column)

(c) Fixed-size data format

Figure 5-20 shows a specification example of data in fixed-size data format.

Table definition:

CREATE TABLE T1 (C1 CHAR(4), C2 CHAR(10),
            C3 VARCHAR(5) ARRAY[10])

Figure 5-20 Specification example of data in fixed-size data format (repetition column)

5.5.5 LOB column input file

Organization of this subsection

(1) Creating a LOB column input file

(2) Notes about the LOB column input file

(1) Creating a LOB column input file

Figure 5-21 shows the format of a LOB column input file.

Figure 5-21 Format of LOB column input file

Create as many LOB data items as there are input lines in the order of input data in the LOB column structure base table. With some LOB data, you need to specify the following information:

To store 0 or more bytes of LOB data
Specify the LOB data according to the format shown in Figure 5-21. If L = 0, specify only the 4-byte LOB data length.

To store the default or null value
Specify only the 4-byte LOB data length based on L = 0 (whether or not the LOB data is the null value is determined by the specification of the row data of the corresponding LOB column structure base table).

Establish correspondence between the row data in the LOB column structure base table and the LOB data in the LOB column input file based on the specification sequence of the LOB data; i.e., the data in row n of the LOB column structure base table corresponds to data item n in the LOB column input file.

Figure 5-22 shows an example of correspondence between the row data in the LOB column structure base table and the LOB data in the LOB column input file. In this example, the LOB value in row 3 is treated as the null value.

Figure 5-22 Example of correspondence between row data in LOB column structure base table and LOB data in LOB column input file

(2) Notes about the LOB column input file

(a) Correspondence between specification of the input data file for the LOB column structure base table and LOB data in the LOB column input file

An error results if the specifications of the input data file for the LOB column structure base table do not agree with the specifications of the corresponding LOB data in the LOB column input file.

This type of error occurs in the following cases:

DAT-format input data file for LOB column structure base table
An error results if at least one byte of LOB data is specified in the LOB column input file, when the corresponding specification in the input data file for the LOB column structure base table is the null value or the default value.

Binary-format input data file for LOB column structure base table
An error results if at least one byte of LOB data is specified in the LOB column input file, when the corresponding specifications in the input data file for the LOB column structure base table and the null value/function information file match and are the null value.

(b) Notes about the number of data items in the input data file for the LOB column structure base table and the number of data items in the LOB column input file

When loading LOB data using a LOB column input file, the database load utility checks the number of data items in the LOB column input file. However, the utility may skip this checking due to the specification of an option or due to the existence of erroneous data in the input data file. When this happens, the utility issues the KFPL16328-W message.

Table 5-24 shows the relationship between the specification of the option and the existence of erroneous data in an input data file.

Table 5-24 Relationship between specification of option and existence of erroneous data in input data file

Option | Existence of erroneous data in input data file for LOB column structure base table
No | Yes
-e option | Not specified | Y | Y¹
Specified | Y | ²

Y: The utility checks the number of data items in LOB column input file.

: The utility does not check the number of data items in LOB column input file.

¹ The utility outputs the LOB column information from the input data file to a LOB middle file for the rows that did not result in an error, then checks the number of data items in the LOB column input file.

To use an error data file later to load the row data for the LOB column structure base table that resulted in an error, you need to prepare another LOB column input file that corresponds to the input file for the LOB column structure base table that is subject to subsequent data loading. You cannot use the initial LOB column input file as is.

² The utility outputs the corresponding LOB column information to a LOB middle file up to the data immediately preceding the erroneous row in the input data file for the LOB column structure base table.

Consequently, the utility outputs the LOB column information to a LOB middle file as is, even if the LOB data is shifted (due to invalid or missing data) in the LOB column input file that corresponds to the input data file for the LOB column structure base table up to the data immediately preceding the erroneous row.

If you load the remaining row data in the addition mode specifying the -r option after correcting the erroneous data in the input data file for the LOB column structure base table, the utility loads data through the last row in the input data file for the LOB column structure base table, then checks the number of data items in the LOB column input file for the first time during the LOB column creation process.

If this data item count checking results in an error, you need to take one of the following actions according to the location of the error in the LOB column input file:

(a) Error within in the range of data in the LOB column input file being loaded

You can load the LOB column by eliminating the cause of the error in the LOB column input file.

(b) Error beyond the range of data in the LOB column input file being loaded

You need to eliminate the cause of the error in the LOB column input file and load the LOB data in the LOB column input file that was previously being loaded as well as the LOB data that has already been loaded.

In this case, check to see if the LOB column structure base table to be loaded is a partitioned table or a non-partitioned table, and also check whether the loading units for the LOB column structure base table are in tables or in RDAREAs. Then, re-initialize the erroneous user LOB RDAREAs or all the user LOB RDAREAs corresponding to the erroneous LOB column, restore them from their backup copy, then load the LOB column.

Figure 5-23 shows a simple procedure for handling a data item count error in the LOB column input file.

Figure 5-23 Simple procedure for handling a data item count error in the LOB column input file

5.6 Error information file

In the event of an input data error, the error information is output to the error information file.

Organization of this section

5.6.1 Contents of error information file

5.6.2 Output example of error information file

5.6.3 Notes about referencing error information

5.6.4 Rules for output when the errdata operand is specified in a source statement

5.6.1 Contents of error information file

The system outputs a logical error number indicating the cause of an error to the error information file. This logical error number (XX) corresponds to the KFPL310XX message.

Table 5-25 shows lists and explains the logical error numbers for logical errors.

Table 5-25 Logical error numbers and descriptions

Logical error number
Description of logical error

1
Input data for NCHAR or NVARCHAR is invalid:

Length of the input data is an odd value

2

The numeric or sign part of packed-format decimal numeric data is invalid.

The numeric part of date, time, or time stamp data is invalid, or the length of the fraction part of time stamp data is invalid.

The numeric or sign part of date interval or time interval data is invalid.

3
The length of variable-length data (VARCHAR, NVARCHAR, MVARCHAR, BLOB, or BINARY) is invalid.

4
Data conversion error occurred.

5

Input data does not match the table in terms of the number of columns.

The column, not enclosed in double quotation marks ("), cannot be recognized.

A null character (0x00) is found as part of data in a text (DAT format) file.

6
Null value was specified for a table or column for which null value is prohibited:

Null value was specified for a table with FIX attribute.

Null value was specified for a cluster key component column.

Null value was specified for a column with NOT NULL attribute.

Null value was specified for the primary key component column.

7
Input records are not sorted by the cluster key.

8
For a table for which a cluster key or index has been defined, the following error occurred:

Duplicate key is prohibited, but a specified key is duplicated.

9
A column value was found that did not satisfy the partitioning conditions for the table created (being processed).

10
The row length of binary-format input data is invalid.

11
The LOB data is invalid:

The length of the file name of the LOB input file is invalid that was specified in the input data file for the LOB column structure base table.

Invalid LOB data length was specified for a LOB column input file or a binary-format file.

An invalid EOF was detected while acquiring the 4-byte LOB data length in the LOB column input file or while acquiring the LOB data with the specified length.

12
The specified LOB input file was not found. A file other than a regulator file was specified for a LOB input file.

13
The length of the LOB data exceeds the defined length.

14
There is a contradiction between the specifications of the LOB column structure base table and the specifications in the LOB input file:

One or more bytes of data are specified for a null value specification.

One or more bytes of data are specified for a default value.

15
The numbers of data items do not match between the LOB column structure base table and the LOB column input file.

16
Invalid parameter for a constructor function

17
No access privilege for LOB input file

18
Invalid data format for storage in abstract data type

19
Invalid number of data elements for storage in repetition column

20
There is an enclosing character at an invalid location.

90
The input data is longer than the defined column length.

When the lengover operand is omitted:

The system discards the excess portion of the data and then stores the data.

When the lengover operand is specified:

The system does not store any data because it assumes an input data error.

Notes

If the -e option is not specified and the length of specified variable-length data is invalid, the system treats the specified data length as being invalid and skips the corresponding row data.

If there is an error in a binary-format input data file (excluding an input data file output by the database reorganization utility), the system outputs a dump image listing of the first erroneous input data in hexadecimal and text format (2-byte codes are ignored). The output format depends on the data that is contained, as shown below:

For data in a BINARY-type column or abstract data-type column with the BINARY attribute
If the data length exceeds 1,024 bytes, the system outputs the length section with a length of 4 bytes and the data section with a maximum length of 1,024 bytes from the beginning. After a linefeed, the system outputs : at the beginning and then outputs the remaining column data. The following shows an output example:

For data in a BLOB-type column
The data is not output.

5.6.2 Output example of error information file

This section presents an output example of error information file.

This dump image listing shows the row data in line 10 that resulted in a data conversion error.

pdload (03-00) **** DB LOAD **** 1996-05-07 12:34:56   single   ........1
KFPL31004-E Data conversion error occurred,
            line=10, column=4   ........................................2
KFPL31002-E Invalid pack format value,
            line=77, column=5   ........................................2
KFPL30000-I Server name=SDS   ..........................................3
KFPL30001-I Rows successfully loaded=98   ..............................4

**** First error data [CODE:4] ****   ..................................5
41424344​ 00000001​ 61620001​ 0000001​c  ABCD ... ab ..
ffffffff 6364                        ... cd   ..........................6

Explanation:

Header

Input data error message

Server name

Number of stored rows

Sub-header (code number is the logical error number)

Dump image listing of the first error data (hexadecimal and ASCII characters)

Following are the contents of the error information file, depending on whether or not the -e option is specified:

-e option | Input data error | Error information file contents
Specified | No |
Yes | 1 - 6
Not specified | No | 1, 3, 4
Yes | 1 - 6

: No information is output.

Note

The numbers shown as the contents of the error information file correspond to the numbers used in the error information file output example.

5.6.3 Notes about referencing error information

For a binary-format input file for a non-FIX table that is output by the database reorganization utility, no error data is subject to dump image listing output or error data file output to an error information file.

For a binary-format file, the following types of input data error prevent columns beginning with the affected column from being output. Consider this when referencing an error data file:

An error in the variable-length character string or BINARY column

Input data column length less than a defined length for that column

For a DAT-format file, data with a row length greater than the value of maxreclen operand of the source statement (if the maxreclen operand is omitted in the source, a default value of 32 KB) is not output to an error data file.

Information is output to an error data file not in the order in which data is stored in the input file, but in the order in which error messages are output to an error information file.

For a binary-format file, the dump image listing from an error information file is not output for a table containing LOB columns, columns of an abstract data type, or repetition columns. If the length section of a variable-length character or BINARY column is invalid, data is output only up to the character string preceding the erroneous variable-length character or BINARY column.

If data that has not been output remains in the error data file, only one warning message is issued, irrespective of the number of data items remaining in that file.

If an input data error is detected when the input data file is in the user-created binary format or fixed-size data format, a dump image listing of the input data in which the first error was detected is output to the error information file. If the work area (memory) required for writing the dump image listing cannot be acquired, the KFPL25222-W message is displayed. In such a case, the system resumes data loading without output of the dump image listing.
Table 5-26 shows whether or not a dump image listing is output when an input data error is detected.

Table 5-26 Whether or not a dump image listing is output when an input data error is detected

Input data file format | Output of dump image listing | Work memory allocation
Allocatable | Unallocatable
DAT format | N |  |
Extended DAT format | N |  |
Fixed-size data format | Y | Outputs a dump image listing and then resumes data loading. | Resumes data loading without outputting a dump image listing.
Binary format | Y
pdrorg-generated binary format | N |  |

Legend:

Y: Output

N: Not output

: Not applicable

5.6.4 Rules for output when the errdata operand is specified in a source statement

This section describes the rules of error data file output and dump image listing output to the error information file for the corresponding data when the errdata operand is specified in the source statement.

The following table shows whether or not the files are output for a HiRDB/Parallel Server with a server name specified in the source statement different from a back-end server containing a table storage RDAREA, for a HiRDB/Parallel Server with a table storage RDAREA that extends over multiple back-end servers, and for a HiRDB/Single Server using a utility special unit:

Relationship with error data file creation work buffer | Format of input data file | Input data error type
Duplicate key error or invalid value for storage in abstract data type | Other errors
Insufficient buffer or errwork=0 | DAT format |  | N
Fixed-size data format |  | Y
Binary format |  | Y
Binary-format input file for a non-FIX table that was output by the database reorganization utility |  |
Sufficient buffer | DAT format | N | N
Fixed-length data format | N | Y
Binary format | N | Y
Binary-format input file for a non-FIX table that was output by the database reorganization utility |  |

Y: Outputs an error data file and a dump image listing for an error information file.

N: Outputs an error data file but not a dump image listing for an error information file.

: Outputs neither an error data file nor a dump image listing for an error information file.

Note

If some of the error data fails to be output to the error data file due to a buffer shortage, a message No output for error data is attached to the error message before it is output to an error information file. In this case, specify a large enough buffer size in the errwork operand to ensure the output of error data.

The following table shows whether or not the files are output for a HiRDB/Parallel Server with a server name specified in the source statement that matches a back-end server containing a table storage RDAREA, and for a HiRDB/Single Server using a utility special unit:

Format of input data file | Input data error type
Duplicate key error or invalid value for storage in abstract data type | Other errors
DAT format | N | N
Fixed-size data format | Y | Y
Binary format | Y | Y
Binary-format input file for non-FIX table that was output by database reorganization utility |  |

Y: Outputs an error data file and a dump image listing for an error information file.

N: Outputs an error data file but not a dump image listing for an error information file.

: Outputs neither an error data file nor a dump image listing for an error information file.

5.7 Column structure information file

A column structure information file is specified in the following cases:

Item | Format of input data file | Explanation
DAT format | Fixed-size data format | pdrorg-generated binary format
Storing data with a column sequence different from input data file and table | Y | Y | Y | 1
Storing data with a column count different from input data file and table | Y | Y | Y | 2
Storing data in the input data file after converting it to the data type of the column in the table |  | Y | NS | 3
Storing a column value in the input data file that matches the null comparison value as the null value |  | Y | Y | 4
Specifying a constructor function that generates values to be stored in abstract data type | Y | Y | NS | 5
The number of elements for repetition columns in the input data file is less than the maximum number of elements in table definition | Y | Y | * | 6

Y: Specifiable.

NS: Not specifiable.

: Not applicable

* If the arrayed data format is VV, you cannot specify the number of elements.

Explanation:

Specify column name statements in the order of corresponding input data.

If some of the input data is not to be stored in the table, specify a skipdata statement for such data. If there is no input data to be stored in the table, omit the column name statement.

Specify the data type of the table column in the corresponding column name statement.

Specify the comparison value (input data) to be treated as the null value in the column name statement.

Specify the constructor function name and parameter type in the column name statement. If the name of the constructor function that generates the data to be stored in the abstract data type is different from the name of the column data type, or if there are multiple functions with the same name, be sure to specify the column structure information file. For the fixed-size data format, also specify the data type of the input parameter and the null comparison value.

Specify the number of input data elements in the column name statement. For details about the column name statement, see 5.7.1 Column name statement; for details about the skipdata statement, see 5.7.2 skipdata statement.

Rules

If an input data file is in the fixed-size data format, be sure to specify a column structure information file. For an input data file in the DAT format or the pdrorg-generated binary format, you can specify a column structure information file as required.
For an input data file in the pdrorg-generated binary format, you can specify a column structure information file only for a non-FIX table. Specifying a column structure information file for a FIX table results in an error. To reorganize the column structure of a FIX table using a column structure information file, handle the input data file as being in the fixed-size data format.

Specify each column name statement and skipdata statement on a single line. If you need more than one line and the last character in the line is a comma (,) for separating operands, specify at least one byte of space or tab between the comma and the continuation character ($), and specify a continuation character at the end of the line. In this manner, you can specify information over more than one line.

When specifying a column structure information file, also specify the -c option.

If you are creating a LOB column structure base table separately from LOB columns and specify a column structure information file during the creation of the LOB column structure base table, you need to specify a column structure information file containing the same information also during the creation of the LOB columns. Otherwise, the LOB column creation process may result in an error.

Organization of this section

5.7.1 Column name statement

5.7.2 skipdata statement

5.7.3 Specification examples

5.7.1 Column name statement

Organization of this subsection

(1) Format

(2) Operands

(3) Specification of data types and argument types

(4) Data storage in the database when the data type specified in the column structure information file does not match the data type in the table

(5) Examples of type operand specification in the column name statement for an input data file in pdrorg-generated binary format

(1) Format

 column-name[{[,type=data-type

             [,null={'numeric-comparison-value'|(begin-position,{c|x}'comparison-value)}]]

             [,element=elements-count][,elmtype=arrayed-data-format]

             [,nullset=null-value-option][,mode={text|bin}]

             [,enclose_del={yes|no}][,filldata=filler-data]

         |[,func=([authorization-identifier.]function-name

             ,param=argument-type[,type=data-type

             [,null={'numeric-comparison-value'|(begin-position,{c|x}'comparison-value')}]]

             [,mode={text|bin}][,enclose_del={yes|no}]

             [,filldata=filler-data]

             [,param=argument-type[,type=data-type

               [,null={'numeric-comparison-value'|(begin-position,{c|x}'comparison-value')}]]

               [,mode={text|bin}][,enclose_del={yes|no}]

               [,filldata=filler-data]]...)]

           }]

Some of the column name statement's operands are not specifiable depending on the format of input data file. The following table shows whether each operand is specifiable for each format.

Type of specified column | Operand | Input data format
DAT format | Fixed-size data format | pdrorg-generated binary format
Predefined type (column specification) | column-name | R | R | R
type | N | R | O³
null | N | O | O
element | O | O | N
elmtype | O | O | N
nullset | O | O | N
mode | N | O⁴ | N
enclose_del | N | O⁵ | N
filldata | N | O | N
Abstract data type (function specification) | column-name | R | R | R
func | O¹ | O¹ | O¹
param | O² | O² | O²
type | N | O² | O³
null | N | O | O
mode | N | O⁴ | N
enclose_del | N | O⁵ | N
filldata | N | O | N

R: Required

O: Optional

N: Not specifiable

¹ Required if a function is specified.

² Required if the func operand is specified with the function.

³ Specifiable if the data type of the column or the data specified in param with function specification is BLOB or BINARY. If any one of the following conditions is applicable, make sure that the operand is specified:

Loading unload data from a BLOB column to a column of an abstract data type for which the BINARY or BLOB parameter has been specified

Loading unload data from the BLOB parameter of an abstract data type to a column of the BLOB or BINARY type

Loading unload data from a BLOB column to a BINARY column

Loading unload data from the BLOB parameter of an abstract data type to a column of the abstract data type for which the BINARY parameter has been specified

⁴ Specifiable only when the type operand value is char and the table definition is CHAR or MCHAR.

⁵ Specifiable only when the type operand value is char and the table definition is VARCHAR or MVARCHAR.

(2) Operands

(a) column-name

Specifies the name of the table column in which input data is to be stored.

If the column-name is enclosed in double quotation marks ("), it is treated as being case sensitive; otherwise, it is treated as all uppercase letters. If the column-name contains a space, enclose the entire column-name in double quotation marks.

(b) type=data-type

Specifies the data type of the column in the input data. For the data types for columns in input data, see (3) Specification of data types and argument types. To determine whether or not the input data is stored in the database when the data type specified in the column structure information file does not match the data type of the table column, see (4) Data storage in the database when the data type specified in the column structure information file does not match the data type in the table.

(c) null={'numeric-comparison-value'|(begin-position,{c|x}'comparison-value')}

Specifies that the null value is to be stored in specified columns of the table.

Because the column data is compared with the input data, specify a comparison value that corresponds to the data type specified in the type operand.

The available comparison method depends on the type of input data. The following table shows the comparison method for each type of input data:

Input data type | Comparison method
Numeric comparison | Character comparison | Hexadecimal comparison
DECIMAL | Y | N | Y
DATE | Y | N | Y
INTERVAL YEAR TO DAY | Y | N | Y
TIME | Y | N | Y
INTERVAL HOUR TO SECOND | Y | N | Y
TIMESTAMP | Y | N | Y
CHAR | N | Y | Y
VARCHAR | N | Y | Y
NCHAR | N | Y | Y
NVARCHAR | N | Y | Y
MCHAR | N | Y | Y
MVARCHAR | N | Y | Y
BINARY | N | Y | Y
BLOB | N | Y | Y
INTEGER | Y | N | Y
SMALLINT | Y | N | Y
FLOAT | Y | N | Y
SMALLFLT | Y | N | Y
yymmdd format | Y | N | Y
yy-mm-dd format | N | Y | Y

Legend:

Y: Can be specified

N: Cannot be specified

Rules

The null value is stored in the columns containing the value specified in this operand.

This operand is not applicable to a column with the NOT NULL attribute, a cluster key component column, or a primary key component column.

For an input data file in pdrorg-generated BINARY format, the null value is specified by setting the offset to 0 for LOB and BINARY column data and the LOB and BINARY parameters of a abstract data type; therefore, you cannot specify this operand for these columns. When these data types have real data, to treat them as the null value by setting the offset to 0, you must first have deleted the real data part from the corresponding input data (simply editing the corresponding offset to 0 does not result in correct processing).

For an input data file in fixed-size data format, the system performs comparison after dividing the data into columns; thus, all trailing spaces are deleted before data comparison.

numeric-comparison-value ((up to 255 characters))

For numeric input data, this operand specifies the numeric value to be compared.

Rules

The specification method is the same as for numeric data in the DAT format, but do not include spaces.

The numeric attribute applies to the INTEGER, SMALLINT, FLOAT, SMALLFLT, DEC, DATE, TIME, INTERVAL YEAR TO DAY, INTERVAL HOUR TO SECOND and TIMESTAMP data types, and to the yymmdd format.

If a numeric value of TIMESTAMP type is specified and the fraction part is shorter than the defined value, the system assumes 0.

Example

DATE: yyyy-mm-dd
Example: January 1, 1995 1995-01-01

TIME: hh:mm:ss
Example: 12:01:01 12:01:01

INTERVAL YEAR TO DAY: yyyymmdd.
Example: 1900 years, 1 month, and 1 day 19000101.

INTERVAL HOUR TO SECOND: hhmmss.
Example: 12 hours, 1 minute, and 1 second 120101.

TIMESTAMP: yyyy-mm-dd hh:mm:ss.nnnn
Example: 1900-01-01 at 01:10:30:45
1900-01-01 01:10:30.4500 or 1900-01-01 01:10:30.45

(begin-position,{c|x}'comparison-value')

For a character comparison value, specify this information when the input data has the character attribute or is binary or LOB data. The character attribute applies to the CHAR, NCHAR, MCHAR, VARCHAR, NVARCHAR, and MVARCHAR data types and to the yy-mm-dd format.

For a hexadecimal comparison value, this information can be specified even if the input data has the numeric attribute (comparison is available with all data types).

begin-position <unsigned integer> ((1-32000))

Specifies in bytes the beginning position of the storage data for the target column that is to be compared with the comparison value in order to determine whether or not the input data is treated as the null value.

The system compares the portion of the input data beginning at the specified position with the specified comparison value. If they match, the system treats the input data as the null value. The following shows examples:

Input data of CHAR(5) | Result of comparison with null=(2,'XYZ') | Handling of input data
*XYZ* | Perfectly matches the comparison value. | Treated as the null value.
XYZ** | Matches the comparison value, but the beginning position does not match. | Treated as the input data.
*XY** | Does not match the comparison value.

c:

Specifies that the comparison value is a character string.

If the number of characters specified for begin-position + comparison-value is longer than the defined length of the corresponding column, a control statement error results.

x:

Specifies that the comparison value is a hexadecimal value.

Two hexadecimal characters (0 to f) are treated as 1 byte.

The specified characters are not case sensitive.

If the specified character string does not consist of hexadecimal characters or if the number of characters specified for begin-position + comparison-value is longer than the defined length of the corresponding column, a control statement error results.

For a numeric-type column, the comparison value may be the same as the input data. In such a case, specify the comparison value as hexadecimal characters. The following shows examples:

Data type of column | Value treated as the null value | Specification following the part null=
DECIMAL | Character string NULL | (1,x'4e554c4c')
DATE | 0000-00-00 | (1,x'00000000​')
INTERVAL YEAR TO DAY | Byte 1 is 0xff. | (1,x'ff')
TIME | 99:99:99 | (1,x'999999')
INTERVAL HOUR TO SECOND | Byte 2 is 0xff. | (2,x'ff')
TIMESTAMP | Bytes 2 and 3 are 0xff. | (2,x'ffff')
INTEGER* | Character string NULL | (1,x'4e554c4c')
SMALLINT* | Character string NL | (1,x'4e4c')
FLOAT* | Character string **NULL** | (1,x'2a2a4e554c4c2a2a')
SMALLFLT* | Character string NULL | (1,x'4e554c4c')

* A specified hexadecimal comparison value may match some value (in the example of SMALLINT, this comparison value matches the big-endian 20044). To treat the value as the null value, you must specify a value that is not stored.

comparison-value ((up to 255 characters))

Specifies the characters to be compared with the input data. If you are specifying x, be sure to specify an even number of characters (with a maximum of 254 characters).

(d) element=elements-count

<1 to number of elements specified for the corresponding column in table definition>

For a repetition column, specify the number of elements to be specified in the input data file.

Specify the element operand if the number of elements specified in the input data file is less than the number of elements specified for the corresponding column during table definition.

If the element operand is omitted, the system assumes the maximum number of elements specified for the corresponding column during table definition.

Rules

If the arrayed data format is the VV format, the system always uses the number of elements specified in the input data file. Therefore, this operand is ignored whether or not it is specified.

An error results if you specify this operand for an input data file in the pdrorg-generated binary format.

(e) elmtype=arrayed-data-format

For a repetition column, specify its array data format.

arrayed-data-format

Specify one of the following formats:

ff: FF format

fv: FV format

vv: VV format

For details about the arrayed data format, see 5.5.4 Arrayed data format for tables containing repetition columns.

Rules

If you omit the elmtype operand and also omit the array statement in the control information file, the system assumes the following format for the arrayed data format:

DAT format file: FF format

Binary format file: VV format

Fixed-size data format file: FF format

An error results if you specify this operand for an input data file in the pdrorg-generated binary format.

(f) nullset=null-value-option

This specifies how null value storage is to be handled if a null value is specified from an element through the end of specified elements for an FF arrayed data format.

null-value-option

c: Nothing is stored in specified element.

e: Null value is stored in specified element.

Rules

When the nullset operand is omitted, the system assumes the following value:

If an array statement is not specified in the control information file: c

If an array statement is specified in the control information file: Value specified in the nullset operand of the array statement

An error results for the binary-format input data file generated by pdrorg.

(g) mode={text|bin}

Specifies the input data storage method when the input data is a fixed-length character string (type=char(n)) and the column data type of the storage target is CHAR or MCHAR. This operand is applicable only to the fixed-size data format.

Criteria

To store the following characters as part of the input data, specify bin:

Trailing single-byte spaces (0x20), tab characters (\t), and null characters (\0) in the input data

Quotation marks (") at both ends of the input data

To delete the above characters from the input data, specify text (default value).

text:

Specifies that the input data is to be edited as follows and then stored:

Delete the trailing single-byte spaces (0x20), tab characters (\t), and null characters (\0) from the input data.

Delete the quotation marks (") at both ends of the input data.

If the input data is shorter than the defined length of the storage column, pad the column with single-byte spaces.

bin:

Specifies that the input data is to be edited as follows and then stored:

If the input data is shorter than the defined length of the storage column, pad the column with single-byte spaces.

When bin is specified, space conversion cannot be performed (the spacelvl operand cannot be specified in the option statement).

(h) enclose_del={yes|no}

Specifies the input data storage method when the input data is a fixed-length character string (type=char(n)) and the column data type of the storage target is VARCHAR or MVARCHAR. This operand is applicable only to the fixed-size data format.

Criteria

To store the quotation marks (") at both ends of the input data as part of the input data, specify no.

To delete the quotation marks at the ends of the input data, specify yes (default value).

yes:

Specifies that the input data is to be edited as follows and then stored:

Delete the trailing single-byte spaces (0x20), tab characters (\t), and null characters (\0) from the input data.

Delete the quotation marks (") at both ends of the input data.

no:

Specifies that the input data is to be edited as follows and then stored:

Delete the trailing single-byte spaces (0x20), tab characters (\t), and null characters (\0) from the input data.

To store single-byte spaces, tab characters, and null characters as part of the input data, enclose them in quotation marks.

(i) filldata=filler-data

Specifies the trailing filler data that is to be used when BINARY data is specified as CHAR type in the fixed-size data format. The filler data is 1-byte data in the range 0-255 expressed in hexadecimal (X'00" to X'ff'). When this operand is omitted, 0 is assumed.

Rules

When converting data from CHAR to BINARY, the system treats the data without the consecutive trailing fillers as the data section of the BINARY data.

A control statement error results if this operand is specified for an input data file that is not in the fixed-size data format or for a column that is not the BINARY type.

Specifying this operand for a parameter other than a BINARY-type parameter results in a control statement error.

(j) func=([authorization-identifier.]function-name,param=argument-type[,type=data-type[,null={'numeric-comparison-value'|(begin-position,{c|x}'comparison-value')}]][,null={'numeric-comparison-value'|(begin-position,{c|x}'comparison-value')}]][,mode={text|bin}][,enclose_del={yes|no}][,filldata=filler-data][,...])

If a specified column name has an abstract data type, this operand specifies information about the constructor function that generates the values to be stored.

For data storage in the database when the input parameter specified in the column structure information file has a different data type than the argument of the constructor function to be called, see (4) Data storage in the database when the data type specified in the column structure information file does not match the data type in the table.

[authorization-identifier.]function-name

When generating the data to be stored by calling a constructor function supplied by a plug-in, specify the name of the function.

You cannot specify a function that produces a return value different from the abstract data type of the column to be stored, or that has an abstract data type argument.

If the authorization identifier is omitted, the system assumes the user who defined the abstract data type.

param=argument-type

Specify the data type of the parameter that is to be passed to the constructor function.

If there are multiple parameters, specify them in the order based on the function's input format. For details about how to specify the argument types, see (3) Specification of data types and argument types. Note that you cannot specify either yy-mm-dd or yymmdd. blobprm is permitted only for an input data file in the pdrorg-generated binary format.

type=data-type

If the input data file is a fixed-size data format file, specify the data type of the parameter to be input. If there are multiple parameters, specify them in the order based on the function's input format. For details about how to specify the argument types, see (3) Specification of data types and argument types. Note that you cannot specify either yy-mm-dd or yymmdd. blobprm is permitted only for an input data file in the pdrorg-generated binary format.

null={'numeric-comparison-value'|(begin-position,{c|x}'comparison-value')}

For an input data file in the fixed-size data format, specify this operand to handle the input parameter as the null value.

The input parameter's data type is subject to comparison. For the specification method, see (c) null={'numeric-comparison-value'|(begin-position,{c|x}'comparison-value')}, previously.

mode={text|bin}

For details about this specification, see (g) mode={text|bin}.

enclose_del={yes|no}

For details about this specification, see (h) enclose_del={yes|no}.

filldata=filler-data

For details about this specification, see (i) filldata=filler-data.

Specification order in func operand:

The following shows the order in which param, type, null, filldata, mode, and enclose_del are specified in the func operand:

In the fixed-size data format

In the binary format

In the DAT format

(3) Specification of data types and argument types

Table 5-27 shows the method for specifying data types and argument types.

Table 5-27 Specification of data types and argument types

Specification
Remarks

integer

smallint

char(n)1, 2
n indicates the CHAR or MCHAR length in bytes; m indicates the NCHAR length in digits. These values may not match the column length defined for the target table. If converting characters to numeric values, do not include the null character (\0) in the character string.
For the param operand, omit (n) and (m).

nchar(m)¹

mchar(n)¹

varchar(n)¹
n indicates the maximum length of VARCHAR or MVARCHAR in bytes; m indicates the maximum length of NVARCHAR in digits. These values may not match the column length defined for the target table.
For the param operand, omit (n) and (m).

nvarchar(m)¹

mvarchar(n)¹

float

smallflt

dec (precision
[, decimal-places])
For the param operand, omit the precision and scaling factor.

date

interval-year-to-day

time

interval-hour-to-second

yy-mm-dd1, 3
You can use this format only when storing character data indicating the last two digits of the year in a DATE-type column. Any one-byte character can be specified as the separator between the year, month, and date (e.g., yy-mm-dd or yy/mm/dd).

yymmdd³
You can use this format only when storing the unsigned packed-format data indicating the last two digits of the year in a DATE-type column.

timestamp(p)
p indicates the length of the fraction part for seconds (0, 2, 4, or 6).
For the param operand, omit (p).

binary(n)
n indicates the maximum length of the BINARY type in bytes.
For the param operand, omit (n).

binaryprm
For an input data file in pdrorg-generated binary format, you can use this type in the type operand.
When skipping abstract data-type data, if the abstract data type is the BINARY-type parameter, use this type in the type operand of the skipdata statement.
A control statement error results if this type is specified in an operand other than the type operand of the skipdata statement for an input data file in pdrorg-generated binary format.

blob(n)

When specifying in the type operand for the fixed-size data format
n indicates the maximum length of the LOB input file name and may not match the length defined for the LOB column. Use this format for binary-format data containing its length in the first four bytes.

When specifying in the type operand for the pdrorg-generated binary format
Omit (n).

When specifying in the param operand
Omit (n).

When specifying in the type operand of a skipdata statement
Omit (n).

blobprm
For an input data file in the pdrorg-generated binary format, you can use this format in the type operand. When unloading an abstract data type, use this format for the BLOB parameter data that has been unloaded.

¹ Specify a left-justified column value.

² If the characters are to be converted to a numeric value, there is no need to left-justify them.

³ The last two digits of the year are expanded to the format 19yy and then stored.

(4) Data storage in the database when the data type specified in the column structure information file does not match the data type in the table

Tables 5-28 and 5-29 show whether or not input data is stored in database if the data type specified in the column structure information file does not match the data type in the table.

Table 5-28 Data storage in the database when the data type specified in the column structure information file does not match the data type in the table (1/2)

Data type specified in column structure information file | Data type in table
IN | SI | CH | NC | MC | VC | NV | MV | FL | SM
integer | Y |  |  |  |  |  |  |  |  |
smallint |  | Y |  |  |  |  |  |  |  |
char | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y
nchar |  |  |  | Y |  |  |  |  |  |
mchar |  |  |  |  | Y |  |  |  |  |
varchar |  |  |  |  |  | Y |  |  |  |
nvarchar |  |  |  |  |  |  | Y |  |  |
mvarchar |  |  |  |  |  |  |  | Y |  |
float |  |  |  |  |  |  |  |  | Y |
smallflt |  |  |  |  |  |  |  |  |  | Y
dec |  |  |  |  |  |  |  |  |  |
date |  |  |  |  |  |  |  |  |  |
interval-year- to-day |  |  |  |  |  |  |  |  |  |
time |  |  |  |  |  |  |  |  |  |
interval-hour- to-second |  |  |  |  |  |  |  |  |  |
timestamp |  |  |  |  |  |  |  |  |  |
binary |  |  |  |  |  |  |  |  |  |
yy-mm-dd |  |  |  |  |  |  |  |  |  |
yymmdd |  |  |  |  |  |  |  |  |  |
blob |  |  |  |  |  |  |  |  |  |

Legend:

IN: INTEGER

SI: SMALLINT

CH: CHAR

NC: NCHAR

MC: MCHAR

VC: VARCHAR

NV: NVARCHAR

MV: MVARCHAR

FL: FLOAT

SF: SMALLFLT

Y: Can be stored.

: Cannot be stored.

Table 5-29 Data storage in the database when the data type specified in the column structure information file does not match the data type in the table (2/2)

Data type specified in column structure information file | Data type in table
DEC | DATE | IYTD | TIME | IHTS | TMST | BIN | BLOB
integer |  |  |  |  |  |  |  |
smallint |  |  |  |  |  |  |  |
char | Y | Y | Y | Y | Y | Y | Y | Y
nchar |  |  |  |  |  |  |  |
mchar |  |  |  |  |  |  |  |
varchar |  |  |  |  |  |  |  |
nvarchar |  |  |  |  |  |  |  |
mvarchar |  |  |  |  |  |  |  |
float |  |  |  |  |  |  |  |
smallflt |  |  |  |  |  |  |  |
dec | Y |  |  |  |  |  |  |
date |  | Y |  |  |  |  |  |
interval-year-to-day |  |  | Y |  |  |  |  |
time |  |  |  | Y |  |  |  |
interval-hour-to-second |  |  |  |  | Y |  |  |
timestamp |  |  |  |  |  | Y |  |
binary |  |  |  |  |  |  | Y |
yy-mm-dd |  | Y |  |  |  |  |  |
yymmdd |  | Y |  |  |  |  |  |
blob |  |  |  |  |  |  | Y* | Y

Legend:

DEC: DECIMAL

DATE: DATE

IYTD: INTERVAL YEAR TO DAY

TIME: TIME

IHTS: INTERVAL HOUR TO SECOND

TMST: TIMESTAMP

BIN: BINARY

BLOB: BLOB

Y: Can be stored.

: Cannot be stored.

* Data can be stored for an input data file in the pdrorg-created binary format.

(5) Examples of type operand specification in the column name statement for an input data file in pdrorg-generated binary format

The following table provides examples of type operand specification in the column name statement for an input data file in pdrorg-generated binary format:

Input data type
Data type after conversion

BLOB type
BLOB parameter
BINARY type
BINARY parameter

BLOB type

func=(F_BLOB,
param=blob)
type=blob
func=(F_BIN,
param=binary,
type=blob)

BLOB parameter
type=blobprm
func=(F_BLOB,
param=blob)
type=blobprm
func=(F_BIN,
param=binary,
type=blobprm)

BINARY type
N
N

N

BINARY parameter
N
N
N
func=(F_BIN,
param=binary)

Legend:

: Specification is not necessary.

N: The corresponding input data type cannot be converted to the indicated data type.

F_BIN: This is a plug-in-provided constructor function of an abstract data type that takes BINARY type as a parameter.

F_BLOB: This is a plug-in-provided constructor function that takes BLOB type as a parameter.

5.7.2 skipdata statement

Organization of this subsection

(1) Format

(2) Operands

(3) Notes

(1) Format

*skipdata* [{,length=bytes-count|,type=data-type[,element=elements-count]}]

(2) Operands

(a) length=bytes-count

<unsigned integer> ((1-32000))

For an input data file in the fixed-size data format, this operand specifies in bytes the length of the column that is to be skipped.

Rules

There is no need to specify this operand for a DAT-format file.

To skip a linefeed code, if the linefeed code consists of linefeed code (\n) and carriage return code (\r), specify as length=2.

(b) type=data-type

For an input data file in the pdrorg-generated binary format, this operand specifies the data type of the column to be skipped.

For details about how to specify the data types, see (3) in section 5.7.1 Column name statement. Note that you cannot specify yy-mm-dd or yymmdd. blobprm is applicable only to an input data file in the pdrorg-generated binary format.

If a table with an abstract data type column is output to a binary-format input data file by pdrorg's unload processing, data in the abstract data type column in the file is converted to the data type of the constructor function's argument by the constructor parameter reverse creation function that was specified during unloading. Therefore, specify in the type operand the data type that is created by the constructor parameter reverse creation function. For details about the data type that is created by the constructor parameter reverse creation function, see the documentation for the applicable plug-in.

(c) element=elements-count

For an input data file in the pdrorg-generated binary format, if a repetition column is to be skipped, this operand specifies the maximum number of elements for the repetition column.

This operand must follow the type operand.

(3) Notes

If an input data file in the fixed-size data format is a text file, specify the skipdata statement to avoid storing the linefeed code at the end of a line.

The skipdata statement is specifiable for a column, but not for a function argument.

The following table shows whether or not each operand is specifiable by the type of input data file:

Operand | Format of input data file
DAT format | Fixed-size data format | pdrorg-generated binary format
length |  | Y |
type |  |  | Y

Y: Mandatory

: Not specifiable

5.7.3 Specification examples

This section presents specification examples of the column structure information file.

Organization of this subsection

(1) DAT format

(2) Fixed-size data format

(3) pdrorg-generated binary format

(1) DAT format

Table definition:

CREATE TABLE T1 (COL1 INTEGER,COL2 DATE,COL3 CHAR(10));

Input data file and column structure information file:

(2) Fixed-size data format

Table definition:

CREATE TABLE T1 (COL1 INTEGER,COL2 DATE,COL3 CHAR(10));

Input data file and column structure information file:

Explanation:

Data consisting of 4 bytes of characters and 2 bytes of spaces can be specified on one line as shown in this example, instead of using two lines COL1,type=char(4) and *skipdata*,length=2.

The skipdata statement is specified for left-justification purposes because the data for COL3 is characters.

The length of one line equals the sum of the column lengths specified in the column structure information file. Therefore, the length of the input data is 9 bytes, although CHAR(10) is defined for the table.

For a text file, the skipdata statement must be specified because the file contains a linefeed code. The length of one line (one record) in this fixed-size-data-format file is determined to be 26 bytes (25 bytes of data section + linefeed code).

(3) pdrorg-generated binary format

This example loads table T1's unload data to table T2, where T1 has SGMLTEXT columns including BLOB parameter data and T2 has BLOB columns. The table definitions show only the row name and data type specification sections; the other sections are omitted.

(a) Order of column definitions do not match between T1 and T2

Table definition during unloading:

T1(C1 INT, C2 SGMLTEXT, C3 BLOB)

Table definition during data loading:

T2(C4 BLOB ,C5 INT, C6 SGMLTEXT)

Contents of column structure information file:

C5
C6, func = (SGMLTEXT, param = blob)
C4

(b) T2 has more columns than T1

Table definition during unloading:

T1(C1 INT, C2 SGMLTEXT, C3 BLOB)

Table definition during data loading:

T2(C4 INT ,C5 BLOB)

Contents of column structure information file:

C4
*skipdata*, type = blobprm
C5

(c) T2 has more columns than T1

Table definition during unloading:

T1(C1 INT, C2 BLOB)

Table definition during data loading:

T2(C4 INT, C5 BLOB, C6 SGMLTEXT)

Contents of column structure information file:

C4
C5

(d) Replacing column data

This example replaces LOB attribute data (C2) in T1's SGMLTEXT type column to T2's LOB column (C6) and T1's LOB column data (C3) to the LOB attribute (C5) of the SGMLTEXT type column in T2.

Table definition during unloading:

T1(C1 INT, C2 SGMLTEXT, C3 BLOB)

Table definition during data loading:

T2(C4 INT ,C5 SGMLTEXT, C6 BLOB)

Contents of column structure information file:

C4
C6, type=blobprm
C5, func=(sgmltext, param=blob)

(e) Changing the data type of columns

This example loads the LOB attribute data (C2) from an SGMLTEXT type column to the BINARY attribute (C5) of an SGMLBIN type column and loads data (C3) from a LOB column to a BINARY type column (C6).

Table definition during unloading:

T1(C1 INT, C2 SGMLTEXT, C3 BLOB)

Table definition during data loading:

T2(C4 INT ,C5 SGMLBIN, C6 BINARY)

Contents of column structure information file:

C4   ................................................1
C5, func=(sgmlbin, param=binary, type=blobprm)   ....2
C6, type=blob   .....................................3

Explanation

Stores T1's C1 data to T2's C4. Specification of data type is omitted because C1 and C4 have the same data type.

Stores T1's C2 data to T2's C5. To store data in the abstract data type column SGMLBIN provided by the plug-in, this example uses the func option to specify the constructor function sgmlbin and the attribute data type binary. Because the input data has the LOB attribute of the abstract data type column SGMLTEXT provided by the plug-in, the example uses the type operand to specify the LOB attribute (blobprm).

Stores T1's C3 data in T2's C6. Because C3 and C6 have different data types, this example specifies the data type of the input data (blob) in the type operand.

(f) Area required for data conversion

If data conversion results in BLOB data placed between the BINARY type data, BINARY parameter data of abstract data type, and BLOB parameter data of an abstract data type, you need to allocate memory to retain that BLOB data. If the utility is unable to allocate this memory, it terminates with a memory allocation error. Memory allocation is required in the following cases:

When BLOB data is loaded to an abstract data type column with BLOB attribute, the data may be loaded to another BLOB type column before that BLOB data.

When BLOB parameter data of an abstract data type is loaded to a BLOB type column, the data may be loaded to an abstract data type column with BLOB attribute after that BLOB parameter data of the abstract data type.

When BLOB data or BLOB parameter data of an abstract data type is loaded to a BINARY type column or an abstract data type column with BINARY attribute, the data may be loaded to another BLOB type column before the target BLOB data or BLOB parameter data of the abstract data type.

Figure 5-24 shows the data arrangement in the input data file in the pdrorg-created binary format that is output from a table for which BINARY type columns, abstract data type columns with BLOB attribute, and BLOB type columns are defined.

Figure 5-24 Data arrangement in an input data file in the pdrorg-created binary format

Explanation

pdload allocates an input data area of at least M. The maximum size of M is determined from the target table definition (you can also specify a desired size in the macreclen operand of the source statement).

If data is loaded in this arrangement, pdload processes the data sequentially and does not allocate any more area for input data.

If data conversion is specified in the column structure information file, pdload allocates an area of M + M2 + K. As the input data area, pdload allocates an area of M + M2 and to retain the BLOB data section preceding the data converted to the BINARY type, pdload allocates an area of K. You can specify the size of the K area using the bloblimit operand in the option statement. pdload allocates the area whose size is obtained from the target table definition or the option statement's bloblimit operand, whichever is smaller.

5.8 Null value/function information file

You can use a null value/function information file to store the null value in a table when a specified comparison value matches the input data. Specify this operand if the name of the constructor function that generates the values to be stored in a column of abstract data type differs from the name of the data type of the column, or if you want to specify information about multiple functions.

A statement specified in this null value/function information file is called a column number statement.

A null value/function information file is applicable only to an input data file in the binary format.

Be sure to specify a column number statement in one line. To specify information for multiple columns, specify as many column number statements as there are columns.

Organization of this section

5.8.1 Column number statement

5.8.1 Column number statement

Organization of this subsection

(1) Format

(2) Operands

(3) Specification example

(4) Notes

(1) Format

column-number {,null={(start-position,[{c|x}]'comparison-value')
          |'numeric-comparison-value'}
          |{,element=elements-count}{,elmtype=arrayed-data-type}
            {,nullset=null-value-option}
          |,func=(function-name,param=argument-type
            [,null={start-position,[{c|x}]'comparison-value')
            |'numeric-comparison-value'}][,...])}

(2) Operands

(a) column-number

<unsigned integer> ((1-30000))

Specifies in order of the definitions (ascending order) the table column number in which the input data is to be stored.

(b) Other operands

For details about the other operands, see section 5.7.1 Column name statement.

(3) Specification example

The following presents a specification example of null value/function information file. This example uses the binary format.

Table definition:

CREATE TABLE T1 (C1 INT,C2 DATE,C3 VARCHAR(10),C4 BLOB(100k));

Null value/function information file:

1,null = '-1'
2,null = '0000-00-00'
3,null = (5,x'20')
4,null = (1,'@')

Explanation:

The null value is stored if the data corresponding to each column is the following value:

C1: 0xffffffff

C2: 0x00000000

C3: 0x000a61626364202020202020

C4: 0x0000000140

(4) Notes

If an input file subject to data loading does not contain data for some columns, the utility stores in those table columns the default value specified in WITH DEFAULT or the null value. For details, see 5.9 Null and default values during data loading.

5.9 Null and default values during data loading

The null and default values that are stored during data loading depend on the specification of these values during table definition and the control statement specification for execution of pdload. Table 5-30 describes the null and default values that are stored during data loading.

Table 5-30 Null and default values that are stored during data loading

Format of input data file
Specification value during table definition
Value of null_string in option statement during execution of pdload
Value stored during data loading

NOT NULL constraint
WITH DEFAULT
DEFAULT clause
When input data is null value¹
When column name statement is omitted²
non-null value

DAT format
NULL
N/A
Specified
default
Default value in DEFAULT clause
Default value in DEFAULT clause
Value of input data

null
Null value

Not specified
default
Null value

null

NOT NULL
Specified
N/A
default
Default value in WITH DEFAULT clause
Default value in WITH DEFAULT clause

null

Not specified
Specified
default
Default value in DEFAULT clause
Default value in DEFAULT clause

null
Null value (results in an error)

Not specified
default
D

null

Extended DAT format
NULL
N/A
Specified
default
Default value in DEFAULT clause
Default value in DEFAULT clause
Value of input data

null
Null value

Not specified
default
Null value

null

NOT NULL
Specified
N/A
default
Default value in WITH DEFAULT clause
Default value in WITH DEFAULT clause

null

Not specified
Specified³
default
null
Default value in DEFAULT clause
Default value in DEFAULT clause

Null value (results in an error)

Not specified³
default
D

null

Specified⁴
default
Default value in DEFAULT clause
Default value in DEFAULT clause

null
Default value in WITH DEFAULT clause

Not specified⁴
default
D

null

Binary format
NULL
N/A
Specified
N/A
Null value
D
Value of input data

Not specified

NOT NULL
Specified
N/A
D

Not specified
Specified

Not specified

Fixed-size data format
NULL
N/A
Specified
N/A
Null value
Default value in DEFAULT clause
Value of input data

Not specified
Null value

NOT NULL
Specified
N/A
D
Default value in WITH DEFAULT clause

Not specified
Specified
Default value in DEFAULT clause

Not specified
D

pdrorg-created binary format
NULL
N/A
Specified
N/A
Null value
Default value in DEFAULT clause
Value of input data

Not specified
Null value

NOT NULL
Specified
N/A
Null value (results in an error)
Default value in WITH DEFAULT clause

Not specified
Specified
Default value in DEFAULT clause

Not specified
D

Legend:

Default value in DEFAULT clause: For details, see Table 5-31.

Default value in WITH DEFAULT clause: For details, see Table 5-32.

N/A: Not applicable

D: The column name statement cannot be specified or omitted depending on specifications when the corresponding table was defined or on the combination of values specified for execution of pdload.

Note

If a primary key or cluster key with UNIQUE specified has been defined for the column for which the WITH DEFAULT or DEFAULT clause is specified, storing the default value results in a key duplication error. In such a case, make sure that you specify the input data.

1 The following input data is treated as the null value:

In DAT format:

"*"

Data with no specification

In extended DATA format:

"*"

Data with no specification

Input data for a column of numeric, date, date interval, time, time interval, or time stamp data type that consists of all single-byte spaces or tabs

In binary format:

Data that matches the comparison value specified in the null operand of the column number statement in the null value/function information file

In fixed-size data format:

Data that matches the comparison value specified in the null operand of the column name statement in the column structure information file

In pdrorg-created binary format:

Data whose column data offset is 0

2 This applies when the column name statement for the corresponding column is omitted in the column structure information file.

3 This applies to the following columns:

Index component column with UNIQUE specified

Cluster key column with UNIQUE specified

Cluster key column with PRIMARY specified

Primary key column

4 Columns other than those in ³.

Table 5-31 Default value in the DEFAULT clause that is stored during data loading

Data type
Specification of DEFAULT clause for the column to be stored

Literal
USER
C_T or CT
C_D or CD
C_TS or CTS
NULL
Omitted

Numeric data
INTEGER
SMALLINT
DECIMAL
FLOAT
SMALLFLT
Default value
N/A
N/A
N/A
N/A
Null value
Same as the default value in the WITH DEFAULT clause

Charac- ter string data
CHARAC TER
Authorization identifier of the user who inserted rows
pdload execution time¹
pdload execution date²
pdload execution date and time³

VARCHAR
N/A
N/A
N/A

Mixed charac- ter string data
MCHAR

MVARCHAR

Nation- al charac- ter string
NCHAR
N/A

NVARCHAR

Date data
DATE
pdload execution date

Date interval data
INTERVAL YEAR TO DAY
N/A

Time data
TIME
pdload execution time

Time interval data
INTERVAL HOUR TO SECOND
N/A

Time stamp data
TIMESTAMP
pdload execution date and time⁴

Binary data
BINARY
N/A

Large object data
BLOB
N/A

Legend:

C_T or CT: CURENT_TIME or CURRENT TIME

N/A: CURRENT_DATE or CURRENT DATE

N/A: CURRENT_TIMESTAMP or CURRENT TIMESTAMP

N/A: Cannot be set.

1 Stored in the format hh:mm:ss.

2 Stored in the format yyyy-mm-dd.

3 Stored in the format yyyy-mm-dd hh:mm:ss[.000000].

4 Zeros are stored for the fraction part of seconds.

Table 5-32 Default value of WITH DEFAULT that is stored during data loading

Data type
Value to be stored

Numeric data
INTEGER
SMALLINT
DECIMAL
FLOAT
SMALLFLT
0

Character string data
CHARACTER
Space

VARCHAR
Space equivalent to 1 byte

National character string
NCHAR
Space

NVARCHAR
Space equivalent to 1 character

Mixed character string data
MCHAR
Space

MVARCHAR
Space equivalent to 1 byte

Date data
DATE
Current date

Date interval data
INTERVAL YEAR TO DAY
0 year, 0 month, and 0 day

Time data
TIME
Current time

Time interval data
INTERVAL HOUR TO SECOND
00:00:00

Time stamp data
TIMESTAMP
Current date and time

Binary data
BINARY
Data with a length of 0

Large object data
BLOB
Data with a length of 0

Note: The current date, current time, and current date and time are based on the date and time the database load utility is executed.

5.10 Using a UOC to load a table

Organization of this section

5.10.1 Overview

5.10.2 UOC interface

5.10.3 Examples of UOCs

5.10.4 Creating a shared library

5.10.1 Overview

You may want to store the input data file after editing it with a user-created program, instead of storing it in the database as is. Such a user program is called a UOC (user's own coding). You can create UOCs in C language.

There are two ways to load a table using a UOC:

Using the utility to input the input data file (by specifying the file name in the source statement)

Using a UOC to input the input data file (by specifying (uoc) in the source statement)

Figures 5-25 and 5-26 show the concept of these methods:

Figure 5-25 Table loading using a UOC (using the utility to input the input data file)

Explanation:

Repeat steps 3 through 7 until all data is loaded from the input data file.

Figure 5-26 Table loading using a UOC (using a UOC to input the input data file)

Explanation:

Repeat steps 3 through 7 until all data is loaded from the input data file.

5.10.2 UOC interface

Information is input and output between the database load utility and the UOC via the interface area. The database load utility allocates this area. The UOC receives the address of this area in the first argument of the function, and references and updates the area.

Figures 5-27 and 5-28 show the structure of the UOC interface area. Table 5-33 describes the contents of the UOC interface area.

Figure 5-27 Structure of UOC interface area (32-bit mode)

Figure 5-28 Structure of UOC interface area (64-bit mode)

Table 5-33 Contents of UOC interface area

Relative position
Field name
Length
(Byte)
Attribute
Value setter
Contents

32
64
32
64

0
0
Eye catcher
8
8
char
pdload
Interface area (*UOCINF*).

8
8
Executing program
4
4
long
pdload
Program receiving control:
0: pdload
1: UOC

12
12
Call type
4
4
long
pdload
Type of processing request to UOC:

o: Start request

Requests processing startup preparations (prepares to start processing, such as by opening the input data file).

e: Edit request¹

Requests editing of row data. For method (1), one row of data input by pdload is set in the input buffer pointed to by the input buffer address. For method (2), the UOC reads the input data file. In both methods, the results of editing the data are then set in the edit buffer pointed to by the edit buffer address. This call is repeated until all data has been processed or the return code from the UOC is a value other than 0 or 4.

c: End request

Requests termination of processing. Such termination processing as closing the input data file is performed. For method (1), the request is issued when there is no more data to be input by pdload. For method (2), the request is issued when return code 16 is received from the UOC.

t: Termination request

Requests forcible termination of processing. This call is used instead of an end request when an error occurs on the pdload side or when a return code other than 0, 4, or 16 is received from the UOC.

Once a start request is issued, an end request is issued when processing terminates normally, and a termination request is issued when processing terminates abnormally. The UOC is not called once an end request or termination request is issued.

16
16
Length of authorization identifier
2
2
short
pdload
Length of name of table owner.

18
18
Authorization identifier
30
30
char
pdload
Name of table owner.

48
48
Length of table identifier
2
2
short
pdload
Length of table name.

50
50
Table identifier
30
30
char
pdload
Table name.

80
80
Length of input data²
4
8
long
pdload

For a binary-format or extended-DAT-format input data file, this is set to the length of the data (full length) set in the input buffer.³

This item is ignored.

84
88
Address of input buffer
4
8
void*
pdload

Set to the address of the buffer that stores the data input by pdload.

This item is ignored.

88
96
Length of edit data2, 5
4
8
long
UOC
For a binary-format or extended-DAT-format input data file, this is set to the length of the data (full length) set in the edit buffer.⁴

Set to -1 if no data is stored.

92
104
Address of edit buffer
4
8
void*
UOC
Address of buffer that stores the data edited by the UOC.

96
112
Address of user parameters
4
8
void*
pdload
Set to the address of the character string specified in the param operand of the srcuoc statement. If the param operand is omitted, it is set to NULL.

100
120
Information used by system
4
8
void*
pdload
Information used by the system (must not be used by the UOC).

104
128
Reserved
16
16
char
pdload
Reserved area (must not be used by the UOC).

120
144
Return code
4
4
long
UOC
Return code that notifies the calling program of the results of UOC processing. The UOC that received control from pdload must return one of the codes explained as follows. Because this area is cleared (set to -1) each time pdload calls the UOC, the UOC must set this area after every call.

0:

Start or end request executed normally, or one row of data has been made available in the edit buffer for an edit request.

4:

Message output processing is to be performed (even if processing terminated normally); the details are the same as for the 0 return code.

When the return code is 4, the message is output up to three times. Once the message has been output three times, the return code is ignored and the message is no longer output, even if the return code remains as 4.

8:

Input processing is to be committed up to that point but further processing is to be discontinued because an error occurred during the UOC processing. However, if an internal error occurred on the HiRDB side, input processing is rolled back. The message output to the message log should be checked to determine whether input processing was committed or rolled back.

16:

The UOC has read the input data file, and pdload is to be notified that there is no more data to be processed. When the input data file is read by pdload, this return code can also be set when no more data is to be received after this time. When pdload receives this return code, it performs end processing.

20:

An error occurred during UOC processing. This return code is set when input processing is rolled back up to the time of the error and processing is discontinued.

If a return code other than 0 or 16 is set, the contents of the message embedded area are output to the standard output and the message log. The message should be a character string of up to 131 bytes terminating with \0.

124
148
Message embedded area
132
132
char
UOC
Storage area for message output to standard output and log.

32: Relative position and length for HiRDB in 32-bit mode

64: Relative position and length for HiRDB in 64-bit mode

Note

1. and 2. in the Contents column indicate the following:

Using pdload to input the input data file

Using a UOC to input the input data file

¹ When the -e option is specified, UOC processing is also discontinued if erroneous data is detected. If pdload was used to input the input data file, the following results:

If the -r option is specified, data up to the specified row data is not passed.

If data contains a carriage return code (\r) before a linefeed code (\n) such as those in a DAT-format file created by a personal computer, the data is passed with the carriage return deleted.

For an input data file in pdrorg-generated binary format with the -W option specified, neither LOB nor BINARY columns can be edited.

When processing a binary-format input data file, data is not passed if it has an invalid length for a variable-length character string.

² The value is set to -1 when the corresponding data is not to be input In the case of a HiRDB in the 64-bit mode, the maximum length of data valid for processing is 2 gigabytes minus 1 byte.

³ The area that is pointed to by the input buffer address field is called the input buffer. The input buffer is allocated by pdload when pdload reads the input data file. The input buffer contains each row of data input by pdload. The format of the input buffer is as follows:

DAT-format input data file
Text data read up to the linefeed code is stored as is. The end of the data consists of a linefeed code (\n) plus the NULL character (\0). Do not reference or update data beyond the last NULL character.

Extended-DAT-format input data file
Text data up to the null character or linefeed code that is not enclosed in the enclosing character is stored as is. The length of the stored data is set as the input data length. Do not reference or update the area that is larger than this input data length.

Binary-format input data file
The row length of the data is stored, as calculated from the table definition. The length of the stored data is set in the input data length. Do not reference or update the area beyond the length set in the input data length.

Input data file output by pdrorg
For a FIX table, the input data length is set to the length of the data section only. For a non-FIX table, the input data length is set to the sum of the offset section plus the data section. Do not reference or update the area beyond the length set in the input data length. Because UOCs cannot handle LOB or BINARY columns, use pdrorg's UOC to edit tables that contain LOB or BINARY columns.

Fixed-size-data-format input data file
The row length of the data is stored, as calculated from the column information in the column structure information file. For a text file, the data still contains linefeed (\n) and carriage return (\r) codes.

⁴ The area pointed to by the edit buffer address field is called the edit buffer. The UOC allocates the edit buffer. However, when pdload reads the input data file, the input buffer can be used as is as the edit buffer if the input buffer is not to be updated beyond the specified data length. For binary-format data, set the length of data in the edit data length field to indicate the actual data part in the edit buffer. For DAT-format data, there is no need to set the length, but the end of the edit buffer data must be a linefeed code (\n) followed by the NULL character (\0).

⁵ For an input data file in the binary or extended DAT format, specify the length of data for the edit buffer. For an input data file in the extended DAT format, make sure that the length of edited data does not exceed the maxreclen operand value specified in the source statement. For an input data file in any other format, specify the initial value of 0.

5.10.3 Examples of UOCs

This section describes examples of data loading using UOCs.

These UOC examples are provided as sample databases. The storage directory is $PDDIR/sample/sampleUOC.

Organization of this subsection

(1) Example of data loading using UOC (1)

(2) Example of data loading using UOC (2)

(1) Example of data loading using UOC (1)

This example changes an input data file with a 2-digit year designation to a 4-digit designation to store the data in a Y2K-supported database that can handle dates in the year 2000 and beyond. The input data file is in DAT format, and pdload is used to input the input data file.

(a) Database table definition

CREATE TABLE DIRECTORY (EMPLOYEE_NUMBER INTEGER,
                     BIRTH_DATE DATE,
                     HOMETOWN CHAR(10),
                     NAME CHAR(16));

(b) Format of input data file

10001, 68/04/30, BOSTON,DAVID IVERSON
10002, 64/09/13, TEXAS,DONALD YOUNG
20001, 70/11/02, CHICAGO,MATT CARR

(c) Command format

pdload DIRECTORY control-information-file-name

(d) Control information file

source input-data-filename
srcuoc library-name entry = date_change_func

(e) UOC example

(File name: sample1.c)

/*****************************************************************************
**                                                                          **
**  HiRDB sample Data input User Own Coding (for CSV file)                  **
**                          ~    ~   ~                                      **
**  name    :   date_change_func                                            **
**                                                                          **
**  func    :   YY/MM/DD  ===>  YYYY-MM-DD                                  **
**                                                                          **
**  i/o     :   none                                                        **
**                                                                          **
**  return  :   none                                                        **
**                                                                          **
*****************************************************************************/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <pdutluoc.h>                                                             1

#define DATELEN         10                  /* DATE length                  */

   static  void    sub_date_change(char *,char *);

void date_change_func(
   UTL_UOC_INF    *uocinf                  /* A(UOC interface area)        */    2
){
   long            wk_leng;                /* length                       */
   char            date_data[10];          /* DATE (HiRDB)                 */
   char           *date_ptr;               /* A(birth date)                */
   char           *address_p;              /* A(native)                    */
   static  char    buff[512];              /* buffer                       */

   switch(uocinf->req_cd){                                                       3
   case UTL_UOC_START:
/*--------------------------------------------------------------------------*/
/*  START                                                                   */
/*--------------------------------------------------------------------------*/
       uocinf->edit_adr = buff;
       uocinf->rtn_code = UTL_UOC_NML;
       break;
   case UTL_UOC_EDIT:
/*--------------------------------------------------------------------------*/
/*  EDIT                                                                    */
/*--------------------------------------------------------------------------*/
       date_ptr = strchr(uocinf->data_adr,',');
       if (date_ptr == NULL){
           strcpy(uocinf->err_msg,"Invalid data");
           goto OWARI;
       }
       sub_date_change(++date_ptr,date_data);
       wk_leng = (long)date_ptr - (long)uocinf->data_adr;
       strncpy(buff,uocinf->data_adr,wk_leng);
       strncpy((char*)((long)buff + wk_leng),date_data,DATELEN);
       wk_leng += DATELEN;
       address_p = strchr(date_ptr,',');
       strcpy((char*)((long)buff + wk_leng),address_p);
       uocinf->rtn_code = UTL_UOC_NML;
       break;
   case UTL_UOC_END:
   case UTL_UOC_TERM:
/*--------------------------------------------------------------------------*/
/*  END                                                                     */
/*--------------------------------------------------------------------------*/
       uocinf->rtn_code = UTL_UOC_NML;
       break;
   default:
       strcpy(uocinf->err_msg,"Invalid request code");
       goto OWARI;
   }
   return;
OWARI:
   uocinf->rtn_code = UTL_UOC_ERR;
   return;
}

static void sub_date_change(
   char    *year_two,                      /* YY/MM/DD                     */
   char    *year_four                      /* YYYY-MM-DD                   */
){
   strcpy(year_four,"19");
   strncat(year_four,year_two,8);
   year_four[4] = '-';
   year_four[7] = '-';
   return;
}

Explanation:

Acquire the UOC creation header provided by HiRDB.

Receive the address of the UOC interface area as an argument.

Determine the call type and execute the appropriate processing.

(2) Example of data loading using UOC (2)

This example converts the character codes of the file transferred from the M machine by FTP in the binary mode from EBCDIK to ASCII and then stores it in the database. The input data file is in binary format, and the UOC is used to input the input data file.

(a) Database table definition

CREATE TABLE EMPLOYEE_LIST (EMPLOYEE_NUMBER INTEGER,
          EMPLOYEE_NAME CHAR(16));

(b) Format of the input data file (EBCDIK codes)

00002711​ E8E4E4D1 C940C9D2 C5C4C140 40404040​   ...Hexadecimal
10001 DAVID IVERSON                            ...Characters
00002712​ E8D6E2C8 C9D640D6 C4C14040 40404040​
10002 DONALD YOUNG
00004E21 D4C1E2C1 D4C940D2 C1E6C1C7 E4C3C8C9
20001 MATT CARR

(c) Command format

pdload EMPLOYEE_LIST control-information-file-name

(d) Control information file

source (uoc)
srcuoc library-name entry=table_load_func param='input-data-filename'

(e) UOC example:

(File name: sample2.c)

/*****************************************************************************
**                                                                          **
**  HiRDB sample Data input User Own Coding (for Binary file 1/2)           **
**                          ~    ~   ~                                      **
**  name    :   table_load_func                                             **
**                                                                          **
**  func    :   Character code convert                                      **
**                                                                          **
**  i/o     :   none                                                        **
**                                                                          **
**  return  :   none                                                        **
**                                                                          **
*****************************************************************************/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <pdutluoc.h>

#define F_START             'S'             /* convert start                */
#define F_CONV              'C'             /* convert execute              */
#define F_END               'E'             /* convert end                  */

   extern  long    data_convert_func(long,long,char*,char*);

void table_load_func(
   UTL_UOC_INF    *uocinf                  /* A(UOC interface area)        */
){
   long            rc;                     /* return code                  */
   long            redsiz;                 /* input data length            */
   char           *ebc_adr;                /* A(EBCDIK)                    */
   char           *asc_adr;                /* A(ASCII)                     */
   char            buff[20];               /* input buffer                 */

   static  int     inflp = EOF;            /* file ID                      */

   switch(uocinf->req_cd){
   case UTL_UOC_START:

/*--------------------------------------------------------------------------*/
/*  START                                                                   */
/*--------------------------------------------------------------------------*/
       uocinf->e_data_len = sizeof(buff);
       uocinf->edit_adr = malloc(sizeof(buff));
       if (uocinf->edit_adr == NULL){
           strcpy(uocinf->err_msg,strerror(errno));
           goto OWARI;
       }
       if (uocinf->user_param == NULL){
           strcpy(uocinf->err_msg,"File name not specified");
           goto OWARI;
       }
       strcpy(uocinf->err_msg,"FILE NAME:");
       strcat(uocinf->err_msg,uocinf->user_param);                                1
       inflp = EOF;
       inflp = open(uocinf->user_param,O_RDONLY | O_NONBLOCK);
       if (inflp == EOF){
           strcpy(uocinf->err_msg,strerror(errno));
           goto OWARI;
       }
       rc = data_convert_func(F_START,0,0,0);
       if (rc != 0){
           strcpy(uocinf->err_msg,strerror(rc));
           goto OWARI;
       }
       uocinf->rtn_code = UTL_UOC_DBG;                                            2
       break;
   case UTL_UOC_EDIT:
/*--------------------------------------------------------------------------*/
/*  EDIT                                                                    */
/*--------------------------------------------------------------------------*/
       redsiz = read(inflp,buff,sizeof(buff));
       switch(redsiz){
       case 0:
           uocinf->rtn_code = UTL_UOC_EOF;
           break;
       case -1:
           strcpy(uocinf->err_msg,strerror(errno));
           goto OWARI;
       default:
           if (redsiz == sizeof(buff)){
               memcpy(uocinf->edit_adr,buff,sizeof(long));
               ebc_adr = (char *)((long)buff + sizeof(long));
               asc_adr = (char *)((long)uocinf->edit_adr + sizeof(long));
               rc = data_convert_func(F_CONV,sizeof(buff) - sizeof(long),
                                      ebc_adr,asc_adr);
               if (rc != 0){
                   strcpy(uocinf->err_msg,strerror(rc));
                   goto OWARI;
               }
               uocinf->rtn_code = UTL_UOC_NML;
           }else{
               strcpy(uocinf->err_msg,"Invalid data");
               goto OWARI;
           }
       }
       break;
   case UTL_UOC_END:
   case UTL_UOC_TERM:
/*--------------------------------------------------------------------------*/
/*  END                                                                     */
/*--------------------------------------------------------------------------*/
       rc = data_convert_func(F_END,0,0,0);
       if (rc != 0){
           strcpy(uocinf->err_msg,strerror(rc));
           goto OWARI;
       }
       if (inflp != EOF){
           rc = close(inflp);
           inflp = EOF;
           if (rc == EOF){
               strcpy(uocinf->err_msg,strerror(errno));
               goto OWARI;
           }
       }
       if (uocinf->edit_adr != NULL){
           free(uocinf->edit_adr);
           uocinf->edit_adr = NULL;
       }
       uocinf->rtn_code = UTL_UOC_NML;
       break;
   default:
       strcpy(uocinf->err_msg,"Invalid request code");
       goto OWARI;
   }
   return;
OWARI:
   uocinf->rtn_code = UTL_UOC_ERR;
   return;
}

Explanation

Acquire the path name of the input data file from the user parameters.

If the file was opened normally, output the file name in a message.

5.10.4 Creating a shared library

Once you have created a UOC, create a shared library. For details about creating a shared library, see F.1 Creating a shared library.

5.11 Rules and notes

Organization of this section

(1) Rules

(2) Notes

(3) Whether or not options and control statements can be specified when pdload functions are used

(4) Using files with a BOM

(1) Rules

(a) Execution of the utility

You can execute pdload only while HiRDB is active.

Execute pdload at the server machine containing the single server or at the server machine where the system manager is located.

If you execute pdload, specify the LANG environment variable. To use character codes that are not supported by the OS in the pdload execution environment, you must set the PDLANG environment variable. For details about LANG and PDLANG, see the HiRDB Version 8 UAP Development Guide.

(b) Whether or not the utility can be executed

Whether or nor pdload can be executed depends on the open attribute of the RDAREAs containing the tables, indexes, and LOB columns subject to data loading, as well as the status of the RDAREAs. For details, see Appendix C. RDAREA Status During Command Execution.

(c) Maximum number of concurrent executions of the utility

The maximum number of times pdload can be executed concurrently depends on the value of the pd_utl_exec_mode operand.

pd_utl_exec_mode=0 specified:

A maximum of 32 concurrent executions of pdload are permitted.

pd_utl_exec_mode=1 specified:

The maximum number of concurrent executions of pdload is the value of the pd_max_users operand.

(d) Using tables and indexes during utility processing

While pdload is creating a table or an index, no other UAP or utility can access the table or the index. However, if you specify nowait=yes in the option statement, you can conduct a NOWAIT search. A NOWAIT search is an SQL search function with NOWAIT specified in the lock option.
If you shut down the RDAREAs containing the table subject to data loading with the pdhold command, an UAP results in a shutdown error. This prevents the utility's execution from being placed in lock-release wait status by UAP execution or the UAP execution from being placed in lock-release wait status by utility execution.

Make sure that you do not execute a definition SQL statement for a table currently undergoing data loading. If a definition SQL statement is executed, pdload terminates abnormally. To prevent execution of a definition SQL on a table currently subject to data loading, you need to issue the pdhold command to shut down the RDAREA that contains the table and index to be created. To reference another table in the same RDAREA during data loading, use the pdhold command to place the RDAREA in reference-possible shutdown status.

If you execute pdload on a table or index with an RDAREA that is being processed by a definition SQL statement, the table or index is placed in lock-release wait status.

For an input data file in DAT format or fixed-size data format, if the WITH DEFAULT clause is not specified for the table columns, and no input data is specified for a column with the NOT NULL attribute, using the utility results in an error.

(e) Relationship between CREATE TABLE or CREATE INDEX and PCTFREE

Percentage of free space in page and in segment during data storage
During data loading, the data is stored according to the percentage of free space in the pages or segments specified in the table definition (PCTFREE operand of CREATE TABLE).
For an index, if the batch index creation mode is specified or new data is created in the creation mode, the data is stored according to the percentage of free space in the pages specified in the index definition (PCTFREE operand of CREATE INDEX).
However, if the -y option is specified, the utility stores data in available pages regardless of the percentage of free space specified during table and index definitions. Additionally, you can change the percentage of free space in the table or index definition by using the option statement with the tblfree operand or the idxfree operand, respectively, specified.

Searching for free space
During execution, pdload always stores data in unused pages (an error results if unused pages cannot be allocated). When loading data in the addition mode (-d specified), the utility does not use any free space in used pages that contain existing data, even if such space is available, because it takes time to search for the free space in used pages. (This could result in a considerable increase in execution time because a large amount of data is added during data loading.) However, if the -y option is specified, no error results even when the utility is unable to allocate unused pages (in which case the utility stores data in available space in used pages). During data loading on a table, the specification of SEGMENT REUSE is ignored, if specified for the table.

(f) Synchronization points during data loading

Normally, synchronization point dumps are not collected during data loading. If other UAPs are executing while data loading is underway and a system failure occurs, the time required for restart increases. Therefore, you should not execute any UAPs during data loading.

Data loading with the synchronization point specification enables you to collect synchronization point dumps at intervals specified as the number of lines. In the event of abnormal termination, this method requires less start time than the normal data loading method that does not collect synchronization point dumps.

(g) Checking national character string data

Values stored in national character string data are not subject to checking as to whether or not the data is in multi-byte codes.

(h) Entering a file created in VOS3 using EasyMT

To input a file created by VOS3 using EasyMT, you must convert it to the character codes specified in the pdsetup command before using pdload to load the data.

(i) Using multi-volume MT

To use multi-volume magnetic tape, you need to install MTguide at the server machine, because it is used for volume switching.

(j) Facility for conversion to a DECIMAL signed normalized number

The facility for conversion to a DECIMAL signed normalized number handles the sign part of DECIMAL type, shown as follows. For details about the facility for conversion to a DECIMAL signed normalized number, see the HiRDB Version 8 System Operation Guide.

Specifications for the sign part of DECIMAL type
The following table shows the HiRDB specifications for the sign part of DECIMAL type:

Sign part | Description
X'C' | Indicates a positive number.
X'D' | Indicates a negative value.
X'F' | Indicates a positive value.

Conversion rules for the sign part of DECIMAL type

When data is inserted, the facility for conversion to a DECIMAL signed normalized number converts the sign part of DECIMAL type according to the following rules.

Conversion rules for the sign part of DECIMAL type (other than 0 data)

Sign part of embedded variable data | Not normalized | Normalized
X'A' | Error | Converted to X'C'
X'B' | Error | Converted to X'D'
X'C' | Not converted | Not converted
X'D' | Not converted | Not converted
X'E' | Error | Converted to X'C'
X'F' | Not converted | Converted to X'C'
X'0' to X'9' | Error | Error

Conversion rules for the sign part of DECIMAL type (0 data)

Sign part of 0 data | Not normalized | Normalized
X'A' | Error | Converted to X'C'
X'B' | Error
X'C' | Not converted
X'D' | Not converted
X'E' | Error
X'F' | Not converted

Thus, if the 0 data is normalized, -0 is converted to +0.

For an input data file in the DAT format that is subject to conversion of character string data, the facility stores the normalized values (sign part is X'C' for positive values and 0 data and X'D' for negative values) regardless of the system definitions.

Referencing error information files and error data files

When the facility for conversion to a decimal signed normalized number is used, the DECIMAL columns are output in the error data dump-image listing that is output to the error information file and in the input data that is output to the error data file as normalized values up to the column where an error was detected by pdload.

(k) Loading data to a table containing an abstract data type

For a table containing an abstract data type provided by a plug-in, you can call a constructor function to generate the values for the corresponding columns to load the data. However, this data loading is not possible if the constructor function is not created in the shared library.

For a table containing a user-defined abstract data type, data loading is not possible because the system cannot generate values for the corresponding columns.

(l) Loading data to a rebalancing table

If you have added an RDAREA to a rebalancing table, you cannot load data to the added RDAREA (during data loading in units of RDAREAs) unless you execute pdrbal on the rebalancing table (return code = 0).

For a table partitioned by flexible hash partitioning, the utility stores data and ignores the hash group; therefore, the data rearranged by pdrbal does not link to the hash key values.

(m) Data loading on external tables

You cannot execute data loading on external tables.

(n) Data loading on falsification prevented tables

You should note the following about executing data loading on falsification prevented tables:

The -d option cannot be specified.

Data loading is disabled if the RDAREA subject to data loading is in reload-not-completed data status. An RDAREA is in reload-not-completed data status when reorganization of a falsification prevented table has not been completed due to an error during reorganization processing.

The date and time that execution of pdload started (the date and time at the host that executed pdload) is stored in the insert history maintenance column (column with SYSTEM GENERATED specified).

Input data for an insert history maintenance column is ignored, if specified.

(o) Data loading on a table with a trigger defined

Execution of pdload does not activate a trigger. Before executing pdload, check the contents of the table's trigger definition.

(2) Notes

(a) Result of utility execution

You can check the result of pdload with pddbst (or by running the UAP or using pdrorg to perform unload processing). When pdload processing is finished, a return code is set. Table 5-34 shows the pdload return codes.

Table 5-34 pdload return codes

Return code
Description
Action

0
Normal termination.
All data in the input data file was loaded.
None

Normal termination.
All data in the input data file was output to the divided-input data files.
Use the divided-input data files to perform data loading in units of RDAREAs.

4
Input data error.
Data loading was skipped because some data in the input data file was invalid.
See the error information file, correct the erroneous data in the input data file, and then re-execute data loading.

Input data error.
Normal data in the input data file was output to the divided-input data files, but erroneous data was not (when the -e option was specified, data was output to the divided-input data files until erroneous data was detected).
See the error information file, correct the erroneous data in the input data file, and then re-create the divided-input data files.

8
Input data error.
When the dataerr operand was specified in the option statement, data loading was rolled back due to an error in the input data file.
Correct the erroneous input data and then re-execute data loading.

Key duplication error.
A key duplication error was detected during
batch creation of index.
Restore the database from its backup, correct the erroneous input data, then re-execute data loading.

Abnormal termination.
Data loading was cancelled due to an error.
Eliminate the cause of the error and then re-execute data loading.

Abnormal termination.
Data output from input data file to divided-input data files failed.
See the error message, eliminate the cause of the error, and then re-create the divided-input data files.

(b) Cancelling processing during utility execution

To cancel processing during the execution of pdload, use the pdcancel command. To terminate pdload forcibly because of a no-response error (such as when a routine job does not finish data loading within the normal amount of time), redirect the display result of the pdls command (with -d rpc -a specified) to a file and then execute the pdcancel -d command.

In this case, if pdload was executing in the creation mode (-d option specified), all the data stored in the table is deleted. If pdload was executing in the addition mode (-d option omitted), processing is rolled back.

If the facility for predicting reorganization time is used and pdload is terminated forcibly by a signal interrupt such as the kill command, the database management table cannot be updated. To terminate pdload while using the facility for predicting reorganization time, make sure that you use the pdcancel command.

(c) Order in which LOB column structure base tables are created when a LOB input file is set up on an EasyMT

When preparing a LOB input file for EasyMT, you need to take into consideration the order in which the columns and rows of the LOB column structure base table are loaded. If you prepare this file randomly without regard to the loading order, a large amount of time may be required for search processing on the LOB input file.

(d) LOB column structure base tables and resources such as the RDAREA and the buffer for LOB data

To load data to a table with LOB columns, you need to prepare all the required resources, such as the RDAREAs and buffers of the LOB column structure base table and LOB data, even if you are loading data only to the LOB column structure base table.

(e) File media that can be used during execution of a utility

The table below shows the file media that are supported during execution of pdload. When a regular file is used, the operating system parameters (kernel parameters) maxfiles, nfile, and nflocks are used during file open processing.

File | Regular File | Fixed-length blocked tape | Variable-length blocked tape
Input data file | Y | Y* | Y
Control information file | Y |  |
Column structure information file | Y |  |
Null value/function information file | Y |  |
Error information file | Y |  |
Error data file | Y |  |
LOB input file | Y |  | Y
LOB middle file | Y |  |
Index information file | Y |  |
Work file for sorting | Y |  |
Process results file | Y |  |

Y: Can be used

: Cannot be used

* Cannot be used for binary format or fixed-size data format.

(f) Executing a utility on an extraction database that is subject to data linkage

You should note the following about executing pdload on a database to be extracted that is subject to data linkage:

Do not execute the utility in the creation mode for an existing table (do not specify the -d option).

To add data to an existing table in the addition mode, execute the utility in the log acquisition mode (specify a in the -l option).

To add a new table subject to HiRDB Datareplicator linkage, execute the utility in the log acquisition mode (specify a in the -l option).

(g) Using a large file

A large file system enables you to store a file whose size exceeds 2 gigabytes. Table 5-35 shows for each file type whether or not pdload supports a large file. Note that the maximum size of file the process can create depends on OS settings. Set the maximum value of system resources for the HiRDB administrator and root user to a value that is greater than the size of file to be created or to unlimited. AIX 5L requires special attention because its default file size is 1 gigabyte. You can use the limit or ulimit OS command to check the limit values for system resources. When you change the file size limitations in AIX 5L, you must also correct the /etc/security/limit file. For details, see the applicable OS and shell documentation. Because HiRDB is an INIT startup process, the OS must be restarted before the changes made by the user can take effect.

Table 5-35 Large file support by pdload

File type | Support of large file
Input data file | Y
Error information file | Y
Error data file | Y
LOB input file | Y
LOB middle file | Y
Index information file | Y
Work file for sorting | Y
MT attribute definition file | N
Process results file | Y

Y: Supported

N: Not supported

(h) Loading data using a DAT-format input file containing a comma (,) at the end of each row

When you load data using a DAT-format input file that contains a comma (,) at the end of each row, the data loading may fail due to a column count mismatch. In this case, specify the names of all table columns in the column structure information file and specify the skipdata statement at the end. There is no need to revise the input data.

If coding of the column structure information file is not feasible because of a large number of table columns involved, you can prepare the file with the following method:

Use the SQL Executer to output table column names to a file.
When directing the output of column names to a file, you need to output the column names in the order in which the columns are defined. Therefore, specify the SQL statement as follows:

PUTFILE TO filename SELECT COLUMN_NAME FROM MASTER.SQL_COLUMNS
WHERE TABLE_NAME ='table-name' ORDER BY COLUMN_ID

Append the skipdata statement to the last row for the name of the file to which the results of editing in Step 1 are output.

(i) Loading data to a table with a plug-in index defined

When loading data in the no-log mode to a table for which a plug-in index is defined, or when loading additional data in the batch index creation mode, be sure to back up both the table storage RDAREAs to be processed (including LOBs) and the index storage RDAREAs, to protect against abnormal termination of the utility. Otherwise, the RDAREAs cannot be recovered in the event of an error, in which case you need to re-create them from the initial state.

When you create a plug-in index using the batch index creation facility (with the -i c option specified), if the plug-in provides the batch plug-in index creation partial recovery facility, you can restore the index by rolling back the process using the log acquired during the abnormal termination of the utility. If the plug-in does not provide this facility, recovery by rollback process is not possible, in which case you need to re-create the entire index.

When you use the plug-in index delayed batch creation facility and you have executed a UAP on a table with YES specified for PDPLGIXMK in the client environment definition, you cannot execute pdload in the addition mode until you use the database reorganization utility to create the index in the batch mode. However, you can execute pdload in the creation mode. Do not use the index information file output directory used by this facility (directory with pd_plugin_ixmk_dir specified) as a file output area with pdload.

(j) Using the differential index function of the HiRDB Text Search Plug-in

When you use the differential index function of the HiRDB Text Search Plug-in, pdload updates the following indexes according to the specification of PDPLUGINNSUB in the client environmental definition:

Presence of existing data | PDPLUGINNSUB specified
Y | N | Not set
No existing data (data loading in creation mode) | M | M | M
Existing data present (data loading in addition mode) | S | M | S

M: Updates the MASTER index

S: Updates the differential index

(k) Loading data to a table containing a unique key index or primary key index

When loading data to a table containing a unique key index or primary key index, note the following:

If an input data file contains duplicate key values, do not execute data loading in any mode other than the index update mode.
If you execute data loading in the batch index creation mode, index information output mode, or index information output suppression mode, the utility stores the table and outputs the index key information to an index information file.
Duplicate key checking is not executed at this point. It is executed when the index data is stored.
If a duplicate key value is detected, index creation processing rolls back, but the data has already been stored (committed and cannot go back). In this case, you need to restore the corresponding RDAREAs using their backup copies.
Therefore, when you load data using an input data file that contains data with duplicate key values, be sure to specify the index update mode. In this mode, the utility updates the index each time it stores data; therefore, the utility can detect a duplicate key value immediately and skips the data without storing it in the database.
Note that the default is the batch index creation mode.

(l) List created on the basis of a table subject to data loading

If you have created a list on the basis of a table subject to data loading, and execute a search process on the list after data loading, the following events may occur:

Retrieval of a wrong row

Specified row not found

In this case, you need to re-create the list before executing the search.

(m) Locked resources required per server during execution of pdload

While executing pdload, each server requires the following amount of locked resources:

Resources subject to lock control beyond the transactions
X = 2 (a + b + c + 1) + (b d)

Note

The value of the pd_lck_until_disconnect_cnt operand in the system definitions must be at least the value of X.

Resources subject to lock control within the transactions
Y = e + f+ g
Note
The value of the pd_lck_pool_size operand in the system definition must be at least Y/x kilobytes. Because utility preprocessing requires (209 + A) resources, the value of Y must be at least (209 + A). The resources allocated during preprocessing are released before data loading begins; therefore, if the obtained value of Y is (209 + A) or greater, use that value.

Legend:

a: Number of table storage RDAREAs

b: Number of index storage RDAREAs

c: Number of LOB column storage RDAREAs

d: Number of indexes

e: Number of segments used by table storage RDAREAs*

f: Number of segments used by index storage RDAREAs*

g: Number of segments used by LOB column storage RDAREAs/64000 *

x: 6 for HiRDB in the 32-bit mode; 4 for HiRDB in the 64-bit mode

A: MAX (number of table columns, number of table indexes, number of table storage RDAREAs)

* When you have specified the -d option and the number of segments used by the table storage RDAREAs, index storage RDAREAs, or LOB column storage RDAREAs is greater, you should use the number of segments actually in use; if the number of segments used by the data to be stored is greater, use the number of segments scheduled to be used for storing data.

(n) Messages displayed in the command execution window

pdload outputs progress messages to the standard output during processing. In the event of an error, error messages are output to standard error. If pdload is executed in an environment in which output to standard output or standard error is suppressed, pdload may stop responding due to a message output wait, or it may output the KFPL20003-E message to the message log file and terminate abnormally. For this reason, you should not execute pdload in an environment in which messages cannot be output to the standard output or standard error output. Note that the sequence and number of messages output to the standard output and to the standard error output may not match the sequence and number in the message log file and syslogfile. To obtain the accurate messages, view the message log file or syslogfile.

(o) Data loading to a shared table

To perform data loading on a shared table, the system places the RDAREAs containing the shared table and shared indexes defined for the target table in the EX lock mode. If the corresponding RDAREAs contain other tables and indexes, these tables and indexes cannot be referenced or updated. For details about the lock mode used for data loading on shared tables, see Appendix B.2 Lock mode for utilities.

(p) Data loading on a table for which referential constraints or check constraints have been defined

When data is loaded into a table for which referential constraints or check constraints have been defined, pdload does not check for data integrity. For this reason, you should use pdconstck to check data integrity during data loading. For details about how to check data integrity, see the HiRDB Version 8 Installation and Design Guide.

(q) Relationship with the facility for predicting reorganization time

When data loading is performed in the creation mode (-d specified), the history of data deletions from tables and indexes is applied to the results of the facility for predicting reorganization time.

If pdload has terminated abnormally, executing the pddbst condition analysis result accumulation facility results in an invalid prediction result* because the reorganization timing cannot be predicted in the data loading completed status. Therefore, if pdload terminates abnormally, re-execute pdload to terminate it normally, then execute the pddbst condition analysis result accumulation facility.

* For example, if rollback occurs due to abnormal termination of data loading, empty database information may be accumulated and used for prediction.

(3) Whether or not options and control statements can be specified when pdload functions are used

Whether or not options and control statements can be specified depends on the pdload functions being used. The applicable functions are as follows:

Registering data in audit trail table

Creating divided-input data files

Tables 5-36 and 5-37 show whether or not options and control statements can be specified when these functions are used. For details about registering data in audit trail tables, see the HiRDB Version 8 System Operation Guide.

Table 5-36 Whether or not options can be specified when pdload functions are used

Option | Whether or not specifiable
Registering data in audit trail table | Creating divided-input data files
-d | O | N
{-a|-b} | M (specify -b) | O (specify -a if the input data file is in the fixed-size data format)
-i | O | N
-l | O | N
-W | M | N
-k | N | N
{-c|-v} | O (specify -v) | O (specify -c if the input data file is in the fixed-size data format)
-n | O | N
-u | O | O
-x | O | N
-f | N | N
-s | N | O
-e | N | O
-r | N | N
-z | O (assumed even when omitted) | O
-y | O | N
-o | O | N
-m | O | O
-X | O | O
-q | N | N

Legend:

M: Mandatory

O: Optional

N: Cannot be specified

Table 5-37 Whether or not control statements can be specified when pdload functions are used

Control statement | Operand | Whether or not specifiable
Registering data in audit trail table | Creating divided-input data files
mtguide |  | N | N
emtdef |  | N | N
source |  | M (specify (uoc)) | M (specify input data file)
index |  | O | N
idxwork |  | O | N
sort |  | O | N
lobdata |  | N | N
lobcolumn |  | N | N
lobmid |  | N | N
srcuoc |  | M | N
array |  | O | O
extdat |  | N | O
src_work |  | N | M
option | spacelvl | O | O
tblfree | O | N
idxfree | O | N
job | N | N
cutdtmsg | N | N
nowait | O | N
bloblimit | N | N
exectime | O | O
null_string | N | N
divermsg | N | N
dataerr | N | N
lengover | N | O
report |  | O | N

Legend:

M: Mandatory

O: Optional

N: Cannot be specified

: Not applicable

(4) Using files with a BOM

If you selected utf-8 as the character encoding in the pdsetup command, you may be able to use a file with a BOM as the input file for pdload. Table 5-38 shows whether or not files with a BOM can be used with pdload. Note that even when a file with a BOM is used as the input file for pdload, the BOM is skipped. No BOM is included in the file that is output by pdload.

Table 5-38 Whether or not files with a BOM can be used in pdload (applicable to UTF-8)

Option or control statement | Input file | Use of file with a BOM
-c | Column structure information file | Y
-v | Null value information file | Y
| Control information file | Y
emtdef | MT attribute definition file | N
source | Input data file | DAT | Y
Extended DAT | Y
Binary | N
Fixed-size | N
Created with pdrorg -W | N
EasyMT information file | N
index | Index information file | N
lobdata | LOB input file | N
lobcolumn | LOB column input file | N
lobmid | LOB middle file | N

Legend:

Y: Can be used

N: Cannot be used

: Not applicable

5.12 Database status in the event of an error and recovery methods

Tables 5-39 through 5-41 describe the database statuses and recovery methods in the event of an error during data loading; Table 5-42 describes the database statuses and recovery methods in the event of an error during data loading on LOB columns, and Table 5-43 describes the database statuses and recovery methods in the event of an input data error.

In the Classification column of the tables, Status means the status of the database when the error occurred and Recovery means the recovery method.

Table 5-39 Database status and recovery method (in the event of an error during data loading) (1/3)

Option
Classification
Message output immediately before error

-l
-i
1.
2.
3.

None (excluding control statement errors)
KFPL00721-I
Row data deleted
KFPL00702-I
Data loading started

a or p
s
Status
Status before execution
Null
Null

Recovery
Re-execute
Re-execute
Re-execute

c
Status
Status before execution
Null
Null

Recovery
Re-execute
Re-execute
Re-execute

n
Status
Status before execution
Null
Null

Recovery
Re-execute
Re-execute
Re-execute

x
Status
Status before execution
Null
Null

Recovery
Re-execute
Re-execute
Re-execute

n
s
Status
Not guaranteed
Not guaranteed
Not guaranteed

Recovery
Re-execute after recovering database
Re-execute after recovering database
Re-execute after recovering database

c
Status
Not guaranteed
Not guaranteed
Not guaranteed

Recovery
Re-execute after recovering database
Re-execute after recovering database
Re-execute after recovering database

n
Status
Not guaranteed
Not guaranteed
Not guaranteed

Recovery
Re-execute after recovering database
Re-execute after recovering database
Re-execute after recovering database

x
Status
Not guaranteed
Not guaranteed
Not guaranteed

Recovery
Re-execute after recovering database
Re-execute after recovering database
Re-execute after recovering database

Table 5-40 Database status and recovery method (in the event of an error during data loading) (2/3)

Option
Classification
Message output immediately before error

-l
-i
4.
5.
6.

KFPL00800-I
Notification of synchronization point
KFPL15225-E
Rollback
KFPL24510-E
Detection of invalid data

a or p
s
Status
Data was stored through the row displayed in KFPL00800-I
Status of 3 or 4
Status of 5 if KFPL15225-E has been displayed.
If not, data was stored through the row displayed in KFPL24509-E.

Recovery
Re-execute
Re-execute
If it is in the status of 5, re-execute.
If some of the rows have been stored, specify the -r option and then re-execute.

c
Status
Data was stored through the row displayed in KFPL00800-I
Status of 3 or 4
Status of 5 if KFPL15225-E has been displayed.
If not, data was stored through the row displayed in KFPL24509-E.

Recovery
Re-execute
Re-execute
If it is in the status of 5, re-execute.
If some of the rows have been stored, specify the -r option and then re-execute.*

n
Status
Data was stored through the row displayed in KFPL00800-I
Status of 3 or 4
Status of 5 if KFPL15225-E has been displayed.
If not, data was stored through the row displayed in KFPL24509-E.

Recovery
Re-execute
Re-execute
If it is in the status of 5, re-execute.
If some of the rows have been stored, specify the -r option and then re-execute.*

x
Status
Data was stored through the row displayed in KFPL00800-I
Status of 3 or 4
Status of 5 if KFPL15225-E has been displayed.
If not, data was stored through the row displayed in KFPL24509-E.

Recovery
Re-execute
Re-execute
If it is in the status of 5, re-execute.
If some of the rows have been stored, specify the -r option and then re-execute.*

n
s
Status
N/A
Not guaranteed
Status of 5 if KFPL15225-E has been displayed.
If not, data was stored through the row displayed in KFPL24509-E.

Recovery
N/A
Re-execute after recovering database
If it is in the status of 5, re-execute.
If some of the rows have been stored, specify the -r option and then re-execute.*

c
Status
N/A
Not guaranteed
Status of 5 if KFPL15225-E has been displayed.
If not, data was stored through the row displayed in KFPL24509-E.

Recovery
N/A
Re-execute after recovering database
If it is in the status of 5, re-execute.
If some of the rows have been stored, specify the -r option and then re-execute.*

n
Status
N/A
Not guaranteed
Status of 5 if KFPL15225-E has been displayed.
If not, data was stored through the row displayed in KFPL24509-E.

Recovery
N/A
Re-execute after recovering database
If it is in the status of 5, re-execute.
If some of the rows have been stored, specify the -r option and then re-execute.*

x
Status
N/A
Not guaranteed
Status of 5 if KFPL15225-E has been displayed.
If not, data was stored through the row displayed in KFPL24509-E.

Recovery
N/A
Re-execute after recovering database
If it is in the status of 5, re-execute.
If some of the rows have been stored, specify the -r option and then re-execute.*

Legend:

N/A: If the applicable option is specified, the corresponding message is not displayed.

* If you are re-executing the utility with the -r option specified, do not specify the -d option.

Table 5-41 Database status and recovery method (in the event of an error during data loading) (3/3)

Option
Classification
Message output immediately before error

-l
-i
7.
8.
9.

KFPL00703-I
Data loading completed
KFPL00715-I
Index creation started
KFPL00716-I
Index creation completed

a or p
s
Status
Creation of table and index completed
N/A
N/A

Recovery
Unnecessary¹
N/A
N/A

c
Status
Table creation completed
Table creation completed
Creation of table and index completed

Recovery
Batch creation of index was executed by pdrorg -k ixmk
Batch creation of index was executed by pdrorg -k ixmk²
Unnecessary1, 2

n
Status
Table creation completed
N/A
N/A

Recovery
Batch creation of index was executed by pdrorg -k ixmk¹
N/A
N/A

x
Status
Table creation completed
N/A
N/A

Recovery
Batch creation of index was executed by pdrorg -k ixmk¹
N/A
N/A

n
s
Status
Table creation completed
N/A
N/A

Recovery
Batch creation of index was executed by pdrorg -k ixmk¹
N/A
N/A

c
Status
Table creation completed
Table creation completed
Creation of table and index completed

Recovery
Re-execute after recovering database³
Re-execute after recovering database³
Unnecessary¹

n
Status
Table creation completed
N/A
N/A

Recovery
Batch creation of index was executed by pdrorg -k ixmk¹
N/A
N/A

x
Status
Table creation completed
N/A
N/A

Recovery
Batch creation of index was executed by pdrorg -k ixmk¹
N/A
N/A

Legend:

N/A: If the applicable option is specified, the corresponding message is not displayed.

1 If you are executing data loading with an option other than -k d, also see Table 5-42.

2 If there are multiple index storage RDAREAs, the indexes for which the KFPL00716-I message was issued have been created, but no other indexes have been created. Execute batch creation of indexes for the indexes that have not been created.

3 If the table storage RDAREA differs from the index storage RDAREA, you can release the table storage RDAREA from the no-log shutdown status, re-initialize the index storage RDAREA, and then execute pdrorg -k ixrc.

Table 5-42 Database status and recovery method (in the event of an error during data loading on LOB columns)

Control statement
-l option
Classification
Message output immediately before error

KFPL00707-I
Data loading on LOB column started
KFPL00708-I
Data loading on LOB column completed

When executing data loading on both LOB column structure base table and LOB columns:
source statement
lobmid statement
lobdata statement
a or p
Status
USER
Creation of LOB column structure base table and index completed
Table creation completed

ULOB
Null if the -d option is specified. Status before execution if the option is not specified.
Creation of LOB column created

Recovery
USER
Unnecessary
Unnecessary

ULOB
Data loaded only on LOB columns²
Unnecessary²

n
Status
USER
No-log shutdown
Table creation completed

ULOB
Not guaranteed
Creation of LOB column created

Recovery
USER
Re-execute after recovering database¹
Unnecessary

ULOB
Re-execute after recovering database¹
Unnecessary

When executing data loading only on LOB columns:
lobmid statement
lobdata statement
a or p
Status
USER
N/A
N/A

ULOB
Status before execution (-d option is ignored)
Creation of LOB column created

Recovery
USER
N/A
N/A

ULOB
Re-execute
Unnecessary

n
Status
USER
N/A
N/A

ULOB
Not guaranteed
Creation of LOB column created

Recovery
USER
N/A
N/A

ULOB
Re-execute after recovering database
Unnecessary

Legend:

N/A: If the applicable option is specified, the corresponding message is not displayed.

USER: User RDAREA

ULOB: User LOB RDAREA

1 In the no-log mode, you must re-execute data loading on the LOB column structure base table and LOB columns after recovering the table (LOB column structure base table, LOB columns, abstract data type columns with the LOB attribute, and indexes) even when data loading on LOB columns terminated abnormally.

2 If there are multiple index storage RDAREAs, the indexes for which the KFPL00708-I message was issued have been created, but no other LOB columns have been created. Execute data loading on the LOB columns that have not been created.

Table 5-43 Database status and recovery method (in the event of an input data error)

-e option
errdata operand in source statement
Classification
Error that does not require rollback (termination with return code 4)
Error that requires rollback (termination with return code 8)

Not specified
Not specified
Status
All rows have been stored in the database except those that were output to the error information file.
If -l n was not specified, the status before pdload was executed.
If -l n was specified, there is no guarantee.

Recovery
Create a file containing the applicable data in the input data file, correct them, then re-execute data loading.
If -l n was not specified, correct the input data and then re-execute data loading.
If -l n was specified, recover the database, correct the input data, and then re-execute data loading.

Specified
Status
All rows have been stored in the database except those that were output to the error information file.
If -l n was not specified, the status before pdload was executed.
If -l n was specified, there is no guarantee.

Recovery
Correct the data that was output to the error data file and then re-execute data loading.
If -l n was not specified, correct the input data and then re-execute data loading.
If -l n was specified, recover the database, correct the input data, and then re-execute data loading.

Specified
Not applicable
Status
Stored in the database up to the row displayed in KFPL24509-E.
If -l n was not specified, the status before pdload was executed.
If -l n was specified, there is no guarantee.

Recovery
Correct the row displayed in KFPL24509-E and then re-execute data loading with the -r option specified.
If -l n was not specified, correct the input data and then re-execute data loading.
If -l n was specified, recover the database, correct the input data, and then re-execute data loading.

Note

Errors that require rollback include LOB column storage data errors and negative-value errors on the length of variable-length character string and on the number of elements for repetition columns.

A key value duplication error in a mode other than the index update mode (-i s) results in a database corruption error where the table and indexes do not match. To recover the error, restore the database to its status before pdload was executed, correct the input data, and then re-execute data loading.

5.13 Examples

Table 5-44 provides a list of the examples of using the database load utility.

Table 5-44 Examples of using the database load utility

Example
Description
Classification

Example 1
Loading data to a row-partitioned table

Explanation is based on the input data file in the DAT format and in the fixed-size data format.

The example uses a column structure information file.

S

Example 2
Loading data to a row-partitioned table in units of tables
S

Example 3
Loading data to a row-partitioned table in units of RDAREAs
S

Example 4
Loading data to a row-partitioned table in units of tables

The input data file is located in a utility special unit.

S

Example 5
Loading data to a table with LOB columns

The example loads data to both a LOB column structure base table and LOB columns at the same time.

S

Example 6
Loading data to a table with LOB columns

The example loads data only to the LOB column structure base table.

S

Example 7
Loading data to a table with LOB columns

The example loads data only to the LOB columns.

S

Example 8
Loading data into an audit trail table

The example loads data from audit trail files waiting for data loading into an audit trail table.

S

Example 9
Loading data to a non-row-partitioned table

The input data file is located at the front-end server.

P

Example 10
Loading data to a row-partitioned table

The input data file is located at the front-end server.

P

Example 11
Loading data to a row-partitioned table

The input data file is located at each back-end server.

P

Example 12
Loading data to a table with LOB columns

The example loads data to both LOB column structure base tables and LOB columns at the same time.

The table is row partitioned and the example loads data in units of RDAREAs.

The input data file is located at the back-end server that contains the RDAREAs subject to data loading.

P

Example 13
Loading data to a table with LOB columns

The example uses a LOB column input file.

The table is row partitioned and the example loads data in units of tables.

The input data file is located at the front-end server.

P

Example 14
Loading data using EasyMT

The table is row-partitioned and the example loads data in units of tables.

The input data file is located at the front-end server.

P

Example 15
Loading data to a table with repetition columns

The table is row partitioned and the example loads data in units of tables.

The table has a cluster key index and the input data is sorted by the cluster key values; therefore, the example specifies an option to not check the sequence of cluster key values.

P

Example 16
Loading data to a table using a plug-in

The table contains columns of SGMLTEXT type.

The input data file is in the DAT format.

The example uses a column structure information file to specify information about a constructor function.

P

Example 17
Loading data to a table using a plug-in

The table contains columns of GEOMETRY type.

The input data file is in the fixed-size data format.

The example uses a column structure information file to specify information about a constructor function.

P

Example 18
Loading data to a table using a plug-in

The table contains columns of SGMLTEXT type and LOB columns.

The example directly specifies the LOB parameters and the name of the LOB input file in the input data file, and provides a separate LOB input file.

P

Example 19
Loading data to a table using a plug-in

The table contains columns of SGMLTEXT type and LOB columns.

The example loads data only to the LOB column structure base table at first, then loads data to the LOB columns concurrently at each back-end server.

The example directly specifies the LOB parameters and the name of the LOB input file in the input data file, and provides a separate LOB input file

P

S: HiRDB/Single Server

P: HiRDB/Parallel Server

Organization of this section

5.13.1 HiRDB/Single Server

5.13.2 HiRDB/Parallel Server

5.13.1 HiRDB/Single Server

Organization of this subsection

(1) Loading data to a table

(2) Loading data to a row-partitioned table in units of tables

(3) Loading data to a row-partitioned table in units of RDAREAs

(4) Loading data using an input data file on a utility special unit

(5) Loading data to LOB column structure base tables and LOB columns

(6) Loading data to a LOB column structure base table only

(7) Loading data to LOB columns only

(8) Loading data into an audit trail table

(1) Loading data to a table

Example 1

This example loads data to table TABLE1. The explanation is based on the input data file in the DAT format and in the fixed-size data format.

The example assumes that the following table and index have been defined:

Table definition:

CREATE TABLE TABLE1(C1 INT,C2 CHAR(8),C3 INT) IN PDBUSER01

Index definition:

CREATE INDEX INDEX1 ON TABLE1(C1) IN PDBUSER03

Overview

Relationship between input/output files and RDAREAs

(a) Input data file in the DAT format

Contents of the input file

1,ABCDEFG,99999,
2,a,-1,
3,XYZ,100,
    :

Explanation of the command

The example loads data to the table (TABLE1).

column_inf: Name of the column structure information file

control_file: Name of the control information file

Contents of the column structure information file (column_inf)

C1                  1
C2                  1
C3                  1
*skipdata*          2

Explanation:

Stores input data in TABLE1 in the order of the columns (C1, C2, and C3).

Specifies a skipdata statement to ignore the separator character at the end of a line.

Contents of the control information file (control_file)

source /usr/load_file1 error=/usr/err1          1
index INDEX1 /usr/index_inf1                    2
sort /usr/sortwork,8192                         3

Explanation:

Specifies the input data file and the error information file to which error information is to be output in the event of an error in the input data:
/usr/load_file1: Name of the input data file
/usr/err1: Name of the error information file

Specifies the index information file to which index information is to be output:
INDEX1: Index identifier
/usr/index_inf1: Name of the index information file

Specifies the work directory for sorting:
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

(b) Input data file in the fixed-size data format

Contents of the input file

1  ABCDEFG  99999
2  a        -1
3  XYZ      100
      :

Note: there is a linefeed code at the end of the line.

Explanation of the command

The example loads data to the table (TABLE1).

-a: Specifies that the input data file is in the fixed-size data format.

column_inf: Name of the column structure information file

control_file: Name of the control information file

Contents of the column structure information file (column_inf)

C1,type=char(3)              1
C2,type=char(8)              1
C3,type=char(6)              1
*skipdata*,length=1          2

Explanation:

Specifies the data type of the columns in the input data.

Specifies a skipdata statement to ignore the linefeed code.

Contents of the control information file (control_file)

source /usr/load_file1 error=/usr/err1          1
index INDEX1 /usr/index_inf1                    2
sort /usr/sortwork,8192                         3

Explanation:

Specifies the input data file and the error information file to which error information is to be output in the event of an error in the input data:
/usr/load_file1: Name of the input data file
/usr/err1: Name of the error information file

Specifies the index information file to which index information is to be output:
INDEX1: Index identifier
/usr/index_inf1: Name of the index information file

Specifies the work directory for sorting:
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

(2) Loading data to a row-partitioned table in units of tables

Example 2

This example loads data to table TABLE1 in units of tables.

The example assumes that the following table and indexes have been defined:

Table definition:

CREATE TABLE TABLE1(C1 INT NOT NULL,C2 CHAR(8),C3 INT)
            IN ((PDBUSER01) C1 > 10,(PDBUSER02))

Index definition (partitioning key index):

CREATE INDEX INDEX1 ON TABLE1(C1) IN ((PDBUSER03),(PDBUSER04))

Index definition (non-partitioning key index):

CREATE INDEX INDEX2 ON TABLE1(C2,C1) IN (PDBUSER05)

Overview

Relationship between input/output files and RDAREAs

(a) Loading data to TABLE1

Explanation of the command

The example loads data to a row-partitioned table (TABLE1) in units of tables.

control_file: Name of the control information file

Contents of the control information file (control_file)

source /usr/load_file1 error=/usr/err1 errdata=/usr/err_data,1000   1
idxwork /usr/idx_file                                               2
sort /usr/sortwork,8192                                             3

Explanation:

Specifies the input data file and the error information file to which error information (up to 1000 entries) is to be output in the event of an error in the input data:
/usr/load_file1: Name of the input data file
/usr/err1: Name of the error information file
/usr/err_data: Name of the error data file

Specifies the directory where index information files are to be created:
/usr/idx_file: Name of the directory where the index information files are to be created

Specifies the work directory for sorting:
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

(3) Loading data to a row-partitioned table in units of RDAREAs

Example 3

This example loads data to a row-partitioned table (TABLE1) in units of RDAREAs. It executes data loading twice on PDBUSER01 and PDBUSER02.

The example assumes that the following table and indexes have been defined:

Table definition:

CREATE TABLE TABLE1(C1 INT NOT NULL,C2 CHAR(8),C3 INT)
            IN ((PDBUSER01) C1 > 10,(PDBUSER02))

Index definition (partitioning key index):

CREATE INDEX INDEX1 ON TABLE1(C1) IN ((PDBUSER03),(PDBUSER04))

Index definition (non-partitioning key index):

CREATE INDEX INDEX2 ON TABLE1(C2,C1) IN (PDBUSER05)

Overview

Relationship between input/output files and RDAREAs

(a) Loading data to PDBUSER01

Explanation of the command

The example loads data to a row-partitioned table (TABLE1) in units of RDAREAs (PDBUSER01).

control_file: Name of the control information file

Contents of the control information file (control_file)

source PDBUSER01 /usr/load_file1 error=/usr/err1          1
idxwork /usr/idx_file                                     2
sort /usr/sortwork,8192                                   3

Explanation:

Specifies the input data file and the error information file to which error information is to be output in the event of an error in the input data:
PDBUSER01: Name of the RDAREA that contains the table subject to data loading
/usr/load_file1: Name of the input data file
/usr/err1: Name of the error information file

Specifies the directory where index information files are to be created:
/usr/idx_file: Name of the directory where the index information files are to be created

Specifies the work directory for sorting:
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

(b) Loading data to PDBUSER02

Explanation of the command

The example loads data to a row-partitioned table (TABLE1) in units of RDAREAs (PDBUSER02).

control_file: Name of the control information file

Contents of the control information file (control_file)

source PDBUSER02 /usr/load_file2 error=/usr/err2          1
idxwork /usr/idx_file                                     2
sort /usr/sortwork,8192                                   3

Explanation:

Specifies the input data file and the error information file to which error information is to be output in the event of an error in the input data:
PDBUSER02: Name of the RDAREA that contains the table subject to data loading
/usr/load_file2: Name of the input data file
/usr/err2: Name of the error information file

Specifies the directory where index information files are to be created:
/usr/idx_file: Name of the directory where the index information files are to be created

Specifies the work directory for sorting:
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

(c) Creating INDEX2

You cannot use INDEX2 as is.

Execute batch index creation with pdrorg (specifying -k ixmk) using index information files 3 and 4 to which index information has been output.

(4) Loading data using an input data file on a utility special unit

Example 4

This example loads data to a row-partitioned table (TABLE1). The input data file is located on a utility special unit.

The example assumes that the following table and index have been defined:

Table definition:

CREATE TABLE TABLE1(C1 INT NOT NULL,C2 CHAR(8),C3 INT)
            IN ((PDBUSER01) C1 > 10,(PDBUSER02))

Index definition:

CREATE INDEX INDEX1 ON TABLE1(C1) IN ((PDBUSER03),(PDBUSER04))

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

The example loads data to a row-partitioned table (TABLE1) in units of tables.

control_file: Name of the control information file

Contents of the control information file (control_file)

source host1:/usr/load_file1 error=/usr/err1          1
index INDEX1 PDBUSER03 /usr/index_inf1                2
index INDEX1 PDBUSER04 /usr/index_inf2                2
sort /usr/sortwork,8192                               3

Explanation:

Specifies the input data file and the error information file to which error information is to be output in the event of an error in the input data:
host1: Name of the host containing the input data file
/usr/load_file1: Name of the input data file
/usr/err1: Name of the error information file

Specifies the index information file to which index information is to be output.
INDEX1: Index identifier
PDBUSER03, PDBUSER04: Name of the index storage RDAREAs
/usr/index_inf1, /usr/index_inf2: Name of the index information files

Specifies the work directory for sorting:
/usr/sortwork: Name of the directory in which sort work file is created
8192: Size of buffer for sorting (in KB)

(5) Loading data to LOB column structure base tables and LOB columns

Example 5

For a table with LOB columns (TABLE2), this example loads data to both the LOB column structure base table and LOB columns at the same time.

The example assumes that the following table and index have been defined:

Table definition:

CREATE TABLE TABLE2(C1 INT,C2 BLOB IN LOBUSER01) IN PDBUSER01

Index definition:

CREATE INDEX INDEX2 ON TABLE2(C1) IN PDBUSER02

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

The example loads data to a table with LOB columns (TABLE2) in units of tables.

control_file: Name of the control information file

Contents of the control information file (control_file)

source /usr/load_file1 error=/usr/err1                         1
index INDEX2 /usr/index_inf1                                   2
sort /usr/sortwork,8192                                        3
lobdata /usr/lob                                               4
lobmid /usr/lobmid_file1                                       5

Explanation:

Specifies the input data file and the error information file to which error information is to be output in the event of an error in the input data:
/usr/load_file1: Name of the input data file
Contents of the input data file (DAT format):
1,lobfile1
2,lobfile2
3,lobfile3
/usr/err1: Name of the error information file

Specifies the index information file to which index information is to be output.
INDEX2: Index identifier
/usr/index_inf1: Names of the index information file

Specifies the work directory for sorting:
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

Specifies the directory containing the LOB input files:
/usr/lob: pathname of the LOB input files

Specifies the file to which information required for loading LOB column data is to be output when loading data to the LOB column structure base table (this file is used as is when loading data to the LOB columns):
/usr/lobmid_file1: Name of the LOB middle file

(6) Loading data to a LOB column structure base table only

Example 6

For a table with LOB columns (TABLE2), this example loads data to the LOB column structure base table only.

The example assumes that the following table and indexes have been defined:

Table definition:

CREATE TABLE TABLE2(C1 INT,C2 BLOB IN LOBUSER01) IN PDBUSER01

Index definition:

CREATE INDEX INDEX2 ON TABLE2(C1) IN PDBUSER02

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

The example loads data to a table with LOB columns (TABLE2) in units of tables.

control_file: Name of the control information file

Contents of the control information file (control_file)

source /usr/load_file1 error=/usr/err1                         1
index INDEX2 /usr/index_inf1                                   2
sort /usr/sortwork,8192                                        3
lobmid /usr/lobmid_file1                                       4

Explanation:

Specifies the input data file and the error information file to which error information is to be output in the event of an error in the input data:
/usr/load_file1: Name of the input data file
Contents of the input data file (DAT format):
1,lobfile1
2,lobfile2
3,lobfile3
/usr/err1: Name of the error information file

Specifies the index information file to which index information is to be output.
INDEX2: Index identifier
/usr/index_inf1: Name of the index information file

Specifies the work directory for sorting:
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

Specifies the file to which information required for loading LOB column data is to be output when loading data to the LOB column structure base table:
/usr/lobmid_file1: Name of the LOB middle file

(7) Loading data to LOB columns only

Example 7

For a table with LOB columns (TABLE2), this example loads data to the LOB columns only.

The example assumes that the following table and index have been defined:

Table definition:

CREATE TABLE TABLE2(C1 INT,C2 BLOB IN LOBUSER01) IN PDBUSER01

Index definition:

CREATE INDEX INDEX2 ON TABLE2(C1) IN PDBUSER02

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

The example loads data to a table with LOB columns (TABLE2) in units of tables.

control_file: Name of the control information file

Contents of the control information file (control_file)

lobdata /usr/lob                                                 1
lobmid /usr/lobmid_file1 error=/usr/err1                         2

Explanation:

Specifies the directory containing the input data file.
/usr/lob: Pathname of the LOB input files
The example uses the following input data file while loading data to the LOB column structure base table:
Contents of the input data file (DAT format):
1,lobfile1
2,lobfile2
3,lobfile3

Specifies the LOB middle file containing the information required for loading data to a LOB column that was created during data loading to the LOB column structure base table, and the error information file to which error information is to be output in the event of a LOB input error:
/usr/lobmid_file1: Name of the LOB middle file
/usr/err1: Name of the error information file

(8) Loading data into an audit trail table

Example 8

This example loads data from audit trail files waiting for data loading into the audit trail table SQL_AUDIT_TRAIL. The example assumes that no index has been defined for the audit trail table.

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

This example loads data from audit trail files waiting for data loading (/hirdb/audit/file) into the audit trail table SQL_AUDIT_TRAIL.

-b and -W: Mandatory options for loading data into audit trail table

control_file: Name of the control information file

Contents of the control information file (control_file)

source (uoc)                                       1
srcuoc param='dir=/hirdb/audit/file,file=all'      2

Explanation:

Specifies that an audit trail data registration UOC is to be used.

Specifies the parameters that are to be passed to the audit trail data registration UOC.
dir=/hirdb/audit/file: HiRDB file name of the audit trail file
file=all: Specifies that all audit trail files waiting for data loading are to be used

5.13.2 HiRDB/Parallel Server

Organization of this subsection

(1) Loading data to a table

(2) Loading data to a row-partitioned table in units of tables

(3) Loading data to a row-partitioned table in units of RDAREAs

(4) Loading data to a table with LOB columns (loading data to LOB RDAREA and LOB columns at the same time)

(5) Loading data to a table with LOB columns (using a LOB column input file)

(6) Loading data using EasyMT

(7) Loading data to a table with repetition columns

(8) Loading data to a table using a plug-in

(1) Loading data to a table

Example 9

This example loads data to table TABLE1.

The example assumes that the following table and index have been defined:

Table definition:

CREATE TABLE TABLE1(C1 INT NOT NULL,C2 CHAR(8),C3 INT) IN PDBUSER01

Index definition:
CREATE INDEX INDEX1 ON TABLE1(C1) IN PDBUSER03

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

The example loads data to the table (TABLE1).

control_file: Name of the control information file

Contents of the control information file (control_file)

source fes1:/usr/load_file1 error=/usr/err1          1
index INDEX1 /usr/index_inf1                         2
sort bes1 /usr/sortwork,8192                         3

Explanation:

Specifies the input data file and the error information file to which error information is to be output in the event of an error in the input data:
fes1: Name of the server containing the input data file
/usr/load_file1: Name of the input data file
/usr/err1: Name of the error information file

Specifies the index information file to which index information is to be output:
INDEX1: Index identifier
/usr/index_inf1: Name of the index information file

Specifies the work directory for sorting:
bes1: Name of the server used to create the sort work file
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

(2) Loading data to a row-partitioned table in units of tables

Example 10

This example loads data to table TABLE1 in units of tables.

The example assumes that the following table and indexes have been defined:

Table definition:

CREATE TABLE TABLE1(C1 INT NOT NULL,C2 CHAR(8),C3 INT)
            IN ((PDBUSER01) C1 > 10,(PDBUSER02))

Index definition (partitioning key index):

CREATE INDEX INDEX1 ON TABLE1(C1) IN ((PDBUSER03),(PDBUSER05))

Index definition (non-partitioning key index):

CREATE INDEX INDEX2 ON TABLE1(C2,C1) IN ((PDBUSER04),(PDBUSER06))

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

The example loads data to a row-partitioned table (TABLE1) in units of tables.

control_file: Name of the control information file

Contents of the control information file (control_file)

source fes1:/usr/load_file1 error=/usr/err1          1
idxwork bes1 /usr/idx_file                           2
idxwork bes2 /usr/idx_file                           2
sort bes1 /usr/sortwork,8192                         3
sort bes2 /usr/sortwork,8192                         3

Explanation:

Specifies the input data file and the error information file to which error information is to be output in the event of an error in the input data:
fes1: Name of the server containing the input data file
/usr/load_file1: Name of the input data file
/usr/err1: Name of the error information file

Specifies the directory where index information files are to be created:
bes1, bes2: Names of the servers where index information files are to be created
/usr/idx_file: Name of the directory where the index information files are to be created

Specifies the work directory for sorting:
bes1, bes2: Names of the servers where the sort work file is to be created
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

(3) Loading data to a row-partitioned table in units of RDAREAs

Example 11

This example loads data to a row-partitioned table (TABLE1) in units of RDAREAs.

The example assumes that the following table and indexes have been defined:

Table definition:

CREATE TABLE TABLE1(C1 INT NOT NULL,C2 CHAR(8),C3 INT)
            IN ((PDBUSER01) C1 > 10,(PDBUSER02))

Index definition (partitioning key index):

CREATE INDEX INDEX1 ON TABLE1(C1) IN ((PDBUSER03),(PDBUSER05))

Index definition (non-partitioning key index):

CREATE INDEX INDEX2 ON TABLE1(C2,C1) IN ((PDBUSER04),(PDBUSER06))

Overview

Relationship between input/output files and RDAREAs

(a) Loading data to PDBUSER01

Explanation of the command

The example loads data to a row-partitioned table (TABLE1) in units of RDAREAs (PDBUSER01).

control_file1: Name of the control information file

Contents of the control information file (control_file1)

source PDBUSER01 bes1:/usr/load_file1 error=/usr/err1          1
index INDEX1 PDBUSER03 /usr/index_inf1                         2
index INDEX2 PDBUSER04 /usr/index_inf2                         2
sort bes1 /usr/sortwork,8192                                   3

Explanation:

Specifies the input data file and the error information file to which error information is to be output in the event of an error in the input data:
PDBUSER01: Name of the RDAREA that contains the table subject to data loading
bes1: Name of the server containing the input data file
/usr/load_file1: Name of the input data file
/usr/err1: Name of the error information file

Specifies the index information files to which index information is to be output:
INDEX1, INDEX2: Index identifiers
PDBUSER03, PDBUSER04: Names of the index storage RDAREAs
/usr/index_inf1, /usr/index_inf2: Names of the index information files

Specifies the work directory for sorting:
bes1: Name of the server used to create the sort work file
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

(b) Loading data to PDBUSER02

Explanation of the command

The example loads data to a row-partitioned table (TABLE1) in units of RDAREAs (PDBUSER02).

control_file2: Name of the control information file

Contents of the control information file (control_file2)

source PDBUSER02 bes2:/usr/load_file2 error=/usr/err2          1
index INDEX1 PDBUSER05 /usr/index_inf3                         2
index INDEX2 PDBUSER06 /usr/index_inf4                         2
sort bes2 /usr/sortwork,8192                                   3

Explanation:

Specifies the input data file and the error information file to which error information is to be output in the event of an error in the input data:
PDBUSER02: Name of the RDAREA that contains the table subject to data loading
bes2: Name of the server containing the input data file
/usr/load_file2: Name of the input data file
/usr/err2: Name of the error information file

Specifies the index information files to which index information is to be output:
INDEX1, INDEX2: Index identifiers
PDBUSER05, PDBUSER06: Names of the index storage RDAREAs
/usr/index_inf3, /usr/index_inf4: Names of the index information files

Specifies the work directory for sorting:
bes2: Name of the server used to create the sort work file
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

(4) Loading data to a table with LOB columns (loading data to LOB RDAREA and LOB columns at the same time)

Example 12

For a table with LOB columns (TABLE2), this example loads data to both the LOB column structure base table and LOB columns at the same time.

The example assumes that the following table and index have been defined:

Table definition:

CREATE TABLE TABLE2(C1 INT,C2 BLOB
            IN ((LOBUSER01),(LOBUSER02)))  
            IN ((PDBUSER01) C1 > 10,(PDBUSER02))

Index definition (partitioning key index):

CREATE INDEX INDEX2 ON TABLE2(C1)
            IN((PDBUSER03),(PDBUSER04))

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

The example loads data to a table with LOB columns (TABLE2) in units of RDAREAs (PDBUSER01, LOBUSER01).

control_file: Name of the control information file

Contents of the control information file (control_file)

source PDBUSER01 bes1:/usr/load_file1 error=/usr/err1          1
index INDEX2 PDBUSER03 /usr/index_inf1                         2
sort bes1 /usr/sortwork,8192                                   3
lobdata /usr/lob                                               4
lobmid /usr/lobmid_file1                                       5

Explanation:

Specifies the input data file and the error information file to which error information is to be output in the event of an error in the input data:
PDBUSER01: Name of the RDAREA that contains the table subject to data loading
bes1: Name of the server containing the input data file
/usr/load_file1: Name of the input data file
Contents of the input data file (DAT format):
1,lobfile1
2,lobfile2
3,lobfile3
/usr/err1: Name of the error information file

Specifies the index information file to which index information is to be output.
INDEX2: Index identifier
PDBUSER03: Name of the index storage RDAREA
/usr/index_inf1: Name of the index information file

Specifies the work directory for sorting:
bes1: Name of the server used to create the sort work file
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

Specifies the directory containing the LOB input files:
/usr/lob: pathname of the LOB Input files

Specifies the file to which information required for loading LOB column data is to be output when loading data to the LOB column structure base table (this file is used as is when loading data to the LOB columns):
/usr/lobmid_file1: Name of the LOB middle file

(5) Loading data to a table with LOB columns (using a LOB column input file)

Example 13

For a table with LOB columns (TABLE2), this example loads data to both the LOB column structure base table and LOB columns at the same time using a LOB column input file to store data to the LOB columns.

The example assumes that the following table and index have been defined:

Table definition:

CREATE TABLE TABLE2(C1 INT,C2 BLOB
            IN ((LOBUSER01),(LOBUSER02)))  
            IN ((PDBUSER01) C1 > 10,(PDBUSER02))

Index definition (partitioning key index):

CREATE INDEX INDEX2 ON TABLE2(C1) IN((PDBUSER03),(PDBUSER04))

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

The example loads data to a table with LOB columns (TABLE2).

-k c: Specification for using a LOB column input file

control_file: Name of the control information file

Contents of the control information file (control_file)

source fes1:/usr/load_file1                          1
index INDEX2 PDUSER03 /usr/index_inf1                2
index INDEX2 PDUSER04 /usr/index_inf2                2
sort bes1 /usr/sortwork,8192                         3
sort bes2 /usr/sortwork,8192                         3
lobdata /usr/collob                                  4
lobcolumn collob_file                                5
lobmid /usr/lobmid_file                              6

Explanation:

Specifies the input data file:
fes1: Name of the server containing the input data file
/usr/load_file1: Name of the input data file

Specifies the index information files to which index information is to be output:
INDEX2: Index identifier
PDBUSER03, PDBUSER04: Names of the index storage RDAREAs
/usr/index_inf1, /usr/index_inf2: Names of the index information files

Specifies the work directory for sorting:
bes1, bes2: Names of the servers used to create the sort work file
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

Specifies the directory containing the LOB column input file:
/usr/collob: Name of the directory containing the LOB column input file

Specifies the LOB column input file:
collob_file: Name of the LOB column input file

Specifies the LOB middle file:
/usr/lobmid_file: Name of the LOB middle file

(6) Loading data using EasyMT

Example 14

This example uses EasyMT to load data to a table (TABLE1). Because the input data file consists of two magnetic tape volumes, the example uses MTguide to change the magnetic tape volumes at the right time.

The example assumes that the following table and indexes have been defined:

Table definition:

CREATE TABLE TABLE1(C1 INT NOT NULL,C2 CHAR(8),C3 INT)
            IN ((PDBUSER01) C1 > 10,(PDBUSER02))

Index definition (partitioning key index):

CREATE INDEX INDEX1 ON TABLE1(C1) IN ((PDBUSER03),(PDBUSER05))

Index definition (non-partitioning key index):

CREATE INDEX INDEX2 ON TABLE1(C2,C1) IN ((PDBUSER04),(PDBUSER06))

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

The example loads data to a table (TABLE1) using EasyMT.

-f easymt: Specification for using EasyMT

control_file: Name of the control information file

Contents of the control information file (control_file)

mtguide use                                                               1
source fes1:MT01 error=/usr/err_file file=load_data,vol=(vol001,vol002)   2
idxwork bes1 /usr/idx_file                                                3
idxwork bes2 /usr/idx_file                                                3
sort bes1 /usr/sortwork,8192                                              4
sort bes2 /usr/sortwork,8192                                              4

Explanation:

Specifies that EasyMT is to be used:
use: Specification for using MTguide (because magnetic tape volumes need to be changed)

Specifies the input data file:
fes1: Name of the server containing the input data file
MT01: Device symbolic name managed by MTguide
/usr/err_file: Name of the error information file
load_data: Name of magnetic tape file
(vol001, vol002): Specification for the load_data file on two magnetic tape volumes

Specifies the directory in which index information files are to be created:
bes1, bes2: Names of the servers used to create index information files
/usr/idx_file: Name of the directory in which index information files are created

Specifies the work directory for sorting:
bes1, bes2: Names of the servers used to create sort work file
/usr/sortwork: Name of the directory in which sort work file is created
8192: Size of buffer for sorting (in KB)

(7) Loading data to a table with repetition columns

Example 15

This example loads data to a table with repetition columns (SCORE_TABLE) without checking the order of cluster key values.

The example assumes that the following table has been defined:

Table definition:

CREATE TABLE SCORE_TABLE
   (NUMBER CHAR(6) UNIQUE CLUSTER KEY IN
    ((PDUSER03),(PDUSER04))
    NAME NCHAR(10),
    SUBJECT_NAME NCHAR(8) ARRAY[5],
    SCORE INT ARRAY[5])
 IN ((PDUSER01) < =  1Z9999,(PDUSER02))

Overview

Relationship between input/output files and RDAREAs

Contents of the input data file (DAT format)

Explanation of the command

The example loads data to a table with repetition columns (SCORE_TABLE) in units of tables.

-x: Specification for not checking the order of cluster key values

control_file: Name of the control information file

Contents of the control information file (control_file)

source fes1:/usr/arrload_file1                1
idxwork bes1 /usr/idx_file                    2
idxwork bes2 /usr/idx_file                    2
sort bes1 /usr/sortwork,8192                  3
sort bes2 /usr/sortwork,8192                  3
array elmtype=ff nullset=c                    4

Explanation:

Specifies the input data file:
fes1: Name of the server containing the input data file
/usr/arrload_file1: Name of the input data file

Specifies the directory where index information files are to be created:
bes1, bes2: Names of the servers used to create index information files
/usr/idx_file: Name of the directory in which index information files are created

Specifies the work directory for sorting:
bes1, bes2: Names of the servers used to create the sort work files
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

Specifies that data is to be loaded to a table with repetition columns:
ff: Arrayed data format
c: Specification for not storing any data for the corresponding element

(8) Loading data to a table using a plug-in

Example 16

This example loads data to a table (TBL01) with an abstract data type (SGMLTEXT) using the HiRDB Text Search Plug-in.

The example assumes that the following table and index have been defined:

Table definition:

CREATE TABLE TBL01(C1 INTEGER,C2 VARCHAR(10),C3 SGMLTEXT ALLOCATE
                     (SGMLTEXT IN LOBUSER01) PLUGIN ...)
                     IN PDBUSER01

Plug-in index definition:

CREATE INDEX INDEX1 USING TYPE NGRAM ON TBL01(C3) IN PDBUSER02

Following is the information about the constructor function of SGMLTEXT type:

Name of the function: SGMLTEXT, input: BLOB, output: the SGMLTEXT type

Overview

Relationship between input/output files and RDAREAs

Contents of the input data file (DAT format)

1,"HiRDB",/usr/lob/file01
-1,"",/usr/lob/file02
999,"HITACHI",/usr/lob/file03
       :

Explanation of the command

The example loads data to a table with an abstract data type (TBL01).

column_inf: Name of the column structure information file

control_file: Name of the control information file

Contents of the column structure information file (column_inf)

C1                                     1
C2                                     1
C3,func=(SGMLTEXT,param=blob)          1,2

Explanation:

Stores the input data in TBL01's columns (C1, C2, and C3).

Calls the constructor function and stores data in the column of abstract data type (C3):
SGMLTEXT: Name of the constructor function
blob: Type of the argument that is passed to the constructor function

Contents of the control information file (control_file)

source fes1:/usr/load_file1               1
lobdata                                   2

Explanation:

Specifies the input data file:
fes1: Name of the server containing the input data file
/usr/load_file1: Name of the input data file

Specifies the LOB input files.

Example 17

This example loads data to a table (TBL02) with an abstract data type (GEOMETRY).

The example assumes that the following table has been defined:

Table definition:

CREATE TABLE TBL02(C1 INTEGER,C2 DECIMAL(7,0),C3 GEOMETRY)
                     IN PDBUSER02

Following is the information about the constructor function of the GEOMETRY type:

Name of the function: GEOMETRY, input: VARCHAR, output: GEOMETRY type

Overview

Relationship between input/output files and RDAREAs

Contents of the input data file (fixed-size data format)

Explanation of the command

The example loads data to a table with an abstract data type (TBL02).

column_inf2: Name of the column structure information file

control_file2: Name of the control information file

Contents of the column structure information file (column_inf2)

C1,type=integer                                            1
C2,type=dec(7,0)                                           2
C3,func=(GEOMETRY,param=varchar,type=varchar(10))          3

Explanation:

Stores INTEGER data in column C1.

Stores DECIMAL (7,0) data in column C2.

Stores the value that was generated by passing data varchar (10) to the GEOMETRY constructor function, the input parameter of which is varchar in the abstract data type column C3.
GEOMETRY: Name of the constructor function
varchar: Type of argument that is passed to the constructor function

Contents of the control information file (control_file2)

source fes1:/usr/load_file2                     1

Explanation:

Specifies the input data file:
fes1: Name of the server containing the input data file
/usr/load_file2: Name of the input data file

Example 18

This example loads data to a table (TBL03) with an abstract data type (SGMLTEXT) and LOB columns.

The example assumes that the following table and index have been defined:

Table definition:

CREATE TABLE TBL03(C1 INTEGER,C2 BLOB(4096) IN LOBUSER01),
                   C3 SGMLTEXT ALLOCATE
                     (SGMLTEXT IN LOBUSER02) PLUGIN ...)
                     IN PDBUSER03

Plug-in index definition:

CREATE INDEX INDEX1 USING TYPE NGRAM ON TBL03(C3) IN PDBUSER04

Following is the information about the construction function of SGMLTEXT type:

Name of the function: SGMLTEXT, input: BLOB, output: SGMLTEXT type

Overview

Relationship between input/output files and RDAREAs

Contents of the input data file (binary format)

Explanation of the command

The example loads data to a table with an abstract data type (TBL03).

-k v: Specifies that the input data file is to contain the LOB parameters and the names of the LOB input files for the data to be stored in the LOB columns.

control_file3: Name of the control information file

Contents of the control information file (control_file3)

source fes1:/usr/load_file3                  1
lobmid /usr/mid_file                         2
lobdata /usr                                 3

Explanation:

Specifies the input data file:
fes1: Name of the server containing the input data file
/usr/load_file3: Name of the input data file

Specifies the LOB middle file:
/usr/mid_file: Name of the LOB middle file

Specifies the LOB input files:
/usr: Name of the directory that contains LOB input files

Example 19

This example loads data to a table (TBL04) with an abstract data type (SGMLTEXT) and LOB columns. First, it loads data to the LOB column structure base table and abstract data type, then loads data to the LOB columns concurrently at each back-end server.

The example assumes that the following table and index have been defined:

Table definition:

CREATE TABLE TBL04(C1 INTEGER,C2 BLOB(100) IN
                  (LOB11),(LOB12)),
                  C3 SGMLTEXT ALLOCATE
                     (SGMLTEXT IN ((LOB21),(LOB22))
                      PLUGIN...)
                      IN ((PDBUSER01) C1 >
                      1000,(PDBUSER02))

Plug-in index definition:

CREATE INDEX INDEX1 USING TYPE NGRAM ON TBL04(C3) IN ((PDBUSER03),(PDBUSER04))

Following is the information about the constructor function of the SGMLTEXT type:

Name of the function: SGMLTEXT, input: BLOB, output: SGMLTEXT type

Overview

Relationship between input/output files and RDAREAs

(a) Loading data to the LOB column structure base table and abstract data type

Explanation of the command

The example loads data to the LOB column structure base table and abstract data type of a table with an abstract data type (TBL04).

-b: Specification for the input data file in the binary format

-k v: Specifies that the input data file is to contain the LOB parameters and the names of the LOB input files for the data to be stored in the LOB columns.

control_file1: Name of the control information file

Contents of the control information file (control_file1)

source fes1:/usr/load_file1 err=/usr/err          1
idxwork bes1 /usr/idx_file                        2
idxwork bes2 /usr/idx_file                        2
lobmid /usr/lobmid                                3

Explanation:

Specifies the input data file:
fes1: Name of the server containing the input data file
/usr/load_file1: Name of the input data file
/usr/err: Name of the error information file

Specifies the directory in which index information files are to be created:
bes1, bes2: Names of the servers used to create index information files
/usr/idxfile: Name of the directory in which index information files are created

Specifies the LOB middle files:
/usr/lobmid: Name of the LOB middle file

(b) Loading data to LOB columns

Explanation of the command

The example loads data to the LOB columns of the table with abstract data type (TBL04) concurrently at each back-end server.

-b: Specification for the input data file in the binary format

-k v: Specifies that LOB input files are to be provided for each LOB data item for the LOB columns and that an input data file is to be provided for the input parameters of the constructor function that generates values for the columns of the abstract data type.

control_file2, control_file3: Names of the control information files

Contents of the control information file (control_file2)

lobdata /usr/lob1                                      1
lobmid LOB11 fes1:/usr/lobmid error=/usr/err1          2

Explanation:

Specifies the input data file:
/usr/lob1: Name of the directory containing the LOB input files

Specifies the LOB middle file:
LOB11: Name of the user LOB RDAREA containing the LOB columns
fes1: Name of the server containing the LOB middle file
/usr/lobmid: Name of the LOB middle file
/usr/err1: Name of the error information file

Contents of the control information file (control_file3)

lobdata /usr/lob2                                      1
lobmid LOB12 fes1:/usr/lobmid error=/usr/err2          2

Explanation:

Specifies the LOB input files:
/usr/lob2: Name of the directory containing the LOB input files

Specifies the LOB middle file:
LOB12: Name of the user LOB RDAREA containing the LOB columns
fes1: Name of the server containing the LOB middle file
/usr/lobmid: Name of the LOB middle file
/usr/err2: Name of the error information file

6. Interactive SQL Execution Utility (pdsql)

This chapter explains the interactive SQL execution utility (pdsql) that can interactively execute SQL statements on a HiRDB database. Execution of the interactive SQL execution utility (pdsql) requires the HiRDB SQL Executor, which is a separate program product.

This chapter contains the following section:

Organization of this chapter

6.1 Overview

6.1 Overview

Executor

Users who have CONNECT privileges can execute the interactive SQL execution utility. However, the required privileges may vary with the type of SQL to be executed. For details about required SQL execution privileges, see the manual HiRDB Version 8 SQL Reference.

Organization of this section

6.1.1 Function

6.1.1 Function

The interactive SQL execution utility is used to execute SQLs interactively on a HiRDB database. This utility simplifies entry and execution of SQL statements; it can also be used to specify commands special to the utility, such as for formatting the execution results. The separate HiRDB SQL Executor program product is required in order to execute this utility.

SQLs input from the standard input or an input file are executed, and the execution results are output to the standard output or to a file. Figure 6-1 provides an overview of the interactive SQL execution utility (pdsql).

Figure 6-1 Overview of interactive SQL execution utility (pdsql)

For details about the interactive SQL execution utility, see README in the HiRDB SQL Executer.

7. Database Structure Modification Utility (pdmod)

This chapter explains the database structure modification utility (pdmod) that can modify the physical structure of a database, including adding an RDAREA, expanding the database, or reinitializing the database.

This chapter contains the following sections:

Organization of this chapter

7.1 Functions of the database structure modification utility

7.2 Command format

7.3 Adding an RDAREA

7.4 Expanding an RDAREA

7.5 Reinitializing an RDAREA

7.6 Deleting an RDAREA

7.7 Moving an RDAREAs

7.8 Modifying data dictionary table attribute definitions

7.9 Modifying RDAREA attributes

7.10 Changing an RDAREA from a HiRDB/Single Server structure to a HiRDB/Parallel Server structure

7.11 Registering generation information for a HiRDB file system area (inner replica facility)

7.12 Deleting generation information for a HiRDB file system area (inner replica facility)

7.13 RDAREA replica definition (inner replica facility)

7.14 Copying RDAREA configuration information (inner replica facility)

7.15 Integrating RDAREAs (inner replica facility)

7.16 Registering an auditor (security audit facility)

7.17 Creating an audit trail table (security audit facility)

7.18 Rules and notes

7.1 Functions of the database structure modification utility

Executor: HiRDB administrator

The database structure modification utility (pdmod) is used to modify the physical structure of a database, such as by adding, expanding, or reinitializing RDAREAs. This utility resolves RDAREA space shortages that may be caused by frequent additions to and updating of tables. Table 7-1 shows the relationships between the functions of the database structure modification utility (pdmod) and the types of RDAREAs.

Table 7-1 Relationships between functions and RDAREA types

RDAREA type Function | MDir | DDir | DDic | DDic LOB | Usr | Usr LOB | List | Reg | Reg LOB
RDAREA addition | NE | NE | Y | Y¹ | Y | Y | Y | NE | NE
RDAREA expansion | Y | Y | Y | Y | Y | Y | Y | Y | Y
RDAREA reinitialization | NE | NE | NE | Y² | Y | Y | Y | Y | Y
RDAREA deletion | NE | NE | NE³ | NE | Y | Y | Y | NE | NE
Moving RDAREA | NE | NE | NE | NE | Y | Y | NE | NE | NE
Dictionary table attribute definition modification |  |  |  |  |  |  |  |  |
RDAREA attribute modification | NE | NE | NE | NE | Y | Y | Y | NE | NE
RDAREA change from HiRDB/Single Server structure to HiRDB/Parallel Server structure. | Y | Y | Y | Y | Y | Y | Y | Y | Y
Registration of HiRDB file system area generation |  |  |  |  |  |  |  |  |
Deletion of HiRDB file system area generation |  |  |  |  |  |  |  |  |
RDAREA replica definition | NE | NE | NE | NE | Y | Y | NE | NE | NE
RDAREA configuration information copying | NE | NE | NE | NE | Y | Y | NE | NE | NE
Integration of RDAREAs | NE | NE | NE | NE | Y | Y | NE | NE | NE
Auditor registration |  |  |  |  |  |  |  |  |
Audit trail table creation |  |  |  |  | Y |  |  |  |

Legend:

MDir: Master directory RDAREA

DDir: Data directory RDAREA

DDic: Data dictionary RDAREA

DDic LOB: Data dictionary LOB RDAREA

Usr: User RDAREA

Usr LOB: User LOB RDAREA

List: List RDAREA

Reg: Registry RDAREA

Reg LOB: Registry LOB RDAREA

Y: Can be executed.

NE: Cannot be executed.

: Not applicable.

¹ In the case of RDAREA addition, two RDAREAs must be added.

² Can be executed only for an RDAREA in which stored procedure of stored function objects are stored.

³ Can be executed for a data dictionary RDAREA in which a database state analyzed table and database management table are stored.

7.2 Command format

Organization of this section

(1) Format

(2) Options

(1) Format

pdmod -a control-statement-filename

(2) Options

-a control-statement-filename<pathname> ((up to 255 characters))

For a HiRDB/Single Server

Specify the file containing control statements for the database structure modification utility (pdmod) in an absolute path name.

For a HiRDB/Parallel Server

Specify the file containing control statements for the database structure modification utility (pdmod) in an absolute path name. The control statement file should be created for the server machine where the dictionary server is located.

7.3 Adding an RDAREA

Organization of this section

7.3.1 Function

7.3.2 Examples

7.3.3 Control statement (create rdarea statement)

7.3.4 Notes

7.3.1 Function

RDAREA addition is a function that adds a new RDAREA when there are not enough existing RDAREAs for adding new tables and indexes and modifying table definitions. Figure 7-1 provides an overview of the use of the database structure modification utility (pdmod) for RDAREA addition.

Figure 7-1 Overview of database structure modification utility (pdmod): RDAREA addition

Prerequisites

Before adding an RDAREA, you need to initialize the HiRDB file system areas in which the HiRDB files that constitute the new RDAREA are to be created (by executing the pdfmkfs command).

When adding an RDAREA, make sure that the total number of RDAREAs does not exceed the maximum number of RDAREAs (pd_max_rdarea_no) or the maximum number of HiRDB files constituting the RDAREAs (pd_max_file_no) specified in the system common definition. If either of these values is exceeded, you must use the pdchgconf command to change the system common definition or terminate the HiRDB system normally and then change the system common definition.

A shared RDAREA that is added is regarded as having been added to every back-end server (even if a back-end server has no shared RDAREAs, the system assumes that one RDAREA has been added). If the maximum permissible number of RDAREAs or the maximum permissible number of HiRDB files constituting RDAREAs is exceeded at any of the back-end servers, the shared RDAREA cannot be added at all.

Addition of shared RDAREAs is applicable only to user RDAREAs. A shared RDAREA can be added only to a HiRDB file system area that is a character special file and whose usage purpose is SDB.

7.3.2 Examples

This section presents examples of using the database structure modification utility (adding an RDAREA).

Organization of this subsection

(1) Adding RDAREAs (1)

(2) Adding RDAREAs (2)

(1) Adding RDAREAs (1)

This example adds the following RDAREAs:

PDBULOB11 (user LOB RDAREA)

PDBUSER04 (user RDAREA)

Overview

(a) HiRDB/Single Server

Contents of the control statement file (/usr/seifile/mofl01)

/* Adding a LOB RDAREA */
create rdarea PDBULOB11   ..................................................1
         globalbuffer gb01   ...............................................2
         for LOB used by PUBLIC   ..........................................3
         page 8192 characters   ............................................4
         storage control segment 1 pages   .................................5
         file name "/svr02/rdulob11"   .....................................6
           initial 50 segments ;   .........................................7
/* Adding a user RDAREA */
create rdarea PDBUSER04   ..................................................1
         globalbuffer gb02   ...............................................2
         for user used by "userid"   .......................................3
         page 4096 characters   ............................................4
         storage control segment 50 pages   ................................5
         file name "/dbarea/area1/rduser21"   ..............................6
           initial 100 segments ;   ........................................7

Explanation

Specifies the name of the RDAREA to be added.

Specifies the name of the global buffer to which the RDAREA is to be allocated.

Specifies the type of RDAREA.

Specifies the page length.

Specifies the segment size.

Specifies the name of the HiRDB file that constitutes the RDAREA.

Specifies the number of HiRDB file segments.

(b) HiRDB/Parallel Server

Contents of the control statement file (/usr/seifile/mofl01)

/* Adding a user LOB RDAREA */
create rdarea PDBULOB11   ..................................................1
         globalbuffer gb01   ...............................................2
         for LOB used by PUBLIC   ..........................................3
         server name bes1   ................................................4
         page 8192 characters   ............................................5
         storage control segment 1 pages   .................................6
         file name "/svr02/rdulob11"   .....................................7
           initial 50 segments ;   .........................................8
/* Adding a user RDAREA */
create rdarea PDBUSER04   ..................................................1
         globalbuffer gb02   ...............................................2
         for user used by "userid"   .......................................3
         server name bes2   ................................................4
         page 4096 characters   ............................................5
         storage control segment 50 pages   ................................6
         file name "/dbarea/area1/rduser21"   ..............................7
           initial 100 segments ;   ........................................8

Explanation

Specifies the name of the RDAREA to be added.

Specifies the name of the global buffer to which the RDAREA is to be allocated.

Specifies the type of RDAREA.

Specifies the page length.

Specifies the name of the server that manages the RDAREA.

Specifies the segment size.

Specifies the name of the HiRDB file that constitutes the RDAREA.

Specifies the number of HiRDB file segments.

(2) Adding RDAREAs (2)

This example adds the following RDAREAs:

PDBDDIC02 (data dictionary RDAREA)

PDBDICL1 (data dictionary LOB RDAREA)

PDBDICL2 (data dictionary LOB RDAREA)

Overview

(a) HiRDB/Single Server

Contents of the control statement file (/usr/seifile/mofl01)

/* Adding a data dictionary RDAREA */
create rdarea PDBDDIC02   ..................................................1
         globalbuffer gbp01   ..............................................2
         for datadictionary of routines   ..................................3
         page 4096 characters   ............................................4
         storage control segment 30 pages   ................................5
         file name "/svr01/rdddic02"   .....................................6
           initial 150 segments ;   ........................................7
/* Adding a data dictionary LOB RDAREA */
create rdarea PDBDICL01   ..................................................1
         globalbuffer gbp01   ..............................................2
         for LOB used by HiRDB(SQL_ROUTINES)   .............................3
         page 8192 characters   ............................................4
         storage control segment 1 pages   .................................5
         file name "/svr01/rddicl1"   ......................................6
           initial 200 segments ;   ........................................7
/* Adding a data dictionary LOB RDAREA */
create rdarea PDBDICL02   ..................................................1
         globalbuffer gbp01   ..............................................2
         for LOB used by HiRDB(SQL_ROUTINES)   .............................3
         page 8192 characters   ............................................4
         storage control segment 1 pages   .................................5
         file name "/svr01/rddicl2"   ......................................6
           initial 2000 segments ;   .......................................7

Explanation

Specifies the name of the RDAREA to be added.

Specifies the name of the global buffer to which the RDAREA is to be allocated.

Specifies the type of RDAREA.

Specifies the page length.

Specifies the segment size.

Specifies the name of the HiRDB file that constitutes the RDAREA.

Specifies the number of HiRDB file segments.

(b) HiRDB/Parallel Server

Contents of the control statement file (/usr/seifile/mofl01)

/* Adding a data dictionary RDAREA */
create rdarea PDBDDIC02   ..................................................1
         globalbuffer gbp01   ..............................................2
         for datadictionary of routines   ..................................3
         server name dics   ................................................4
         page 4096 characters   ............................................5
         storage control segment 30 pages   ................................6
         file name "/svr01/rdddic02"   .....................................7
           initial 150 segments ;   ........................................8
/* Adding a data dictionary LOB RDAREA */
create rdarea PDBDICL01   ..................................................1
         globalbuffer gbp01   ..............................................2
         for LOB used by HiRDB(SQL_ROUTINES)   .............................3
         server name dics   ................................................4
         page 8192 characters   ............................................5
         storage control segment 1 pages   .................................6
         file name "/svr01/rddicl1"   ......................................7
           initial 200 segments ;   ........................................8
/* Adding a data dictionary LOB RDAREA */
create rdarea PDBDICL02   ..................................................1
         globalbuffer gbp01   ..............................................2
         for LOB used by HiRDB(SQL_ROUTINES)   .............................3
         server name dics   ................................................4
         page 8192 characters   ............................................5
         storage control segment 1 pages   .................................6
         file name "/svr01/rddicl2"   ......................................7
           initial 2000 segments ;   .......................................8

Explanation

Specifies the name of the RDAREA to be added.

Specifies the name of the global buffer to which the RDAREA is to be allocated.

Specifies the type of RDAREA.

Specifies the name of the server that manages the RDAREA.

Specifies the page length.

Specifies the segment size.

Specifies the name of the HiRDB file that constitutes the RDAREA.

Specifies the number of HiRDB file segments.

7.3.3 Control statement (create rdarea statement)

This section explains the operands of the create rdarea statement. In the following table, each number corresponds to the number assigned to each operand.

No.
Operand

1

create [shared]

2

rdarea RDAREA-name

3

[globalbuffer global-buffer-name]

4

for {datadictionary of {routines|dbmanagement}
 |user used by {PUBLIC|authorization-identifier[,authorization-identifier]...}
 |LOB used by {HiRDB (data-dictionary-table-name)
 |PUBLIC|authorization-identifier[,authorization-identifier]...}
 |list}

5

[server name server-name]

6

[open attribute {INITIAL|DEFER|SCHEDULE}]

7

[page page-length characters]

8

[storage control segment segment-size pages]

9

[max entries maximum-registered-lists-count]

10

[extension {use extension-segments-count segments|nouse}]

11

file name "HiRDB-file-system-area-name/HiRDB-filename"

12

initial HiRDB-file-segments-count segments

[file name "HiRDB-file-system-area-name/HiRDB-filename"

initial HiRDB-file-segments-count segments]...

;

Note: Nos. 11 and 12 must be specified at the end of the create rdarea statement.

Organization of this subsection

(1) shared

(2) RDAREA-name <identifier> ((1-30))

(3) globalbuffer global-buffer-name<identifier> ((1-16))

(4) for {datadictionary of {routines|dbmanagement}|user used by {PUBLIC|authorization-identifier[,authorization-identifier]...}|LOB used by {HiRDB (data-dictionary-table-name)|PUBLIC|authorization-identifier[,authorization-identifier]...}|list}

(5) server name server-name<identifier> ((1-8))

(6) open attribute {INITIAL|DEFER|SCHEDULE}

(7) page page-length characters<unsigned integer> ((4096-30720)) <<4096 or 8192>>

(8) storage control segment segment-size pages<unsigned integer> ((1-16000)) <<1 or 50>>

(9) [max entries maximum-registered-lists-count] <unsigned integer> ((500-50000 and a multiple of 500)) <<500>>

(10) [extension {use extension-segments-count segments|nouse}]

(11) file name "HiRDB-file-system-area-name/HiRDB-filename" ((up to 167 characters))

(12) initial HiRDB-file-segments-count segments<unsigned integer>

(1) shared

For a HiRDB/Parallel Server (only), specifies that a shared RDAREA is to be added.

Rules

To specify shared, Y must have been specified in the pd_sharedrdarea_use operand in the system definition. If this specification is missing, an error results.

Specifying shared in the case of a HiRDB/Single Server results in an error.

An RDAREA created as a shared RDAREA can be referenced from any server, not just the server specified in the server name operand (can be referenced from all back-end servers).

(2) RDAREA-name<identifier> ((1-30))

Specifies a name for the RDAREA that is to be added. ALL cannot be specified as an RDAREA name. If the RDAREA name is enclosed in double quotation marks ("), it is treated as being case sensitive; otherwise, it is treated as all uppercase letters. If the RDAREA name contains a blank, it must be enclosed in double quotation marks.

(3) globalbuffer global-buffer-name<identifier> ((1-16))

If you want to temporarily allocate a global buffer to the added RDAREA, specify the name of the global buffer in the HiRDB system (for a HiRDB/Parallel Server, in the server where the RDAREA is added).

You can use the pdbufls command to check the global buffer.

Rules

You cannot specify a global buffer for indexes or LOBs.

If you are adding a data dictionary RDAREA, be sure to specify this operand.

If you specify the number of global buffer sectors, the size of the specified global buffer must be greater than the page length of the RDAREA being added. You can use the pdbufls command to check the global buffer.

At HiRDB startup, the size of the global buffer is set to the maximum length of the corresponding RDAREA.

The global buffer allocated with this operand is no longer effective the next time HiRDB is started normally or restarted after planned termination. Therefore, you need to modify information about the global buffer allocation in the system common definitions at that time.

If HiRDB fails to allocate the global buffer, the RDAREA is not added.

(4) for {datadictionary of {routines|dbmanagement}|user used by {PUBLIC|authorization-identifier[,authorization-identifier]...}|LOB used by {HiRDB (data-dictionary-table-name)|PUBLIC|authorization-identifier[,authorization-identifier]...}|list}

Specifies the type of RDAREA to be added.

datadictionary of routines

Specifies that the RDAREA to be added is a data dictionary RDAREA.

This data dictionary RDAREA will store the data dictionary tables related to stored procedures, stored functions, and triggers (SQL_ROUTINES, SQL_ROUTINE_RESOURCES, and SQL_ROUTINE_PARAMS).

When a data dictionary RDAREA is added, a data dictionary LOB RDAREA must also be added.

datadictionary of dbmanagement

Specifies that the RDAREA to be added is a data dictionary RDAREA for storing a database state analyzed table and database management table.

This data dictionary RDAREA is required when the facility for predicting reorganization time is used.

user used by {PUBLIC|authorization-identifier[,authorization-identifier]...}

Specifies that the RDAREA to be added is a user RDAREA.

PUBLIC

Specifies that the user RDAREA to be added is a public RDAREA.

authorization-identifier[,authorization-identifier]...<identifier> ((1-8))

Specifies that the user RDAREA to be added is a private RDAREA, and specifies the authorization identifiers of the users who can use the user RDAREA.

Rules:

The system treats an authorization identifier enclosed in double quotation marks (") as case sensitive; otherwise, the system treats it as all uppercase letters.

By specifying an authorization identifier, you can assign RDAREA usage privileges to the private RDAREA.

You can specify a maximum of 255 authorization identifiers.

You cannot specify PUBLIC, MASTER, HiRDB, or ALL as the authorization identifier.

LOB used by{HiRDB(dictionary-table-name)| PUBLIC|authorization-identifier[,authorization-identifier]...}

Specifies that the RDAREA to be added is a data dictionary LOB RDAREA or user LOB RDAREA.

HiRDB (dictionary-table-name)

Specifies that the RDAREA to be added is a data dictionary LOB RDAREA; SQL_ROUTINES must be specified as the name of the data dictionary table.

Stored procedure definition source statements and objects are stored in such RDAREAs. Two create rdarea statements must be specified to create this type of RDAREA, one for storing stored procedure definition source statements and one for storing stored procedure objects.

Notes:

If you add a data dictionary LOB RDAREA, a data dictionary table related to the stored procedure is created. To store this table in a separate data dictionary RDAREA from other data dictionary tables, you can add a data dictionary RDAREA at the same time.

By adding a data dictionary LOB RDAREA, you can use abstract data type definitions, stored functions, and stored procedures.

If such a data dictionary LOB RDAREA already exists, specification of this operand results in an error.

When adding a data dictionary LOB RDAREA, you can specify only data dictionary RDAREAs in the same control statement file.

PUBLIC

Specifies that the user LOB RDAREA to be added is a public RDAREA.

authorization-identifier[,authorization-identifier]...<identifier> ((1-8))

Specifies that the user LOB RDAREA to be added is a private RDAREA, and specifies the authorization identifiers of the users who can use the user LOB RDAREA.

Rules:

The system treats an authorization identifier enclosed in double quotation marks (") as case sensitive; otherwise, the system treats it as all uppercase letters.

By specifying an authorization identifier, you can assign RDAREA usage privileges to the private RDAREA.

You can specify a maximum of 255 authorization identifiers.

You cannot specify PUBLIC, MASTER, HiRDB, or ALL as the authorization identifier.

list

Specifies that the list RDAREA is to be added.

(5) server name server-name<identifier> ((1-8))

HiRDB/Single Server

This operand cannot be specified for a HiRDB/Single Server.

HiRDB/Parallel Server

Specifies the name of the server that is to manage the added RDAREA.

For a data dictionary RDAREA or data dictionary LOB RDAREA, the server name of the data dictionary server must be specified. If the name of any other server is specified, the name of the dictionary server is assumed.

For a user RDAREA or user LOB RDAREA, the name of a back-end server must be specified. If the name of any other server is specified, an error results.

When a shared RDAREA is added, the server specified in this operand becomes an updatable back-end server.

(6) open attribute {INITIAL|DEFER|SCHEDULE}

Specifies the RDAREA's open timing.

Criteria

Normally, specify INITIAL unless a special operation mode is used.

To reduce the HiRDB startup time when there are many RDAREAs, specify DEFER.

Rules

This operand takes effect only when Y is specified in the pd_rdarea_open_attribute_use operand in the system common definitions.

This operand is applicable to user RDAREAs, user LOB RDAREAs, and list RDAREAs. This operand is ignored if specified for any other type of RDAREA (the RDAREA open timing for all other RDAREA types is INITIAL).

When this operand is omitted, the system assumes the value of the pd_rdarea_open_attribute operand in the system common definitions.

The value of this operand takes effect at the next startup, regardless of the HiRDB startup mode.

If the HiRDB file system area assigned to the added RDAREA is shared by other RDAREAs, all such RDAREAs must have the same open timing. Otherwise, an expected result may not be obtained from the RDAREAs sharing the HiRDB file system area.

INITIAL

The RDAREA's HiRDB file system area is to be opened at the time of system startup and the RDAREA information is to be made resident in memory; thus, high-speed operation is available from the first SQL.

Notes

The RDAREA's initial status at system startup is open and remains unchanged until an operation command is executed, unless it is placed in error shutdown status due to an error.

The INITIAL open attribute does not permit access to a closed RDAREA.

DEFER

The RDAREA's HiRDB file system area is not to be opened at the time of system startup; rather, it is to be opened and its RDAREA information is to be made resident in memory the first time an RDAREA in the HiRDB file system area is accessed. Thus, high-speed operation is available beginning with the second access to the HiRDB file system area.

Notes

The RDAREA's initial status at system startup is closed and changes to open the first time an RDAREA in its HiRDB file system area is accessed. The HiRDB file system area's RDAREAs remain in open status thereafter until an operation command is executed, unless they are placed in error shutdown status due to an error.

The DEFER open attribute permits access to a closed RDAREA.

SCHEDULE

The RDAREA's HiRDB file system area is not to be opened at the time of system startup; rather, it is to be opened and the RDAREA information is to be made resident in memory the first time an RDAREA in the HiRDB file system area is accessed from within a transaction. When this attribute is used, transaction workload increases because a HiRDB file system area opened by a transaction is closed when the transaction terminates and open processing must be performed on the HiRDB file system area the first time each transaction accesses one of its RDAREAs.

Notes

The RDAREA's initial status at system startup is closed and changes to open when the RDAREA is first accessed by a transaction. When the transaction is terminated, all the RDAREAs opened by it are closed.
You can use the pdopen command to keep RDAREAs in open status until they are placed in shutdown close status. You can also use other operation commands to change the RDAREA status. However, if an error is detected, RDAREAs are placed in error shutdown status.

The SCHEDULE open attribute permits access to a closed RDAREA.

(7) page page-length characters<unsigned integer> ((4096-30720)) <<4096 or 8192>>

Specifies the page length of the HiRDB file that constitutes the RDAREA, expressed as a multiple of 2,048 bytes. If you have specified the sector length during creation of the HiRDB file system area, specify a value that is a multiple of 2,048 and is also a multiple of the sector length.

The following RDAREAs will have fixed-length pages:

Data dictionary LOB RDAREA and user LOB RDAREA
Specify 8,192. If any other value is specified or the operand is omitted, 8,192 is assumed.

Data dictionary RDAREA for storing a database state analyzed table and database management table
Specify 4,096. If any other value is specified or the operand is omitted, 4,096 is assumed.

For details about the page lengths of other RDAREAs, see the HiRDB Version 8 Installation and Design Guide and specify the appropriate value. This page length is used by HiRDB as the smallest unit of I/O operations on the RDAREA.

(8) storage control segment segment-size pages<unsigned integer> ((1-16000)) <<1 or 50>>

Specifies in pages the size of one segment.

For a data dictionary LOB RDAREA or a user LOB RDAREA 1 must be specified; if any other value is specified, 1 is assumed. For details about the segment sizes of other RDAREAs, see the HiRDB Version 8 Installation and Design Guide and specify the appropriate value.

(9) [max entries maximum-registered-lists-count] <unsigned integer> ((500-50000 and a multiple of 500)) <<500>>

Specifies the maximum number of lists that can be created in the list RDAREA, expressed as a multiple of 500. If the specified value is not a multiple of 500, the system rounds it up to the next multiple of 500. An error results if you specify this operand for any RDAREA other than the list RDAREA.

(10) [extension {use extension-segments-count segments|nouse}]

Specifies whether or not to apply automatic extension to the RDAREA that is being added.

Automatic extension of RDAREA is a facility that extends an RDAREA automatically in the event of a shortage of RDAREA space if there is enough space in the HiRDB file system area. If you use this facility for the RDAREA and a shortage of unused segments occurs, the system allocates new unused segments to the RDAREA. These new unused segments are added at the end of the HiRDB file constituting the RDAREA.

Prerequisites

You need to specify the -e option (specifying the number of extensions) for the HiRDB file system area containing the RDAREA.

There must be enough space in the HiRDB file system area that contains the last HiRDB file constituting the RDAREA.

use extension-segments-count segments

Specifies that automatic extension of an RDAREA is to be applied.

The automatic extension of an RDAREA is applicable to data dictionary RDAREAs, data dictionary LOB RDAREAs, user RDAREAs, and user LOB RDAREAs. For any other type of RDAREA, the system assumes nouse even if use is specified.

For an RDAREA other than a LOB RDAREA, automatic extension occurs when there are no more used free segments or used segments. For a LOB RDAREA, automatic extension occurs when there are no more unused segments.

extension-segments-count <unsigned integer> ((1-64000))

Specifies the number of extension segments.

The maximum number of HiRDB file extensions is 24. If this value is exceeded, an error occurs. The maximum number of extensions per HiRDB file system area is determined by the value specified when the HiRDB file system area is created. Therefore, you need to define the maximum number of extensions, taking into account the number of files in the HiRDB file system area and the frequency of extension.

nouse

Specifies that automatic extension of an RDAREA is not to be applied.

Notes

If allocation of unused segments fails due to a shortage of space in the HiRDB file system area, either extend or re-initialize the RDAREA or use the database reorganization utility to reorganize the table.

If the number of extensions exceeds the maximum value, integrate the extensions in the HiRDB file system area containing the RDAREA or add a HiRDB file in another HiRDB file system area to the RDAREA.
To integrate extensions, make a backup copy with pdfbkup, initialize the HiRDB file system area with pdfmkfs, then restore the HiRDB file system area from its backup copy using pdfrstr.

The last file is locked from the beginning to the end of the automatic extension process.

(11) file name "HiRDB-file-system-area-name/HiRDB-filename" ((up to 167 characters))

Specifies a file to be allocated to the added RDAREA, in terms of a HiRDB file system area name and a HiRDB file name.

Rules

Enclose HiRDB-file-system-area-name/HiRDB-filename in double quotation marks (").

Do not include a linefeed character inside the double quotation marks.

You can allocate a maximum of 16 HiRDB files per RDAREA.

The database structure modification utility (pdmod) creates the HiRDB file in the specified HiRDB file system area.

HiRDB-file-system-area-name/HiRDB-filename must be unique in the HiRDB system.

For a list RDAREA, use a HiRDB file system area with a purpose of WORK.

HiRDB-file-system-area-name<pathname>

Specifies the name of the HiRDB file system area.

HiRDB-filename<HiRDB filename> ((1-30 characters))

Specifies the name of the HiRDB file (which cannot begin with pl).

(12) initial HiRDB-file-segments-count segments<unsigned integer>

Specifies the number of segments in this file in the RDAREA. The number of segments is the total number of pages/segment size. (For details about how to estimate the total number of pages, see the HiRDB Version 8 Installation and Design Guide.) The size of a HiRDB file cannot exceed 2 GB, regardless of the number of segments.

7.3.4 Notes

An added RDAREA becomes available at the following time:

Global buffer not allocated by the control statement
The added RDAREA becomes available the next time HiRDB is started normally. If there is a global buffer created with the -o option specified and the global buffer size is larger than the page size of the added RDAREA, the RDAREA becomes available also at the time of a restart. After the restart, the RDAREA is closed, so you will have to use the pdopen command to open the RDAREA before it can be used.

Global buffer allocated by the control statement
The added RDAREA becomes available upon completion of the RDAREA addition processing. When a shared RDAREA is added, the global buffer must be allocated to all back-end servers.
In either case, you must modify the system common definitions so that a global buffer is allocated to the newly added RDAREA at the time of the next HiRDB normal startup. For details about the system common definitions, see the HiRDB Version 8 System Definition. If the system common definitions are not modified but there is an available global buffer for which the -o option was specified in the pdbuffer operand of the system common definition, that global buffer is allocated automatically to the RDAREA the next time HiRDB is started normally. Also, if there is an available global buffer for which the -o option was specified, or a global buffer is specified with the control statement, that global buffer is allocated at the time of a HiRDB restart.

After adding an RDAREA, you should make a backup copy of the added RDAREA, the master directory RDAREA, and the corresponding data dictionary RDAREA, using the database copy utility (pdcopy). For details about the database copy utility, see 18. Database Copy Utility (pdcopy).

When you add the data dictionary LOB RDAREAs, stored procedures or stored functions become available. When the data dictionary LOB RDAREAs are added, data dictionary tables are also created at the same time. Therefore, you should check to ensure that there is sufficient free space in the data dictionary RDAREAs. If there is not enough space, expand the data dictionary RDAREAs in advance. To check the size of an RDAREA, use the database condition analysis utility.
If you want to store the data dictionary tables related to stored procedures in a separate data dictionary RDAREA from other data dictionary tables, you can add a data dictionary RDAREA at the same time.
Once the data dictionary LOB RDAREAs have been added, the stored procedures or stored functions become available when global buffers are allocated to the added RDAREAs.

When adding an RDAREA, specify a HiRDB file in the HiRDB file system area whose generations are not managed.

7.4 Expanding an RDAREA

Organization of this section

7.4.1 Function

7.4.2 Examples

7.4.3 Control statement (expand rdarea statement)

7.4.4 Notes

7.4.1 Function

RDAREA expansion is a function that adds HiRDB files to an RDAREA when the initially estimated RDAREA size becomes insufficient. An RDAREA is expanded by adding component HiRDB files.

Files can be added to an RDAREA up to the maximum of 16 files. An RDAREA can be expanded even while a table or index contained in the RDAREA is being referenced by another user. RDAREA expansion has no effect on the data already contained in the RDAREA.

Figure 7-2 provides an overview of the use of the database structure modification utility (pdmod) for RDAREA expansion.

Figure 7-2 Overview of database structure modification utility (pdmod): RDAREA expansion

Note

If you have extended an RDAREA, be sure to make a backup copy of the RDAREA as well as the other RDAREAs that need to be backed up at the same time. For details about how to back up RDAREAs, see the HiRDB Version 8 System Operation Guide.

Prerequisites

To expand an RDAREA, first you need to initialize the HiRDB file system areas for creation of HiRDB files.

An RDAREA subject to expansion must be in one of the following statuses:

Master directory RDAREA
Shutdown release and open status

Data directory RDAREA, data dictionary RDAREA, data dictionary LOB RDAREA, user RDAREA, user LOB RDAREA, registry RDAREA, or registry LOB RDAREA
RDAREA open timing set to INITIAL: Shutdown release status or open status but shut down by command
RDAREA open timing set to DEFER or SCHEDULE: Shutdown release status, open status but shut down by command, or shutdown release and closed status
To specify the RDAREA open timing, use the pd_rdarea_open_attribute and pd_rdarea_open_attribute_use operands in the system common definitions. For details about these operands, see the HiRDB Version 8 System Definition. You can check the current RDAREA open timing using the pddbls command.

When you expand an RDAREA, check that the maximum number of RDAREA component files in the system common definition (pd_max_file_no) will not be exceeded. If this value is exceeded, you must use the pdchgconf command to change the system common definition or terminate the HiRDB system normally and then change the system common definition.

A shared RDAREA that is expanded is regarded as having been expanded at every back-end server (even if a back-end server has no shared RDAREA, the system assumes that an RDAREA has been expanded). If the maximum permissible number of HiRDB files constituting RDAREAs is exceeded at any of the back-end servers, the shared RDAREA cannot be expanded at all.

7.4.2 Examples

This section presents examples of using the database structure modification utility (expanding an RDAREA).

Organization of this subsection

(1) Expanding an RDAREA

(1) Expanding an RDAREA

This example expands the following RDAREAs:

PDBDDIC
Allocates a new HiRDB file (/svr01/rdddic02).

PDBUSER02
Allocates a new HiRDB file (/dbarea/area1/rduser05).

Overview

Contents of the control statement file (/usr/seifile/mofl02)

/* Expanding a data dictionary RDAREA */
expand rdarea PDBDDIC   ....................................................1
         file name "/svr01/rdddic02"  ......................................2
           initial 50 segments ;   .........................................3
/* Expanding a user RDAREA */
expand rdarea PDBUSER02   ..................................................1
         file name "/dbarea/area1/rduser05"   ..............................2
           initial 100 segments ;   ........................................3

Explanation

Specifies the name of the RDAREA to be expanded.

Specifies the name of the RDAREA file to be added to the RDAREA.

Specifies the number of HiRDB file segments.

7.4.3 Control statement (expand rdarea statement)

This section explains the operands of the expand rdarea statement. In the following table, each number corresponds to the number assigned to each operand.

No.
Operand

1

expand rdarea RDAREA-name

2

 [extension {use extension-segments-count segments|nouse}]

3

 file name "HiRDB-file-system-area-name/HiRDB-filename"

4

   initial HiRDB-file-segments-count segments

 [file name "HiRDB-file-system-area-name/HiRDB-filename"

   initial HiRDB-file-segments-count segments]...

;

Note: Nos. 3 and 4 must be specified at the end of the expand rdarea statement.

Organization of this subsection

(1) RDAREA-name<identifier> ((1-30))

(2) extension {use extension-segments-count segments|nouse}]

(3) file name "HiRDB-file-system-area-name/HiRDB-filename"((up to 167 characters))

(4) initial HiRDB-file-segments-count segments<unsigned integer>

(1) RDAREA-name<identifier> ((1-30))

Specifies the name of the RDAREA to be expanded. ALL cannot be specified as an RDAREA name. If the RDAREA name is enclosed in double quotation marks ("), it is treated as being case sensitive; otherwise, it is treated as all uppercase letters. The RDAREA name must be enclosed in double quotation marks if it includes a blank.

(2) extension {use extension-segments-count segments|nouse}]

Specifies whether or not to apply automatic extension to the RDAREA that is being expanded. When this operand is omitted, the system assumes the specification existing before the RDAREA is expanded.

Automatic extension of RDAREA is a facility that extends an RDAREA automatically in the event of a shortage of RDAREA space if there is enough space in the HiRDB file system area. If you use this facility for an RDAREA and a shortage of unused segments occurs, the system allocates new unused segments to the RDAREA. These new unused segments are added at the end of the HiRDB file constituting the RDAREA.

Prerequisites

You need to specify the -e option (specifying the number of extensions) for the HiRDB file system area containing the RDAREA.

There must be enough space in the HiRDB file system area that contains the last HiRDB file constituting the RDAREA.

use extension-segments-count segments

Specifies that automatic extension of RDAREA is to be applied.

The automatic extension of an RDAREA is applicable to data dictionary RDAREAs, data dictionary LOB RDAREAs, user RDAREAs, and user LOB RDAREAs, registry RDAREAs, and registry LOB RDAREAs. For any other type of RDAREA, the system assumes nouse, even if use is specified.

For an RDAREA other than a LOB RDAREA, automatic extension occurs when there are no more used free segments or used segments. For a LOB RDAREA, automatic extension occurs when there are no more unused segments.

extension-segments-count <unsigned integer> ((1-64000))

Specifies the number of extension segments.

The maximum number of HiRDB file extensions is 24. If this value is exceeded, an error occurs. The maximum number of extensions per HiRDB file system area is determined by the value specified when the HiRDB file system area is created. Therefore, you need to define the maximum number of extensions, taking into account the number of files in the HiRDB file system area and the frequency of extension.

nouse

Specifies that automatic extension of RDAREA is not to be applied.

Notes

If allocation of unused segments fails due to a shortage of space in the HiRDB file system area, either extend or re-initialize the RDAREA or use the database reorganization utility to reorganize the table.

If the number of extensions exceeds the maximum value, integrate the extensions in the HiRDB file system area containing the RDAREA or add HiRDB file in another HiRDB file system area to the RDAREA.
To integrate extensions, make a backup copy with pdfbkup, initialize the HiRDB file system area with pdfmkfs, then restore the HiRDB file system area from its backup copy using pdfrstr.

The last file is locked from the beginning to the end of the automatic extension process.

(3) file name "HiRDB-file-system-area-name/HiRDB-filename"((up to 167 characters))

Specifies a file to be added to the RDAREA, in terms of a HiRDB file system area name and a HiRDB file name.

Rules

Enclose HiRDB-file-system-area-name/HiRDB-filename in double quotation marks (").

Do not include a linefeed character inside the double quotation marks.

You can allocate a maximum of 16 HiRDB files per RDAREA.

The database structure modification utility (pdmod) creates the HiRDB file in the specified HiRDB file system area.

HiRDB-file-system-area-name/HiRDB-filename must be unique in the HiRDB system.

For a list RDAREA, use a HiRDB file system area with a purpose of WORK.

If you are extending the RDAREA to a HiRDB file system area with a sector length specified, the page length of the RDAREA must be a multiple of the sector length.

HiRDB-file-system-area-name <pathname>

Specifies the name of the HiRDB file system area.

HiRDB-filename <HiRDB filename> ((1-30 characters))

Specifies the name of the HiRDB file (which cannot begin with pl).

(4) initial HiRDB-file-segments-count segments<unsigned integer>

Specifies the number of segments in this file in the RDAREA file. The number of segments is the total number of pages/segment size. For details about how to estimate the total number of pages, see the HiRDB Version 8 Installation and Design Guide. The size of a HiRDB file cannot exceed 2 GB, regardless of the number of segments.

7.4.4 Notes

After expanding an RDAREA, you should make a backup copy of the expanded RDAREA, the master directory RDAREA, and the corresponding data dictionary RDAREA, using the database copy utility (pdcopy). For details about the database copy utility, see 18. Database Copy Utility (pdcopy).

If you are expanding an RDAREA to which the inner replica facility is applied (original and replica RDAREAs), the HiRDB file system area of the specified HiRDB file must have been registered for the corresponding generation.

If you are expanding an RDAREA to which the inner replica facility is not applied, specify a HiRDB file in the HiRDB file system area whose generations are not managed.

7.5 Reinitializing an RDAREA

Organization of this section

7.5.1 Function

7.5.2 Examples

7.5.3 Control statement (initialize rdarea statement)

7.5.4 Table and index status after reinitialization

7.5.5 Output of execution results listing

7.5.6 Notes

7.5.1 Function

User RDAREA reinitialization is a function that reinitializes an RDAREA for any of the following purposes:

To change the size, number, or names of the HiRDB files comprising the RDAREA

To change the segment size and page length of the RDAREA (user RDAREAs only)

To recover the RDAREA from an error without using its backup

When an RDAREA is reinitialized, table and index definitions are inherited, but all data is deleted. The data must be re-created by the database load utility (pdload) or the database reorganization utility (pdrorg).

Figure 7-3 provides an overview of the use of the database structure modification utility (pdmod) for RDAREA reinitialization.

Figure 7-3 Overview of database structure modification utility (pdmod): RDAREA reinitialization

Note

As soon as an RDAREA has been reinitialized, a backup of the RDAREA should be made.

¹ Free space

² For details about unload and reload processing, see Chapter 8. Database Reorganization Utility (pdrorg).

Prerequisites

An RDAREA subject to reinitialization must be in shutdown and closed status. A shared RDAREA must be in shutdown and closed status at all back-end servers.

When reinitializing an RDAREA, be sure that the number of HiRDB files does not exceed the maximum number of HiRDB files constituting the RDAREAs (pd_max_file_no) specified in the system common definition. If this value is exceeded, you must use the pdchgconf command to change the system common definition or terminate the HiRDB system normally and then change the system common definition.

A shared RDAREA that is reinitialized is regarded as having been reinitialized at every back-end server (even if a back-end server has no shared RDAREA to be reinitialized, the system assumes that an RDAREA has been reinitialized). If the maximum permissible number of HiRDB files constituting RDAREAs is exceeded at any of the back-end servers, the shared RDAREA cannot be reinitialized at all.

If reinitializing a data dictionary LOB RDAREA, you can execute the utility only on an RDAREA in which stored procedure or stored function objects are stored. After execution, you need to re-create all SQL objects using ALTER PROCEDURE (with ALL specified) or ALTER ROUTINE. For details about ALTER PROCEDURE and ALTER ROUTINE, see the HiRDB Version 8 SQL Reference. You can determine the RDAREA storing the stored procedure or stored function objects by searching the data dictionary table. For details about the data dictionary search method, see the HiRDB Version 8 UAP Development Guide.

If reinitializing the registry LOB RDAREA, you also need to reinitialize the registry RDAREA (it is not possible to reinitialize the registry LOB RDAREA only). After the reinitialization, you must re-register any registry information that is used by the plug-in module.

7.5.2 Examples

This section presents an example of using the database structure modification utility (reinitializing an RDAREA).

Organization of this subsection

(1) Reinitializing an RDAREA

(1) Reinitializing an RDAREA

This example reinitializes the following RDAREAs:

PDBUSER01
Change the segment size to 140 pages

PDBUSER02
Change the HiRDB file (/dbarea/area1/rduser02) allocated to the RDAREA to /dbarea/area1/rduser06 and /dbarea/area1/rduser07.

Overview

Contents of the control statement file (/usr/seifile/mofl03)

/* Re-initializing a user RDAREA */
initialize rdarea PDBUSER01   ..................................................1
             storage control segment 140 pages;   ..............................2
/* Re-initializing a user RDAREA */
initialize rdarea PDBUSER02   ..................................................1
             with reconstruction   .............................................3
             file name "/dbarea/area1/rduser06"   ..............................4
               initial 100 segments   ..........................................5
             file name "/dbarea/area1/rduser07"   ..............................4
               initial 60 segments ;   .........................................5

Explanation

Specifies the name of the RDAREA to be re-initialized.

Specifies the segment size after change.

Specifies that all HiRDB files constituting the RDAREA are to be changed.

Specifies the name of the HiRDB file to be re-allocated to the RDAREA.

Specifies the number of HiRDB file segments.

7.5.3 Control statement (initialize rdarea statement)

This section explains the operands of the initialize rdarea statement. In the following table, each number corresponds to the number assigned to each operand.

No.
Operand

1

initialize rdarea RDAREA-name

2

 [with reconstruction]

3

 [open attribute {INITIAL|DEFER|SCHEDULE}]

4

 [page page-length characters]

5

 [storage control segment segment-size pages]

6

 [max entries maximum-lists-count-registered]

7

 [extension {use extension-segments-count segments|nouse}]

8

 [file name "HiRDB-file-system-area-name/HiRDB-filename"

9

   initial HiRDB-file-segments-count segments]

  [file name "HiRDB-file-system-area-name/HiRDB-filename"

   initial HiRDB-file-segments-count segments]...]

;

Note: Nos. 8 and 9 must be specified at the end of the initialize rdarea statement.

Organization of this subsection

(1) RDAREA-name<identifier> ((1-30))

(2) with reconstruction

(3) open attribute {INITIAL|DEFER|SCHEDULE}

(4) page page-length characters<unsigned integer> ((4096-30720))

(5) storage control segment segment-size pages<unsigned integer> ((1-16000))

(6) max entries maximum-lists-count-registered <unsigned integer> ((500-50000 and a multiple of 500))

(7) extension {use extension-segments-count segments|nouse}

(8) file name "HiRDB-file-system-area-name/HiRDB-filename"((up to 167 characters))

(9) initial HiRDB-file-segments-count segments<unsigned integer>

(1) RDAREA-name<identifier> ((1-30))

Specifies the name of the RDAREA that is to be reinitialized. ALL cannot be specified as an RDAREA name. If the RDAREA name is enclosed in double quotation marks ("), it is treated as being case sensitive; otherwise, it is treated as all uppercase letters. The RDAREA name must be enclosed in double quotation marks if it includes a blank.

(2) with reconstruction

Specifies that all HiRDB files comprising the RDAREA are to be reconstructed. When this operand is specified, all the HiRDB files comprising the RDAREA to be reconstructed must be specified in file name operands. Any existing HiRDB file definitions that are not specified in file name operand definitions become invalid; HiRDB files that will no longer be used should be deleted. When this operand is omitted, the value in effect before execution of RDAREA reinitialization is inherited. To change an HiRDB file definition without specifying this operand, the name of the applicable HiRDB file must be specified in a file name operand and the new values must be specified in the applicable operands.

(3) open attribute {INITIAL|DEFER|SCHEDULE}

Specifies the RDAREA open timing.

Criteria

Normally, specify INITIAL unless a special operation mode is used.

To reduce the HiRDB startup time when there are many RDAREAs, specify DEFER.

Rules

This operand takes effect only when Y is specified in the pd_rdarea_open_attribute_use operand in the system common definitions.

This operand is applicable to user RDAREAs, user LOB RDAREAs, and list RDAREAs. This operand is ignored if specified for any other type of RDAREA (the RDAREA open timing for all other RDAREA types is INITIAL).

When this operand is omitted, the system assumes the value existing before the RDAREA reinitialized.

The value of this operand takes effect at the next startup, regardless of the HiRDB startup mode.

If the HiRDB file system area assigned to the corresponding RDAREA is shared by other RDAREAs, all such RDAREAs must have the same open timing. Otherwise, an expected result may not be obtained from the RDAREAs sharing the HiRDB file system area.

INITIAL

The RDAREA's HiRDB file system area is to be opened at the time of system startup and the RDAREA information is to be made resident in memory; thus, high-speed operation is available from the first SQL.

Notes

The RDAREA's initial status at system startup is open and remains unchanged until an operation command is executed, unless it is placed in error shutdown status due to an error.

The INITIAL open attribute does not permit access to a closed RDAREA.

DEFER

The RDAREA's HiRDB file system area is not to be opened at the time of system startup; rather, it is to be opened and its RDAREA information is to be made resident in memory the first time an RDAREA in the HiRDB file system area is accessed. Thus, high-speed operation is available beginning with the second access to the HiRDB file system area.

Notes

The RDAREA's initial status at system startup is closed and changes to open the first time an RDAREA in its HiRDB file system area is accessed. The HiRDB file system area's RDAREAs remain in open status thereafter until an operation command is executed, unless they are placed in error shutdown status due to an error.

The DEFER open attribute permits access to a closed RDAREA.

SCHEDULE

The RDAREA's HiRDB file system area is not to be opened at the time of system startup; rather, it is to be opened and the RDAREA information is to be made resident in memory the first time an RDAREA in the HiRDB file system area is accessed from within a transaction. When this attribute is used, transaction workload increases because a HiRDB file system area opened by a transaction is closed when the transaction terminates, and open processing must be performed on the HiRDB file system area the first time each transaction accesses one of its RDAREAs.

Notes

The RDAREA's initial status at system startup is closed and changes to open when the RDAREA is first accessed by a transaction. When the transaction is terminated, all the RDAREAs opened by it are closed.
You can use the pdopen command to keep RDAREAs in open status until they are placed in shutdown close status. You can also use other operation commands to change the RDAREA status. However, if an error is detected, RDAREAs are placed in error shutdown status.

The SCHEDULE open attribute permits access to a closed RDAREA.

(4) page page-length characters<unsigned integer> ((4096-30720))

Specifies a multiple of 2,048 bytes if the page length for the HiRDB files that are to constitute the RDAREA is to be changed. If you specified a sector length during creation of the HiRDB file system area, specify a multiple of the sector length.

When this operand is omitted, the value in effect before execution of RDAREA reinitialization is inherited.

For a data dictionary LOB RDAREA and user LOB RDAREA, 8192 must be specified; if any other value is specified, 8192 is assumed. For details about the page lengths of other RDAREAs, see the HiRDB Version 8 Installation and Design Guide and specify the appropriate value.

The page length specified in this operand is used as the smallest unit for I/O operations performed by HiRDB on the RDAREA.

Rules

If an RDAREA to be reinitialized includes a table, if you reduce the page length, the table row may not fit (in which case an error occurs during data storage).

If the RDAREA includes a FIX table, an error results if the following value is smaller than the row length (you can check the row length by retrieving ROW_LENGTH from SQL_TABLES in the data dictionary table):
(page length after modification 1000) 1000

An error results if the specified page length is greater than the maximum page length for RDAREAs assigned to the global buffer.

If the RDAREA to be re-initialized has an index, an error results if the key length of the index obtained from the specified page size is greater than the following value:
MIN (page size of RDAREA/2 - 1242, 4036)
(bytes)

(5) storage control segment segment-size pages<unsigned integer> ((1-16000))

Specifies a new segment size (number of pages) for the RDAREA.

When this operand is omitted, the value in effect before execution of RDAREA reinitialization is inherited.

For a data dictionary LOB RDAREA or user LOB RDAREA, 1 must be specified; if any other value is specified, 1 is assumed. For details about the segment sizes of other RDAREAs, see the HiRDB Version 8 Installation and Design Guide and specify the appropriate value.

(6) max entries maximum-lists-count-registered <unsigned integer> ((500-50000 and a multiple of 500))

Specifies the maximum number of lists that can be created in the list RDAREA, expressed as a multiple of 500. If the specified value is not a multiple of 500, the system rounds it up to the next multiple of 500.

When this operand is omitted, the value in effect before execution of RDAREA reinitialization is inherited.

An error results if you specify this operand for any RDAREA other than the list RDAREA.

(7) extension {use extension-segments-count segments|nouse}

Specifies whether or not to apply automatic extension to the RDAREA that is being reinitialized. When this operand is omitted, the value in effect before execution of RDAREA reinitialization is inherited.

Automatic extension of RDAREA is a facility that extends an RDAREA automatically in the event of a shortage of RDAREA space if there is enough space in the HiRDB file system area. If you use this facility for an RDAREA and a shortage of unused segments occurs, the system allocates new unused segments to the RDAREA. These new unused segments are added at the end of the HiRDB file constituting the RDAREA.

Prerequisites

You need to specify the -e option (specifying the number of extensions) for the HiRDB file system area containing the RDAREA.

There must be enough space in the HiRDB file system area that contains the last HiRDB file constituting the RDAREA.

use extension-segments-count segments

Specifies that automatic extension of RDAREA is to be applied.

The automatic extension of RDAREA is applicable to data dictionary RDAREAs, data dictionary LOB RDAREAs, user RDAREAs, and user LOB RDAREAs. For any other type of RDAREA, the system assumes nouse, even if use is specified.

For an RDAREA other than a LOB RDAREA, automatic extension occurs when there are no more used free segments or used segments. For a LOB RDAREA, automatic extension occurs when there are no more unused segments.

extension-segments-count <unsigned integer> ((1-64000))

Specifies the number of extension segments.

The maximum number of HiRDB file extensions is 24. If this value is exceeded, an error occurs. The maximum number of extensions per HiRDB file system area is determined by the value specified when the HiRDB file system area is created. Therefore, you need to define the maximum number of extensions, taking into account the number of files in the HiRDB file system area and the frequency of extension.

nouse

Specifies that automatic extension of RDAREA is not to be applied.

Notes

If allocation of unused segments fails due to a shortage of space in the HiRDB file system area, either extend or re-initialize the RDAREA or use the database reorganization utility to reorganize the table.

If the number of extensions exceeds the maximum value, integrate the extensions in the HiRDB file system area containing the RDAREA or add a HiRDB file in another HiRDB file system area to the RDAREA.
To integrate extensions, make a backup copy with pdfbkup, initialize the HiRDB file system area with pdfmkfs, then restore the HiRDB file system area from its backup copy using pdfrstr.

The last file is locked from the beginning to the end of the automatic extension process.

(8) file name "HiRDB-file-system-area-name/HiRDB-filename"((up to 167 characters))

Specifies a file that is to comprise the reinitialized RDAREA, in terms of a HiRDB file system area name and a HiRDB file name. HiRDB-file-system-area-name/HiRDB-filename must be enclosed in double quotation marks.

Rules

When this operand is omitted, the value in effect before execution of RDAREA reinitialization is inherited.

Do not include a linefeed character inside the double quotation marks.

You can allocate a maximum of 16 HiRDB files per RDAREA.

The database structure modification utility (pdmod) creates the HiRDB file in the specified HiRDB file system area. If the HiRDB file system area already contains a HiRDB file, pdmod deletes it and then creates a new file; therefore, an error results if there are no HiRDB file privileges.

HiRDB-file-system-area-name/HiRDB-filename must be unique in the HiRDB system.

For a list RDAREA, use a HiRDB file system area with a purpose of WORK.

HiRDB-file-system-area-name<pathname>

Specifies the name of the HiRDB file system area.

HiRDB-filename<HiRDB filename> ((1-30 characters))

Specifies the name of the HiRDB file (which cannot begin with pl).

(9) initial HiRDB-file-segments-count segments<unsigned integer>

Specifies the number of segments in this file in the RDAREA.

When this operand is omitted, the value in effect before execution of RDAREA reinitialization is inherited.

The number of segments is the total number of pages/segment size. (For details about how to estimate the total number of pages, see the HiRDB Version 8 Installation and Design Guide.) The size of a HiRDB file cannot exceed 2 GB, regardless of the number of segments.

7.5.4 Table and index status after reinitialization

Figures 7-4 and 7-5 show the table and index status after re-initialization for an RDAREA containing a table and index. Figure 7-6 shows the conditions of a re-initialized table, columns of abstract data type of the LOB attribute, plug-in columns, and a plug-in index that are in the RDAREA to be re-initialized.

If the KFPX14255-W or KFPX24242-W message is issued during RDAREA re-initialization and the cause of the error is an invalid RDAREA status, see the HiRDB Version 8 System Operation Guide for details about increasing the size of the RDAREA and changing its attributes.

Figure 7-4 Table and index status after reinitialization (1/2)

Note

Initialized status means that there is a definition but there is no data; an index on this status is usable. Incomplete status means that the table and index no longer conform; an index on this status mode is not usable.

Figure 7-5 Table and index status after reinitialization (2/2)

Note

Initialized status means that there is a definition but there is no data; an index on this status is usable. Incomplete status means that the table and index no longer conform; an index on this status is not usable.

Figure 7-6 Conditions of a reinitialized table, columns of abstract data type of the LOB attribute, plug-in-supplied columns of abstract data type, and a plug-in index

Note

Initialized state refers to a condition in which an index is defined without data, so that the index can be used. Access-disabled state refers to a condition in which data has been deleted from the index, so that the index consists solely of a definition. In this condition, the index cannot be used. Incomplete state refers to a condition in which the table and the index are mismatched, so that the index cannot be used.

If referential constraints have been defined for a table stored in the RDAREA that is to be re-initialized, the check pending status is changed. The check pending status is managed by the data dictionary tables (CHECK_PEND columns in the SQL_TABLES and SQL_REFERENTIAL_CONSTRAINTS tables) and by the table information in the RDAREA. For details about the check pending status, see the manual HiRDB Version 8 Installation and Design Guide.

The following examples show the check pending status changes when USE is specified in the pd_check_pending operand in the system definition and RDAREAs are re-initialized.

When there is an RDAREA that stores only indexes

When T2 (referencing table) references T1 (referenced table) and RDAREA3 stores only the index for the primary key of T1, the check pending status is changed during re-initialization as follows:

RDAREA to be re-initialized | Check pending status of T2 (referencing table)
Data dictionary table | Table information in RDAREA2
RDAREA1 | P | P
RDAREA2 | N | N
RDAREA3 | -- | --

Legend:

P: Check pending status is set.

N: Check pending status is released.

--: Check pending status remains unchanged.

For a row-partitioned table

When T2 (referencing table) and T3 (referencing table) both reference T1 (referenced table), and when T1 and T3 are both row-partitioned tables, the check pending status is changed during re-initialization as follows:

RDAREA to be re-initialized | Check pending status of T2 (referencing table) | Check pending status of T3 (referencing table)
Data dictionary table | Table information in RDAREA2 | Data dictionary table | Table information in RDAREA2 | Table information in RDAREA3
RDAREA1 | P | P | P | P | P
RDAREA2 | N | N | P | N | P
RDAREA3 | -- | -- | -- | -- | N

Legend:

P: Check pending status is set.

N: Check pending status is released.

--: Check pending status remains unchanged.

When the inner replica facility is used

When RDAREA1 and RDAREA2 have replica RDAREAs (generation No. 1) RDAREA1_1 and RDAREA2_1, respectively, and when T2 (referencing table) references T1 (referenced table), the check pending status is changed during re-initialization as follows:

RDAREA to be re-initialized | Check pending status of T2 (referencing table)
Data dictionary table | Table information in RDAREA2 (generation No. 0) | Table information in RDAREA2_1 (generation No. 1)
RDAREA1 | P | P | --
RDAREA2 | -- | N | --
RDAREA1_1 | P | -- | P
RDAREA2_1 | -- | -- | N

Legend:

P: Check pending status is set.

N: Check pending status is released.

--: Check pending status remains unchanged.

7.5.5 Output of execution results listing

When an RDAREA is re-initialized, an execution results listing is output. The following shows an example of an execution results listing (table and index information):

                             1         2          9  
pdmod -information-         yyyy-mm-dd  hh:mm:ss   dbl
initialize rdarea name = 3 USER_PUBLIC_1
 initialized table
 4 USERA.STOCK
 USERA.EMPLOYEE
 initialized index          rdarea name
 5 USERA.EMPLOYEENO        6 USER_PUBLIC_1
    USERA.PNAME              USER_PUBLIC_2
 unfinished index           rdarea name
  7 USERA.NAME             8 USER_PUBLIC_1
initialize LOB data(table name)  rdarea name
 10 USERA.STOCK           11 USER_LOB_1

Explanation

Date pdmod was executed
yyyy-mm-dd
year month date

Time pdmod was executed
hh:mm:ss
hour minute second

Name of reinitialized RDAREA

Table identifier in reinitialized RDAREA
authorization-identifier.table-identifier

Initialized index
authorization-identifier.index-identifier

Name of RDAREA from which index data was deleted

Index placed in incomplete status (unusable status) after the index data was deleted

RDAREA name of index placed in incomplete status (unusable status)

HiRDB identifier

Table identifier of LOB column structure base table

Name of user LOB RDAREA

7.5.6 Notes

After reinitializing an RDAREA, you should make a backup copy of the expanded RDAREA, the master directory RDAREA, and the corresponding data dictionary RDAREA, using the database copy utility (pdcopy). For details about the database copy utility, see Chapter 18. Database Copy Utility (pdcopy).

If an error occurs while an RDAREA is being reinitialized, the system does not restore the RDAREA. In this case, you must restore it, because its HiRDB files may have already been deleted or the database may have become corrupted during initialization.

When reinitialization of an RDAREA terminates normally, the RDAREA is placed in command shutdown and closed status. Before using such an RDAREA, you need to use an operation command to place it in shutdown release and open status.

If you change the number of HiRDBs or rename the HiRDBs, the system deletes the HiRDB files that are no longer used.

The following describes the data stored in the RDAREA, the definition information, and the user's action after re-initialization.

RDAREA containing a table

All data in the RDAREA is deleted and only the table definition information is inherited. If the table is partitioned, only the data stored in the RDAREA subject to reinitializing is deleted. If the table has an index, the index key data corresponding to the deleted table data is also deleted, so that only the definition information is inherited. If the table is partitioned but its index does not correspond to the partitioning key, the index is placed in the unfinished status.

If the table contains a LOB column, the corresponding LOB data is also deleted.

If the table contains an abstract data type column, the system treats it as a regular table. However, if the table contains an abstract data type column with the LOB attribute, the system also deletes the data for the abstract data type column in the corresponding user LOB RDAREA.

If the table has a plug-in index, the system also deletes the data for the plug-in index and inherits only the definition information.

If the indexes and LOB columns of the table stored in the RDAREA that is subject to re-initialization are stored in another RDAREA, the RDAREA containing the indexes and LOB columns must be in shutdown release and open status.

User's action:
After the reinitialization, restore the data using the database load utility, database reorganization utility, or a UAP. Note that a UAP cannot access the database if there is an unfinished index (a KFPA11879-E error). If this happens, take one of the following actions:
Either use the database reorganization utility (pdrorg) to reorganize the table with the index defined (batch index creation mode), or re-create the index.
Delete the table and the index data by initializing the table with the index defined (by executing the PURGE TABLE SQL statement).

RDAREA containing an index

All key data for the index is deleted from the RDAREA. If the data corresponding to the index exists in other RDAREAs, the index is placed in the unfinished status.

User's action:
If the index is successfully initialized after the reinitialization process, you can use the index as is. If the index is in the unfinished status, take one of the following actions:
Either use the database reorganization utility (pdrorg) to reorganize the table with the index defined (batch index creation mode), or re-create the index.
Delete the table and the index data by initializing the table with the index defined (by executing the PURGE TABLE SQL statement).
Reinitialize the RDAREA that contains the table with the index defined. In this case, the RDAREA containing the index must be in the shutdown release and open status.

User LOB RDAREA

All LOB data in the RDAREA is deleted. However, data in the LOB column structure base table associated with this LOB data is retained as is. If data in the LOB column structure base table is retained, the LOB column is treated as data with a length of 0.

User's action:
After the reinitialization, restore the database using the database load utility, the database reorganization utility, or a UAP.

User LOB RDAREA storing a column of abstract data type with the LOB attribute

All data in the RDAREA is deleted and the area becomes access-disabled. If a retrieval is made from the abstract data type column structure base table with the LOB attribute, the error message KFPA11891-E is output. This is because the abstract data type column structure base table with the LOB attribute (the part of a table containing an abstract data type from which all abstract data type data is removed) associated with the data remains undeleted.

User's action:
To access the storage user LOB RDAREA for the access-disabled abstract data type column with the LOB attribute, take one of the following actions:
Initialize the abstract data type column structure base table with the LOB attribute (by executing the PURGE TABLE SQL statement) to delete data.
Execute the database load utility (pdload) in the creation mode (-d).
Reinitialize the abstract data type column structure base table storage RDAREA with the LOB attribute. In this case, the abstract data type storage RDAREA with the LOB attribute must be in the shutdown release state and open status.

User LOB RDAREA storing a plug-in index

All data in the RDAREA is deleted. After the reinitialization, the plug-in index is placed in the unfinished status. If an attempt is made to access an unfinished plug-in index, the error message KFPA11879-E is output.

User's action:
Restore the plug-in index in the unfinished status by executing the database reorganization utility specifying the index re-creation option.

If a KFPX24231-W message is issued during the reinitialization of a registry RDAREA, and the registry LOB RDAREA is not reinitialized, you need to also reinitialize the registry LOB RDAREA. After the reinitialization, you must re-register the registry information used by the plug-in.

If you have created a list on the basis of a table stored in the RDAREA subject to reinitialization, re-create the list.

If the RDAREA to be re-initialized stores a referenced table, referencing table, or check constraint table, the check pending status is changed. The check pending status is managed by the data dictionary tables and the table information in the RDAREA. During re-initialization of the RDAREA, the check pending status is changed as described below. For details about the check pending status, see the manual HiRDB Version 8 Installation and Design Guide.

When an RDAREA storing a referenced table (a table in which a primary key has been defined) is re-initialized, any table referencing that table (that is, a table in which a foreign key referencing that primary key has been defined) in other RDAREAs is placed in check pending status. If the RDAREA to be re-initialized is a replica RDAREA, a referencing table stored in the same generation of the target RDAREA that is to be re-initialized is placed in check pending status. If the value of the pd_check_pending operand in the system definition is NOUSE, the tables are not placed in check pending status. When an RDAREA to be re-initialized stores only indexes for the primary key, the check pending status remains unchanged.
If the system was unable to place the referencing table in check pending status, it displays the KFPX24242-W message. In such a case, possible causes are as follows:
The RDAREA storing the referencing table is in shutdown status.
The referencing table to be placed in check pending status is being accessed by another program.
There was no RDAREA with the same generation when the replica RDAREA was re-initialized.
Another I/O error or RDAREA access error occurred.
If this message is displayed, eliminate the cause of the error and set the check pending status forcibly.

If an RDAREA storing a referencing table is re-initialized and the referencing table is in check pending status, the check pending status is released. However, in the following cases, only the table information in the RDAREA is released from check pending status; the data dictionary table is not released from check pending status:
The referencing table is partitioned.
The RDAREA storing the referencing table uses the inner replica facility.
The value of pd_check_pending in the system definition is set to NOUSE.
If the data dictionary table has not been released from check pending status, use pdconstck to perform integrity checking and then release the data dictionary table from check pending status.

If an RDAREA storing a check constraint table is re-initialized and the table for which check constraints have been defined is in check pending status, the check pending status is released. However, in the following cases, only the table information in the RDAREA is released from check pending status; the data dictionary table is not released from check pending status:
The table for which the check constraints have been defined is partitioned.
The RDAREA storing the table with the check constraints defined uses the inner replica facility.
The value of pd_check_pending in the system definition is set to NOUSE.
If the data dictionary table has not been released from check pending status, use pdconstck to perform integrity checking and then release the data dictionary table from check pending status.

If you are re-initializing an RDAREA to which the inner replica facility is applied (original and replica RDAREAs), the HiRDB file system area of the specified HiRDB file must have been registered to the corresponding generation.

If you are re-initializing a replica RDAREA, an error results if there is no replica RDAREA generation that is associated with the table, index, and LOB column in the RDAREA to be re-initialized.

If you are re-initializing an RDAREA to which the inner replica facility is not applied, specify a HiRDB file in the HiRDB file system area whose generations are not managed.

Do not re-initialize an RDAREA that contains a table that is subject to data extraction during data linkage. If such an RDAREA is re-initialized, subsequent HiRDB Datareplicator linkage becomes invalid.

An RDAREA containing a falsification prevented table cannot be re-initialized.

7.6 Deleting an RDAREA

Organization of this section

7.6.1 Function

7.6.2 Example

7.6.3 Control statement (remove rdarea statement)

7.6.4 Notes

7.6.1 Function

This function deletes RDAREAs (including replica RDAREAs) that are no longer needed. An RDAREA can be redefined by first deleting it with this function and then adding a newly defined RDAREA. Figure 7-7 provides an overview of the use of the database structure modification utility (pdmod) for RDAREA deletion.

Figure 7-7 Overview of database structure modification utility (pdmod): RDAREA deletion

Prerequisites

An RDAREA that stores a table, index, or LOB column cannot be deleted. The same applies to an RDAREA for which replica RDAREAs have been defined. Replica RDAREAs can be deleted even if they contain tables, indexes, and LOB columns.

An RDAREA subject to deletion must be in the shutdown and closed status. A shared RDAREA must be in shutdown and closed status at all back-end servers.

7.6.2 Example

This section presents an example of using the database structure modification utility (deleting an RDAREA).

Organization of this subsection

(1) Deleting an RDAREA

(1) Deleting an RDAREA

This example deletes the following RDAREA:

PDBUSER04

Overview

Contents of the control statement file (/usr/seifile/mofl04)

/* Deleting a user RDAREA */
remove rdarea PDBUSER04 ;

Explanation

Specifies the name of the RDAREA to be deleted.

7.6.3 Control statement (remove rdarea statement)

This section explains the operand of the remove rdarea statement. In the following table, the number corresponds to the explanation of the operand.

No. | Operand
1 | remove rdarea RDAREA-name;

Organization of this subsection

(1) RDAREA-name<identifier> ((1-30))

(1) RDAREA-name<identifier> ((1-30))

Specifies the name of the RDAREA that is to be deleted. ALL cannot be specified as the RDAREA name. If the RDAREA name is enclosed in double quotation marks ("), it is handled as case sensitive; otherwise, it is handled as all uppercase letters. An RDAREA name must be enclosed in double quotation marks if it includes a blank.

An RDAREA that stores a table, index, or LOB column cannot be deleted. The same applies to an RDAREA for which replica RDAREAs have been defined.

7.6.4 Notes

If you delete an RDAREA, the HiRDB files used in that RDAREA are also deleted.

If an error occurs during RDAREA deletion process, the RDAREA subject to deletion is not restored. In this case, re-execute the remove rdarea statement on the corresponding RDAREA because the HiRDB files may have already been deleted.

Once an RDAREA has been deleted, you need to modify the pdbuffer operand in the system common definitions after HiRDB terminates normally. Otherwise, more memory is used than is actually needed. For details about the system common definitions, see the HiRDB Version 8 System Definition.

If you are deleting a replica RDAREA and its inner replica attribute is the current RDAREA, you must use the pddbchg command to change it to a sub-RDAREA.

If you have deleted a replica RDAREA, use pdcopy to make a backup of the original RDAREA, master directory RDAREA, and data dictionary RDAREA.

If you have deleted all replica RDAREAs of an original RDAREA, the inner replica facility is no longer applicable to that RDAREA.

If a data dictionary RDAREA containing a database state analyzed table and a database management table is deleted, the database state analyzed table and database management table are also deleted.

If an RDAREA stores a referencing table or check constraint table, and if it uses the inner replica facility, and if only the table information in its specific replica RDAREA is in check pending status, and if this replica RDAREA is deleted, all of its generations are placed in non-check pending status but the data dictionary table is not released from check pending status. When the data dictionary table is not released from check pending status, use pdconstck to perform integrity checking and then release the data dictionary table from check pending status.

7.7 Moving an RDAREAs

Organization of this section

7.7.1 Function

7.7.2 Example

7.7.3 Control statement (move rdarea statement)

7.7.4 Output of execution results listing

7.7.5 Notes

7.7.1 Function

For a HiRDB/Parallel Server, this function moves RDAREA to another server. Figure 7-8 provides an overview of moving RDAREAs.

Figure 7-8 Overview of moving RDAREAs

Prerequisites

The RDAREAs to be moved must be in shutdown and closed status. A shared RDAREA must be in shutdown and closed status at all back-end servers.

Before moving RDAREAs, use pdcopy to make a backup of the RDAREAs to be moved, master directory RDAREA, and data dictionary RDAREA.

Before moving RDAREAs, you should check and, if necessary, revise the resource requirements for the target server.

When an RDAREA is moved, an error results unless all its related RDAREAs are also moved. Related RDAREAs include the following:

For a non-partitioned table, related RDAREAs are all RDAREAs that contain the table, indexes, and LOB data.

For a row-partitioned table, related RDAREAs are all RDAREAs that contain the tables corresponding to the partitioning conditions, indexes, and LOB data.
If there is any non-partitioning key index (including a non-partitioning key index used for partitioning in a server), you must delete it. After you finish moving an RDAREA, re-create the non-partitioning key index. If UNIQUE is specified for the non-partitioning key index, you may not be able to re-create it. For details, see UNIQUE in CREATE INDEX in the manual HiRDB Version 8 SQL Reference.
If a primary key has been defined other than the non-partitioning keys, you must delete the target table after saving its data, re-define the table after moving the RDAREA, and then recover the data. Note that if a primary key has been defined other than the partitioning keys, you may not be able to re-define the table due to the unique index.

If the inner replica facility is used, the generation of the HiRDB file system area must be registered in advance for the target server to which the original and replica RDAREAs are moved.

7.7.2 Example

This section explains an example of using the database structure modification utility (moving RDAREAs).

Organization of this subsection

(1) Moving RDAREAs

(1) Moving RDAREAs

This example moves the following RDAREAs to back-end server bes2:

PDBUSER01, PDBUSER02, PDBULOB01

Command to be executed

pdmod -a /usr/seifile/mofl01

Contents of the control statement file (/usr/seifile/mofl01)

/* Moving RDAREAs */
 move rdarea PDBUSER01,PDBUSER02,PDBULOB01   .......1
             to bes2 ;   ...........................2

Explanation

Specifies the names of the RDAREAs to be moved.

Specifies the name of the target back-end server.

7.7.3 Control statement (move rdarea statement)

This section explains the operands of the move rdarea statement. In the following table, the number corresponds to the explanation of the operand.

No. | Operand
1 | move rdarea RDAREA-name[,RDAREA-name]...
2 | to server-name
| ;

Organization of this subsection

(1) RDAREA-name

(2) to server-name

(1) RDAREA-name

<identifier> ((1-30))

Specifies the name of an RDAREA that is to be moved.

If multiple RDAREAs are specified, they must all be in the same server.

You cannot specify ALL for the RDAREA name. The system treats an RDAREA name enclosed in double quotation marks (") as case sensitive; otherwise, the system treats the RDAREA name as all uppercase letters. You must enclose an RDAREA name in double quotation marks if it contains a space.

(2) to server-name

<identifier> ((1-8))

Specifies the name of the target server (back-end server).

An error results if the specified server name is not for a back-end server or the server does not exist in HiRDB.

7.7.4 Output of execution results listing

When RDAREAs are moved, an execution results listing is output.

The following is an example of the execution results listing that is output:

                             1          2           3
pdmod -information-           yyyy-mm-dd  hh:mm:ss     db1
                    4      5
  move rdarea from bes1 to bes2
    rdarea name = RDUSER1 6
      table name
     7 USERA.STOCK
        USERA.EMPLOYEE
      index name
     8 USERA.EMPLOYEE_NUMBER
        USERA.PRODUCT_NAME
      LOB data(table name)
     9 USERA.STOCK
      rdarea name = PDUSER1_1
        original rdarea name = PDUSER1 10

Explanation

pdmod execution date
yyyy-mm-dd (year-month-date)

pdmod execution time
hh:mm:ss (hour:minute:second)

HiRDB identifier

Name of the source server

Name of the target server

Name of an RDAREA that was moved

Table contained in the moved RDAREA
authorization-identifier.table-identifier

Index or plug-in index contained in the moved RDAREA
authorization-identifier.index-identifier

LOB column or column of abstract data type of the LOB attribute contained in the moved RDAREA
authorization-identifier.table-identifier

Original RDAREA name of the moved RDAREA

7.7.5 Notes

Once you start moving RDAREAs, do not execute any UAP or utility until the HiRDB restart has been completed. If you do not restart HiRDB after moving RDAREAs, operation cannot be guaranteed.

You must delete the HiRDB file that constitutes the moved source RDAREA and create the HiRDB file that constitutes the target RDAREA. The path name of the HiRDB file that constitutes the target RDAREA must be the same as the source HiRDB file.

Once an RDAREA has been moved, any routine using a table in the source RDAREA will be disabled. You must re-create such routines with the ALTER ROUTINE SQL statement.

After moving RDAREAs, use pdcopy to make a backup of the moved RDAREAs, master directory RDAREA, and data dictionary RDAREA.

7.8 Modifying data dictionary table attribute definitions

Organization of this section

7.8.1 Function

7.8.2 Example

7.8.3 Control statement (alter system statement)

7.8.4 Note

7.8.1 Function

This function lets you modify a data dictionary table's attribute definitions. The data dictionary table attribute definitions include:

Dictionary table referencing privilege

Use of mixed-character data in dictionary tables

(a) Dictionary table referencing privilege

The information that can be retrieved by accessing a dictionary table can be restricted based on the user's privilege. The specification of the dicinf operand in the database initialization utility (define system statement) can be modified.

(b) Use of mixed-character data in dictionary tables

This function enables mixed-character data to be used in dictionary tables. If nouse (mixed-character data not permitted in dictionary tables) is specified in the dictionary datatype mchar operand of the database initialization utility, the specification can be modified so that mixed-character data can be used.

7.8.2 Example

This section presents an example of using the database structure modification utility (modifying data dictionary table attribute definitions).

Organization of this subsection

(1) Modifying data dictionary table attribute definitions

(1) Modifying data dictionary table attribute definitions

When data dictionary tables are accessed, this example limits the information available to users according to users' privileges. It allows mixed character string data in the data dictionary table. This example assumes that a HiRDB/Single Server is used.

Command to be executed

pdmod -a /usr/seifile/mofl01

Contents of the control statement file (/usr/seifile/mofl01)

/* Modifying data dictionary table attribute definitions */
alter system dicinf limited   ......................1
        dictionary datatype mchar use ;   ..........2

Explanation

When data dictionary tables are accessed, this statement limits the information available to users as appropriate to the users' privileges.

This operand enables mixed character string data to be used in the data dictionary.

7.8.3 Control statement (alter system statement)

This section explains the operands of the alter system statement. In the following table, each number corresponds to the number assigned to each operand.

No.
Operand

1

alter system [dicinf {unlimited|limited}]

2

          [dictionary datatype mchar use]

;

Organization of this subsection

(1) dicinf {unlimited|limited}

(2) dictionary datatype mchar use

(1) dicinf {unlimited|limited}

Specifies whether or not to limit the information that can be retrieved by accessing data dictionary tables based on the user's privileges (specification of the reference privilege for data dictionary tables). For details about how to specify the reference privilege for data dictionary tables, see the HiRDB Version 8 System Operation Guide.

unlimited

All information can be retrieved when a data dictionary table is accessed.

limited

The information that can be retrieved when a data dictionary table is accessed is to be restricted based on the user's privileges (users with DBA privilege can retrieve all information; users without DBA privilege can retrieve only the information available to their assigned privilege).

Rules

If a view table has been defined that references a data dictionary table, or an SQL object routine has been defined, you cannot change the data dictionary table reference privileges.

To modify the data dictionary table reference privileges, you need to delete all view tables that reference the data dictionary table beforehand.

If an SQL object routine has been defined that references data dictionary tables, the system issues a warning message indicating that the SQL object will be disabled, then terminates the processing normally. In this case, you need to re-create the routine's disabled SQL object using ALTER PROCEDURE or ALTER ROUTINE. You can identify the disabled SQL object by searching the data dictionary table. For details about ALTER PROCEDURE or ALTER ROUTINE, see the HiRDB Version 8 SQL Reference. For details about how to search a data dictionary table, see the HiRDB Version 8 UAP Development Guide.

When limited is specified, there is an increase in the number of UAP access tables used to retrieve data dictionary tables. Therefore, you must increase the number of concurrently accessible base tables (value of pd_max_access_tables in the system common definition). Five base tables must be accessible concurrently for each data dictionary table.

(2) dictionary datatype mchar use

Specifies that mixed-character data can be used in dictionary tables. When this operand is specified, the data type of dictionary table columns becomes MVARCHAR.

Criteria

If Kanji characters are used in a table name or column names, the data type is changed to MVARCHAR.

Rules

If a view table is defined that references data dictionary tables, you cannot specify this operand. To specify this operand, you need to delete such view tables beforehand.

If an SQL object routine has been defined that references data dictionary tables, the system issues a warning message indicating that the SQL object will be disabled, then terminates the processing normally. In this case, you need to re-create the routine's disabled SQL object using ALTER PROCEDURE or ALTER ROUTINE. You can identify the disabled SQL object by searching the data dictionary table. For details about ALTER PROCEDURE or ALTER ROUTINE, see the HiRDB Version 8 SQL Reference. For details about how to search a data dictionary table, see the HiRDB Version 8 UAP Development Guide.

7.8.4 Note

An error results if the alter system statement is executed while a UAP, utility, or operation command is accessing a data dictionary table.

7.9 Modifying RDAREA attributes

Organization of this section

7.9.1 Function

7.9.2 Example

7.9.3 Control statement (alter rdarea statement)

7.9.1 Function

This function modifies the following RDAREA attributes:

RDAREA open timing

Automatic extension of RDAREA

Prerequisites

An RDAREA subject to attribute modification must be in the shutdown and closed status.

7.9.2 Example

This section presents an example of using the database structure modification utility (modifying RDAREA attributes).

Organization of this subsection

(1) Modifying RDAREA attributes

(1) Modifying RDAREA attributes

For a HiRDB/Single Server, this example modifies the open timing of the following RDAREAs:

PDBUSER01 (user RDAREA)

PDBULOB11 (user LOB RDAREA)

Command to be executed

pdmod -a /usr/seifile/mofl01

Contents of the control statement file (/usr/seifile/mofl01)

/* Modifying RDAREA attributes */
alter rdarea PDBUSER01 open attribute SCHEDULE ;
alter rdarea PDBULOB11 open attribute SCHEDULE ;

Explanation

This command changes the RDAREAs' (PDBUSER01 and PDBULOB11) open timing to SCHEDULE.

7.9.3 Control statement (alter rdarea statement)

This section explains the operands of the alter rdarea statement. In the following table, each number corresponds to the number assigned to each operand.

No. | Operand
1 | alter rdarea RDAREA-name
2 | open attribute {INITIAL|DEFER|SCHEDULE}]
3 | [extension {use extension-segments-count segments|nouse}]
| ;

Organization of this subsection

(1) RDAREA-name <identifier> ((1-30))

(2) open attribute {INITIAL|DEFER|SCHEDULE}

(3) extension {use extension-segments-count segments|nouse}

(1) RDAREA-name <identifier> ((1-30))

Specifies the name of the RDAREA whose open timing is to be changed. ALL cannot be specified for RDAREA-name. If the RDAREA name is enclosed in double quotation marks ("), it is handled as case sensitive; otherwise, it is handled as all uppercase letters. An RDAREA name must be enclosed in double quotation marks if it includes a blank.

(2) open attribute {INITIAL|DEFER|SCHEDULE}

Specifies the RDAREA open timing.

Criteria

Normally, specify INITIAL unless some special operation mode is used.

To reduce the HiRDB startup time when there are many RDAREAs, specify DEFER.

Rules

This operand takes effect only when Y is specified in the pd_rdarea_open_attribute_use operand in the system common definitions.

This operand is applicable to user RDAREAs, user LOB RDAREAs, and list RDAREAs. This operand is ignored if specified for any other type of RDAREA (the RDAREA open timing for all other RDAREA types is INITIAL).

When this operand is omitted, the system assumes the value existing before the RDAREA attributes were modified.

The value of this operand takes effect at the next startup, regardless of the HiRDB startup mode.

If the HiRDB file system area assigned to the corresponding RDAREA is shared by other RDAREAs, all such RDAREAs must have the same open timing. Otherwise, an expected result may not be obtained from the RDAREAs sharing the HiRDB file system area.

INITIAL

The RDAREA's HiRDB file system area is to be opened at the time of system startup and the RDAREA information is to be made resident in memory; thus, high-speed operation is available from the first SQL.

Rules

The RDAREA's initial status at system startup is open and remains unchanged until an operation command is executed, unless it is placed in error shutdown status due to an error.

The INITIAL open attribute does not permit access to a closed RDAREA.

DEFER

The RDAREA's HiRDB file system area is not to be opened at the time of system startup; rather, it is to be opened and its RDAREA information is to be made resident in memory the first time an RDAREA in the HiRDB file system area is accessed. Thus, high-speed operation is available beginning with the second access to the HiRDB file system area.

Rules

The RDAREA's initial status at system startup is closed and changes to open the first time an RDAREA in its HiRDB file system area is accessed. The HiRDB file system area's RDAREAs remain in open status thereafter until an operation command is executed, unless they are placed in error shutdown status due to an error.

The DEFER open attribute permits access to a closed RDAREA.

SCHEDULE

The RDAREA's HiRDB file system area is not to be opened at the time of system startup; rather, it is to be opened and the RDAREA information is to be made resident in memory the first time an RDAREA in the HiRDB file system area is accessed from within a transaction. When this attribute is used, transaction workload increases because a HiRDB file system area opened by a transaction is closed when the transaction terminates, and open processing must be performed on the HiRDB file system area the first time each transaction accesses one of its RDAREAs.

Rules

The RDAREA's initial status at system startup is closed and changes to open when the RDAREA is first accessed by a transaction. When the transaction is terminated, all the RDAREAs opened by it are closed. You can use the pdopen command to keep RDAREAs in open status until they are placed in shutdown close status. You can also use other operation commands to change the RDAREA status. However, if an error is detected, RDAREAs are placed in error shutdown status.

The SCHEDULE open attribute permits access to a closed RDAREA.

(3) extension {use extension-segments-count segments|nouse}

Specifies whether or not to apply automatic extension to the RDAREA for which attributes are being modified. When this operand is omitted, the value existing before attribute modification takes effect.

Automatic extension of RDAREA is a facility that extends automatically an RDAREA in the event of a shortage of RDAREA space if there is enough space in the HiRDB file system area. If you use this facility for an RDAREA and a shortage of unused segments occurs, the system allocates new unused segments to the RDAREA. These new unused segments are added at the end of the HiRDB file constituting the RDAREA.

Prerequisites

You need to specify the -e option (specifying the number of extensions) for the HiRDB file system area containing the RDAREA.

There must be enough space in the HiRDB file system area that contains the last HiRDB file constituting the RDAREA.

use extension-segments-count segments

Specifies that automatic extension of RDAREA is to be applied.

The automatic extension of RDAREA is applicable to data dictionary RDAREAs, data dictionary LOB RDAREAs, user RDAREAs, and user LOB RDAREAs. For any other type of RDAREA, the system assumes nouse, even if use is specified.

For an RDAREA other than a LOB RDAREA, automatic extension occurs when there are no more used free segments or used segments. For a LOB RDAREA, automatic extension occurs when there are no more unused segments.

extension-segments-count <unsigned integer> ((1-64000))

Specifies the number of extension segments.

The maximum number of HiRDB file extensions is 24. If this value is exceeded, an error occurs. The maximum number of extensions per HiRDB file system area is determined by the value specified when the HiRDB file system area is created. Therefore, you need to define the maximum number of extensions taking into account the number of files in the HiRDB file system area and the frequency of extension.

nouse

Specifies that automatic extension of RDAREA is not to be applied.

Notes

If allocation of unused segments fails due to a shortage of space in the HiRDB file system area, either extend or re-initialize the RDAREA or use the database reorganization utility to reorganize the table.

If the number of extensions exceeds the maximum value, integrate the extensions in the HiRDB file system area containing the RDAREA or add an HiRDB file in another HiRDB file system area to the RDAREA.
To integrate extensions, make a backup copy with pdfbkup, initialize the HiRDB file system area with pdfmkfs, then restore the HiRDB file system area from its backup copy using pdfrstr.

The last file is locked from the beginning to the end of the automatic extension process.

7.10 Changing an RDAREA from a HiRDB/Single Server structure to a HiRDB/Parallel Server structure

Organization of this section

7.10.1 Function

7.10.2 Example

7.10.3 Control statement (alter HiRDB mode to parallel statement)

7.10.4 Notes

7.10.1 Function

When a HiRDB system is converted from a HiRDB/Single Server to a HiRDB/Parallel Server, this function changes the RDAREAs in the HiRDB/Single Server structure to RDAREAs in the HiRDB/Parallel Server structure.

All RDAREAs are changed as follows:

Master directory, data directory, data dictionary, and data dictionary LOB RDAREAs become data dictionary server RDAREAs in the HiRDB/Parallel Server

User, user LOB, and list RDAREAs become back-end server RDAREAs in the HiRDB/Parallel Server

Figure 7-9 provides an overview of the use of the database structure modification utility (pdmod) to change RDAREAs from a HiRDB/Single Server structure to a HiRDB/Parallel Server structure.

Figure 7-9 Overview of database structure modification utility (pdmod): changing from HiRDB/Single Server structure to HiRDB/Parallel Server structure

7.10.2 Example

This section presents an example of using the database structure modification utility (changing an RDAREA from a HiRDB/Single Server structure to a HiRDB/Parallel Server structure).

Organization of this subsection

(1) Changing RDAREAs from a HiRDB/Single Server structure to a HiRDB/Parallel Server structure

(1) Changing RDAREAs from a HiRDB/Single Server structure to a HiRDB/Parallel Server structure

This example changes the following RDAREAs from a HiRDB/Single Server structure to a HiRDB/Parallel Server structure:

PDBMAST

PDBDDIR

PDBDDIC

PDBDICL1

PDBDICL2

PDBUSER01

PDBUSER02

PDBULOB01

PDBLIST01

Overview

Contents of the control statement file (/usr/seifile/mofl05)

/* Changing RDAREAs from a HiRDB/Single Server structure to a HiRDB/Parallel Server structure */
alter HiRDB mode to parallel
        dictionary server name dic1   ...............1
        server name bes1 others ;   .................2

Explanation

Name of the dictionary server after reconfiguration

Name of the back-end server after reconfiguration

7.10.3 Control statement (alter HiRDB mode to parallel statement)

This section explains the operands of the alter HiRDB mode to parallel statement. In the following table, each number corresponds to the number assigned to each operand.

No. | Operand
| alter HiRDB mode to parallel
1 | dictionary server name server-name
2 | server name server-name
3 | {RDAREA-name[,RDAREA-name]...| others}
| [server name server-name
| {RDAREA-name[,RDAREA-name]...| others}]...
| ;

Organization of this subsection

(1) dictionary server name server-name <identifier> ((1-8))

(2) server name server-name <identifier> ((1-8))

(3) {RDAREA-name[,RDAREA-name]... |others}

(1) dictionary server name server-name <identifier> ((1-8))

Specifies the name of the dictionary server after the RDAREAs are changed from a HiRDB/Single Server to a HiRDB/Parallel Server. Master directory, data directory, data dictionary, and data dictionary LOB RDAREAs are placed in the specified dictionary server.

(2) server name server-name <identifier> ((1-8))

Specifies the name of the back-end server after the RDAREAs are changed from a HiRDB/Single Server to a HiRDB/Parallel Server. User, user LOB, and list RDAREAs are placed in the specified back-end server.

(3) {RDAREA-name[,RDAREA-name]... |others}

RDAREA-name[,RDAREA-name]...<identifier> ((1-30))

Specifies the names of the RDAREAs to be allocated to the specified back-end server. ALL cannot be specified as an RDAREA name. If an RDAREA name is enclosed in double quotation marks ("), it is handled as case sensitive; otherwise, it is handled as all uppercase letters. An RDAREA name must be enclosed in double quotation marks if it includes a blank.

others

Specifies that all RDAREAs are to be allocated to the specified back-end server.

7.10.4 Notes

After changing RDAREAs from HiRDB/Single Server structure to HiRDB/Parallel Server structure, be sure to terminate the HiRDB/Single Server normally.

If you partition a row-partitioned table into multiple back-end servers, the system does not partition its non-partitioning key indexes, resulting in a mismatch in the non-partitioning key indexes when the HiRDB/Parallel Server is started. Therefore, redefine such non-partitioning key indexes so that they are partitioned into multiple back-end servers.

If you are placing a dictionary server in another (added) server machine after migrating from HiRDB/Single Server to HiRDB/Parallel Server, move the master directory RDAREAs, data directory RDAREAs, data dictionary RDAREAs, data dictionary LOB RDAREAs, registry RDAREAs, and registry LOB RDAREAs to the server machine where the dictionary server is located before starting the HiRDB/Parallel Server.

If you are changing the server structure specifying RDAREAs, and the RDAREA for the table is different from the RDAREA for the table's indexes, place each RDAREA in the same server machine. However, you should delete a non-partitioned index of a row-partitioned table beforehand.

If a stored procedure or a user-defined stored function is registered, all such stored procedures and user-defined stored functions become disabled after the migration. For any stored procedures or user-defined stored functions that have been disabled after the migration, you need to re-create all SQL objects by starting the HiRDB/Parallel Server and executing ALTER PROCEDURE (with ALL specified) or ALTER ROUTINE. For details about ALTER PROCEDURE and ALTER ROUTINE, see the HiRDB Version 8 SQL Reference.

If the registry facility is used, re-register the registry manipulation stored procedure after the migration using the registry facility initialization utility (pdreginit) specifying -k renew. If you are using the following plug-in, re-register the plug-in by executing the pdplgrgst -a command:

HiRDB Image Search Plug in

During the migration, do not change the HiRDB identifier in the system common definition pd_system_id.

If generations of a HiRDB file system area are managed, its RDAREAs cannot be changed from a HiRDB/Single Server to HiRDB/Parallel Server structure (an attempt results in an error).

While shared tables and shared indexes are defined, do not change RDAREAs from a HiRDB/Single Server configuration to a HiRDB/Parallel Server configuration. Before you can change the configuration, you must delete all shared tables and shared indexes defined in HiRDB.

7.11 Registering generation information for a HiRDB file system area (inner replica facility)

Organization of this section

7.11.1 Function

7.11.2 Example

7.11.3 Control statement (create generation statement)

7.11.4 Notes

7.11.1 Function

This function registers in a data dictionary table generation information for a HiRDB file system area, as required for using the inner replica facility.

7.11.2 Example

This section explains an example of using the database structure modification utility (registering the generations of a HiRDB file system area).

Organization of this subsection

(1) Example of registering generation information for a HiRDB file system area

(1) Example of registering generation information for a HiRDB file system area

This example registers generation information for /HiRDB_P/area01_GN1, and /HiRDB_P/area02_GN1 in the replica HiRDB file system area of the original HiRDB file system area /HiRDB_P/area01, and /HiRDB_P/area02.

Command to be executed

pdmod -a /usr/seifile/mofl01

Contents of the control statement file (/usr/seifile/mofl01)

create generation for HiRDB file system area
    "/HiRDB_P/area01_GN1"   ............................................1
    server name bes1   .................................................2
    generation number 1   ..............................................3
    reproduce "/HiRDB_P/area01" ;   ....................................4
create generation for HiRDB file system area
    "/HiRDB_P/area02_GN1"   ............................................1
    server name bes2   .................................................2
    generation number 1   ..............................................3
    reproduce "/HiRDB_P/area02" ;   ....................................4

Explanation

Specifies the name of the replica HiRDB file system area.

Specifies the name of the back-end server that defines the replica HiRDB file system area.

Specifies the generation number used to manage the replica HiRDB file system area.

Specifies the name of the original HiRDB file system area.

7.11.3 Control statement (create generation statement)

This section explains the operands of the create generation statement. In the following table, the number corresponds to the explanation of the operand.

No.
Operand

1

create generation
     for HiRDB file system area "replica-HiRDB-file-system-area-name"

2

     server name server-name

3

     generation number generation-number

4

     reproduce "original-HiRDB-file-system-area-name"

-

 ;

Organization of this subsection

(1) for HiRDB file system area "replica-HiRDB-file-system-area-name"

(2) server name server-name

(3) generation number generation-number

(4) reproduce "original-HiRDB-file-system-area-name"

(1) for HiRDB file system area "replica-HiRDB-file-system-area-name"

<path name> ((1-165))

Specifies the absolute path name of the replica HiRDB file system area to be used for generation management.

Do not include a linefeed character inside the double quotation marks ("). Specify the replica HiRDB file system area name in such a manner that HiRDB-file-system-area-name + HiRDB-file-name become unique in the HiRDB system during the replica RDAREA definition.

(2) server name server-name

<identifier> ((1-8))

Specifies the name of the back-end server that defines the replica HiRDB file system area.

An error results if the specified name is not for a back-end server. For a HiRDB/Single Server, do not specify this operand.

To register a generation for a shared RDAREA, specify the name of the updatable back-end server.

(3) generation number generation-number

<unsigned integer> ((1-10))

Specifies the generation number to be used to manage the replica HiRDB file system area.

(4) reproduce "original-HiRDB-file-system-area-name"

<path name> ((1-165))

Specifies the absolute path name of the original HiRDB file system area for which generations are to be managed.

Do not include a linefeed character inside the double quotation marks (").

7.11.4 Notes

If generation information is registered per each HiRDB file system area but there is no applicable replica and original HiRDB file system areas, a warning message is displayed (without resulting in an error).

You can register a maximum of 10 generations of a HiRDB file system area.

After registering generation information per each HiRDB file system area, use pdcopy to make a backup of the data dictionary RDAREA.

7.12 Deleting generation information for a HiRDB file system area (inner replica facility)

Organization of this section

7.12.1 Function

7.12.2 Example

7.12.3 Control statement (remove generation statement)

7.12.4 Notes

7.12.1 Function

This function deletes unneeded generation information about a HiRDB file system area.

7.12.2 Example

This section explains an example of using the database structure modification utility (deleting generation information for a HiRDB file system area).

Organization of this subsection

(1) Example of deleting generation information for a HiRDB file system area

(1) Example of deleting generation information for a HiRDB file system area

This example deletes generation information for /HiRDB_P/area01_GN1. The example assumes that generation information for /HiRDB_P/area01_GN1 was registered.

Command to be executed

pdmod -a /usr/seifile/mofl01

Contents of the control statement file (/usr/seifile/mofl01)

remove generation for HiRDB file system area
    "/HiRDB_P/area01_GN1"   ..........................1
    server name bes1 ;   .............................2

Explanation

Specifies the name of a replica HiRDB file system area in order to delete its generation information.

Specifies the name of the back-end server from which the replica HiRDB file system area is to be deleted.

7.12.3 Control statement (remove generation statement)

This section explains the operands of the remove generation statement. In the following table, the number corresponds to the explanation of the operand.

No.
Operand

1

remove generation
     for HiRDB file system area "replica-HiRDB-file-system-area-name"

2

     server name server-name

-

 ;

Organization of this subsection

(1) for HiRDB file system area "replica-HiRDB-file-system-area-name"

(2) server name server-name

(1) for HiRDB file system area "replica-HiRDB-file-system-area-name"

<path name> ((1-165))

Specifies the absolute path name of the replica HiRDB file system area whose generation information is to be deleted.

Do not include a linefeed character inside the double quotation marks (").

(2) server name server-name

<identifier> ((1-8))

Specifies the name of the back-end server from which the replica HiRDB file system area is to be deleted.

An error results if the specified name is not for a back-end server. For a HiRDB/Single Server, do not specify this operand.

7.12.4 Notes

When generation information for a HiRDB file system area is deleted, the utility does not delete the HiRDB file system area itself; only its generation information is deleted.

If a replica RDAREA has been defined in a HiRDB file system area, the generation information for that HiRDB file system area cannot be deleted.

The generation information cannot be deleted for any original HiRDB file system area. Generation information for an original HiRDB file system area is deleted when the generation information for all its replica HiRDB file system areas has been deleted.

After deleting generation information for a HiRDB file system area, use pdcopy to make a backup of the data dictionary RDAREA.

7.13 RDAREA replica definition (inner replica facility)

Organization of this section

7.13.1 Function

7.13.2 Example

7.13.3 Control statement (replicate rdarea statement)

7.13.4 Notes

7.13.1 Function

This function defines replicas of an existing RDAREA. By defining a replica RDAREA, you can use the inner replica facility.

Prerequisites

You can define a replica RDAREA without the entity of the replica HiRDB file system area as long as its generation information has been registered in the data dictionary table.

When you define a replica RDAREA, we recommend that you place the original RDAREA in command shutdown and closed status.

When you define a replica RDAREA, make sure that the total numbers of RDAREAs and HiRDB files do not exceed the maximum number of RDAREAs (pd_max_rdarea_no) and the maximum number of HiRDB files constituting the RDAREAs (pd_max_file_no) specified in the system common definition. If this value is exceeded, you must use the pdchgconf command to change the system common definition or terminate the HiRDB system normally and then change the system common definition.

If the original RDAREA for which a replica is to be defined is a shared RDAREA, the system assumes that a replica has been defined for the RDAREA at every back-end server (even if a replica definition has not been specified for a back-end server, the system assumes that a replica has been defined). If the maximum permissible number of RDAREAs or maximum permissible number of HiRDB files constituting RDAREAs is exceeded at any back-end server, the replica definition cannot be specified for the shared RDAREA at all.

When you define a replica RDAREA, make sure that the total number of original RDAREAs does not exceed the maximum inner replicas (pd_max_replica_control) specified in the system common definition. If this value is exceeded, you must use the pdchgconf command to change the system common definition or terminate the HiRDB system normally and then change the system common definition.

If the original RDAREA for which a replica is to be defined is a shared RDAREA, the system assumes that a replica has been defined at every back-end server (even if no replica definition has been specified for a back-end server, the system assumes that a replica has been defined). If the maximum permissible number of inner replicas is exceeded at any of the back-end servers, the replica definition cannot be specified for the shared RDAREA at all.

If you are using mirror files that apply the logical volume function to replica RDAREAs, the RDAREA open timing must be set to SCHEDULE.

7.13.2 Example

This section explains an example of using the database structure modification utility (defining replica RDAREAs).

Organization of this subsection

(1) Example of defining replica RDAREAs

(1) Example of defining replica RDAREAs

This example defines replica RDAREAs (RD01_GN1 and RD02_GN1) from original RDAREAs (RD01 and RD02).

Command to be executed

pdmod -a /usr/seifile/mofl01

Contents of the control statement file (/usr/seifile/mofl01)

replicate rdarea RD01_GN1   ...........................1
                 globalbuffer gbufrp01   ..............2
                 reproduce RD01   .....................3
                 generation number 1 ;   ..............4
replicate rdarea RD02_GN1   ...........................1
                 globalbuffer gbufrp02   ..............2
                 reproduce RD02   .....................3
                 generation number 1 ;   ..............4

Explanation

Specifies a name for a replica RDAREA.

Specifies the name of the global buffer that is to be allocated temporarily to the replica RDAREA.

Specifies the name of the original RDAREA.

Specifies the generation number of the original RDAREA.

7.13.3 Control statement (replicate rdarea statement)

This section explains the operands of the replicate rdarea statement. In the following table, the number corresponds to the explanation of the operand.

No.
Operand

1

replicate rdarea replica-RDAREA-name

2

     [globalbuffer global-buffer-name]

3

     [lobbuffer LOB-global-buffer-name]

4

     reproduce original-RDAREA-name

5

     generation number generation-number-of-HiRDB-file-system-area

-

 ;

Organization of this subsection

(1) replica-RDAREA-name

(2) globalbuffer global-buffer-name

(3) lobbuffer LOB-global-buffer-name

(4) reproduce original-RDAREA-name

(5) generation number generation-number-of-HiRDB-file-system-area

(1) replica-RDAREA-name

<string of alphanumeric symbols, underscore, and space beginning with an alphabetic symbol> ((1-30))

Specifies a name for the replica RDAREA that is being defined.

You cannot specify ALL for the RDAREA name. The system treats an RDAREA name enclosed in double quotation marks (") as case sensitive; otherwise, the system treats it as all uppercase letters.

(2) globalbuffer global-buffer-name

<string of alphanumeric symbols beginning with an alphabetic symbol> ((1-16))

Specifies the name of a global buffer in the HiRDB system (at the server where the replica definition is to be made, in the case of a HiRDB/Parallel Server) that is to be allocated temporarily to the user RDAREA for which a replica is being defined.

To check the global buffer, use the pdbufls command.

Rules

You cannot specify a global buffer for indexes or LOB RDAREAs.

If you specified the number of global buffer sectors, the size of the specified global buffer must be greater than the page length of the original RDAREA. You can use the pdbufls command to check the global buffer.

A global buffer allocation specified here is ignored the next time HiRDB starts normally. Therefore, you must change the global buffer allocation in the system common definition at the next HiRDB normal startup.

When this operand is omitted, the global buffer allocated to the original RDAREA is also allocated to the replica RDAREA.

If this operand is specified but no global buffer is allocated, the RDAREA replica definition results in an error.

(3) lobbuffer LOB-global-buffer-name

<string of alphanumeric symbols beginning with an alphabetic symbol> ((1-16))

Specifies the name of a global buffer in the HiRDB system (at the server where the replica definition is to be made in the case of a HiRDB/Parallel Server) that is to be allocated temporarily to the LOB RDAREA for which a replica is being defined.

To check the global buffer, use the pdbufls command.

Rules

You cannot specify a global buffer for user RDAREAs or index RDAREAs.

The size of the specified global buffer must be greater than the page length of the original RDAREA. You can use the pdbufls command to check the global buffer.

The global buffer allocation specified here is ignored the next time HiRDB starts normally. Therefore, you must change the global buffer allocation in the system common definition at the next HiRDB normal startup.

When this operand is omitted, the LOB global buffer allocated to the original RDAREA is also allocated to the replica RDAREA. If no LOB global buffer has been allocated to the original RDAREA, no LOB global buffer is allocated to the replica RDAREA.

If this operand is specified but no LOB global buffer is allocated, the RDAREA replica definition results in an error.

You can specify this operand for replica definition for LOB RDAREAs. An error results if this operand is specified for replica definition for user RDAREAs.

(4) reproduce original-RDAREA-name

<string of alphanumeric symbols, underscore, and space beginning with an alphabetic symbol> ((1-30))

Specifies the name of the original RDAREA for which a replica is being defined.

The system treats an RDAREA name enclosed in double quotation marks (") as case sensitive; otherwise, the system treats it as all uppercase letters.

(5) generation number generation-number-of-HiRDB-file-system-area

<unsigned integer> ((1-10))

Specifies the generation number of the HiRDB file system area of the original RDAREA.

An error results if the registered generation number does not correspond to the HiRDB file system area of the HiRDB files that constitute the original RDAREA.

7.13.4 Notes

After RDAREA replica definition is completed, the replica RDAREA is placed in closed and command shutdown status. To use the replica RDAREA, you must place it in shutdown-release and open status. To do this, you need a replica HiRDB file system area; therefore, provide the entity of the replica HiRDB file system area before placing the replica RDAREA in shutdown release and open status.

After RDAREA replica definition is completed, the replica status of the replica RDAREA is set to sub-RDAREA. To set it to the current RDAREA, place the RDAREA in shutdown-release and open status, and then use the pddbchg command to change it to the current RDAREA.

After defining a replica RDAREA, use pdcopy to make a backup of the master directory and data dictionary RDAREAs.

After RDAREA replica definition is completed, the replica RDAREA usage privilege is set to neutral (the status in which there is no data in the replica RDAREA in the data dictionary's SQL_RDAREA_PRIVILEGES table).

You cannot define a replica of a RDAREA that contains a falsification prevented table.

7.14 Copying RDAREA configuration information (inner replica facility)

Organization of this section

7.14.1 Function

7.14.2 Example

7.14.3 Control statement (define copy rdarea statement)

7.14.4 Notes

7.14.1 Function

In an environment that uses the inner replica facility, if consistency is lost between the definitions of the HiRDB files constituting an RDAREA and the entity for the following reasons, this function enables you to copy the configuration information for the entity.

An RDAREA was expanded or re-initialized, and then the entity was adjusted in an environment in which the number of component files, the page length, the segment size, or the number of segments does not match in the inner replica group.

There was inconsistency in the configuration information between the original and replica RDAREAs, but another replica RDAREA was defined on the basis of the replica RDAREA structure files (in this case, the configuration information is based on the original RDAREA definitions).

Prerequisites

To copy configuration information for an RDAREA, the target RDAREA must be in command shutdown and closed status. If the target RDAREA is a shared RDAREA, it must be in command shutdown and closed status at all back-end servers.

When copying the configuration information for an RDAREA, make sure that the number of the HiRDB files constituting the RDAREAs does not exceed the specified maximum value (pd_max_file_no). If this value is exceeded, you must use the pdchgconf command to change the system common definition or terminate the HiRDB system normally and then change the system common definition.

When configuration information is copied for a shared RDAREA, the system assumes that the configuration information has been copied for that RDAREA at every back-end server (even if configuration information has not been copied for a back-end server, the system assumes that the configuration information has been copied). If the maximum permissible number of HiRDB files constituting RDAREAs is exceeded at any of the back-end servers, the configuration information cannot be copied for the shared RDAREA at all.

7.14.2 Example

This section explains an example of using the database structure modification utility (copying configuration information for an RDAREA).

Organization of this subsection

(1) Copying the configuration information for an RDAREA

(1) Copying the configuration information for an RDAREA

This example copies configuration information from the original RDAREA (RD01) to replica RDAREA (RD01_GN1).

Command to be executed

pdmod -a /usr/seifile/mofl01

Contents of the control statement file (/usr/seifile/mofl01)

define copy rdarea RD01_GN1   ................1
       reproduce RD01 ;   ....................2

Explanation

Specifies the name of the source RDAREA.

Specifies the name of the target RDAREA.

7.14.3 Control statement (define copy rdarea statement)

This section explains the operands of the define copy rdarea statement. In the following table, the number corresponds to the explanation of the operand.

No.
Operand

1

define copy rdarea target-RDAREA-name

2

     [globalbuffer global-buffer-name]

3

     [lobbuffer LOB-global-buffer-name]

4

     reproduce source-RDAREA-name

-

 ;

Organization of this subsection

(1) target-RDAREA-name

(2) globalbuffer global-buffer-name

(3) lobbuffer LOB-global-buffer-name

(4) reproduce source-RDAREA-name

(1) target-RDAREA-name

<string of alphanumeric symbols, underscore, and space beginning with an alphabetic symbol> ((1-30))

Specifies the name of the target RDAREA to which the configuration information is to be copied.

The system treats an RDAREA name enclosed in double quotation marks (") as case sensitive; otherwise, the system treats it as all uppercase letters.

(2) globalbuffer global-buffer-name

<string of alphanumeric symbols beginning with an alphabetic symbol> ((1-16))

Specifies the name of the global buffer in the HiRDB system (in the server used to copy the configuration information in the case of a HiRDB/Parallel Server) that is to be allocated to the target RDAREA.

To check the global buffer, use the pdbufls command.

Rules

You cannot specify a global buffer for index or LOB RDAREAs.

If you specified the number of global buffer sectors, the size of the specified global buffer must be greater than the page length of the source RDAREA. You can use the pdbufls command to check the global buffer.

The global buffer allocation specified here is ignored the next time HiRDB starts normally. Therefore, you must change the global buffer allocation in the system common definition at the next HiRDB normal startup.

When this operand is omitted, the utility allocates the global buffer that was allocated before the configuration information was copied.

If this operand is specified but no global buffer is allocated, copying of the RDAREA configuration information results in an error.

(3) lobbuffer LOB-global-buffer-name

<string of alphanumeric symbols beginning with an alphabetic symbol> ((1-16))

Specifies the name of the global buffer in the HiRDB system (in the server used to copy configuration information in the case of a HiRDB/Parallel Server) that is to be allocated to the target LOB RDAREA.

To check the global buffer, use the pdbufls command.

Rules

You cannot specify a global buffer for user RDAREAs or index RDAREAs.

The size of the specified global buffer must be greater than the page length of the source RDAREA. You can use the pdbufls command to check the global buffer.

The global buffer allocation specified here is ignored the next time HiRDB starts normally. Therefore, you must change the global buffer allocation in the system common definition at the next HiRDB normal startup.

When this operand is omitted, the utility allocates the LOB global buffer that was allocated before the configuration information was copied. Note that no LOB global buffer is allocated if no LOB global buffer had been allocated before the configuration information was copied.

If this operand is specified but no LOB global buffer is allocated, copying of the RDAREA configuration information results in an error.

This operand is applicable when LOB RDAREA configuration information is copied. An error results if this operand is specified when RDAREA configuration information for a user RDAREA is copied.

(4) reproduce source-RDAREA-name

<string of alphanumeric symbols, underscore, and space beginning with an alphabetic symbol> ((1-30))

Specifies the name of the source RDAREA from which configuration information is to be copied.

The system treats an RDAREA name enclosed in double quotation marks (") as case sensitive; otherwise, the system treats it as all uppercase letters.

An error results if the registered generation number does not correspond to the HiRDB file system area of the HiRDB files that constitute the source RDAREA.

7.14.4 Notes

After copying RDAREA configuration information, use pdcopy to make a backup of the target RDAREA, master directory RDAREA, and data dictionary RDAREA.

If the specified target and source RDAREAs are the same, the utility does not copy RDAREA configuration information.

If the source RDAREA stores a referenced table, referencing table, or check constraint table, copy the RDAREA configuration information while no table is in check pending status in the source RDAREA and in any RDAREA storing a table that has a reference relationship with the table in the source RDAREA. If any of the applicable tables is in check pending status, use pdconstck to perform integrity checking and then release the check pending status.

7.15 Integrating RDAREAs (inner replica facility)

Organization of this section

7.15.1 Function

7.15.2 Example

7.15.3 Control statement (recast rdarea statement)

7.15.4 Notes

7.15.1 Function

The RDAREA integration function switches an original RDAREA's HiRDB files over to a replica RDAREA's HiRDB files and stops using the inner replica facility.

Prerequisites

You can integrate RDAREAs when there is only one replica RDAREA for the original RDAREA.

To integrate RDAREAs, the original and replica RDAREAs must be in command shutdown and closed status. A shared RDAREA must be in command shutdown and closed status at all back-end servers.

7.15.2 Example

This section explains an example of using the database structure modification utility (integrating RDAREAs).

Organization of this subsection

(1) Integrating RDAREAs

(1) Integrating RDAREAs

This example stops using the inner replica facility.

Command to be executed

pdmod -a /usr/seifile/mofl01

Contents of the control statement file (/usr/seifile/mofl01)

recast rdarea RD01   ................................1
               globalbuffer gbufrp01 ;   ............2
recast rdarea RD02   ................................1
               globalbuffer gbufrp02 ;   ............2

Explanation

Specifies the name of the original RDAREA.

Specifies the name of global buffer that is to replace the current global buffer allocated to the original RDAREA.

7.15.3 Control statement (recast rdarea statement)

This section explains the operands of the recast rdarea statement. In the following table, the number corresponds to the explanation of the operand.

No.
Operand

1

recast rdarea original-RDAREA-name

2

     [globalbuffer global-buffer-name]

3

     [lobbuffer LOB-global-buffer-name]

-

 ;

Organization of this subsection

(1) original-RDAREA-name

(2) globalbuffer global-buffer-name

(3) lobbuffer LOB-global-buffer-name

(1) original-RDAREA-name

<string of alphanumeric symbols, underscore, and space beginning with an alphabetic symbol> ((1-30))

Specifies the name of the original RDAREA that is to be integrated.

The system treats an RDAREA name enclosed in double quotation marks (") as case sensitive; otherwise, the system treats it as all uppercase letters.

An error results if there is more than one replica RDAREA for the specified original RDAREA.

(2) globalbuffer global-buffer-name

<string of alphanumeric symbols beginning with an alphabetic symbol> ((1-16))

Specifies the name of the global buffer in the HiRDB system (in the server where RDAREAs are integrated in the case of a HiRDB/Parallel Server) that is to be allocated to the original RDAREA that is to be integrated.

To check the global buffer, use the pdbufls command.

Rules

You cannot specify a global buffer for indexes or LOB RDAREAs.

If you specified the number of global buffer sectors, the size of the specified global buffer must be greater than the page length of the replica RDAREA. You can use the pdbufls command to check the global buffer.

The global buffer allocation specified here is ignored the next time HiRDB starts normally. Therefore, you must change the global buffer allocation in the system common definition at the next HiRDB normal startup.

When this operand is omitted, the global buffer for the replica RDAREA existing before RDAREA integration is allocated.

If this operand is specified but no global buffer is allocated, the integration of RDAREAs results in an error.

(3) lobbuffer LOB-global-buffer-name

<string of alphanumeric symbols beginning with an alphabetic symbol> ((1-16))

Specifies the name of the LOB global buffer in the HiRDB system (at the server where RDAREAs are to be integrated in the case of a HiRDB/Parallel Server) that is to be allocated to the original RDAREA that is to be integrated.

To check the global buffer, use the pdbufls command.

Rules

You cannot specify a global buffer for user RDAREAs or index RDAREAs.

The size of the specified global buffer must be greater than the page length of the replica RDAREA. You can use the pdbufls command to check the global buffer.

The global buffer allocation specified here is ignored the next time HiRDB starts normally. Therefore, you must change the global buffer allocation in the system common definition at the next HiRDB normal startup.

When this operand is omitted, the LOB global buffer allocated before RDAREA integration is allocated. Note that a LOB global buffer is not allocated if no LOB global buffer had been allocated before RDAREA integration.

If this operand is specified but no LOB global buffer is allocated, RDAREA integration results in an error.

This operand is applicable to integration of LOB RDAREAs. An error results if the operand is specified when user RDAREAs are integrated.

7.15.4 Notes

After RDAREAs are integrated, the definition of the replica RDAREA is deleted. The HiRDB files for the original RDAREA existing before the integration are also deleted.

After integrating RDAREAs, delete the generation information for the HiRDB file system area from the original RDAREA's HiRDB files.

After integrating RDAREAs, use pdcopy to make a backup of the target RDAREA, master directory RDAREA, and data dictionary RDAREA.

If a replica RDAREA stores a referenced table, referencing table, or check constraint table, integrate RDAREAs while no table is in check pending status in the replica RDAREA and in any RDAREA storing a table that has a reference relationship with the table in the replica RDAREA. If any of the applicable tables is in check pending status, use pdconstck to perform integrity checking and then release the check pending status.

In an RDAREA storing a referencing table or check constraint table, if only the table information in the original RDAREA is in check pending status, that table information is placed in non-check pending status as a result of RDAREA integration, but the data dictionary table is not released from check pending status. When the data dictionary table has not been released from check pending status, use pdconstck to perform integrity checking and then release the data dictionary table from the check pending status.

7.16 Registering an auditor (security audit facility)

Organization of this section

7.16.1 Function

7.16.2 Example

7.16.3 Control statement (create auditor statement)

7.16.4 Notes

7.16.1 Function

For use of the security audit facility, this function registers a user with the audit privilege (auditor) into a HiRDB that is to be subject to security audits. For details about the security audit facility, see the HiRDB Version 8 System Operation Guide.

Prerequisites

You can register only one auditor per HiRDB. If an auditor has already been registered, an attempt to register another auditor results in an error.

For the auditor, specify either a new user or an existing user who does not have the DBA privilege. Registering an existing user who has the DBA privilege results in an error.

When an auditor is registered, a schema is also defined at the same time. Therefore, there is no need to execute CREATE SCHEMA before registering an auditor.

7.16.2 Example

This section explains an example of using the database structure modification utility (registering an auditor).

Organization of this subsection

(1) Registering an auditor

(1) Registering an auditor

Register the authorization identifier HIRAUD as an auditor

Command to be executed

pdmod -a /usr/seifile/mofl01

Contents of the control statement file (/usr/seifile/mofl01)

create auditor for HIRAUD ;   ................................1

Explanation

Registers the authorization identifier HIRAUD as an auditor.

7.16.3 Control statement (create auditor statement)

This section explains the operands of the create auditor statement. In the following table, the number corresponds to the explanation of the operand.

No.
Operand

1

create auditor for authorization identifier

-

 ;

Organization of this subsection

(1) authorization-identifier

(1) authorization-identifier

<string of alphanumeric symbols beginning with an alphabetic symbol> ((1-8))

Specifies the authorization identifier of the user who is to be registered as the auditor.

You must specify in this operand the authorization identifier of either a new user or an existing user who does not have the DBA privilege. Specifying a user who has the DBA privilege or a user who is in password-invalid account lock status results in an error.

To treat the authorization identifier as being case sensitive, enclose the entire authorization identifier in double quotation marks ("). If the authorization identifier is not enclosed in double quotation marks, it is treated as being all uppercase letters.

7.16.4 Notes

If you register a new user as the auditor, that user's authorization identifier is used as the password immediately after registration. If you register an existing user as the auditor and no password is set for that user, that user's authorization identifier is also used as the password immediately after registration. In either case, use the GRANT statement to change the password.

If you register a new user as the auditor while the Directory Server linkage facility is being used, you also need to register the user in the Directory Server.

7.17 Creating an audit trail table (security audit facility)

Organization of this section

7.17.1 Function

7.17.2 Example

7.17.3 Control statement (create audit table statement)

7.17.1 Function

This function creates the audit trail table that is required in order to use the security audit facility.

Prerequisites

Before creating an audit trail table, you must register an auditor.

You can create one audit trail table per HiRDB. If an audit trail table has already been created, an attempt to create another one will result in an error.

For the RDAREA that will store the audit trail table, you must specify a user RDAREA that can be accessed only by the auditor. An error results if you specify a shared RDAREA, public user RDAREA, or RDAREA that can be accessed by a user who is not the auditor.

7.17.2 Example

This section explains an example of using the database structure modification utility (creating an audit trail table).

Organization of this subsection

(1) Creating an audit trail table

(1) Creating an audit trail table

This example creates the audit trail table SQL_AUDIT_TRAIL in the RDAREA RD00AUD.

Command to be executed

pdmod -a /usr/seifile/mofl01

Contents of the control statement file (/usr/seifile/mofl01)

create audit table SQL_AUDIT_TRAIL   ...............................1
                 in RD00AUD ;   ....................................2

Explanation

Creates the audit trail table SQL_AUDIT_TRAIL.

Creates the audit trail table in the RDAREA RD00AUD.

7.17.3 Control statement (create audit table statement)

This section explains the operands of the create audit table statement. In the following table, the number corresponds to the explanation of the operand.

No.
Operand

1

create audit table [table-identifier]

2

       in RDAREA-name

-

 ;

Organization of this subsection

(1) table-identifier

(2) RDAREA-name

(1) table-identifier

<identifier> ((1-30)) <<SQL_AUDIT_TRAIL>>

Specifies a table identifier for the audit trail table. If this information is omitted, SQL_AUDIT_TRAIL is assumed.

To treat the table identifier as being case sensitive, enclose the entire identifier in double quotation marks ("). If the identifier is not enclosed in double quotation marks, it is treated as being all uppercase letters.

You cannot specify in as the table identifier.

(2) RDAREA-name

<string of alphanumeric symbols, underscore, and space beginning with an alphabetic symbol> ((1-30))

Specifies the name of the RDAREA (user RDAREA) that is to store the audit trail table. This RDAREA must be accessible only by the auditor. An error results if the specified RDAREA can be accessed by a user who is not the auditor.

To treat the RDAREA name as being case sensitive, enclose the entire name in double quotation marks ("). If the name is not enclosed in double quotation marks, it is treated as being all uppercase letters.

7.18 Rules and notes

Organization of this section

(1) Rules

(2) Notes

(1) Rules

(a) Utility execution

The database structure modification utility (pdmod) can be executed only when HiRDB is running.

The database structure modification utility (pdmod) should be executed on a server machine where the single-server or the system manager is located.

To use pdmod, we recommend that you specify $PDDIR/bin/pdmod (specifying pdmod alone may execute another program product's command with the same name).

If you use Real Time SAN Replication based on the log-only synchronous method and execute pdmod at the transaction execution site, you must perform the preparations for log application. For details about the preparations for log application, see the manual HiRDB Version 8 Disaster Recovery System Configuration and Operation Guide.

(b) Control statements

Multiple control statements can be specified simultaneously. The database structure modification utility completes processing at each control statement. Should any control statement cause an error, the database structure modification utility continues with the processing by skipping that statement. The control statements that have been executed successfully are not rolled back, even when other control statements produced errors. Therefore, if an error occurs in the database structure modification utility, resolve the error based on standard error output and messages that are output to the message log, and re-execute only those control statements that caused an error.

A comment can be provided in a control statement by enclosing it with a slash-asterisk (/*) and an asterisk-slash (*/).

If you selected utf-8 as the character encoding in the pdsetup command, you can use a control statements file that contains a BOM. However, only ASCII characters are permitted for comments in the control statements file. If character encoding other than ASCII is used, pdinit may not function correctly.

(2) Notes

(a) Utility execution results

The results of execution of the database structure modification utility can be verified by the following methods:

pddbls command (with -r ALL -a specification)

Retrieving the dictionary table

Executing the database condition analysis utility

(b) In the event a HiRDB file system area is corrupted

If the execution of the database structure modification utility is interrupted due to a power failure or the kill command, in some cases the HiRDB file system area can be damaged. If a conflict is detected by executing the pdfls command, use one of the following procedures to perform recovery:

Use the pdfmkfs command to recreate the HiRDB file system area. For each RDAREA, execute the database structure modification utility on the HiRDB files that were stored.

Execute the pdfbkup and pdfrstr commands to back up and restore the HiRDB file system area.

8. Database Reorganization Utility (pdrorg)

This chapter explains the database reorganization utility (pdrorg) for maintaining tables and indexes.

This chapter contains the following sections:

Organization of this chapter

8.1 Overview

8.2 Reorganizing a table

8.3 Unloading a table

8.4 Reloading to a table

8.5 Reorganizing data dictionary tables

8.6 Creating indexes in batch mode

8.7 Re-creating indexes

8.8 Reorganizing indexes

8.9 Command format

8.10 Reorganization using a UOC

8.11 Notes on executing pdrorg on special tables

8.12 Rules and notes

8.13 Database status in the event of an error and recovery method

8.1 Overview

Organization of this section

8.1.1 Functions of pdrorg

8.1.2 Reorganizing a table

8.1.3 Unloading a table

8.1.4 Reloading to a table

8.1.5 Reorganizing a dictionary table

8.1.6 Creating indexes in batch mode

8.1.7 Re-creating an index

8.1.8 Reorganizing an index

8.1.9 Log acquisition mode during execution of pdrorg

8.1.10 RDAREAs containing a table and indexes being processed

8.1.11 Whether or not execution of pdrorg is permitted on a table containing columns of an abstract data type

8.1.12 Executor

8.1.1 Functions of pdrorg

The database reorganization utility (pdrorg) is used to maintain tables and indexes. Table 8-1 lists the use and functions of pdrorg, and Figure 8-1 shows an overview of the functions of pdrorg.

Table 8-1 Use and functions of pdrorg

Classification | Use | pdrorg function
A | B | C | D | E | F | G
Table | Improving table storage efficiency (use pddbst to check) | Y |  |  | Y |  |  |
Message KFPH00212-I or KFPH22017-I issued | Y |  |  | Y |  |  |
Expected search performance not obtained | Y |  |  | Y |  |  |
Migrating data to another table |  | Y | Y |  |  |  |
Modifying table partitioning conditions |  | Y | Y |  |  |  |
Using unload data for pdload's input data file or with a UAP |  | Y |  |  |  |  |
Reorganizing tables for unloading purposes separately from reloading purposes |  | Y | Y |  |  |  |
Index | Specifying -i n during execution of pdload or pdrorg |  |  |  |  | Y |  |
Loading data in units of RDAREAs using pdload on a table with non-partitioned indexes, or reorganizing and reloading data in units of RDAREAs using pdrorg |  |  |  |  | Y |  |
Creating plug-in index in delayed batch creation mode |  |  |  |  | Y |  |
Releasing used free index storage pages that resulted from addition, deletion, or updating of a large amount of data |  |  |  |  |  | Y* | Y*
Reinitializing an RDAREA to which only indexes were stored using pdmod and then restoring the indexes from the RDAREA in the initialized status |  |  |  |  |  | Y |
Creating an index in uncreated status after executing CREATE INDEX specifying EMPTY |  |  |  |  |  | Y |
Re-creating a plug-in index |  |  |  |  |  | Y |
Specifying -i x during the execution of pdload |  |  |  |  |  | Y |

Legend:

A: Reorganize tables.

B: Unload tables.

C: Reload to tables.

D: Reorganize data dictionary tables.

E: Create indexes in batch.

F: Re-create indexes.

G: Reorganize indexes.

Y: pdrorg's function corresponding to the use

* Normally execute index reorganization. Index re-creation involves a data search in the table, but index reorganization does not; therefore, processing speed is faster with index reorganization.

Figure 8-1 Overview of pdrorg functions

Explanation:

Reorganizing table: 1 and 2

Unloading table: 1

Reloading table: 2

Reorganizing data dictionary table: 1 and 2

Creating indexes in batch mode: 5

Re-creating indexes: 3 and 5

Reorganizing indexes: 4 and 5

8.1.2 Reorganizing a table

Organization of this subsection

(1) What is reorganizing a table?

(2) Reorganizing a table with a LOB column

(3) Using a utility special unit

(4) Reorganization with the synchronization point specification

(5) Reorganization using a UOC

(1) What is reorganizing a table?

Repeated data addition and deletion to a table affects the arrangement of rows in a table, resulting in reduced data access and storage efficiency. In this case, you can improve data access and storage efficiency by saving the table data in a file and then storing it back into the table. This is called reorganizing a table.

You can reorganize a table in units of tables or RDAREAs (for a row-partitioned table).

Figure 8-2 shows an overview of table reorganization.

Figure 8-2 Overview of table reorganization

Unload data file
The unload data file is used to temporarily save table data.

Control information file
The control information file contains pdrorg's control statements.
The control statements are used to specify an unload data file, index information, and LOB column information.

(2) Reorganizing a table with a LOB column

If a table contains a LOB column, you can reorganize its LOB column structure base table and LOB column at the same time or separately.

A LOB column structure base table is the part of a table without the LOB column. A LOB column is a column of the BLOB data type.

If you reorganize a LOB column structure base table and the LOB column at the same time, specifying the -j option improves performance. Apply the reorganization with the -j option omitted when you reorganize either a LOB column structure base table or a LOB column.

If an abstract data type provided by a plug-in is stored in a user LOB RDAREA, you can choose to reorganize the abstract data type together with the LOB column structure base table or you can choose to not reorganize the abstract data type.

Figure 8-3 shows the procedure for reorganizing a table with a LOB column.

Figure 8-3 Reorganizing a table with a LOB column

Explanation:

Data for the LOB column structure base table (Columns A and B) is saved to an unload data file.

Data for the LOB column (Column C) is saved to a LOB data unload data file.

By specifying the -g and -j options, you can save both the LOB column structure base table data and the LOB column data to an unload data file.

(3) Using a utility special unit

When reorganizing a table with a HiRDB/Single Server, you can use a utility special unit. You can place an unload data file in the utility special unit. Figure 8-4 shows the procedure for reorganizing a table using a utility special unit.

Figure 8-4 Reorganizing a table using a utility special unit

(4) Reorganization with the synchronization point specification

When a table is reorganized, a transaction is normally settled after all data is reloaded. If the utility terminates abnormally during execution, the transaction rolls back to the start point, in which case you have to re-execute the utility from the beginning.

Reorganization with the synchronization point specification enables you to settle the transaction at every specified number of data items. This reduces the time required for rollback and re-execution in the event of abnormal termination.

Note that reorganization with the synchronization point specification is not applicable to unloading, batch index creation, or reorganization of LOB columns, in which case a transaction is settled when all processing is completed.

To execute reorganization with the synchronization point specification, specify the option statement (with the job operand). Figure 8-5 shows an overview of reorganization with the synchronization point specification.

Figure 8-5 Overview of reorganization with the synchronization point specification

Explanation:

At the first execution, rollback occurs after the occurrence of an error. Rollback is to the point of two million entries because the transaction has settled at that point.

The re-execution skips deletion of existing table data and data storage processing up to the point of two million entries, then stores the remaining data.

(5) Reorganization using a UOC

You can use a user-created program (UOC) for reorganization.

When you use a UOC, you can pass data retrieved from the database to the UOC for editing and then output the result, instead of directly saving the retrieved data to the unload data file.

For example, when a large amount of data is to be deleted, suppose that a UOC is used to check the data retrieved from the database to determine whether or not it is to be output to the unload data file. By reloading data from the resulting unload data, you can delete data in the format obtained immediately after reorganization; that is, when there are no scattered free pages (there are no used free pages). Additionally, by using a UOC for unloading, you can output data in a desired format.

8.1.3 Unloading a table

Organization of this subsection

(1) What is unloading a table?

(2) Migrating data into another table

(3) Modifying table partitioning conditions

(4) Using an unload data file as pdload's input data file or with a UAP

(5) Unloading a table with LOB columns or abstract data type columns provided by a plug-in (LOB attribute)

(6) Unloading a table using a UOC

(7) Using a utility special unit

(1) What is unloading a table?

Table reorganization involves saving the table data into a file and then storing the data from the file back into the table. This process for saving table data in a file is called unloading a table.

You can unload a table in units of tables or RDAREAs (applicable to row-partitioned tables).

Figure 8-6 shows an overview of unloading a table.

Figure 8-6 Overview of unloading a table

Unload data file
The unload data file is used to save table data.

Control information file
The control statement file contains pdrorg's control statements.
The control statements are used to specify an unload data file, LOB column information, etc.

(2) Migrating data into another table

To migrate data into another table, first save the table data to an unload data file and then reload the data from the unload data file into the other table. Note that the target table must have the same attribute (FIX or non-FIX) and column definitions (such as number of columns and their data types) as the source table. However, data migration may still be possible even when their definitions are different if you use pdload's input data file (-W option specified) as the unload data.

Figure 8-7 provides an overview of migrating data to another table.

Figure 8-7 Overview of migrating data into another table

(3) Modifying table partitioning conditions

To modify table partitioning conditions, first save the table data to an unload data file, then modify the table partitioning conditions, and reload the data from the unload data file back into the table.

Figure 8-8 shows an overview of modifying table partitioning conditions.

Figure 8-8 Overview of modifying table partitioning conditions

(4) Using an unload data file as pdload's input data file or with a UAP

To use an unload data file as pdload's input data file or with a UAP, specify the -W option during unload operation.

(5) Unloading a table with LOB columns or abstract data type columns provided by a plug-in (LOB attribute)

As with table reorganization, you can unload a LOB column structure base table and LOB columns at the same time or separately.

(6) Unloading a table using a UOC

For details about unloading tables using a UOC, see 8.1.2 (5) Reorganization using a UOC.

(7) Using a utility special unit

For details about how to use a utility special unit, see Section 8.1.2 Reorganizing a table.

8.1.4 Reloading to a table

Organization of this subsection

(1) What is reloading to a table?

(2) Migrating data into another table

(3) Modifying table partitioning conditions

(4) Reloading to a table with LOB columns or abstract data type columns provided by a plug-in (LOB attribute)

(5) Using a utility special unit

(6) Reloading with the synchronization point specification

(1) What is reloading to a table?

Table reorganization involves saving table data into a file and then storing the data from the file back into the table. The process for storing data from a file back into a table is called reloading a table.

You can reload a table in units of tables or RDAREAs (applicable to row-partitioned tables).

Figure 8-9 shows an overview of reloading a table.

Figure 8-9 Overview of reloading a table

Unload data file
The unload data file is used to save table data.

Control information file
The control statement file contains pdrorg's control statements.
The control statements are used to specify an unload data file, index information, and LOB column information.

(2) Migrating data into another table

For details about how to migrate data into another table, see Section 8.1.3 Unloading a table.

(3) Modifying table partitioning conditions

For details about how to modify table partitioning conditions, see Section 8.1.3 Unloading a table.

(4) Reloading to a table with LOB columns or abstract data type columns provided by a plug-in (LOB attribute)

As with table reorganization, you can reload to a LOB column structure base table and LOB columns at the same time or separately.

(5) Using a utility special unit

For details about how to use a utility special unit, see Section 8.1.2 Reorganizing a table.

(6) Reloading with the synchronization point specification

For details about how to reload with the synchronization point specification, see Section 8.1.2 Reorganizing a table.

8.1.5 Reorganizing a dictionary table

You reorganize a data dictionary table in the same way you reorganize a user-defined table, by placing the data dictionary RDAREAs (including the data dictionary LOB RDAREA, registry RDAREA, and registry LOB RDAREA, if they are defined) in command shutdown status.

You can reorganize a specific data dictionary table or all data dictionary tables.

If a reload operation results in an error during table reorganization, you can re-execute only the reload operation.

8.1.6 Creating indexes in batch mode

You can create an index using an index information file created with pdload, pdrorg, or the plug-in index delayed batch creation facility. This is called batch index creation.

If index reorganization results in an error (applicable when -l a or -l p is specified), you need to execute batch index creation.

You can execute batch index creation in units of indexes or index storage RDAREAs.

Figure 8-10 shows an overview of batch index creation.

Figure 8-10 Batch index creation

Index information file
The index information file contains information about an index that was output by pdload or pdrorg. If the plug-in index delayed batch creation facility is used, this file contains the index information updated by a UAP.

Control information file
The control information file contains pdrorg's control statements.
The control statements are used to specify index information.

8.1.7 Re-creating an index

You can create an index by searching table data and generating index information. This is called index re-creation.

You can re-create an index in units of indexes or index storage RDAREAs.

Figure 8-11 shows an overview of index re-creation.

Figure 8-11 Overview of index re-creation

Index information file
The index information file contains information about an index that was generated by searching table data.

Control statement file
The control statement file contains pdrorg's control statements.
The control statements are used to specify index information.

8.1.8 Reorganizing an index

You can create an index information file by searching index key information and rearranging the index on the basis of that information. This is called index reorganization.

You can reorganize an index in units of indexes or index storage RDAREAs.

Figure 8-12 shows an overview of index reorganization.

Figure 8-12 Overview of index reorganization

Index information file
The index information file contains information about an index that was generated by searching index key information.

Control statement file
The control statement file contains pdrorg's control statements.
The control statements are used to specify index information.

8.1.9 Log acquisition mode during execution of pdrorg

When you execute pdrorg, we recommend that you use pre-update log acquisition (-l p) as the log acquisition mode. The pre-update log acquisition mode is the default.

In the pre-update log acquisition mode, the utility does not acquire a database update log during update processing, thereby reducing the processing time. Compared to when the log acquisition mode is used, you can reduce the utility execution time.

8.1.10 RDAREAs containing a table and indexes being processed

To avoid a UAP accessing a table and an index from unnecessarily being placed in wait status, you should use the pdhold command to shut down the RDAREAs that contain the table and index being processed.

8.1.11 Whether or not execution of pdrorg is permitted on a table containing columns of an abstract data type

This section describes the pdrorg functions that can be executed on a table containing an abstract data type. Table 8-2 shows whether or not execution of pdrorg functions is permitted on a table containing an abstract data type.

Table 8-2 Whether or not execution of pdrorg functions is permitted on a table containing an abstract data type

Function
Condition
Executability

Table reorganization (-k rorg, unld, and reld)
Abstract data type provided by plug-in
No LOB attribute
Y

With LOB attribute
Only LOB column structure base table
Y

Concurrently (-j option specified)
Y¹

Only LOB columns
NE

User-defined abstract data type
NE

Index creation (-k ixmk and ixrc)
Plug-in index created from the index type provided by plug-in
Y

Index of user-defined abstract data type
NE

Index reorganization (-k ixor)

NE

Reloading to another table (tblname statement)
Modifying table partitioning conditions
Abstract data type provided by plug-in
Y²

User-defined abstract data type
NE

Creation of input data file for pdload (-W option)
Abstract data type provided by plug-in
Y³

User-defined abstract data type
NE

Y: Executable.

NE: Not executable.

: No condition.

¹ Executable only for an abstract data type provided by a plug-in with the unload facility.

² With some plug-ins, the function is not executable unless you specify the constructor parameter reverse creation function. For details about the function name to be specified, see the applicable plug-in documentation.

³ With some plug-ins, the function is executable only when the constructor parameter reverse creation function is specified. For details about the function name to be specified , see the applicable plug-in documentation.

8.1.12 Executor

The following table describes the privileges required in order to execute each function of pdrorg:

pdrorg function | Table subject to processing
Data dictionary table | User-defined table | Audit trail table
Table reorganization | DBA privilege | SELECT, INSERT, and DELETE privileges or DBA privilege | SELECT, INSERT, and DELETE privileges
Table unloading | DBA privilege | SELECT or DBA privilege | SELECT privilege
Table reloading | N | INSERT, DELETE, or DBA privilege | INSERT and DELETE privileges
Reorganization, unloading, and reloading in units of schemas | N | DBA privilege or schema's owner | Audit privilege
Batch index creation | N | No privilege required | No privilege required
Index re-creation | N | No privilege required | No privilege required
Index reorganization | N | No privilege required | No privilege required

N: Cannot be executed.

Note

When the Directory Server linkage facility is used, the executor must have as its role the indicated privilege as a pdrorg executor.

8.2 Reorganizing a table

Organization of this section

8.2.1 Examples

8.2.2 Cross-reference by purpose

8.2.1 Examples

The section presents examples of using the database reorganization utility (reorganizing a table), listed as follows:

Example
Description
Classification

1
Reorganizing a row-partitioned table in units of tables
S

2
Reorganizing a row-partitioned table in units of RDAREAs
S

3
Reorganizing a table with LOB columns

Reorganizing LOB column structure base tables and LOB columns at the same time

S

4
Reorganizing a table with an abstract data type (SGMLTEXT type)

Reorganizing only the LOB column structure base table

S

5
Reorganizing a row-partitioned table in units of tables
P

6
Reorganizing a table with LOB columns

Reorganizing LOB column structure base tables and LOB columns at the same time

P

7
Reorganizing a table using EasyMT as an unload data file

Using EasyMT for an unload data file

Creating one unload data file at a single server

P

8
Reorganizing tables in units of schemas
P

S: HiRDB/Single Server

P: HiRDB/Parallel Server

Organization of this subsection

(1) Reorganizing a row-partitioned table in units of tables

(2) Reorganizing a row-partitioned table in units of RDAREAs

(3) Reorganizing a table with LOB columns

(4) Reorganizing a table with an abstract data type

(5) Reorganizing a row-partitioned table in units of tables

(6) Reorganizing a table with LOB columns

(7) Reorganizing a table using EasyMT as an unload data file

(8) Reorganizing tables in units of schemas

(1) Reorganizing a row-partitioned table in units of tables

Example 1

This example reorganizes a row-partitioned table (TABLE1) in units of tables.

The example assumes that the table (TABLE1) and indexes are defined as follows:

Table definition:

CREATE TABLE TABLE1(C1 INT NOT NULL,C2 CHAR(8),C3 INT)
      IN ((PDBUSER01) C1 > 10,(PDBUSER02))

Index definition (partitioning key index):

CREATE INDEX INDEX1 ON TABLE1(C1)
      IN ((PDBUSER03),(PDBUSER04))

Index definition (non-partitioning key index):

CREATE INDEX INDEX2 ON TABLE1(C2,C1) IN (PDBUSER05)

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

This example reorganizes the row-partitioned table (TABLE1) in units of tables.

-k rorg: Specification for reorganization

-t TABLE1: Name of the table being reorganized

control_file: Name of the control information file

Contents of the control information file (control_file)

unload /usr/unload_file1                     1
idxwork /usr/idx_file                        2
sort /usr/sortwork,8192                      3

Explanation:

Specifies the unload data file:
/usr/unload_file1: Name of the unload data file

Specifies the directory in which index information files are to be created:
/usr/idx_file: Name of the directory in which index information files are created

Specifies the work directory for sorting:
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

(2) Reorganizing a row-partitioned table in units of RDAREAs

Example 2

This example reorganizes a row-partitioned table (TABLE1) in units of RDAREAs.

The example assumes that the table (TABLE1) and indexes are defined as follows:

Table definition:

CREATE TABLE TABLE1(C1 INT NOT NULL,C2 CHAR(8),C3 INT)
      IN ((PDBUSER01) C1 > 10,(PDBUSER02))

Index definition (partitioning key index):

CREATE INDEX INDEX1 ON TABLE1(C1)
      IN ((PDBUSER03),(PDBUSER04))

Index definition (non-partitioning key index):

CREATE INDEX INDEX2 ON TABLE1(C2,C1) IN (PDBUSER05)

Overview

Relationship between input/output files and RDAREAs

(a) Reorganizing TABLE1 (RDAREA PDBUSER01)

Explanation of the command

This example reorganizes the row-partitioned table (TABLE1) in units of RDAREAs.

-k rorg: Specification for reorganization

-t TABLE1: Name of the table being reorganized

-r PDBUSER01: Name of the RDAREA being reorganized

control_file: Name of the control information file

Contents of the control information file (control_file)

unload /usr/unload_file1                     1
idxwork /usr/idx_file                        2
sort /usr/sortwork,8192                      3

Explanation:

Specifies the unload data file:
/usr/unload_file1: Name of the unload data file

Specifies the directory in which index information files are to be created:
/usr/idx_file: Name of the directory in which index information files are created

Specifies the work directory for sorting:
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

(b) Creating INDEX2

You cannot use INDEX2 as is. To use INDEX2, you need to reorganize RDAREA PDBUSER02 and output index information for PDBUSER02. Create indexes from this index information file and the existing index information file 2 in batch mode by executing pdrorg (specifying -k ixmk).

For details, see Section 8.6 Creating indexes in batch mode.

(3) Reorganizing a table with LOB columns

Example 3

For a table with LOB columns (TABLE2), this example reorganizes its LOB column structure base table and LOB columns at the same time.

The example assumes that the table and index are defined as follows:

Table definition:

CREATE TABLE TABLE2(C1 INT NOT NULL,C2 BLOB IN
            ((LOBUSER01), (LOBUSER02))) IN
            ((PDBUSER01) C1 > 10,(PDBUSER02))

Index definition:

CREATE INDEX INDEX2 ON TABLE2(C1) IN
            ((PDBUSER03),(PDBUSER04))

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

This example reorganizes the table with LOB columns (TABLE2) in units of tables (both LOB column structure base table and LOB columns at the same time).

-k rorg: Specification for reorganization

-t TABLE2: Name of the table being reorganized

control_file: Name of the control information file

Contents of the control information file (control_file)

unload /usr/unload_file1                                   1
index INDEX2 PDBUSER03 /usr/index_inf1                     2
index INDEX2 PDBUSER04 /usr/index_inf2                     2
sort /usr/sortwork,8192                                    3
lobunld /usr/lobunld_file1                                 4

Explanation:

Specifies the unload data file:
/usr/unload_file1: Name of the unload data file

Specifies the index information files to which index information is output:
INDEX2: Index identifier
PDBUSER03, PDBUSER04: Names of the index storage RDAREAs
/usr/index_inf1, /usr/index_inf2: Names of the index information files

Specifies the work directory for sorting:
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

Specifies the LOB data unload file:
/usr/lobunld_file1: Name of the LOB data unload file

(4) Reorganizing a table with an abstract data type

Example 4

This example reorganizes a table (TABLE1) with columns of abstract data type (SGMLTEXT). The abstract data type (SGMLTEXT) is provided by the HiRDB Text Search Plug-in.

The example assumes that the table and index are defined as follows:

Table definition:

CREATE TABLE TABLE1(C1 INT,C2 SGMLTEXT ALLOCATE
         (SGMLTEXT IN LOBUSER01)
         PLUGIN'<DTD>sgml.dtd</DTD>' ) IN PDBUSER01

Plug-in index definition:

CREATE INDEX INDEX1 USING TYPE NGRAM ON TABLE1(C2) IN LOBUSER02

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

This example reorganizes the table (TABLE1).

-k rorg: Specification for reorganization

-t TABLE1: Name of the table being reorganized

control_file: Name of the control information file

Contents of the control information file (control_file)

unload /hd001/unload_file1                                    1
index INDEX1 LOBUSER02 /hd001/ixdir/INDEX1_LOBUSER02          2

Explanation:

Specifies the unload data file:
/hd001/unload_file1: Name of the unload data file

Specifies the index information file:
INDEX1: Index identifier of the plug-in index subject to batch index creation
LOBUSER02: Name of the index storage RDAREA for the plug-in index subject to batch index creation
/hd001/ixdir/INDEX1_LOBUSER02: Name of the index information file

(5) Reorganizing a row-partitioned table in units of tables

Example 5

This example reorganizes a row-partitioned table (TABLE1) in units of tables.

The example assumes that the table and indexes are defined as follows:

Table definition:

CREATE TABLE TABLE1(C1 INT NOT NULL,C2 CHAR(8),C3 INT)
            IN ((PDBUSER01) C1 > 10,(PDBUSER02))

Index definition (partitioning key index):

CREATE INDEX INDEX1 ON TABLE1(C1)
            IN ((PDBUSER03),(PDBUSER05))

Index definition (non-partitioning key index):

CREATE INDEX INDEX2 ON TABLE1(C2,C1)
            IN ((PDBUSER04),(PDBUSER06))

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

This example reorganizes the row-partitioned table (TABLE1) in units of tables.

-k rorg: Specification for reorganization

-t TABLE1: Name of the table being reorganized

control_file: Name of the control information file

Contents of the control information file (control_file)

unload bes1:/usr/unload_file1                     1
idxwork bes1 /usr/idxwork                         2
sort bes1 /usr/sortwork,8192                      3
unload bes2:/usr/unload_file2                     1
idxwork bes2 /usr/idxwork                         2
sort bes2 /usr/sortwork,8192                      3

Explanation:

Specifies the unload data file:
bes1, bes2: Names of the servers containing the unload data files
/usr/unload_file1, /usr/unload_file2: Names of the unload data files

Specifies the directory for index information files to which index information is to be output:
bes1, bes2: Names of the servers used to create index information files
/usr/idxwork: Name of the directory for index information files

Specifies the work directory for sorting:
bes1, bes2: Names of the servers used to create the sort work file
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

(6) Reorganizing a table with LOB columns

Example 6

For a table with LOB columns (TABLE2), this example reorganizes both the LOB column structure base table and LOB columns at the same time.

The example assumes that the table and index are defined as follows:

Table definition:

CREATE TABLE TABLE2(C1 INT NOT NULL,C2 BLOB IN
          ((LOBUSER01), (LOBUSER02))) IN
          ((PDBUSER01) C1 > 10,(PDBUSER02))

Index definition:

CREATE INDEX INDEX2 ON TABLE2(C1) IN
           ((PDBUSER03),(PDBUSER04))

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

This example reorganizes the table with LOB columns (TABLE2) in units of tables (both the LOB column structure base table and LOB columns at the same time).

-k rorg: Specification for reorganization

-t TABLE2: Name of the table being reorganized

control_file: Name of the control information file

Contents of the control information file (control_file)

unload bes1:/usr/unload_file1                              1
unload bes2:/usr/unload_file2                              1
index INDEX2 PDBUSER03 /usr/index_inf1                     2
index INDEX2 PDBUSER04 /usr/index_inf2                     2
sort bes1 /usr/sortwork,8192                               3
sort bes2 /usr/sortwork,8192                               3
lobunld bes1:/usr/lobunld_file1                            4
lobunld bes2:/usr/lobunld_file2                            4

Explanation:

Specifies the unload data file:
bes1, bes2: Names of the servers containing the unload data files
/usr/unload_file1, /usr/unload_file2: Names of the unload data files

Specifies the index information files to which index information is output:
INDEX2: Index identifier
PDBUSER03, PDBUSER04: Names of the index storage RDAREAs
/usr/index_inf1, /usr/index_inf2: Names of the index information files

Specifies the work directory for sorting:
bes1, bes2: Names of the servers used to create the sort work file
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

Specifies the LOB data unload files:
bes1, bes2: Names of the servers containing the LOB data unload files
/usr/lobunld_file1, /usr/lobunld_file2: Names of the LOB data unload files

(7) Reorganizing a table using EasyMT as an unload data file

Example 7

This example reorganizes a row-partitioned table (TABLE1) in units of tables using EasyMT as an unload data file. It creates only one unload data file specifying the -g option.

The example assumes that the table and indexes are defined as follows:

Table definition:

CREATE TABLE TABLE1(C1 INT NOT NULL,C2 CHAR(8),C3 INT)
            IN ((PDBUSER01) C1 > 10,(PDBUSER02))

Index definition (partitioning key index):

CREATE INDEX INDEX1 ON TABLE1(C1)
            IN ((PDBUSER03),(PDBUSER05))

Index definition (non-partitioning key index):

CREATE INDEX INDEX2 ON TABLE1(C2,C1)
            IN ((PDBUSER04),(PDBUSER06))

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

This example reorganizes the row-partitioned table (TABLE1) in units of tables.

-k rorg: Specification for reorganization

-t TABLE1: Name of the table being reorganized

-g: Specification for integrating data into a single unload data file

-f easymt: Specification for using EasyMT as unload data file

control_file: Name of the control information file

Contents of the control information file (control_file)

mtguide use                                                    1
unload fes1:MT01 file=unload_data,vol=(vol001,vol002)          2
idxwork bes1 /usr/idx_file                                     3
idxwork bes2 /usr/idx_file                                     3
sort bes1 /usr/sortwork,8192                                   4
sort bes2 /usr/sortwork,8192                                   4

Explanation:

Specifies EasyMT:
use: Specification for using MTguide

Specifies the unload data file:
fes1: Name of the server used to create unload data file
MT01: Device symbolic name managed by MTguide
unload_data: Name of the MT file
(vol001,vol002): Specification for unloading data to two magnetic tape volumes

Specifies the directory for index information files to which index information is to be output:
bes1, bes2: Names of the servers used to create index information files
/usr/idx_file: Name of the directory in which index information files are created

Specifies the work directory for sorting:
bes1, bes2: Names of the servers used to create sort work file
/usr/sortwork: Name of the directory in which sort work file is created
8192: Size of the buffer for sorting (in KB)

(8) Reorganizing tables in units of schemas

Example 8

This example reorganizes all tables owned by schema USER01, for which the following tables have been defined:

CREATE TABLE TABLE1(C1 INT) IN (BES1R01)
CREATE TABLE TABLE2(C1 BLOB IN LOBUSER01) IN(BES2R01)
CREATE TABLE TABLE3(C1 ADT1) IN(BES3R01)

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

This example reorganizes all tables owned by schema USER01. When reorganizing tables in units of schemas with a HiRDB/Parallel Server, the system assumes the -g and -j options.

-k rorg: Specification for reorganization

-t USER01.all: Specification for all the tables owned by schema USER01

control_file: Name of the control information file

Contents of the control information file (control_file)

unload bes1:/hd001/unload_file1                   1
idxwork bes1 /hd001/idxwork                       2
sort bes1 /hd001/sortwork,8192                    3
idxwork bes2 /hd001/idxwork                       2
sort bes2 /hd001/sortwork,8192                    3
idxwork bes3 /hd001/idxwork                       2
sort bes3 /hd001/sortwork,8192                    3

Explanation:

Specifies the unload data file:
bes1: Name of the server containing the unload data file
/hd001/unload_file1: Name of the unload data file

Specifies the directory for index information files to which index information is to be output:
bes1, bes2, bes3: Names of the servers used to create index information files
/hd001/idxwork: Name of the directory for index information files

Specifies the work directory for sorting:
bes1, bes2, bes3: Names of the servers used to create the sort work file
/hd001/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

8.2.2 Cross-reference by purpose

Required options and control statements depend on the type of reorganization.

The options listed in (1) and the control statements are mandatory. The items in (2) through (4) are related to the options and control statements presented in the Reference column. For details about the options, see Section 8.9.2.

Organization of this subsection

(1) Required items

(2) Information to be specified depending on the attribute of the table being reorganized

(3) Information to be specified depending on the type of unload data file or LOB data unload file

(4) Information to be specified depending on the reorganization method

(1) Required items

Item | Reference
Option | Control statement
Type of pdrorg processing | -k rorg | (1) |  |
Reorganization of a user-defined table (can be omitted because the default is -c user) | -c user | (2) |  |
Name of the table to be reorganized | -t | (3) |  |
File containing the control statements | control-information-filename | (19) |  |
Information about an unload data file |  |  | unload statement | 8.9.4

: Not applicable

(2) Information to be specified depending on the attribute of the table being reorganized

Item | Reference location
Option | Control statement
Indexes are defined | -i | (6) | index statement | 8.9.5
-o | (15) | idxwork statement | 8.9.7
sort statement | 8.9.8
There are LOB columns | -j | (9) | lobunld statement | 8.9.9
There are columns of abstract data type provided by a plug-in (LOB attribute) | -j | (9) | unld_func statement | 8.9.13
reld_func statement | 8.9.14
Consecutive trailing spaces are to be removed from a table with suppress option specified* | -S | (14) |  |
There are constraint definitions |  |  | constraint statement | 8.9.15
Inner replica facility is used | -q | (18) |  |

: Not applicable

* This option helps you reduce the processing time and the size of the unload data file.

(3) Information to be specified depending on the type of unload data file or LOB data unload file

Item | Reference location
Option | Control statement
Integrating data into a single file | -g | (8) |  |
Using EasyMT | -f | (12) | mtguide statement | 8.9.3
emtdef statement | 8.9.3
Using HiRDB files | -f | (12) |  |
Specifying the unload data storage sequence (in order of cluster key, index, or data storage) | -b | (13) |  |

: Not applicable

(4) Information to be specified depending on the reorganization method

Item | Reference location
Option | Control statement
Reorganizing only some of the RDAREAs for a row-partitioned table | -r | (4) |  |
Acquiring or not acquiring database update log | -l | (5) |  |
Specifying synchronization points when reorganizing a large amount of data |  |  | option statement | 8.9.16
Monitoring the execution time of pdrorg |  |  | option statement | 8.9.16
Forcibly restoring the table status to normal |  |  | option statement | 8.9.16
Changing the pdrorg executor's user authorization identifier to a value other than the value of environment variable PDUSER¹ | -u | (10) |  |
Reorganizing in batch input/output mode using local buffer instead of global buffer² | -n | (11) |  |
Changing a reorganization status message output interval to a value other than 100,000 lines | -m | (16) |  |
Monitoring the response time for server-to-server communication | -X | (17) |  |
Using the same space character in the entire table data |  |  | option statement | 8.9.16
Changing the percentage of free space in table and index during reorganization³ |  |  | option statement | 8.9.16
Obtaining tuning information during the execution of pdrorg |  |  | report statement | 8.9.17
Deleting unneeded data during reorganization |  |  | unlduoc statement | 8.9.10

: Not applicable

¹ If omitted, the system assumes the value of the PDUSER environment variable. If the PDUSER environment variable has not been specified, the system assumes the user name in the login window.

² By specifying the number of batch input/output pages, you can reduce the number of I/O operations, because data is input/output in units of specified pages in batch mode.

³ If a space shortage occurs in an RDAREA during execution of pdrorg, you can complete the processing without having to expand the RDAREA temporarily (except for a table or index whose percentage of free space is 0).

8.3 Unloading a table

Organization of this section

8.3.1 Examples

8.3.2 Cross-reference by purpose

8.3.3 Format of database load utility input files

8.3.1 Examples

The section presents examples of using the database reorganization utility (unloading a table), listed as follows:

Example
Description
Classification

1
Unloading a row-partitioned table in units of tables

Using the unload data file as an input data file for pdload

Integrating all data in a single unload data file

P

2
Unloading and reloading a table

After unloading the table, modifying the table partitioning conditions before reloading

3
Unloading and reloading a table

Using unloaded table data to reload another table

4
Unloading and reloading a table with an abstract data type (SGMLTEXT type)

After unloading the table, modifying the table partitioning conditions before reloading

5
Unloading and reloading a table with an abstract data type (SGMLTEXT type)

Using unloaded table data to reload another table

P: HiRDB/Parallel Server

Organization of this subsection

(1) Unloading a row-partitioned table in units of tables

(2) Unloading and reloading a table while modifying the table partitioning conditions

(3) Unloading and reloading to migrate table data into another table

(4) Unloading and reloading while modifying the partitioning conditions of a table with an abstract data type

(5) Unloading and reloading to migrate table data from a table with an abstract data type to another table

(6) Creating an input data file for pdload in fixed-size data format

(1) Unloading a row-partitioned table in units of tables

Example 1

This example unloads a row-partitioned table (TABLE1) in units of tables. It uses the unload data as an input data file (binary format) for pdload. All data is integrated in a single data file.

The example assumes that the following table and indexes have been defined:

Table definition:

CREATE TABLE TABLE1(C1 INT NOT NULL,C2 CHAR(8),C3 INT)
            IN ((PDBUSER01) C1 > 10,(PDBUSER02))

Index definition (partitioning key index):

CREATE INDEX INDEX1 ON TABLE1(C1)
            IN ((PDBUSER03),(PDBUSER05))

Index definition (non-partitioning key index):

CREATE INDEX INDEX2 ON TABLE1(C2,C1)
            IN ((PDBUSER04),(PDBUSER06))

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

This example unloads the row-partitioned table (TABLE1) in units of tables.

-k unld: Specification for unloading

-W bin: Specification for using the unload data file as an input data file (binary format) for pdload

-g: Specification for integrating all data in a single unload data file

-t TABLE1: Name of the table being unloaded

control_file: Name of the control information file

Contents of the control information file (control_file)

unload bes1:/usr/unload_file1                     1

Explanation:

Specifies the unload data file:
bes1: Name of the server containing the unload data file
/usr/unload_file1: Name of the unload data file

(2) Unloading and reloading a table while modifying the table partitioning conditions

Example 2

To modify a table's (TABLE1's) partitioning conditions, this example first unloads the table, modifies the table partitioning conditions, then reloads the table.

The example assumes that the following table and index have been defined:

Table definition:

CREATE TABLE TABLE1(C1 INT NOT NULL,C2 CHAR(8),C3 INT) IN PDBUSER01

Index definition (partitioning key index):

CREATE INDEX INDEX1 ON TABLE1(C1) IN PDBUSER03

Overview

(a) Unloading the table before modifying the table partitioning conditions

Relationship between input/output files and RDAREAs

Explanation of the command

The example unloads the table (TABLE1).

-k unld: Specification for unloading

-t TABLE1: Name of the table being unloaded

-g: Specification for modifying the table partitioning conditions

control_file: Name of the control information file

Contents of the control information file (control_file)

unload bes1:/hd001/unload_file                             1

Explanation:

Specifies the unload data file:
bes1: Name of the server containing the unload data file
/hd001/unload_file: Name of the unload data file

(b) Modifying the table's (TABLE1's) partitioning conditions

First, drop TABLE1 with DROP TABLE. Then, redefine the table's (TABLE1's) partitioning conditions and modify the index definition, shown as follows:

CREATE TABLE TABLE1(C1 INT NOT NULL,
                    C2 CHAR(8),
                    C3 INT)
             IN ((PDBUSER01) C1 > 10,(PDBUSER02))
CREATE INDEX INDEX1 ON TABLE1(C1)
             IN ((PDBUSER03),(PDBUSER04))

(c) Reloading to the table after modifying the partitioning conditions

Relationship between input/output files and RDAREAs

Explanation of the command

The example reloads to the table (TABLE1).

-k reld: Specification for reloading

-t TABLE1: Name of the table being reloaded

-g: Specification for modifying the table partitioning conditions

control_file: Name of the control information file

Contents of the control information file (control_file)

unload bes1:/hd001/unload_file                    1
idxwork bes1 /usr/idxwork                         2
idxwork bes2 /usr/idxwork                         2
sort bes1 /usr/sortwork,8192                      3
sort bes2 /usr/sortwork,8192                      3

Explanation:

Specifies the unload data file:
bes1: Name of the server containing the unload data file
/hd001/unload_file: Name of the unload data file

Specifies the directory for index information files to which index information is to be output:
bes1, bes2: Names of the servers used to create index information files
/usr/idxwork: Name of the directory for index information files

Specifies the work directory for sorting:
bes1, bes2: Names of the servers used to create the sort work file
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

(3) Unloading and reloading to migrate table data into another table

Example 3

This example migrates data from a table (TABLE1) to another table.

The example assumes that the following tables and indexes have been defined:

Source table and index definition:

CREATE TABLE TABLE1(C1 INT NOT NULL,C2 CHAR(8),C3 INT) IN PDBUSER01
CREATE INDEX INDEX1 ON TABLE1(C1) IN PDBUSER03

Target table and index definition:

CREATE TABLE TABLE11(C1 INT NOT NULL,C2 CHAR(8),C3 INT) IN PDBUSER11
CREATE INDEX INDEX11 ON TABLE11(C1) IN PDBUSER13

Overview

(a) Unloading the source table

Relationship between input/output files and RDAREAs

Explanation of the command

The example unloads the table (TABLE1).

-k unld: Specification for unloading

-t TABLE1: Name of the table being unloaded

-g: Specification for migrating data into another table

control_file: Name of the control information file

Contents of the control information file (control_file)

unload bes1:/hd001/unload_file                             1

Explanation:

Specifies the unload data file:
bes1: Name of the server containing the unload data file
/hd001/unload_file: Name of the unload data file

(b) Reloading to the destination table (reloading to another table)

Relationship between input/output files and RDAREAs

Explanation of the command

The example reloads to the table (TABLE11).

-k reld: Specification for reloading

-t TABLE11: Name of the table being reloaded

-g: Specification for migrating data into another table

control_file: Name of the control information file

Contents of the control information file (control_file)

unload bes1:/hd001/unload_file              1
idxwork bes2 /usr/idxwork                   2
sort bes2 /usr/sortwork,8192                3
tblname TABLE1                              4

Explanation:

Specifies the unload data file:
bes1: Name of the server containing the unload data file
/hd001/unload_file: Name of the unload data file

Specifies the directory for index information files to which index information is to be output:
bes2: Name of the server used to create index information files
/usr/idxwork: Name of the directory for index information files

Specifies the work directory for sorting:
bes2: Name of the server used to create the sort work file
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

Specifies reloading the table data into another table:
TABLE1: Name of the source table

(4) Unloading and reloading while modifying the partitioning conditions of a table with an abstract data type

Example 4

To modify the partitioning conditions of a table (TABLE1) with an abstract data type (SGMLTEXT), this example first unloads the table, modifies the table partitioning conditions, then reloads the table. The abstract data type (SGMLTEXT) is provided by the HiRDB Text Search Plug-in.

Table definition:

CREATE TABLE TABLE1(C1 INT,C2 SGMLTEXT ALLOCATE (SGMLTEXT IN LOBUSER01)
              PLUGIN'<DTD>sgml.dtd</DTD>' ) IN PDUSER01

Overview

(a) Unloading the table before modifying the table partitioning conditions

Relationship between input/output files and RDAREAs

Explanation of the command

The example unloads the table (TABLE1).

-k unld: Specification for unloading

-t TABLE1: Name of the table being unloaded

-j: Specification for unloading a table with an abstract data type with LOB attribute

-g: Specification for modifying the table partitioning conditions

control_file: Name of the control information file

Contents of the control information file (control_file)

unload bes1:/hd001/unload_file                             1
unld_func type=SGMLTEXT,func=unsgmltext(sgmltext)          2

Explanation:

Specifies the unload data file:
bes1: Name of the server containing the unload data file
/hd001/unload_file: Name of the unload data file

Specifies the constructor parameter reverse creation function:
SGMLTEXT: Name of the abstract data type (column C2)
unsgmltext: Name of the constructor parameter reverse creation function (for the actual name, see the applicable plug-in manual)
sgmltext: Data type of the argument of the constructor parameter reverse creation function

(b) Modifying the table's (TABLE1's) partitioning conditions

First, drop TABLE1 with DROP TABLE. Then, redefine the table's (TABLE1's) partitioning conditions as follows:

CREATE TABLE TABLE1(C1 INT NOT NULL,
                   C2 SGMLTEXT ALLOCATE
                      (SGMLTEXT IN ((LOBUSER01),(LOBUSER02)))
                       PLUGIN'<DTD>sgml.dtd</DTD>' )
   IN ((PDUSER01) C1<2000,(PDBUSER02))

(c) Reloading to the table after modifying the partitioning conditions

Relationship between input/output files and RDAREAs

Explanation of the command

The example reloads to the table (TABLE1).

-k reld: Specification for reloading

-t TABLE1: Name of the table being reloaded

-j: Specification for reloading to a table with an abstract data type with LOB attribute

-g: Specification for modifying the table partitioning conditions

control_file: Name of the control information file

Contents of the control information file (control_file)

unload bes1:/hd001/unload_file                       1
reld_func type=SGMLTEXT,func=sgmltext(blob)          2

Explanation:

Specifies the unload data file:
bes1: Name of the server containing the unload data file
/hd001/unload_file: Name of the unload data file

Specifies the constructor function:
SGMLTEXT: Name of the abstract data type (column C2)
sgmltext(blob): Name of the constructor function (parentheses enclose the data type of the constructor function's argument)

(5) Unloading and reloading to migrate table data from a table with an abstract data type to another table

Example 5

This example migrates data from a table (TABLE1) with abstract data type (SGMLTEXT) to another table. The abstract data type (SGMLTEXT) is provided by the HiRDB Text Search Plug-in.

Source table and index definition:

CREATE TABLE TABLE1(C1 INT,
                   C2 SGMLTEXT ALLOCATE
                     (SGMLTEXT IN LOBUSER01)
                     PLUGIN'<DTD>sgml.dtd</DTD>'
                   C3 SGMLTEXT ALLOCATE
                     (SGMLTEXT IN LOBUSER02)
                     PLUGIN'<DTD>sgml.dtd</DTD>'
                   ) IN PDUSER01

Target table and index definition:

CREATE TABLE TABLE2(C1 INT,
                   C2 SGMLTEXT ALLOCATE
                     (SGMLTEXT IN LOBUSER03)
                     PLUGIN'<DTD>sgml.dtd</DTD>'
                   C3 SGMLTEXT ALLOCATE
                     (SGMLTEXT IN LOBUSER04)
                     PLUGIN'<DTD>sgml.dtd</DTD>'
                   ) IN PDUSER02

Overview

(a) Unloading the source table

Relationship between input/output files and RDAREAs

Explanation of the command

The example unloads the table (TABLE1).

-k unld: Specification for unloading

-t TABLE1: Name of the table being unloaded

-j: Specification for unloading a table with an abstract data type with LOB attribute

-g: Specification for migrating data into another table

control_file: Name of the control information file

Contents of the control information file (control_file)

unload bes1:/hd001/unload_file                             1
unld_func type=SGMLTEXT,func=unsgmltext(sgmltext)          2

Explanation:

Specifies the unload data file:
bes1: Name of the server containing the unload data file
/hd001/unload_file: Name of the unload data file

Specifies the constructor parameter reverse creation function:
SGMLTEXT: Name of the abstract data type (column C2)
unsgmltext: Name of the constructor parameter reverse creation function (for the actual name, see the applicable plug-in manual)
sgmltext: Data type of the argument of the constructor parameter reverse creation function

(b) Reloading to the target table (another table)

Relationship between input/output files and RDAREAs

Explanation of the command

The example reloads to the table (TABLE2).

-k reld: Specification for reloading

-t TABLE2: Name of the table being reloaded

-j: Specification for reloading to a table with an abstract data type with LOB attribute

-g: Specification for migrating data to another table

control_file: Name of the control information file

Contents of the control information file (control_file)

unload bes1:/hd001/unload_file                       1
reld_func type=SGMLTEXT,func=sgmltext(blob)          2
tblname TABLE1                                       3

Explanation:

Specifies the unload data file:
bes1: Name of the server containing the unload data file
/hd001/unload_file: Name of the unload data file

Specifies the constructor function:
SGMLTEXT: Name of the abstract data type (column C2)
sgmltext(blob): Name of the constructor function (parentheses enclose the data type of the constructor function's argument)

Specifies reloading table data to another table:
TABLE1: Name of the source table

(6) Creating an input data file for pdload in fixed-size data format

Example 6

This example unloads data from the table PRODUCT_TABLE as an input data file for pdload in fixed-size data format.

Table definition

 CREATE TABLE PRODUCT_TABLE
       (PRODUCT_NUMBER SMALLINT NOT NULL,PRODUCT_NAME NVARCHAR(12),QUANTITY INTEGER)
       IN ((RDAREA1)PRODUCT_NUMBER<=10000,(RDAREA2)PRODUCT_NUMBER<=20000,(RDAREA3));

pdrorg command

pdrorg -k unld -t PRODUCT_TABLE -W fixtext,@,cr control_file

Explanation

-k unld: Specification for unloading

-t PRODUCT_TABLE: Name of the table being unloaded

-W fixtext,@,cr: Specification for unloading the data as an input data file for pdload in fixed-size data format (@ is the padding character, and use of 1-byte linefeed codes is specified)

control_file: Name of the control information file

Contents of the control information file (control_file)

unload bes1:/hd001/unload_file                                          1
fixtext_option enclose=" format=integer,type1 format=smallint,type2     2

Explanation:

Specifies the unload data file:
bes1: Name of the server containing the unload data file
/hd001/unload_file: Name of the unload data file

Specifies how to edit the output data:
enclose=": Encloses in the enclosing character (") the data for PRODUCT_NAME in a column whose data type is NVARCHAR.
format=integer,type1: Outputs in output format type1 the data for QUANTITY in a column whose data type is INTEGER.
format=smallint,type2: Outputs in output format type 2 the data for PRODUCT_NUMBER in a column whose data type is SMALLINT.

Output data

PRODUCT_NUMBER    PRODUCT_NAME    QUANTITY
(6 bytes)         (14 bytes)      (11 bytes)     (1 byte)

###100            "BOOTS"@@@@@@@  @@@@@@@@@@@    linefeed-character
@@@@@@            ""@@@@@@@@@@@@  #0000000100​    linefeed-character
-12345            @@@@@@@@@@@@@@  -0000000300​    linefeed-character

Note

# represents a space character, and 1 row consists of 32 bytes.

8.3.2 Cross-reference by purpose

Required options and control statements depend on the type of unload operation executed by the user.

The options listed in (1) and the control statements are mandatory. The items in (2) through (4) are related to the options and control statements presented in the Reference column. For details about the options, see Section 8.9.2.

Organization of this subsection

(1) Required items

(2) Information to be specified depending on the attribute of the table being unloaded

(3) Information to be specified depending on the type of unload data file or LOB data unload file

(4) Information to be specified depending on the unloading method

(1) Required items

Item | Reference
Option | Control statement
Type of pdrorg processing | -k unld | (1) |  |
Reorganization of a user-defined table (can be omitted because the default is -c user) | -c user | (2) |  |
Name of the table to be unloaded | -t | (3) |  |
File containing the control statements | control-information-filename | (19) |  |
Information about an unload data file |  |  | unload statement | 8.9.4

: Not applicable

(2) Information to be specified depending on the attribute of the table being unloaded

Item | Reference location
Option | Control statement
There are LOB columns | -j | (9) | lobunld statement | 8.9.9
There are columns of abstract data type provided by a plug-in (LOB attribute) | -j | (9) | unld_func statement | 8.9.13
There are repetition columns | -W | (7) | array statement | 8.9.12
Consecutive trailing spaces are to be removed from a table with suppress option specified* | -S | (14) |  |
Inner replica facility is used | -q | (18) |  |

: Not applicable

* This option helps you reduce the processing time and the size of the unload data file.

(3) Information to be specified depending on the type of unload data file or LOB data unload file

Item | Reference location
Option | Control statement
Using unload data as pdload's input data file or with a UAP | -W | (7) | fixtext_option statement | 8.9.19
Integrating data into a single file | -g | (8) |  |
Using EasyMT | -f | (12) | mtguide statement | 8.9.3
emtdef statement | 8.9.3
Using HiRDB files | -f | (12) |  |
Specifying the unload data storage sequence (in order of cluster key, index, or data storage) | -b | (13) |  |

: Not applicable

(4) Information to be specified depending on the unloading method

Item
Reference location

Option
Control statement

Unloading only some of the RDAREAs for a row-partitioned table
-r
(4)

Changing the pdrorg executor's user authorization identifier to a value other than the value of environment variable PDUSER¹
-u
(10)

Unloading in batch input/output mode using local buffer instead of global buffer²
-n
(11)

Changing an unloading status message output interval to a value other than 100,000 lines
-m
(16)

Monitoring the response time for server-to-server communication
-X
(17)

Monitoring the execution time of pdrorg

option statement
8.9.16

Using the same space character in the entire table data

option statement
8.9.16

Obtaining tuning information during the execution of pdrorg

report statement
8.9.17

Unloading a column of abstract data type with BLOB attribute as VARCHAR type

blobtovarchar statement
8.9.18

Executing one of the following:

Deleting unneeded data and then outputting the unload data file

Updating data to use as pdload's input data file

Outputting data in a desired format for applications

unlduoc statement
8.9.10

: Not applicable

¹ If omitted, the system assumes the value of the PDUSER environment variable. If the PDUSER environment variable has not been specified, the system assumes the user name in the login window.

² By specifying the number of batch input/output pages, you can reduce the number of I/O operations, because data is input/output in units of specified pages in batch mode.

8.3.3 Format of database load utility input files

If you specify the -W option at the time of unloading, you can use the unload data file as the input data file to the database load utility.

Organization of this subsection

(1) DAT and extended DAT formats

(2) Binary format

(3) Fixed-size data format

(1) DAT and extended DAT formats

In the DAT and extended DAT formats, data is output as character string data. For details about the differences between the DAT and extended DAT formats, see (c) Differences between DAT and extended DAT formats. Except for the cited differences, the DAT and extended DAT formats are identical.

To output data, use the following rules:

The system outputs one table row as one line in the file (a linefeed character is output at the end of each line).

The system inserts a separator character between column data. For details about column data output formats (in DAT format) for various data types, see Section 5.5.1 DAT format.
Character string, national character, mixed character string, and BINARY data are enclosed in double quotation marks (") in the output format.
The output format of an abstract data type consists of as many data items as there are specified by the constructor parameter reverse creation function, each of which is delimited by a separator character. If the constructor parameter reverse creation function's return value is BLOB, the system outputs consecutive separator characters as the null value.

The system outputs LOB column data as the null value, regardless of the specification of the -j option.

If the constructor parameter reverse creation function's return value is BLOB, the system outputs the column data of abstract data type as the null value.

An error results if the line length exceeds 512 MB after conversion. If you assign a streaming tape device to the unload data file and the line length exceeds 32 KB, an error results.

If you specify the spacelvl=3 and sup options in the option statement, the system converts two consecutive single-byte spaces of NCHAR type and suppresses the output of a pair of single-byte spaces.

If the data type of a column is character string, national character data, mixed character string, or binary data, and the column value contains a combination of the enclosing character (") + separator character or the separator character + enclosing character ("), the utility may treat the value as the end or start of column data during data loading. To avoid this, use the -W option to change the separator character during unloading or output the data in the binary format.

(a) Format for repetition columns

For repetition columns, the system outputs data from each element by separating it with separator characters. The row data format depends on what is specified in the array statement in the control information file. Figure 8-13 shows the row data output format when ff is specified in the array statement: Figure 8-14 shows the row data output format when vv is specified in the array statement.

Figure 8-13 Row data output format with ff specified in the array statement

Explanation

Data is stored in all the elements.

Elements 1-6 contain data, and element 5 contains a null value. Elements 7-10 contain either no data or a null value.

Data is stored in all the elements. Elements 3, 8, and 9 contain a null value.

Either the column value is null or all elements contain a null value.

Figure 8-14 Row data output format with vv specified in the array statement

Explanation

Data is stored in all the elements. A value of 10 is output as the current number of elements.

Elements 1-6 contain data, and element 5 contains a null value. A value of 6 is output as the current number of elements.

Data is stored in all the elements. Elements 3 and 8-10 contain null values. A value of 10 is output as the current number of elements.

Because a null value is stored in the column value, a value of 0 is output as the current number of elements.

All elements contain a null value. A value of 10 is output as the current number of elements.

(b) Format used when the sup option is specified

If you specify the sup option during unload operation, the system compresses any trailing spaces in any column that is shorter than the column length specified in the table definitions and then outputs them to the unload data file. The following shows the format depending on the specification of the sup option:

Data type: CHAR or MCHAR

Example 1

Table definition:

CREATE TABLE T1(C1 INTEGER,C2 CHAR(10),...);

Input data: 1,A,A,...

sup option: Specified

1,"AA",...

Explanation: The system compresses the spaces (equal to eight characters) in a column that is shorter than the defined length.

sup option: Not specified

1,"AA........",...

Note: A period (.) indicates a single-byte space.

Explanation: The system outputs single-byte spaces (.) (equal to eight characters) to pad the column that is shorter than the defined length.

Example 2

Table definition:

CREATE TABLE T1(C1 INTEGER,C2 MCHAR(10),...1,);

Input data: 1,..........,... (a period (.) indicates a single-byte space)

sup option: Specified

1,".",...

Explanation: The system outputs one single-byte space.

sup option: Not specified

1,"..........",...

Explanation: The system outputs as many single-byte spaces as there are defined for the table.

Data type: NCHAR

Example 1

Table definition:

CREATE TABLE T1(C1 INTEGER,C2 NCHAR(10),...);

Input data: 1,A,A,...

sup option: Specified

1,"AA",...

Explanation: The system compresses the spaces (equal to eight characters) in a column that is shorter than the defined length.

sup option: Not specified

1,"AA ",...

Note: A triangle () indicates a double-byte space.

Explanation: The system outputs double-byte spaces () (equal to eight characters) to pad the column that is shorter than the defined length.

Example 2

Table definition:

CREATE TABLE T1(C1 INTEGER,C2 NCHAR(10),...1,);

Input data: 1, ,... (a triangle () indicates a single-byte space)

sup option: Specified

1,"",...

Explanation: The system outputs one double-byte space.

sup option: Not specified

1," ",...

Explanation: The system outputs as many double-byte spaces as there are defined for the table.

Data type: NCHAR (spacelvl=3 specified in the option statement)

Example 1

Table definition:

CREATE TABLE T1(C1 INTEGER,C2 NCHAR(10),...);

Input data: 1,A,A,...

sup option: Specified

1,"AA",...

Explanation: The system compresses the spaces (equal to eight characters) in a column that is shorter than the defined length.

sup option: Not specified

1,"AA................",...

Explanation: The system outputs single-byte spaces (equal to eight characters) to pad the column that is shorter than the defined length.

Example 2

Table definition:

CREATE TABLE T1(C1 INTEGER,C2 NCHAR(10),...1,);

Input data: 1,,... (a triangle () indicates a single-byte space)

sup option: Specified

1,"..",...

Note: A period (.) indicates a single-byte space.

Explanation: The system outputs two single-byte spaces.

sup option: Not specified

1,"....................",...

Note: A period (.) indicates a single-byte space.

Explanation: The system outputs as many single-byte spaces as there are defined for the table.

(c) Differences between DAT and extended DAT formats

The following table describes the differences between the DAT and extended DAT formats:

Item
DAT format
Extended DAT format

When the data contains the null character (\0) or linefeed character (\n)
The row containing the corresponding column data value is not output.
The row containing the corresponding column data value is output (\0 and \n are output as is).

When the enclosing character (") is used as part of the data
The enclosing character used as part of the corresponding column data value is output as is.
Two consecutive enclosing characters are output for an enclosing character that is used as part of the column data value.*
Example: " ""

* Because multi-byte characters are also subject to conversion, you must pay special attention if the file contents are to be referenced, such as by an application program. Data loading can be performed because pdload converts "" to " whether or not the data contains multi-byte characters.

(2) Binary format

In the binary format, data is output in an internal format based on the database column definition. If this type of file is used as an input to the database load utility, the unloaded table and the data loading target table must have the same column definitions. For a non-FIX table, data cannot be loaded into a FIX table, even if the column definitions are the same.

To output data, use the following rules:

For FIX tables, the system outputs data continuously without inserting separator characters between the column data items. For non-FIX tables, the system outputs not only the column data but also the data length and data position offset. Figure 8-15 shows the row data output format for non-FIX tables. For a description of column data output formats (in binary format) for various data types, see Section 5.5.2 Binary format.

For a table with LOB columns defined, if the -j option is specified, the system outputs the LOB data value; otherwise, the system outputs the null value.

In the case of data output to a fixed-length block tape such as CMT, the system attaches a 512-byte header to the data.

Figure 8-15 Row data output format for non-fix tables

Explanation

The system outputs the row length, column data offset, and row data in this order.

L

Row length (4-byte binary number)

Column data storage position offset

Offset from the beginning of the line to the column data header (4-byte binary number). The system outputs as many column data offsets as there are columns in the table. If a column's data is the null value, the system stores a value of 0 and does not output column data.

Column data

Column value.

If the column data requires a word boundary to be referenced by a UAP, first copy it to a boundary-adjusted area, then reference the column data.

For details about the output format for columns whose column data type or abstract data type attribute is BINARY, see 5.5.2 Binary format.

The following shows the order following the LOB column structure base table of the BINARY data, BINARY attribute data of abstract data type, LOB attribute data of abstract data type, and LOB column data:

Repetition columns take the following format:

Column data storage position offset (abstract data type with BLOB attribute)

The system outputs as many data offsets as there are specified by the constructor parameter reverse creation function in the specified order. Therefore, the number of columns in an unloaded table may not match the number of offsets in the unloaded data. The following shows an example:

LOB attribute data

The system outputs the data returned from the constructor parameter reverse creation function in the same format as for a column of defined type. The order of output is the same as the order of offsets, which is the order specified by the constructor parameter reverse creation function.

In the data indicated by row length L, the system outputs two-byte control information for each column of abstract data type. There is no need to consider this control information to edit the data.

If the constructor parameter reverse creation function returns a BLOB type, the system outputs the data in the same manner as with a defined BLOB type in the following order:

The system outputs the column data of defined types and the data of abstract data type that is output by the constructor parameter reverse creation function (for a BLOB type, only the data length) as the LOB column structure base table data with a length of L.

Immediately after the LOB column structure base table data, the system outputs the BLOB data that is output by the constructor parameter reverse creation function. The order of output is the same as the order defined for the column of abstract data type. If multiple constructor parameter reverse creation functions have been specified for this abstract data type, the system outputs the data in the order the functions are specified.

The system outputs all other BLOB data that is not an abstract data type. The order of output is the same as the order in which the BLOB column is defined.

The following shows an example:

(3) Fixed-size data format

In the fixed-size data format, data is output as fixed-length character string data.

(a) Output format

Output unit
One row of data is output per row in the database.

Output format of each row

Length of a row
A row is output as fixed length.

Output order of column data
Column data is output in the order of the column definitions.

Separator between column items
No separator character is output between column data items.

Linefeed
By specifying the applicable option, you can insert a linefeed character at the end of the row.

Output format of each column
For details about the output format of each type of column data, see Table 8-3.

Output format of repetition columns
Data for each element is output as many times as defined for the element. For details about the output format of each type of element data, see Table 8-3.

Output format of special column data

Column data with the null value
The column data is padded with the padding character up to the output length of the column data. Repetition columns are padded with as many instances of the padding character as equals (output length of column data number of defined elements).

Repetition column whose element has the null value
Column data is padded with the padding character up to the output length of the column data.

Control characters in column data
For the character data, mixed character string data, and national character data types, you can use the fixtext_option statement to specify how to handle control characters. The default is that the utility does not check for control characters.

Table 8-3 Output format of each type of column data

Data type of column
Output format
Output length
(bytes)

Numeric data
INTEGER

When format=integer,type1 is specified in the fixtext_option statement or the fixtext_option statement is omitted
- A numeric value is right-aligned.
- The first byte is treated as the sign part: the space character (0x20) is output for a positive value and - is output for a negative value.
- An empty part is filled with 0.

Example:

0000000001​

-0000000001​

: One space character

When format=integer,type2 is specified in the fixtext_option statement
- A numeric value is right-aligned.
- The leading digit of the numeric value is treated as the sign part: the space character (0x20) is output for a positive value and - is output for a negative value.
- An empty part is filled with space characters (0x20).

Example:

2

-2

: One space character

11

SMALLINT

When format=smallint,type1 is specified in the fixtext_option statement or the fixtext_option statement is omitted
- A numeric value is right-aligned.
- The first byte is treated as the sign part: the space character (0x20) is output for a positive value and - is output for a negative value.
- An empty part is filled with 0.

Example:

00003

-00003

: One space character

When format=smallint,type2 is specified in the fixtext_option statement
- A numeric value is right-aligned.
- The leading digit of the numeric value is treated as the sign part: the space character (0x20) is output for a positive value and - is output for a negative value.
- An empty part is filled with space characters (0x20).

Example:

3

-3

: One space character

6

DECIMAL

A numeric value is right-aligned in the format integer.decimal-number.

The first byte is treated as the sign part: the space character (0x20) is output for a positive value and - is output for a negative value.

An empty part is filled with 0.

Example 1:

DEC(6,2)

0003.14

-0003.14

Example 2:

DEC(6,0)

000314.

-000314.

Example 3:

DEC(6,6)

.000314

-.000314

: One space character
Number of digits + 2

FLOAT

A value is left-aligned in the format mantissaEexponent.

The first byte is treated as the sign part: + is output for a positive value and - is output for a negative value.

An empty part is filled with space characters (0x20).

Example 1

20E10

+2.000000000000000​E+11

Example 2:

-30E222

-3.000000000000000​E+223

: One space character
23

SMALLFLT

A value is left-aligned in the format mantissaEexponent.

The first byte is treated as the sign part: + is output for a positive value and - is output for a negative value.

An empty part is filled with space characters (0x20).

Example:

20E10

+2.000000000000000​E+11

: One space character

23

Character string data
CHARACTER

Left-aligned characters are output up to the defined length.

You can specify whether or not to add enclosing characters with the enclose operand in the fixtext_option statement.

Example 1:

enclose omitted, defined length is 8

AIKO

Example 2:

enclose=", defined length is 8

"AIKO"

: One space character
Defined length*

VARCHAR

Left-aligned characters are output up to the real length.

You can specify whether or not to add enclosing characters with the enclose operand in the fixtext_option statement.

If the -W fixtext option is specified for a variable-length character string that is shorter than the defined length, the data is padded with the padding character up to the defined length.

Example 1:

enclose omitted, defined length is 8, real length is 4

AIKO

Example 2:

enclose=", defined length is 8, real length is 4

"AIKO"

: One space character
Defined length*

Mixed character string data
MCHAR
Same as for CHARACTER.
Defined length*

MVARCHAR
Same as for VARCHAR.
Defined length*

National character data
NCHAR
Same as for CHARACTER.
Defined length 2*

NVARCHAR
Same as for VARCHAR.
Defined length 2*

Date data
DATE
Data is output in the format yyyy-mm-dd. (yyyy: year, mm: month, dd: date).

Example:

2004-03-12

10

Time data
TIME
Data is output in the format hh:mm:ss (hh: hour, mm: minute, ss: second).

Example:

12:12:12

8

Date interval data
INTERVAL YEAR TO DAY

Data is output in the format [|-]yyyymmdd. (: space character, -: minus sign, yyyy: year, mm: month, dd: date).

The first byte is treated as the sign part: the space character (0x20) is output for a positive value and - is output for a negative value.

Example:

00010101​.

-00010101​.

: One space character

10

Time interval data
INTERVAL HOUR TO SECOND

Data is output in the format [|-]hhmmss. (: space character, -: minus sign, hh: hour, mm: minute, ss: second).

The first byte is treated as the sign part: the space character (0x20) is output for a positive value and - is output for a negative value.

Example:

010101.

-010101.

: One space character

8

Time stamp data
TIMESTAMP
Data is output in the format yyyy-mm-ddhh:mm:ss[.nnnnnn] (yyyy: year, mm: month, dd: date, : space character, hh: hour, mm: minute, ss: second, nnnnnn: fraction of a second). The fraction of a second is expressed with 0, 2, 4, or 6 digits. When it is expressed with 0 digits, the . is not output.

Example:

1970-03-1212:12:12

: One space character

19
Fractions of a second:
0: +0
2: +3
4: +5
6: +7

Large object data
BLOB
No data is output.
0

Binary data
BINARY
No data is output.
0

Abstract data type

No data is output.
0

Legend:

: Not applicable

* If you have specified the enclose operand in the fixtext_option statement, add 2 bytes to the output length.

(b) Rules

A maximum of 512 megabytes (536,870,912 bytes) can be output per row (including linefeed characters).

If the table contains a column of the abstract data type, you must specify the unld_func statement.

8.4 Reloading to a table

Organization of this section

8.4.1 Examples

8.4.2 Cross-reference by purpose

8.4.3 Whether or not reloading is permitted when the table definitions of unload table and reload table do not match

8.4.4 Handling of a reloading error during table reorganization

8.4.1 Examples

For examples of reloading, see Examples 2 to 5 in Section 8.3.1 Examples.

8.4.2 Cross-reference by purpose

Required options and control statements depend on the type of reload operation executed by the user.

The options listed in (1) and the control statements are mandatory. The items in (2) through (4) are related to the options and control statements presented in the Reference column. For details about the options, see Section 8.9.2.

Organization of this subsection

(1) Required items

(2) Information to be specified depending on the attribute of the table being reloaded

(3) Information to be specified depending on the type of unload data file or LOB data unload file

(4) Information to be specified depending on the reloading method

(1) Required items

Item | Reference
Option | Control statement
Type of pdrorg processing | -k reld | (1) |  |
Reorganization of a user-defined table (can be omitted because the default is -c user) | -c user | (2) |  |
Name of the table to be reloaded | -t | (3) |  |
File containing the control statements | control-information-filename | (19) |  |
Information about an unload data file |  |  | unload statement | 8.9.4

: Not applicable

(2) Information to be specified depending on the attribute of the table being reloaded

Item | Reference location
Option | Control statement
Indexes are defined | -i | (6) | index statement | 8.9.5
-o | (15) | idxwork statement | 8.9.7
sort statement | 8.9.8
There are LOB columns | -j | (9) | lobunld statement | 8.9.9
There are columns of abstract data type provided by a plug-in (LOB attribute) | -j | (9) | reld_func statement | 8.9.14
There are constraint definitions |  |  | constraint statement | 8.9.15
Inner replica facility is used | -q | (18) |  |

: Not applicable

(3) Information to be specified depending on the type of unload data file or LOB data unload file

Item | Reference location
Option | Control statement
Integrating data into a single file (-g option specified during unload operation) | -g | (8) |  |
Using EasyMT | -f | (12) | mtguide statement | 8.9.3
emtdef statement | 8.9.3
Using HiRDB files | -f | (12) |  |

: Not applicable

(4) Information to be specified depending on the reloading method

Item | Reference location
Option | Control statement
Reloading only to some of the RDAREAs for a row-partitioned table | -r | (4) |  |
Acquiring or not acquiring database update log | -l | (5) |  |
Specifying synchronization points when reloading a large amount of data |  |  | option statement | 8.9.16
Monitoring the execution time of pdrorg |  |  | option statement | 8.9.16
Changing the pdrorg executor's user authorization identifier to a value other than the value of environment variable PDUSER¹ | -u | (10) |  |
Reloading in batch input/output mode using local buffer instead of global buffer² | -n | (11) |  |
Changing a reloading status message output interval to a value other than 100,000 lines | -m | (16) |  |
Monitoring the response time for server-to-server communication | -X | (17) |  |
Migrating table data to another table |  |  | tblname statement | 8.9.11
Using the same space character in the entire table data |  |  | option statement | 8.9.16
Changing the percentage of free space in table and index during reloading³ |  |  | option statement | 8.9.16
Obtaining tuning information during the execution of pdrorg |  |  | report statement | 8.9.17

: Not applicable

¹ If omitted, the system assumes the value of the PDUSER environment variable. If the PDUSER environment variable has not been specified, the system assumes the user name in the login window.

² By specifying the number of batch input/output pages, you can reduce the number of I/O operations because data is input/output in units of specified pages in batch mode.

³ If a space shortage occurs in an RDAREA during execution of pdrorg, you can complete the processing without having to expand the RDAREA temporarily (except for a table or index whose percentage of free space is 0).

8.4.3 Whether or not reloading is permitted when the table definitions of unload table and reload table do not match

pdrorg outputs the definition information for an unloaded table to the unload data file. During reloading, pdrorg compares the table definition information in the unload data file with that for the table to be reloaded to determine whether reloading is possible.

If the table definitions are the same, the unloaded table can be reloaded. However, whether or not reloading to a different table, transfer of table data to another system, or reloading to a table with a different table definition is possible depends on conditions.

Organization of this subsection

(1) Options to be specified during reloading

(2) Comparing the storage conditions between the unloaded table and the reload table

(3) Limitations on reloading

(1) Options to be specified during reloading

If you are reloading table data to a different table, transferring table data to another system, or reloading table data to a table whose table storage conditions are different from those of the unloaded table, you must specify the following options:

During unloading and reloading, specify the -g option.

If the table contains a BLOB column or a column of an abstract data type with the BLOB attribute, specify both the -j option and the -g option.

(2) Comparing the storage conditions between the unloaded table and the reload table

If the unloaded table and the reload table employ the same partitioning method, the utility checks the items listed in Table 8-4 to determine whether or not their storage conditions are different. If their storage conditions are different, whether or not reloading is possible is determined by the criteria shown in Table 8-5 (this is applicable when reloading is to be performed in units of tables or schemas; reloading in units of RDAREAs is not supported at all).

Table 8-4 Storage condition check items when the unloaded table and reload table employ the same partitioning method

Partitioning method | Items checked
Non-partitioning | None
Hash partitioning | Hash function | Function name
Hash type | FIX or flexible
Column structure of partitioning key | Defined order
Storage RDAREAs | Number of storage RDAREAs, RDAREA IDs, RDAREA names, and server names
Key range partitioning | Column structure of partitioning key | Defined order and column IDs
Start column of partitioning key | Column ID, data type, and defined length
Number of partitioning conditions
Partitioning condition | Storage RDAREA IDs and condition values
Matrix partitioning | Column structure of partitioning key | Defined order
Number of partitioning conditions
Number of partitioning condition values
Partitioning key conditions | Number of partitions in key, dimension number, partitioning column ID, data type, defined length, length of condition value, and condition value
Hash function | Function name
Hash type | FIX or flexible
Storage RDAREAs | Number of storage RDAREAs, RDAREA IDs, RDAREA names, and server names

Table 8-5 Whether or not reloading is possible when storage conditions are different

-g¹ | HiRDB conf | Partitioning conditions of unloaded table | Partitioning conditions of table to be reloaded
Key range ptn | Hash partitioning | Matrix partitioning | Not partitioned
FIX | Flex | Key range and key range | Key range and hash
Specified | HiRDB/Single Server | Key range partitioning | Y | Y | Y | Y | Y | Y
Hash ptn | FIX | Y | Y | Y | Y | Y | Y
Flex | Y | Y | Y | Y | Y | Y
Matrix ptn | Key range and key range | Y | Y | Y | Y | Y | Y
Key range and hash | Y | Y | Y | Y | Y | Y
Not partitioned | Y | Y | Y | Y | Y | Y
HiRDB/Parallel Server | Key range partitioning | Y | Y | Y | Y | Y | Y
Hash ptn | FIX | Y | Y | Y | Y | Y | Y
Flex | Y | Y | Y | Y | Y | Y
Matrix ptn | Key range and key range | Y | Y | Y | Y | Y | Y
Key range and hash | Y | Y | Y | Y | Y | Y
Not partitioned | Y | Y | Y | Y | Y | Y
Omitted | HiRDB/Single Server | Key range partitioning | Y | Y | Y | Y | Y | Y
Hash ptn | FIX | N | Y | Y | Y | Y | Y
Flex | N | Y | Y | Y | Y | Y
Matrix ptn | Key range and key range | Y | Y | Y | Y | Y | Y
Key range and hash | Y | Y | Y | Y | Y | Y
Not partitioned | Y | Y | Y | Y | Y | Y
HiRDB/Parallel Server | Key range partitioning | Y⁶ | N | Y2, 3 | N | N | Y⁵
Hash ptn | FIX | N | N | Y2, 4 | N | N | Y⁵
Flex | N | N | Y⁷ | N | N | Y⁵
Matrix ptn | Key range and key range | N | N | Y2, 3 | Y⁶ | N | Y⁵
Key range and hash | N | N | Y2, 3 | N | N | Y⁵
Not partitioned | N | N | Y2, 3 | N | N | Y²

Legend:

Y: Can be reloaded according to the storage conditions of the table to be reloaded.

N: Cannot be reloaded.

conf: configuration

ptn: partitioning

Flex: flexible

1 Indicates whether or not the -g option is specified during unloading or reloading. Reloading from a partitioned table to a non-partitioned table when the -g option is omitted means reloading from a partitioned table that is not partitioned among multiple servers to a non-partitioned table. If the table is partitioned among multiple servers, specify the -g option.

2 For a table with a BLOB column or a column of an abstract data type with the BLOB attribute, reloading is supported only when the -j option is specified during unloading and reloading.

3 pdrorg stores data in a wrap-around manner without using the hash function.

4 Data is stored in the same RDAREA as during unloading. Data cannot be reloaded if the corresponding RDAREA is not found during reloading.

5 Reloading is not supported for a table containing a BLOB column or a column of an abstract data type with the BLOB attribute

6 Whether or not reloading is supported depends on the change made to the table storage conditions, as described below:

Change to the table storage conditions | Whether or not reloading is supported | Remarks
Partitioning conditions changed | Partitioning conditions added | N | Terminates with an error.
Partitioning conditions deleted
Partitioning key value changed
Partitioning conditions not changed | Storage RDAREA changed | RDAREA name changed | Y | If the conditions of ² and ⁵ are satisfied, the utility stores data in the RDAREA corresponding to the storage RDAREA used during unloading.
Change made to the server containing the RDAREA | N | Terminates with an error.
Storage RDAREA not changed | Partitioning key component column changed (such as column name and specification order) | N | Terminates with an error.

7 Whether or not reloading is supported depends on the change made to the table storage conditions, as described below:

Change to the table storage conditions | Whether or not reloading is supported | Remarks
Storage RDAREA changed | RDAREA added | Y | If the conditions of ⁴ and ⁵ are satisfied, the utility stores data in the RDAREA used during unloading. Data is not stored in the added RDAREA.
RDAREA deleted | N | Terminates with an error.
RDAREA renamed
Change made to the server containing the RDAREA
Storage RDAREA not changed | Hash function changed | Y | If the conditions of ⁴ and ⁵ are satisfied, the utility stores data in the RDAREA used during unloading.
Partitioning key component column changed (such as column name and specification order)

(3) Limitations on reloading

Reloading is prohibited in the following cases:

For a table containing a LOB column, the -j option is omitted.

Reloading from a FIX table to a non-FIX table, or vice versa.

There is a mismatch between the unloaded table and the table to be reloaded in terms of the number of table columns, the order of the column definitions, the data types of a column, the column names, or the column attributes (such as NOT NULL).

The unload table contains a column with the NOT NULL attribute and the reload table contains partitioning key structure columns. (If a column with a NOT NULL attribute is changed to a partitioning key structure column, the corresponding table must be unloaded with the -W option specified. Then the data can be loaded with the database load utility.)

A new unique key index or primary key index is defined for a data column with duplicated values.

When the number of elements for each repetition column in the table to be reloaded is less than the unloaded table.

The data type of a column for which an abstract data type has been defined has been changed.

8.4.4 Handling of a reloading error during table reorganization

If reloading results in an error during table reorganization, eliminate the cause of the error and then re-execute table reorganization (-k rorg).

Organization of this subsection

(1) Processing resulting in an error during table reorganization and the restart location for re-execution

(2) Whether or not commands and SQL statements can be executed on a table that is in reload-not-completed data status

(3) Reload-not-completed data status release timing

(4) Notes

(1) Processing resulting in an error during table reorganization and the restart location for re-execution

If table reorganization results in an error, the table is placed in under-reorganization status. If table reorganization is re-executed while the table's status is under-reorganization, processing is restarted with the process that resulted in the error. To determine whether or not the corresponding RDAREA was being reorganized, execute pddbst's logical analysis in units of RDAREAs or analysis in units of tables and then check Status in the analysis results.

(a) When reorganizing a LOB column structure base table only or together with a LOB column (-j specified)

In the event of an error during table reorganization, Table 8-6 describes the location where table reorganization is restarted. Reorganization of a LOB column structure base table only or together with a LOB column is based on the assumption that the -j option is specified and a single unload data file is used.

Specification of options for execution of pdrorg:

pdrorg -k rorg [-j]

Specification of a control information file for execution of pdrorg:

unload statement

Table 8-6 Restart location when table reorganization is re-executed due to an error (when only LOB column structure base table or both LOB column structure base table and LOB column are reorganized (-j specified))

No.
Processing during table reorganization
Output message immediately before error*
Table status
Restart location

LOB column structure base table
LOB column
LOB attribute

1
Unloading
Starting unloading
712, 732

No. 1

2
Completing unloading
714, 734
rc=8

No. 1

rc=0
N and R
N and R
N and R
For falsification prevented table:
No. 3

R
R
R
For table other than falsification prevented table:
No. 1 (in units of tables or RDAREAs)
No. 3 (in units of schemas)

3
Reloading
Starting data deletion
Not output
N and R
N and R
N and R
For falsification prevented table:
No. 3

R
R
R
For table other than falsification prevented table:
No. 1 (in units of tables or RDAREAs)
No. 3 (in units of schemas)

4
Completing data deletion
721
N and R
N and R
N and R
No. 5

5
Starting reloading
712, 732
N and R
N and R
N and R
No. 5

6
Completing reloading
714, 734
rc=8
N and R
N and R
N and R
No. 5

rc=0
R
R
R
When index has been defined and -i c is specified:
No. 7
Other than the above:
No. 1

7
Batch index creation
Starting index unloading (during restart only)
725
R
R
R
No. 7

8
Starting batch index creation
715
R
R
R
No. 7

9
Completing batch index creation
716
R
R
R
When there is an index that has not been created:
No. 7

Other than the above:
No. 1

Legend:

N: Reload-not-completed data status

R: Reorganizing

: Normal status (before or after reorganization)

* Messages are abbreviated. For example, 712 means KFPL00712-I and 732 means KFPL00732-I.

(b) When reorganizing a LOB column structure base table together with a LOB column (lobunld statement specified)

In the event of an error during table reorganization, Table 8-7 describes the location where table reorganization is restarted. Reorganization of a LOB column structure base table only or together with a LOB column is based on the assumption that the lobunld statement is specified and an unload data file and LOB data unload data file are used.

Specification of options for execution of pdrorg:

pdrorg -k rorg

Specification of a control information file for execution of pdrorg:

unload and lobunld statements

Table 8-7 Restart location when table reorganization is re-executed due to an error (when only LOB column structure base table or both LOB column structure base table and LOB column are reorganized (lobunld statement specified))

No.
Processing during table reorganization
Output message immediately before error*
Table status
Restart location

LOB column structure base table
LOB column
LOB attribute

1
Unloading LOB column structure base table
Starting unloading
712, 732

No. 1

2
Completing unloading
714, 734
rc=8

No. 1

rc=0
N and R
N and R
N and R
For falsification prevented table:
No. 3

R
R
R
For table other than falsification prevented table:
No. 1

3
Reloading to LOB column structure base table
Starting data deletion
Not output
N and R
N and R
N and R
For falsification prevented table:
No. 3

R
R
R
For table other than falsification prevented table:
No. 1

4
Completing data deletion
721
N and R
N and R
N and R
No. 5

5
Starting reloading
712, 732
N and R
N and R
N and R
No. 5

6
Completing reloading
714, 734
rc=8
N and R
N and R
N and R
No. 5

rc=0
R
R
R
When index has been defined and -i c is specified:
No. 7
Other than the above:
No. 1

7
Batch index creation
Starting index unloading (during restart only)
725
R
R
R
No. 7

8
Starting batch index creation
715
R
R
R
No. 7

9
Completing batch index creation
716
R
R
R
When there is an index that has not been created:
No. 7
Other than the above:
No. 10

10
Unloading LOB column
Starting unloading
712, 732
R
R
R
No. 10

11
Completing unloading
714, 734
rc=8
R
R
R
No. 10

rc=0
R
N and R
R
For falsification prevented table:
No. 12

R
R
R
For table other than falsification prevented table:
No. 10

12
Reloading LOB column
Starting data deletion
Not output
R
N and R
R
For falsification prevented table:
No. 12

R
R
R
For table other than falsification prevented table:
No. 10

13
Completing data deletion
721
R
N and R
R
No. 14

14
Starting reloading
712, 732
R
N and R
R
No. 14

15
Completing reloading
714, 734
rc=8
R
N and R
R
No. 14

rc=0

No. 1

Legend:

N: Reload-not-completed data status

R: Reorganizing

: Normal status (before or after reorganization)

* Messages are abbreviated. For example, 712 means KFPL00712-I and 732 means KFPL00732-I.

(c) When reorganizing a LOB column only

In the event of an error during table reorganization, Table 8-8 describes the location where table reorganization is restarted.

Specification of options for execution of pdrorg:

pdrorg -k rorg

Specification of a control information file for execution of pdrorg:

lobunld statement

Table 8-8 Restart location when table reorganization is re-executed due to an error (when LOB column only is reorganized)

No.
Processing during table reorganization
Output message immediately before error*
Table status
Restart location

LOB column structure base table
LOB column
LOB attribute

1
Unloading LOB column
Starting unloading
712, 732

No. 1

2
Completing unloading
714, 734
rc=8

No. 1

rc=0

N and R

For falsification prevented table:
No. 3

R

For table other than falsification prevented table:
No. 1

3
Reloading LOB column
Starting data deletion
Not output

N and R

For falsification prevented table:
No. 3

R

For table other than falsification prevented table:
No. 1

4
Completing data deletion
721

N and R

No. 5

5
Starting reloading
712, 732

N and R

No. 5

6
Completing reloading
714, 734
rc=8

N and R

No. 5

rc=0

No. 1

Legend:

N: Reload-not-completed data status

R: Reorganizing

: Normal status (before or after reorganization)

* Messages are abbreviated. For example, 712 means KFPL00712-I and 732 means KFPL00732-I.

(d) When reorganizing in units of schemas

In the event of an error during table reorganization, Table 8-9 describes the location where table reorganization is restarted.

Specification of options for execution of pdrorg:

pdrorg -k rorg -t all

Table 8-9 Restart location when table reorganization is re-executed due to an error (reorganization in units of schemas)

No. | Processing during table reorganization | Timing | Restart location
1 | Unloading | When an error occurred during unloading | No. 1
2 | Reloading | When an error occurred after the KFPL00722-I message was issued | No. 2

(e) When reorganizing for each server (-g omitted) (applicable to HiRDB/Parallel Server only)

Specification of options for execution of pdrorg:

pdrorg -k rorg

Specification of a control information file for execution of pdrorg:

unload statement only, lobunld statement only, or both unload and lobunld statements

For a HiRDB/Parallel Server, if reloading results in an error during reorganization of a table that is split among multiple servers, reorganization is restarted at the location indicated in (a) through (c) for each server where the unload and lobunld statements are specified in the control information file.

(2) Whether or not commands and SQL statements can be executed on a table that is in reload-not-completed data status

If reloading results in an error during table reorganization or reorganization is incomplete for a reason such as an error during reorganization of a falsification prevented table, the target RDAREA is placed in reload-not-completed data status. In such a case, execution of some commands and SQL statements is restricted.

Table 8-10 describes whether or not utilities can be executed on a table that is in reload-not-completed data status, Table 8-11 describes whether or not operation commands can be executed on such a table, and Table 8-12 describes whether or not SQL statements can be executed on such a table.

Table 8-10 Whether or not utilities can be executed on a table in reload-not-completed data status

Utility name | Function | Table status
B: | B: RN | B: | B: | B: RN | B: RN | B: | B: N
A: | A: | A: RN | A: | A: RN | A: | A: RN | A: N
L: | L: | L: | L: RN | L: | L: RN | L: RN | L: N
pdload | Data loading on LOB column structure base table | -d specified | Y | Y | Y | Y | Y | Y | Y | Y
-d omitted | Y | N | N | N | N | N | N | N
Data loading on LOB column | Y | N | N | N | N | N | N | N
Concurrent data loading on LOB column structure base table and LOB column | -d specified | Y | Y | Y | Y | Y | Y | Y | Y
-d omitted | Y | N | N | N | N | N | N | N
pdrorg | Table reorganization (-k rorg) | -j specified | unload statement | Y | C | C | C | C | C | C | C
-j omitted | unload statement | Y | C | C | C | C | C | C | C
lobunld statement | Y | C | C | C | C | C | C | C
unload statement and lobunld statement | Y | C | C | C | C | C | C | C
Unloading table (-k unld) | Y | Y | Y | Y | Y | Y | Y | Y
Table reloading (-k reld) | -j specified | unload statement | Y | Y | Y | Y | Y | Y | Y | Y
-j omitted | unload statement | Y | Y | Y | Y | Y | Y | Y | Y
lobunld statement | Y | Y | Y | Y | Y | Y | Y | Y
unload statement and lobunld statement | Y | Y | Y | Y | Y | Y | Y | Y
Batch index creation (-k ixmk) | B-TREE index | Y | N | N | N | N | N | N | N
Plug-in index | Y | N | N | N | N | N | N | N
Index re-creation (-k ixrc) | B-TREE index | Y | N | N | N | N | N | N | N
Plug-in index | Y | N | N | N | N | N | N | N
Index reorganization (-k ixor) | Y | N | N | N | N | N | N | N
pdrbal | Y | N | N | N | N | N | N | N
Other utility | Y | Y | Y | Y | Y | Y | Y | Y

Legend:

B: RDAREA storing LOB column structure base table

A: RDAREA containing LOB attributes

L: RDAREA containing LOB columns

RN: Reload-not-completed data status

: Normal status (before or after reorganization)

Y: Can be executed.

C: Can be re-executed if no change is made to the options and control information files. If changes are made to the options or control information files, re-re-execution results in an error.

N: Cannot be executed.

Table 8-11 Whether or not operation commands can be executed on a table in reload-not-completed data status

Operation command name | Condition | Table status
B: | B: RN | B: | B: | B: RN | B: RN | B: | B: RN
A: | A: | A: RN | A: | A: RN | A: | A: RN | A: RN
L: | L: | L: | L: RN | L: | L: RN | L: RN | L: RN
pdrels | RDAREA containing falsification prevented table | B | Y | N | Y | Y | N | N | Y | N
A | Y | Y | N | Y | N | Y | N | N
L | Y | Y | Y | N | Y | N | N | N
Other RDAREA | Y | Y | Y | Y | Y | Y | Y | Y
Other operation command | Y | Y | Y | Y | Y | Y | Y | Y

Legend:

B: RDAREA containing LOB column structure base table

A: RDAREA containing LOB attributes

L: RDAREA containing LOB columns

RN: Reload-not-completed data status

: Normal status (before or after reorganization)

Y: Can be executed.

N: Cannot be executed.

Table 8-12 Whether or not SQL statements can be executed on a table in reload-not-completed data status

SQL | Table status
B: | B: RN | B: | B: | B: RN | B: RN | B: | B: RN
A: | A: | A: RN | A: | A: RN | A: | A: RN | A: RN
L: | L: | L: | L:RN | L: | L:RN | L:RN | L:RN
SELECT statement | Y | Y | C | C | C | C | C | C
UPDATE statement | Y | Y | C | C | C | C | C | C
INSERT statement | Y | Y | C | C | C | C | C | C
DELETE statement | Y | Y | C | C | C | C | C | C
Other SQL statement | Y | Y | Y | Y | Y | Y | Y | Y

Legend:

B: RDAREA storing LOB column structure base table

A: RDAREA storing LOB attributes

L: RDAREA containing LOB columns

RN: Reload-not-completed data status

: Normal status (before or after reorganization)

Y: Can be executed.

C: If a LOB column or a column of an abstract data type with the LOB attribute is to be manipulated, the SQL statement cannot be executed if the RDAREA storing the target LOB column or LOB attribute is in reload-not-completed data status.

(3) Reload-not-completed data status release timing

The reload-not-completed data status is released at the following times:

When the PURGE TABLE statement is executed

When pdmod is used to re-initialize the RDAREA

When table reorganization (-k rorg) is re-executed using the option statement with tblstatus=clear specified, and pdrorg terminates normally

When table reorganization (-k rorg) is re-executed and pdrorg terminates normally

When table reloading (-k reld) is executed and pdrorg terminates normally

When pdload (-d specified) is executed

(4) Notes

Table reorganization (-k rorg) is not restarted in the following cases; execute table reloading (-k reld) or recover the table from its backup:

In the no-log mode (-l n specified)

When a data dictionary table was reorganized

When changes were made to the options and control information file (except for changes to the -b option or to the option statement's tblstatus operand)

Before re-execution, the following processing was executed on the target table (in this case, start from unload processing instead of restarting the processing):
- Execution of pdload with -d specified
- Recovery of RDAREA from a backup created prior to the table reorganization
- Reloading on the table (-k reld)
- Re-initialization of RDAREA by pdmod
- Execution of the PURGE TABLE statement

Do not execute pdrorg from any other user until the current table reorganization is completed (do not concurrently perform re-execution of table reorganization, normal table reorganization, or reloading on the table).

If indexes are defined for a table and table reorganization is re-executed in the index update mode (-i s), the index information file may remain. In such a case, delete the index information file after table reorganization has been completed.

If you are re-executing table reorganization in units of schemas, shut down the RDAREA storing the table in the schema with the pdhold command (to protect UAPs from accessing the table being reorganized and being placed in wait status and to protect the tables from being updated by UAPs). Additionally, do not execute CREATE TABLE or DROP TABLE on the corresponding schema until table reorganization for that schema is completed.

Table reorganization cannot be restarted if the -r option is specified, a non-partitioning key index is specified in the -b option, and the restart location falls on the unloading of LOB column structure base table or unloading of LOB column. In such a case, delete the -b option and then re-execute or execute table reloading (-k reld).

8.5 Reorganizing data dictionary tables

Organization of this section

8.5.1 Example

8.5.2 Cross-reference by purpose

8.5.1 Example

This section presents an example of using the database reorganization utility (reorganizing a data dictionary table).

Example 1

This example reorganizes data dictionary tables in units of tables. The example assumes that the data dictionary tables are stored in the RDAREAs shown as follows. When reorganizing data dictionary tables, be sure to shut down the RDAREAs or LOB RDAREAs that contain the data dictionary tables being reorganized.

Data dictionary RDAREAs (DDIC and DIC_RTN)

Data dictionary LOB RDAREAs (RTN_SRC and RTN_OBJ)

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

This example reorganizes the data dictionary tables in units of tables.

-k rorg: Specification for unloading

-c dic: Specification for reorganizing data dictionary tables

control_file: Name of the control information file

Contents of the control information file (control_file)

unload /usr/unload_file                     1
lobunld /usr/lob_unload_file                2

Explanation:

Specifies the unload data file:
/usr/unload_file: Name of the unload data file

Specifies the LOB data unload file:
/usr/lob_unload_file: Name of the LOB data unload file

8.5.2 Cross-reference by purpose

Required options and control statements depend on the type of reorganization.

The options listed in (1) and the control statements are mandatory. The items in (2) and (3) are related to the options and control statements presented in the Reference column. For details about the options, see Section 8.9.2.

Organization of this subsection

(1) Required items

(2) Information to be specified depending on the type of unload data file

(3) Information to be specified depending on the reorganization method

(1) Required items

Item | Reference
Option | Control statement
Type of pdrorg processing | -k rorg | (1) |  |
Reorganization of data dictionary table | -c dic | (2) |  |
File containing the control statements | control-information-filename | (19) |  |
Information about an unload data file |  |  | unload statement | 8.9.4

: Not applicable

(2) Information to be specified depending on the type of unload data file

Item | Reference location
Option | Control statement
Using EasyMT | -f | (12) | mtguide statement | 8.9.3
emtdef statement | 8.9.3
Using HiRDB files | -f | (12) |  |

: Not applicable

(3) Information to be specified depending on the reorganization method

Item | Reference location
Option | Control statement
Reorganizing only a specified data dictionary table | -t | (3) |  |
Acquiring or not acquiring database update log | -l | (5) |  |
Monitoring the execution time of pdrorg |  |  | option statement | 8.9.16
Changing the pdrorg executor's user authorization identifier to a value other than the value of environment variable PDUSER* | -u | (10) |  |
Changing a reorganization status message output interval to a value other than 100,000 lines | -m | (16) |  |
Monitoring the response time for server-to-server communication | -X | (17) |  |

: Not applicable

* If omitted, the system assumes the value of the PDUSER environment variable. If the PDUSER environment variable has not been specified, the system assumes the user name in the login window.

8.6 Creating indexes in batch mode

Organization of this section

8.6.1 Examples

8.6.2 Cross-reference by purpose

8.6.1 Examples

This section presents examples of using the database reorganization utility (creating indexes in batch mode), listed as follows:

Example
Description
Classification

1
Creating an index in batch mode

Creating an index in batch mode on the basis of the index information file output in table reorganization example 2

S

2
Creating a plug-in index in delayed batch mode

Creating a plug-in index defined for a table with a abstract data type (SGMLTEXT) in delayed batch mode

3
Creating indexes in batch mode

Using the index information files output during the execution of the database load utility (index information output mode)

P

S: HiRDB/Single Server

P: HiRDB/Parallel Server

Organization of this subsection

(1) Creating an index in batch mode

(2) Creating a plug-in index in delayed batch mode

(3) Creating indexes in batch mode

(1) Creating an index in batch mode

Example 1

This example creates an index (INDEX2) in batch mode on the basis of the index information that was output in table reorganization example 2. The name of the index information file is /usr/index_inf2. Index information in PDBUSER02 has already been obtained in /usr/index_inf4.

The example assumes that the following table (TABLE1) and indexes have been defined:

Table definition:

CREATE TABLE TABLE1(C1 INT NOT NULL,C2 CHAR(8),C3 INT)
        IN ((PDBUSER01) C1 > 10,(PDBUSER02))

Index definition (partitioning key index):

CREATE INDEX INDEX1 ON TABLE1(C1)
        IN ((PDBUSER03),(PDBUSER04))

Index definition (non-partitioning key index):

CREATE INDEX INDEX2 ON TABLE1(C2,C1) IN (PDBUSER05)

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

This example creates an index (INDEX2) in batch mode on the basis of the index information.

-k ixmk: Specification for batch index creation

-t TABLE1: Name of the table subject to batch index creation

-o: Specification for deleting unneeded index information files after index creation is completed

control_file: Name of the control information file

Contents of the control information file (control_file)

index INDEX2 PDBUSER05 /usr/index_inf2                  1
index INDEX2 PDBUSER05 /usr/index_inf4                  1
sort /usr/sortwork,8192                                 2

Explanation:

Specifies the index information files containing the index information:
INDEX2: Index identifier
PDBUSER05: Name of the index storage RDAREA
/usr/index_inf2, /usr/index_inf4: Names of the index information files

Specifies the work directory for sorting:
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

(2) Creating a plug-in index in delayed batch mode

Example 2

This example creates a plug-in index (INDEX1) in delayed batch mode that is defined for a table (TABLE1) with columns of abstract data type (SGMLTEXT). The abstract data type is provided by the HiRDB Text Search Plug-in.

The example assumes that the following table and index have been defined:

Table definition:

CREATE TABLE TABLE1(C1 INT,C2 SGMLTEXT
         ALLOCATE (SGMLTEXT IN LOBUSER01)
         PLUGIN'<DTD>sgml.dtd</DTD>' ) IN PDBUSER01

Plug-in index definition:

CREATE INDEX INDEX1 USING TYPE NGRAM ON TABLE1(C2)
         IN LOBUSER02

The index information file was created by executing an updating UAP (INSERT or UPDATE statement) with the following definition information:

Server definition:

set pd_plugin_ixmk_dir="/hd001/ixdir"

Client environment variable:

PDPLGIXMK YES

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

This example creates a plug-in index (INDEX1) defined for the table (TABLE1) in delayed batch mode.

-k ixmk: Specification for batch index creation

-t TABLE1: Name of the table subject to batch index creation

control_file: Name of the control information file

Contents of the control information file (control_file)

index INDEX1 LOBUSER02 /hd001/ixdir/INDEX1.LOBUSER02               1

Explanation:

Specifies the index information file containing the information subject to delayed batch index creation
INDEX1: Identifier of the plug-in index subject to delayed batch index creation
LOBUSER02: Name of the index storage RDAREA for the plug-in index subject to delayed batch index creation
/hd001/ixdir/INDEX1.LOBUSER02: Name of the index information file

(3) Creating indexes in batch mode

Example 3

This example creates indexes in batch mode on the basis of the index information files. It uses four index information files that were output during the execution of the database load utility (to load data in index information output mode).

The example assumes that the following table and indexes have been defined:

Table definition:

CREATE TABLE TABLE1(C1 INT NOT NULL,C2 CHAR(8),C3 INT)
              IN ((PDBUSER01) C1 > 10,(PDBUSER02))

Index definition (partitioning key index):

CREATE INDEX INDEX1 ON TABLE1(C1)
              IN ((PDBUSER03),(PDBUSER05))

Index definition (non-partitioning key index):

CREATE INDEX INDEX2 ON TABLE1(C2,C1)
              IN ((PDBUSER04),(PDBUSER06))

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

This example creates indexes in batch mode on the basis of the index information output during data load operation.

-k ixmk: Specification for batch index creation

-t TABLE1: Name of the table subject to batch index creation

control_file: Name of the control information file

Contents of the control information file (control_file)

index INDEX1 PDBUSER03 /usr/index_inf1          1
index INDEX2 PDBUSER04 /usr/index_inf2          1
index INDEX1 PDBUSER05 /usr/index_inf3          1
index INDEX2 PDBUSER06 /usr/index_inf4          1
sort bes1 /usr/sortwork,8192                    2
sort bes2 /usr/sortwork,8192                    2

Explanation:

Specifies the index information files containing the index information:
INDEX1, INDEX2: Index identifiers
PDBUSER03, PDBUSER04, PDBUSER05, PDBUSER06: Names of the index storage RDAREAs
/usr/index_inf1, /usr/index_inf2, /usr/index_inf3, /usr/index_inf4: Names of the index information files

Specifies the work directory for sorting:
bes1, bes2: Names of the servers used to create the sort work file
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

8.6.2 Cross-reference by purpose

Required options and control statements depend on the type of batch index creation.

The options listed in (1) and the control statements are mandatory. The items in (2) are related to the options and control statements presented in the Reference column. For details about the options, see Section 8.9.2.

Organization of this subsection

(1) Required items

(2) Information to be specified depending on the batch index creation method

(1) Required items

Item | Reference
Option | Control statement
Type of pdrorg processing | -k ixmk | (1) |  |
Name of the table to be subject to batch index creation | -t | (3) |  |
File containing the control statements | control-information-filename | (19) |  |
Information about the index information file |  |  | index statement | 8.9.5

: Not applicable

(2) Information to be specified depending on the batch index creation method

Item | Reference location
Option | Control statement
Acquiring or not acquiring database update log | -l | (5) |  |
Changing the pdrorg executor's user authorization identifier to a value other than the value of environment variable PDUSER¹ | -u | (10) |  |
Executing batch index creation in batch input/output mode using local buffer instead of global buffer² | -n | (11) |  |
Automatically deleting index information files after index creation | -o | (15) |  |
Changing a batch index creation status message output interval to a value other than 100,000 lines | -m | (16) |  |
Monitoring the response time for server-to-server communication | -X | (17) |  |
Not enough space in the /tmp directory |  |  | sort statement | 8.9.8
Monitoring the execution time of pdrorg |  |  | option statement | 8.9.16
Changing the percentage of free space in index during batch index creation³ |  |  | option statement | 8.9.16
The inner replica facility is used | -q | (18) |  |

: Not applicable

¹ If omitted, the system assumes the value of the PDUSER environment variable. If the PDUSER environment variable has not been specified, the system assumes the user name in the login window.

² By specifying the number of batch input/output pages, you can reduce the number of I/O operations because data is input/output in units of specified pages in batch mode.

³ If a space shortage occurs in an RDAREA during execution of pdrorg, you can complete the processing without having to expand the RDAREA temporarily (except for an index whose percentage of free space is 0).

8.7 Re-creating indexes

Organization of this section

8.7.1 Examples

8.7.2 Cross-reference by purpose

8.7.1 Examples

This section presents examples of using the database reorganization utility (re-creating indexes), listed as follows:

Example
Description
Classification

1
Re-creating a plug-in index

Re-creating a plug-in index defined for a table with an abstract data type (SGMLTEXT)

S

2
Re-creating indexes in units of index storage RDAREAs
P

3
Re-creating indexes in units of indexes

S: HiRDB/Single Server

P: HiRDB/Parallel Server

Organization of this subsection

(1) Re-creating a plug-in index

(2) Re-creating an index in units of index storage RDAREAs

(3) Re-creating indexes in units of indexes

(1) Re-creating a plug-in index

Example 1

This example re-creates a plug-in index (INDEX1) defined for a table (TABLE1) with columns of abstract data type (SGMLTEXT). The abstract data type (SGMLTEXT) is provided by the HiRDB Text Search Plug-in.

The example assumes that the following table and index have been defined:

Table definition:

CREATE TABLE TABLE1(C1 INT,C2 SGMLTEXT
        ALLOCATE (SGMLTEXT IN LOBUSER01)
        PLUGIN'<DTD>sgml.dtd</DTD>' ) IN PDBUSER01

Plug-in index definition:

CREATE INDEX INDEX1 USING TYPE NGRAM ON TABLE1(C2)
        IN LOBUSER02

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

This example creates a plug-in index (INDEX1) defined for a table (TABLE1).

-k ixrc: Specification for index re-creation

-t TABLE1: Name of the table subject to index re-creation

control_file: Name of the control information file

Contents of the control information file (control_file)

index INDEX1 LOBUSER02 /usr/index_file                   1

Explanation:

Specifies the index information file to which plug-in index information is to be output:
INDEX1: Identifier of the plug-in index to be created
LOBUSER02: Name of the RDAREA storing the plug-in index to be created
/usr/index_file: Name of the index information file to which index information is output

(2) Re-creating an index in units of index storage RDAREAs

Example 2

This example re-creates an index (INDEX1) in units of RDAREAs (PDBUSER03).

The example assumes that the following table and indexes have been defined:

Table definition:

CREATE TABLE TABLE1(C1 INT NOT NULL,C2 CHAR(8),C3 INT)
              IN ((PDBUSER01) C1 > 10,(PDBUSER02))

Index definition (partitioning key index):

CREATE INDEX INDEX1 ON TABLE1(C1)
              IN ((PDBUSER03),(PDBUSER05))

Index definition (non-partitioning key index):

CREATE INDEX INDEX2 ON TABLE1(C2,C1)
              IN ((PDBUSER04),(PDBUSER06))

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

This example re-creates indexes (INDEX1 and INDEX2).

-k ixrc: Specification for index re-creation

-t TABLE1: Name of the table subject to index re-creation

control_file: Name of the control information file

Contents of the control information file (control_file)

index INDEX1 PDBUSER03 /usr/index_inf1                1
sort bes1 /usr/sortwork,8192                          2

Explanation:

Specifies the index information file:
INDEX1: Index identifier
PDBUSER03: Name of the index storage RDAREA
/usr/index_inf1: Name of the index information file

Specifies the work directory for sorting:
bes1: Name of the server used to create the sort work file
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

(3) Re-creating indexes in units of indexes

Example 3

This example re-creates indexes (INDEX1 and INDEX2) defined for a row-partitioned table (TABLE1).

The example assumes that the following table and indexes have been defined:

Table definition:

CREATE TABLE TABLE1(C1 INT,C2 INT NOT NULL)
    IN ((PDBUSER01) C2<200,(PDBUSER02) C2<400,(PDBUSER03))

Index definition:

CREATE INDEX INDEX1 ON TABLE1(C2) IN ((IDX01),(IDX02),(IDX03))
CREATE INDEX INDEX2 ON TABLE1(C1) IN ((IDX04),(IDX05))

Overview

(a) Re-creating all indexes defined for the table

Relationship between input/output files and RDAREAs

Explanation of the command

This example re-creates indexes (INDEX1 and INDEX2).

-k ixrc: Specification for index re-creation

-t TABLE1: Name of the table subject to index re-creation

control_file: Name of the control information file

Contents of the control information file (control_file)

idxname name=*                                  1
idxwork bes1 /index/workdir01                   2
idxwork bes2 /index/workdir02                   2
sort bes1 /usr/sortwork,8192                    3
sort bes2 /usr/sortwork,8192                    3

Explanation:

Specifies index re-creation in units of indexes:
*: Specification for re-creating all indexes defined for the table (TABLE1)

Specifies the directory in which index information files are to be created:
bes1, bes2: Names of the servers used to create index information
/index/workdir01, /index/workdir02: Names of the directories in which index information files are created

Specifies the work directory for sorting:
bes1, bes2: Names of the servers used to create the sort work file
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

(b) Re-creating one of the indexes defined for a table

Relationship between input/output files and RDAREAs

Explanation of the command

This example re-creates an index (INDEX1).

-k ixrc: Specification for index re-creation

-t TABLE1: Name of the table subject to index re-creation

control_file: Name of the control information file

Contents of the control information file (control_file)

idxname name=INDEX1                           1
idxwork bes1 /index/workdir01                 2
idxwork bes2 /index/workdir02                 2
sort bes1 /usr/sortwork,8192                  3
sort bes2 /usr/sortwork,8192                  3

Explanation:

Specifies index re-creation in units of indexes:
INDEX1: Name of the index to be re-created

Specifies the directory in which index information files are to be created:
bes1, bes2: Names of the servers used to create index information
/index/workdir01, /index/workdir02: Names of the directories in which index information files are created

Specifies the work directory for sorting:
bes1, bes2: Names of the servers used to create the sort work file
/usr/sortwork: Name of the directory in which the sort work file is created
8192: Size of buffer for sorting (in KB)

8.7.2 Cross-reference by purpose

Required options and control statements depend on the type of index re-creation.

The options listed in (1) and the control statements are mandatory. The items in (2) are related to the options and control statements presented in the Reference column. For details about the options, see Section 8.9.2.

Organization of this subsection

(1) Required items

(2) Information to be specified depending on the index re-creation method

(1) Required items

Item | Reference
Option | Control statement
Type of pdrorg processing | -k ixrc | (1) |  |
Name of the table subject to index re-creation | -t | (3) |  |
File containing the control statements | control-information-filename | (19) |  |
Information about the index information file or index |  |  | index or idxname statement | 8.9.5 or 8.9.6

: Not applicable

(2) Information to be specified depending on the index re-creation method

Item | Reference location
Option | Control statement
Acquiring or not acquiring database update log | -l | (5) |  |
Changing the pdrorg executor's user authorization identifier to a value other than the value of environment variable PDUSER¹ | -u | (10) |  |
Re-creating in batch input/output mode using local buffer instead of global buffer² | -n | (11) |  |
Automatically deleting index information files after index re-creation | -o | (15) |  |
Changing an index re-creation status message output interval to a value other than 100,000 lines | -m | (16) |  |
Monitoring the response time for server-to-server communication | -X | (17) |  |
Not enough space in the /tmp directory when index is re-created in units of index storage RDAREAs (using the index statement) |  |  | sort statement | 8.9.8
Not enough space in the /tmp directory when index is re-created in units of indexes (using the idxname statement) |  |  | idxwork statement | 8.9.7
sort statement | 8.9.8
Monitoring the execution time of pdrorg |  |  | option statement | 8.9.16
Changing the percentage of free space in index during index re-creation³ |  |  | option statement | 8.9.16
The inner replica facility is used | -q | (18) |  |

: Not applicable

¹ If omitted, the system assumes the value of the PDUSER environment variable. If the PDUSER environment variable has not been specified, the system assumes the user name in the login window.

² By specifying the number of batch input/output pages, you can reduce the number of I/O operations because data is input/output in units of specified pages in batch mode.

³ If a space shortage occurs in an RDAREA during execution of pdrorg, you can complete the processing without having to expand the RDAREA temporarily (except for an index whose percentage of free space is 0).

8.8 Reorganizing indexes

Organization of this section

8.8.1 Example

8.8.2 Cross-reference by purpose

8.8.1 Example

This section presents an example of using the database reorganization utility (reorganizing indexes).

Example 1

This example reorganizes the indexes (INDEX1 and INDEX2) defined for a table (TABLE1).

The example assumes that the following table and indexes have been defined:

Table definition:

CREATE TABLE TABLE1(C1 INT NOT NULL,C2 CHAR(8),C3 INT)
              IN ((PDBUSER01) C1 > 10,(PDBUSER02))

Index definition (partitioning key index):

CREATE INDEX INDEX1 ON TABLE1(C1)
              IN ((PDBUSER03),(PDBUSER05))

Index definition (non-partitioning key index):

CREATE INDEX INDEX2 ON TABLE1(C2,C1)
              IN ((PDBUSER04),(PDBUSER06))

Overview

Relationship between input/output files and RDAREAs

Explanation of the command

This example reorganizes the indexes (INDEX1 and INDEX2) defined for a table (TABLE1).

-k ixor: Specification for index reorganization

-t TABLE1: Name of the table subject to index reorganization

control_file: Name of the control information file

Contents of the control information file (control_file)

idxname name=*                              1
idxwork bes1 /usr/idx_file                  2
idxwork bes2 /usr/idx_file                  2

Explanation:

Specifies index reorganization in units of indexes:
*: Specification for reorganizing all indexes defined for the table (TABLE1)

Specifies the directory for index information files:
bes1, bes2: Names of the servers used to create index information
/usr/idx_file: Name of the directory in which index information files are created

8.8.2 Cross-reference by purpose

Required options and control statements depend on the type of index reorganization.

The options listed in (1) and the control statements are mandatory. The items in (2) are related to the options and control statements presented in the Reference column. For details about the options, see Section 8.9.2.

Organization of this subsection

(1) Required items

(2) Information to be specified depending on the index reorganization method

(1) Required items

Item | Reference
Option | Control statement
Type of pdrorg processing | -k ixor | (1) |  |
Name of the table subject to index reorganization | -t | (3) |  |
File containing the control statements | control-information-filename | (19) |  |
Information about the index information file or index |  |  | index or idxname statement | 8.9.5 or 8.9.6

: Not applicable

(2) Information to be specified depending on the index reorganization method

Item | Reference location
Option | Control statement
Acquiring or not acquiring database update log | -l | (5) |  |
Changing the pdrorg executor's user authorization identifier to a value other than the value of environment variable PDUSER¹ | -u | (10) |  |
Automatically deleting index information files after index reorganization | -o | (15) |  |
Monitoring the response time for server-to-server communication | -X | (17) |  |
Not enough space in the /tmp directory when index is reorganized in units of indexes (using the idxname statement) |  |  | idxwork statement | 8.9.7
Monitoring the execution time of pdrorg |  |  | option statement | 8.9.16
Changing the percentage of free space in index during index reorganization² |  |  | option statement | 8.9.16
The inner replica facility is used | -q | (18) |  |

: Not applicable

¹ If omitted, the system assumes the value of the PDUSER environment variable. If the PDUSER environment variable has not been specified, the system assumes the user name in the login window.

² If a space shortage occurs in an RDAREA during execution of pdrorg, you can complete the processing without having to expand the RDAREA temporarily (except for an index whose percentage of free space is 0).

8.9 Command format

Organization of this section

8.9.1 Format

8.9.2 Options

8.9.3 mtguide and emtdef statements (specification of MT information)

8.9.4 unload statement (specification of unload data file)

8.9.5 index statement (specification of index information file information)

8.9.6 idxname statement (specification of index information)

8.9.7 idxwork statement (specification of directory for index information file)

8.9.8 sort statement (specification of work directory for sorting)

8.9.9 lobunld statement (specification of LOB data unload file)

8.9.10 unlduoc statement (specification of UOC storage library information)

8.9.11 tblname statement (re-registration of table data to another table)

8.9.12 array statement (specification of row data output format for repetition columns)

8.9.13 unld_func statement (specification of constructor parameter reverse creation function)

8.9.14 reld_func statement (specification of constructor function)

8.9.15 constraint statement (specification of check pending status)

8.9.16 option statement (specification of data processing information)

8.9.17 report statement (specification of a file to which pdrorg tuning information is output)

8.9.18 blobtovarchar statement (specification of column subject to data conversion)

8.9.19 fixtext_option statement (specification of output data during creation of input data file in fixed-size data format)

8.9.1 Format

This section explains the format of the pdrorg command. In the following table, each number corresponds to the number assigned to each option.

Options in bold are important or mandatory.

No.
Format

1
pdrorg
-k processing-type

2
[-c object-of-processing]

3

[-t {[authorization-identifier.]table-identifier|[authorization-identifier.]all
|table-identifier[,table-identifier]...}]

4
[-r RDAREA-name]

5
[-l log-acquisition-method]

6
[-i index-creation-method]

7

[-W {{dat|extdat}[,[separator-character][,{cr|crlf}][,sup]]
      |bin
      |fixtext[,[padding-character][,{cr|crlf}]]}]

8
[-g]

9
[-j]

10
[-u authorization-identifier]

11

[-n [batch-input/output-local-buffer-sectors-count],[div],
[random-access-local-buffer-sectors-count]]

12
[-f unload-data-file-type-or-LOB-data-unload-file-type]

13
[-b unload-sequence]

14
[-s]

15
[-o]

16
[-m progress-message-output-interval]

17

[-X response-monitoring-time-for-server-to-server-communication]

18
[-q generation-number]

19
control-information-filename

Note

Be sure to specify control-information-filename as the last option.

Relationships between functions and options of pdrorg

The following table shows the relationships between the functions and options of the pdrorg command:

Options
pdorg's functions

Table reorg
Table unldg
Table reldg
Data dict tbl reorg
Batch index creation
Index
re-creation
Index
reorg

-k
R
R
R
R
R
R
R

-c
O
O
O
R

-t
R
R
R
O
R
R
R

-r
O
O
O

-l
O

O
O
O
O
O

-i
O

O

-W

O

-g
O
O
O

-j
O
O
O

-u
O
O
O
O
O
O
O

-n
O
O
O

O
O

-f
O
O
O
O

-b
O
O

-S
O
O

-o
O

O

O
O
O

-m
O
O
O
O
O
O

-X
O
O
O
O
O
O
O

-q
O
O
O

O
O
O

control-information-filename
R
R
R
R
R
R
R

R: Required

O: Optional

: Not specifiable

8.9.2 Options

Organization of this subsection

(1) -k processing-type

(2) -c object-of-processing

(3) -t {[authorization-identifier.]table-identifier|[authorization-identifier.]all|table-identifier[,table-identifier]...}

(4) -r RDAREA-name

(5) -l log-acquisition-method

(6) -i index-creation-method

(7) -W {{dat|extdat}[,[separator-character][,{cr|crlf}][,sup]]|bin|fixtext[,[padding-character][,{cr|crlf}]]}

(8) -g

(9) -j

(10) -u authorization-identifier

(11) -n [batch-input/output-local-buffer-sectors-count],[div],[random-access-local-buffer-sectors-count]

(12) -f unload-data-file-type-or-LOB-data-unload-file-type

(13) -b unload-sequence

(14) -s

(15) -o

(16) -m progress-message-output-interval

(17) -X response-monitoring-time-for-server-to-server-communication

(18) -q generation-number

(19) control-information-filename

(1) -k processing-type

Specifies the type of processing to be executed by pdrorg:

rorg

Reorganize a table.

unld

Unload a table.

reld

Reload a table.

ixmk

Execute batch index creation.

ixrc

Re-create an index.

ixor

Reorganize an index.

(a) Notes

When -k rorg is specified, the utility executes unload, reload, and index creation processing (if -i c specified) sequentially in this order. If the utility terminates abnormally during the processing, the utility stores information about the processing that resulted in abnormal termination as a status in the database table. Therefore, when the same processing is restarted, the utility starts from the processing that resulted in abnormal termination. This means that the utility does not always start with unload processing. For details, see 8.4.4 Handling of a reloading error during table reorganization.

To always start with unload processing, regardless of whether the previous pdrorg terminated normally or abnormally, consider using the type of operation that executes -k unld and -k reld separately.

(2) -c object-of-processing

<<user>>

Specifies the type of table to be reorganized:

dic

Reorganize a data dictionary table.

user

Reorganize a table.

(3) -t {[authorization-identifier.]table-identifier|[authorization-identifier.]all|table-identifier[,table-identifier]...}

Specifies the name of the table being processed.

(a) User-defined table

To specify a user-defined table, use the following format:

-t {[authorization-identifier.]table-identifier| [authorization-identifier.]all}

Specify either only one table or all to reorganize all tables owned by the schema. Reorganizing all tables owned by a schema is called reorganizing in units of schemas.

If you omit the authorization identifier, the system assumes the user name used to establish connection with HiRDB.

Rules

You cannot specify a view table.

If an authentication identifier or table identifier is enclosed in double quotation marks ("), the command treats it as being case sensitive. If it is not enclosed in double quotation marks ("), the command treats it as in all uppercase letters. If you are using sh (Bourne shell), csh (C shell), or ksh (Korn shell), you must enclose the entire identifier in single quotation marks (').

Rules for reorganization in units of schemas

Reorganization in units of schemas is applicable to -k rorg, -k unld, and -k reld, that does not involve reorganization or reloading with the synchronization point specification.

If you unload a table in units of schemas, you can use the obtained unload data file to reload the table in units of tables. On the other hand, if you unload a table in units of tables, you cannot use the obtained unload data file to reload the table in units of schemas.

Tables are unloaded or reloaded in the order that their table identifiers are specified.

If an error occurs while processing a table, the system terminates the processing at that point. If an error occurs while reloading a table, reload the affected table as well as any unprocessed table in units of tables. Reorganization has been completed for the tables for which processing has terminated normally.

If you are reorganizing a table in units of schemas, use the pdhold command to shut down the RDAREAs storing the table in the schema so that the UAP that accesses the table under reorganization is not placed in wait status.

If tables contained in the schema are different between unload and reload operations, the system handles them as follows:
Tables during unload operation: (T1, T3, T5, T7)
Tables during reload operation: (T1, T2, T3, T5)
T1, T3, T5: Are reloaded.
T2: Is skipped because it was not in the schema during unload operation.
T7: Is not reloaded because it was not in the schema during unload operation.

If there is an external table for the schema, the external table will not be processed.

(b) Data dictionary tables

To specify data dictionary tables, use the following format:

-t table-identifier[,table-identifier]...

You can specify as many table identifiers as there are data dictionary tables. You cannot specify an authorization identifier. To reorganize all data dictionary tables, omit the -t option.

Before starting reorganization of a data dictionary table, make a backup copy of the data dictionary RDAREA (if a space shortage occurs in the RDAREA during reload processing, the backup copy can be used to restore the RDAREA to its status before reorganization and then you can expand the RDAREA).

You can specify the following data dictionary table identifiers:

No. | Table identifier | Remarks
1 | SQL_PHYSICAL_FILES |
2 | SQL_RDAREAS
3 | SQL_TABLES
4 | SQL_COLUMNS
5 | SQL_INDEXES
6 | SQL_USERS
7 | SQL_RDAREA_PRIVILEGES
8 | SQL_TABLE_PRIVILEGES
9 | SQL_DIV_TABLE
10 | SQL_DIV_TABLE_REGULARIZE | Table used by the system
11 | SQL_INDEX_COLINF |
12 | SQL_TABLE_STATISTICS
13 | SQL_COLUMN_STATISTICS
14 | SQL_INDEX_STATISTICS
15 | SQL_VIEW_TABLE_USAGE
16 | SQL_VIEWS
17 | SQL_VIEW_DEF | Table used by the system
18 | SQL_DIV_INDEX |
19 | SQL_DIV_COLUMN
20 | SQL_REFERENTIAL_CONSTRAINTS | Table used by the system
21 | SQL_ALIASES |
22 | SQL_ROUTINES
23 | SQL_ROUTINE_RESOURCES
24 | SQL_ROUTINE_PARAMS
25 | SQL_DATATYPES
26 | SQL_DATATYPE_DESCRIPTORS
27 | SQL_TABLE_RESOURCES
28 | SQL_PLUGINS
29 | SQL_PLUGIN_ROUTINES
30 | SQL_PLUGIN_ROUTINE_PARAMS
31 | SQL_REGISTRY_CONTEXT | Table used by the system
32 | SQL_REGISTRY_KEY
33 | SQL_INDEX_TYPES | None
34 | SQL_INDEX_RESOURCES
35 | SQL_INDEX_DATATYPE
36 | SQL_INDEX_FUNCTION
37 | SQL_TYPE_RESOURCES
38 | SQL_INDEX_TYPE_FUNCTION
39 | SQL_EXCEPT
40 | SQL_FOREIGN_SERVERS
41 | SQL_USER_MAPPINGS
42 | SQL_USAGE_PRIVILEGES | Table used by the system
43 | SQL_IOS_GENERATIONS | None
44 | SQL_PARTKEY
45 | SQL_PARTKEY_DIVISION
46 | SQL_AUDITS
47 | SQL_AUDIT_REGULARIZE | Table used by the system
48 | SQL_TRIGGERS | None
49 | SQL_TRIGGER_ACTCOND | Table used by the system
50 | SQL_TRIGGER_COLUMNS | None
51 | SQL_TRIGGER_DEF_SOURCE
52 | SQL_TRIGGER_USAGE
53 | SQL_KEYCOLUMN_USAGE
54 | SQL_TABLE_CONSTRAINTS
55 | SQL_CHECKS
56 | SQL_CHECK_COLUMNS
57 | SQL_REFERENTIAL_CONSTRAINTS
58 | SQL_DIV_TYPE
59 | SQL_SYSPARAMS
60 | SQL_DB_MANAGEMENT | Table used by the system
61 | SQL_DB_STATE_ANALYZED
62 | SQL_PUBLICVIEW_SAME_USERS

(4) -r RDAREA-name

<identifier> ((1-30))

For a row-partitioned table stored in multiple RDAREAs, this option specifies the name of the RDAREA being reorganized.

When this option is omitted, the utility assumes that all data for the row-partitioned table is being reorganized.

(a) Rules

If an RDAREA name is enclosed in double quotation marks ("), the command treats it as being case sensitive. If it is not enclosed in double quotation marks ("), the command treats it as in all uppercase letters. If an RDAREA name contains a space, enclose the RDAREA name in double quotation marks ("). If you are using sh (Bourne shell), csh (C shell), or ksh (Korn shell), you must enclose the entire set of RDAREA names in single quotation marks (').

If you have unloaded a table partitioned by the flexible hash partitioning method in units of RDAREAs and changed the hash function or added an RDAREA, the system ignores the hash function during the reload operation and stores the data as is in the original RDAREAs.
If you have unloaded a table partitioned by the key range or FIX hash partitioning method in units of RDAREAs, you cannot reload the table using different partitioning conditions.
To reorganize a table by changing the hash function, adding an RDAREA, or modifying the partitioning conditions, use the method of reorganization in units of tables, specifying the -g option. To change the hash function or add an RDAREA, use the ALTER TABLE definition SQL statement. To determine whether or not reloading is permitted when the table definition for an unload table does not match the table definition of the reload table, see Section 8.4.3 Whether or not reloading is permitted when the table definitions of unload table and reload table do not match.

When reorganizing tables in units of schemas, you cannot specify the -r option.

If you are specifying a replica RDAREA, specify its original RDAREA name in this option and also specify the target generation number in the -q option.

(5) -l log-acquisition-method

<<p>>

Specifies the method for acquiring the database update log during the execution of pdrorg.

If pdrorg terminates abnormally during execution, the database is not restored to its status immediately before execution of pdrorg even when a database update log has been acquired. For details about how to handle abnormal termination of pdrorg, see 8.13 Database status in the event of an error and recovery method.

a

Indicates the log acquisition mode in which the system collects database updating log information required for rollback and rollforward.

Criteria

This mode is suitable for reorganizing a small amount of table data. When pdrorg is executed in the log acquisition mode, there is no need to make backups either before or after execution of the utility, but performance is lower than in the other modes.

p

Indicates the pre-update log acquisition mode in which the system collects database updating log information required for rollback, but not the database updating log information required for rollforward.

Criteria

This mode is suitable for reorganizing a large amount of table data. When pdrorg is executed in pre-update log acquisition mode, execution time is faster than in the log acquisition mode. However, you need to make backup copies after the execution of pdrorg to protect against possible media errors.

If an error occurs during execution of pdrorg, pdrorg restores the database to the synchronization point immediately preceding the error. This prevents RDAREAs from being placed in no-log shutdown status; however, the target table is not restored to its status immediately before execution of pdrorg.

n

Indicates the no-log mode in which the system does not collect database updating log information.

Criteria

When the pdrorg command is executed in the no-log mode, execution time is faster than in other modes. However, you must make backups before and after execution of the pdrorg command so that the database can be restored from its backup in the event of an error during utility execution or from its backup and log information in the event of a media error. This mode is suitable for reorganizing a large amount of table data.

Notes

If an error occurs while pdrorg is executing in the no-log mode, you need to either restore the RDAREA that was shut down due to an error from its backup copy or re-initialize it.

You cannot specify the no-log mode for a reorganization or reload operation with the synchronization point specification.

For index re-creation (-k ixrc), the system assumes the log acquisition mode to protect the database under key search processing from being placed in error shutdown status. For index reorganization (-k ixor), the system assumes the pre-update log acquisition mode for the same reason. Therefore, the segment release log is output during key search processing, even if you specify the no-log mode.

(a) Notes

If p or n is specified and the database can be restored from its previous backup copy and log information or from its unload data (applicable if the corresponding RDAREA contains only the table being reorganized), there is no need to make backup copies before the execution of pdrorg.

For details about the operating method when p or n is specified (when the database updating log information is not collected), see the HiRDB Version 8 System Operation Guide.

The transaction log is always collected by the transaction (T) that is generated by pdrorg, whether or not the -l option is specified. The system creates the following amount of transaction log information per server; the formula for determining the amount of log information during execution of pdrorg is shown below:
Amount of log = (1328 + 176 3) T + A (bytes)

-k unld specified:

T = (x 2) + (y 2)

-k reld specified:

T = (x 3) + (y 3) + (z 2)

-k ixrc specified:

T = (x 2) + (z 2)

-k ixmk specified:

T = z 2

-k ixor specified:

T = z 3

-k rorg specified:

T = Value when -k unld is specified + value when -k reld is specified + (x + y)

x: Number of tables (for reloading with synchronization point specification, the number of synchronization points)*

y: Number of LOB column (LOB attribute) storage RDAREAs (when -j is specified, 1)*

z: Number of indexes number of index storage RDAREAs (this is not needed if -i s is specified)*

* For processing in units of schemas, you must determine the value for all tables owned by the corresponding schema.

A: Amount of system log information that is output according to database manipulation (amount of database update log information). This value depends on the value of the -l option. For details about determining the amount of system log information, see the HiRDB Version 8 Installation and Design Guide.
If p or n is specified, the system collects the following amount of ENQ log information per server by lock control:

ENQ log = (p + q + r) T

p: Number of table storage RDAREAs

q: Number of LOB column (LOB attribute) storage RDAREAs

r: Number of index storage RDAREAs

Therefore, the system outputs as much system log information as equals record length of system log file ENQ log information.

When -k unld is specified, the log acquisition mode (-l a) is assumed regardless of the -l option value.

If you use Real Time SAN Replication based on the log-only synchronous method and have executed pdrorg with -l p or -l n specified at the transaction execution site, you must execute the preparations for log application. For details about the preparations for log application, see the manual HiRDB Version 8 Disaster Recovery System Configuration and Operation Guide.

(6) -i index-creation-method

Specifies the index creation method.

When this option is omitted, the utility assumes c for a user-defined table and s for a data dictionary table.

c

Indicates the batch index creation mode in which the system executes batch index creation immediately after reloading the table.

Criterion

When you are reorganizing a large amount of table data, this mode enables you to create an index at high speed.

n

Indicates the index information output mode in which the system outputs only index information to the index information file.

Criterion

You can create an index at high speed by executing multiple batch index creation (-k ixmk) processes concurrently by pdrorg using the index information files that have been output. This method is especially effective for a table that is partitioned in multiple servers constituting a HiRDB/Parallel Server.

Notes

If you specify the index information output mode, you need to execute batch index creation (-k ixmk) with pdrorg after reloading data to the table. If you use ALTER TABLE to add an RDAREA without having executed batch index creation, the index information file obtained is not usable. To add an RDAREA using ALTER TABLE, be sure to complete batch index creation beforehand. If you have added an RDAREA with ALTER TABLE, you need to execute index re-creation (-k ixrc) with pdrorg.

If a plug-in index is defined for a table being reorganized, you cannot specify -i n unless the plug-in supports the batch plug-in index creation partial recovery facility.

s

Indicates the index update mode in which the system updates the index each time a row is stored.

Criterion

Specify this option when reorganizing a table with a small amount of data.

(a) Notes about index creation

Figure 8-16 shows the method for creating a row-partitioned index and non-partitioned index. If a table is partitioned and stored in multiple RDAREAs at the same server, a row-partitioned index is stored in as many index storage RDAREAs as there are table storage RDAREAs, while a non-partitioned index is always stored in a single index storage RDAREA, regardless of the number of table storage RDAREAs.
A row-partitioned index is stored in the same manner as for a table that is partitioned within the same server (RDAREAs INDEX1_1 and INDEX1_2 in the figure).
A non-partitioned index is always stored in a single RDAREA in the server regardless of the number of table storage RDAREAs (RDAREAs INDEX1_3, INDEX2_1, and INDEX2_2 in the figure).

Figure 8-16 Index creation method for a partitioning key index and non-partitioning key index

Explanation:

Index creation depends on the -i option during table reorganization. For example, if you reorganize TABLE1_1 in units of RDAREAs, row-partitioned index INDEX1_1 is created (there is no effect on INDEX1_2). In this case, non-partitioned index INDEX2_1 is not created because it requires information about both TABLE1_1 and TABLE1_2 (the index information file is created only for TABLE1_1).

To create a non-partitioned index, you also need to reorganize TABLE1_2 to create the index information file for this table, then execute pdrorg's batch index creation using the index information files for TABLE1_1 and TABLE1_2.

After the reload operation is completed, the corresponding index is placed in unfinished status, thereby unusable until batch index creation is completed.

If you specify -i c or -i n, the command creates as many index information files as the number of indexes number of table storage RDAREAs. Because these files are opened simultaneously, the maximum number of files permitted per process may be exceeded. If this is the case, increase the pd_max_open_fds operand value in the system definition. If the value of the pd_max_open_fds operand is exceeded, check and, if necessary, revise the number of table partitions per server and the number of defined indexes, or specify -i s.

(b) Notes about specifying -i c or -i n

If -i c or -i n is specified and the index and idxwork statements are omitted, the system outputs the index information file to the /tmp directory using the following naming convention:

/tmp/INDEX-index-name-index-storage-RDAREA-name-unique-character-string

If pdrorg terminates abnormally, this file is not deleted. If you re-execute pdrorg, another index information file is created under a different name. Because this may result in a space shortage in the /tmp directory, you should delete unneeded index information files using the OS's rm command.

(7) -W {{dat|extdat}[,[separator-character][,{cr|crlf}][,sup]]|bin|fixtext[,[padding-character][,{cr|crlf}]]}

Specifies that the unload data file is used as the input data file to the database load utility.

When this option is specified, the system outputs table data to an unload data file in DAT, extended DAT, binary, or fixed-size data format.

For details about the format of the unload data file that is output by pdrorg specifying the -W option, see Section 8.3.3 Format of database load utility input files.

dat

Specifies that data is to be output in the DAT format.

extdat

Specifies that data is to be output in the extended DAT format.

When you output data in extended DAT format, you cannot specify more than one unload data file.

separator-character <character string>

Specifies that the separator between data items is to be changed to a character other than the comma (,) when data is output in DAT or extended DAT format.

When this option is omitted, the utility assumes a comma as the separator character.

Rules

You cannot specify any of the following characters because they are not permitted as separator characters for the input data file to the database load utility:
* (asterisk), " (double quotation mark), _ (underline)

The following characters, which can occur in data being unloaded, are not suitable for use as separator characters:
Uppercase letters (A-Z) and lowercase letters (a-z)
Numeric characters (0-9)
Characters that can conflict with the results of conversion of row data into a DAT format
Characters that can occur as character codes used in Japanese-language input:
| \ [ ] ( ) { }(overbar)
Signs for numeric data (+ or -)
Hyphen (-) for date data input
Colon (:) for time data input
Period (.) for time and date interval data input

To use the comma as the separator character, do not specify a separator character.

If the separator character contains a blank, enclose the entire separator character in double quotation marks.

{cr|crlf}

Specifies the linefeed code to be used for data output in DAT or extended DAT format. When this option is omitted, the utility assumes cr.

cr: Outputs 0x0a as the linefeed code.

crlf: Outputs 0x0d, 0x0a as the linefeed code.

When specifying either cr or crlf by omitting a separator character, use a comma to separate them (e.g., -W dat,, cr).

sup

Specifies that trailing consecutive spaces are not to be output when column data of CHAR, NCHAR, or MCHAR type is output in DAT or extended DAT format.

For the CHAR or MCHAR type, the system compresses trailing single-byte spaces in a column with data that is less than the defined length. If the column data is all spaces, the system outputs one single-byte space.

For the NCHAR type, the system compresses trailing double-byte spaces in a column with data that is less than the defined length. If the column data is all spaces, the system outputs one double-byte space. The double-byte space depends on the character encoding in use. For details about the character encodings, see the HiRDB Version 8 SQL Reference.

For the output format when the sup option is specified, see Section 8.3.3 Format of database load utility input files.

Criteria

Specifying the sup option has the following effects:

The size of unload data file is reduced.

If you specify the suppress option for a CHAR, NCHAR, or MCHAR column during table definition, the system creates input data for the database load utility in such a format that all trailing spaces are already compressed.

Notes

If the sup option is specified during an unload operation, the column data does not have an identical length in the unload data file. This point should be noted if the output data is to be sorted or edited with a UAP.

You can store multi-byte characters and a value other than character codes in a column of the CHAR or MCHAR type; however, if you specify the sup option, the command compresses spaces unconditionally even when a multi-byte character string contains a space character, or a non-character code has the same value as the space character. If this happens, you can pad any column shorter than the defined length with spaces by re-executing data loading on the same table. In this case, do not specify the sup option because if the data is referenced or displayed by another program, a coding error occurs on the last double-byte character.

bin

Specifies that the output data is in binary format.

fixtext

Specifies that data in the fixed-size data format is to be output.

Examples

When the padding character and {cr|crlf} are omitted
-W fixtext

When the padding character is and {cr|crlf} is omitted
-W fixtext,

When the padding character is and cr is specified
-W fixtext,,cr

When the padding character is omitted and crlf is specified
-W fixtext,,crlf

padding-character

Specifies the character to be used to fill out to the defined length when the column data or element data is the null value or when a variable-length character string is shorter than the defined length.

Rules

The padding character must be a 1-byte character.

When the padding character is omitted, the system assumes the space character (0x20). To use the space character as the padding character, omit padding-character.

The asterisk (*), double quotation mark ("), and underscore (_) must not be specified as the padding character.

{cr|crlf}

Specifies the linefeed code to be used.

cr:

Use the 1-byte linefeed code (0x0a).

crlf:

Use the 2-byte linefeed code (0x0d, 0x0a).

(a) Criteria

Specify this option in the following cases:

To migrate data from one table to another

To output table data to an unload data file and then use the data with a UAP

(b) Rules

An unload data file obtained with the -W option specified cannot be used for reload processing by pdrorg.

If this option is specified, hirdb cannot be specified in the -f option.

When reorganizing a table in units of schemas, you cannot specify the -W option.

If the defined length of a table row exceeds 512 megabytes, data cannot be output in the DAT or fixed-size data format. In such a case, output the data in binary format.

If you are transferring data from the UNIX version of HiRDB to the Windows version, or vice versa, output the data in the DAT format. If you need to convert the character encoding, do so first and then load data to the migration target.

If you specify the -W option for a table with LOB columns or columns of abstract data type with LOB attribute, either real data or the null value is output, depending on the -j option specification. Table 8-13 shows the relationship between options -W and -j.

Table 8-13 Relationship between options -W and -j

Column data type | -W option
bin | dat or extdat | fixtext
Predefined data type | BINARY type | -j option omitted | Real data | Real data | Not output
-j option specified | Real data | Real data | Not output
BLOB type | -j option omitted | Null value | Null value | Not output
-j option specified | Real data | Null value | Not output
Other | -j option omitted | Real data | Real data | Real data
-j option specified | Real data | Real data | Real data
Abstract data type | BLOB attribute* | -j option omitted | Real data | Null value | Not output
-j option specified | Real data | Null value | Not output
Other | -j option omitted | Real data | Real data | Not output
-j option specified | Real data | Real data | Not output

* This is the argument type of constructor parameter reverse creation function that is specified in the unld_func statement.

(8) -g

For a HiRDB/Parallel Server, this option specifies that table data stored in multiple servers is to be unloaded to a single unload data file at one server.

For a HiRDB/Single Server, this option specifies that an unload data file is to be created on the utility special unit.

Even when a table contains a LOB column, you can unload to a single LOB data unload file.

(a) Criteria

Specify this option in the following cases:

Creating an unload data file for backup purposes

Modifying the table partitioning conditions

Outputting an unload data file to a utility special unit

Allocating required space in another host with a HiRDB/Parallel Server when there is not enough space at the applicable host

(b) Notes

With a HiRDB/Parallel Server, the system assumes that the -g option is specified during table reorganization in units of schemas, even if this operand is omitted.

If the data unloaded in units of RDAREAs is reloaded in units of tables with the -g option specified, the data is deleted because the system treats other servers' RDAREAs as containing no data. In this case, do not specify the -g option.

If the data unloaded in units of RDAREAs is reloaded in units of RDAREAs with the -g option specified, you cannot modify the table partitioning conditions.

(9) -j

Specifies that a table containing LOB columns is to be unloaded.

You an also specify this option to unload a table containing an abstract data type with LOB attribute or reorganize LOB storage RDAREAs.

When this option is specified, the utility outputs both the LOB column structure base table and the LOB data to the unload data file during the unload operation. During the reload operation, the utility reloads both the LOB column structure base table and the LOB data. This feature enables a table containing LOB columns to be migrated to another system, or its partitioning condition to be changed. This depends on the unloading process being able to be executed as described in Section 8.4.3 Whether or not reloading is permitted when the table definitions of unload table and reload table do not match.

(a) Rules

This option is ignored if specified for a table containing no LOB column.

The -j option is always assumed during reorganization in units of schemas.

If you specify the -j option during an unload operation, be sure to specify this option during a reload operation.

If the -g option is specified for unloading a table divided and stored in multiple servers in HiRDB/Parallel Servers, unloading is performed sequentially for each server at the expense of a reduction in parallel-processing performance.

If a table with LOB columns is to be unloaded using the -W bin option, the -j option sets the LOB columns as the columns to be unloaded.

(10) -u authorization-identifier

Specifies the authorization identifier of the user executing pdrorg.

For details about the default value, see (b) Default value, as follows.

When this option is specified, the system displays a message requesting entry of a password. If no password is required, enter null in response to the message.

The system uses the specified authorization identifier to connect to HiRDB and to check execution privileges.

(a) Criterion

Specify this option to use a different authorization identifier than the one specified in the PDUSER environment variable.

(b) Default value

When this option is omitted, the system assumes the following authorization identifier and password:

The system assumes the value of the PDUSER environment variable specified during execution of pdrorg. If you are executing the utility in the background with & attached by the shell, or in a remote shell environment where a response cannot be entered, be sure to specify the PDUSER environment variable. The following shows an example of specifying the PDUSER environment variable with the C shell:
With password: setenv PDUSER'"authorization-identifier"/"password"'
Without password: setenv PDUSER'"authorization-identifier"'

If the PDUSER environment variable is not specified, the system assumes the login window's user name. Enter the password when a message is displayed requesting password entry. If no password is required, enter null in response to the message.

(c) Rules

Do not specify this option if you are executing the utility in the background with & attached by the shell or in a remote shell environment where a response cannot be entered.

The system treats an authorization identifier enclosed in double quotation marks (") as case sensitive; otherwise, the system treats it as in all uppercase letters. If you use the Bourne shell (sh), C shell (csh), or Korn shell (ksh), you must enclose the authorization identifier in single quotation marks (').

(11) -n [batch-input/output-local-buffer-sectors-count],[div],[random-access-local-buffer-sectors-count]

Specifies that a local buffer is to be used for reading data from the database during an unload operation or for writing data to the database during a reload operation. When this option is specified, the number of input/output operations can be reduced by the number of batch input/output operations because the system uses the local buffer to access databases.

When this option is omitted, the system uses the global buffer to access one page at a time during an input/output operation.

batch-input/output-local-buffer-sectors-count<unsigned integer> ((2-4096))

Specifies the number of batch input/output local buffer sectors. The batch input/output local buffer is used for data pages.

We recommend that you specify a value in the range 16-32 for the number of batch input/output local buffer sectors. The guideline is 64 kilobytes/page size.

div

Specify div when all the conditions listed below are satisfied. If all these conditions are satisfied but div is not specified, the number of input/output operations may increase, thereby affecting performance adversely.

The partitioning conditions during the unload operation differ from those during the reload operation.

There are multiple RDAREAs for a table in the same server.

When div is specified, the required memory size increases because the system allocates as many buffer sectors as there are table partitions in the server.

random-access-local-buffer-sectors-count<unsigned integer> ((4-125000))

Specifies the number of random access local buffer sectors. The random access local buffer is used for index pages.

Hitachi recommends that you change the combination of the number of batch input/output local buffer sectors, div, and the number of random access local buffer sectors according to the table definition. Table 8-14 shows the recommended -n option value.

Table 8-14 Recommended -n option specification (pdrorg)

Condition | Table type | Column definition | Table partitioning in server
Yes | No
During unloading | FIX table |  | -n x, div | -n x
Non-FIX table |  | -n, , y
During reloading | FIX table |  | -n x, div | -n x
Non-FIX table | A variable-length character string with a column length of 256 bytes or more or a BINARY column is defined. | -n, , y
An abstract data type column is defined. | -n x, div, y | -n x, , y
A repetition column is defined.
Other | -n x, div | -n x

Legend:

x: Number of batch output local buffer sectors

y: Number of random access local buffer sectors

: Not applicable

(a) Buffer used by pdrorg

When the -n option is omitted, the pdrorg command uses the global buffer. In such a case, transaction performance is degraded for a process that uses the global buffer because a large amount of global buffer space is needed for reorganization. When the -n option is specified, there is no such buffer contention. Figure 8-17 shows the relationship between pdrorg and the buffer:

Figure 8-17 Relationship between pdrorg and the buffer

Explanation:

When only the global buffer is used (-n option is omitted), contention occurs on the buffer between pdrorg and UAPs.

When both a local buffer and a global buffer are used (-n option is specified), no contention occurs on the buffer between pdrorg and UAPs. Note that during reorganization of a LOB column, the system uses the global buffer even if the -n option is specified.

If you specify only the number of batch input/output local buffer sectors in the -n option, the system uses only one batch input/output local buffer sector for a single RDAREA. This may result in buffer contention because the system uses only one batch input/output local buffer sector even if there are multiple RDAREAs. If buffer contention occurs, the number of input/output operations increases, affecting performance adversely. In such a case, specify div. When div is specified, the system allocates as many batch input/output local buffer sectors as there are RDAREAs (one batch input/output local buffer sector for each RDAREA), thereby avoiding buffer contention.

Even if a batch input/output local buffer is specified, the system may use the global buffer depending on conditions. Tables 8-15 and 8-16 describe the relationships between the conditions and the buffer.

Table 8-15 Relationships between conditions and the buffer to be used (during an unload operation by pdrorg)

Condition
Random access local buffer

Not specified
Specified

Global buffer
Batch input/output local buffer
Global buffer
Batch input/output local buffer
Random access local buffer

Data page
RDAREA storing LOB column structure base table
FIX table

Y

Y

Non-FIX table
Y

Y

RDAREA storing LOB column
Y

Y

RDAREA storing LOB attributes
Y

Y

Index page
When searching key values from index (when -b is specified)
Y
Y

Y

Directory page

Y

Legend:

Y: Used

: Not used

Table 8-16 Relationships between conditions and the buffer to be used (during a reload operation by pdrorg)

Condition | Random access local buffer
Not specified | Specified
Global buffer | Batch input/output local buffer | Global buffer | Batch input/output local buffer | Random access local buffer
Data page | RDAREA storing LOB column structure base table | FIX table |  | Y |  | Y |
Non-FIX table | When a variable-length character string or BINARY string with column length greater than 256 bytes is defined | Y |  | Y |  |
When a column of an abstract data type or a repetition column is defined and a row of data is too large to fit on one page | Y |  | Y |  |
Other |  | Y |  | Y |
RDAREA storing a LOB column | Y |  | Y |  |
RDAREA storing LOB attributes | Y |  | Y |  |
Index page | When searching key values from table (when -i c or -i n is specified) |  | Y |  | Y |
When creating index concurrently (when -i s is specified) | Y |  |  |  | Y
When executing batch index creation (when -i c is specified) | Y |  |  |  | Y
Directory page | Y |  | Y |  |

Legend:

Y: Used

: Not used

(b) Rules

For rebalancing a table, performance may reduce considerably if the size of the global buffer is insufficient. If none of the columns exceeds 256 bytes in defined length, specify the number of batch output pages.
If the local buffer specification does not take effect for some reason, such as the existence of a column with a defined length of 256 bytes or greater, allocate at least the following number of global buffer sectors:
Number of buffer sectors required per RDAREA
= 1024 (number of table storage RDAREAs) 2 + 3

For rebalancing a table using the FIX hash partitioning method, the system allocates the buffer for the number of pages specified for each hash group. Therefore, more memory may be required than for a non-partitioned table or a table partitioned by other methods.

(12) -f unload-data-file-type-or-LOB-data-unload-file-type

Specifies the type of unload data file or LOB data unload file.

When this option is omitted, the utility assumes a regular file or streaming tape device as the unload data file.

easymt

EasyMT is used as the unload data file or LOB data unload file.

For a HiRDB/Parallel Server, if you have specified hirdb

A HiRDB file is used as the unload data file or LOB data unload file.

(13) -b unload-sequence

Specifies the order in which data is to be unloaded.

When this option is omitted, if the cluster key is defined for the table, the utility unloads the table data in the order of the cluster key values; otherwise, the utility unloads the table in the order that its data is stored.

You cannot specify this option for an index, plug-in index, or index for a repetition column with an exception value specification.

(a) Criteria

To unload a table with a cluster key defined, omit this option. If a cluster key has not been defined, but the table is to be unloaded and then a cluster key is to be defined for it before reloading, you must unload the table in the order of index values that is the same as the order of cluster key values (ASC or DESC).

Specify one of the following options as the order of data to be unloaded:

cluster

Unload data in the order of the cluster key values

index,index-identifier[,desc]

Unload data in the order of the index values.

desc unloads in the descending order of index values. Note that desc is applicable only to a single-column index.

primary[,,desc]

Unload data in the order of primary key values.

desc unloads data in the descending order of index values. Note that desc is applicable only to a single-column index.

physical

Unload data in the order it is stored.

Rules

The system treats an index identifier enclosed in double quotation marks (") as case sensitive; otherwise, the system treats it as in all uppercase letters. If an index identifier contains a space, enclose the index identifier in double quotation marks ("). If using the Bourne shell (sh), C shell (csh), or Korn shell (ksh), you must enclose the index identifier in single quotation marks (').

The desc option is applicable only to single-column indexes.

When this option is specified, data is output to the unload data file in units of table storage RDAREAs in the order in the specified index, but it is not in the order in the index in the table as a whole. If you need an unload data file in which data is sorted in the order in the index (such as when you output data in DAT format by specifying the -W option), you must create an unload data file in units of RDAREAs for a row-partitioned table.

You cannot specify the -b option for reorganization in units of schemas.

When you are unloading LOB columns in the order of index values (by specifying index in the -b option), the index must be available. As in the following cases, if no index has been created, you need to create the index first and then unload the LOB columns:

n specified in the -i option

Reloading to a non-partitioned table in units of RDAREAs for which a non-partitioning key index is defined

(14) -s

When reorganizing a table with the suppress option specified for a CHAR, NCHAR, or MCHAR column, specify this option to remove all trailing consecutive spaces from columns during the unload operation.

(a) Effects of this option

By specifying this option, you can reduce processing time and the size of unload data file.

The following table shows the cases for which specifying the -S option can reduce processing time and the size of unload data file:

Status of unloaded table | Status of reloaded table
Column without suppress option | Column with suppress option
Condition A | Condition B | Condition A | Condition B
Column with suppress option | Condition A | M | M | Y | M
Condition B |  |  |  |

Condition A: Applicable column has no index defined and is neither key range-partitioned nor hash-partitioned.

Condition B: Applicable column has an index defined or is key range-partitioned or hash-partitioned.

Y: The unload and reload processing time is reduced and the size of the unload data file is also reduced.

M: The unload processing time is reduced and the size of the unload data file is also reduced, but the reload processing time is slower than the case indicated as .

: There is no effect on the reduction of processing time or size of the unload data file.

(b) Notes

For the following columns, specifying the -S option cannot reduce the processing time or the size of the unload data file, even if the suppression option is specified for the corresponding table:

Columns defining index

Columns partitioned by key range partitioning method

Columns partitioned by hash partitioning method

If the definitions of these columns have changed during the reload operation, it takes more processing time than when the definitions have not changed.

If the -W option is specified, the -s option, if specified, is ignored.

(15) -o

Specify this option to automatically delete the index information files after index creation processing is completed successfully.

(a) Criteria

A plug-in index in particular requires a large index information file. Such index information files require a large amount of disk space, if retained. You can specify this option to make sure that the index information files are always deleted after index creation processing.

(b) Notes

The following table shows the relationship between index information files and the -o option:

-k option | Contents of index information file | -o option
Specified | Omitted
rorg, reld | Index information file specified in the index statement | Y* |
Index information file allocated by HiRDB | Y* | Y*
ixmk | Index information file created by pdload or pdrorg | Y |
Index information file created by the plug-in index delayed batch creation facility | Y | Y
ixrc, ixor | Index information file allocated by HiRDB with the idxname specified | Y | Y
Index information file specified in the index statement | Y |

Y: Deleted.

: Not deleted.

* For a table partitioned within the server, the index information file is not deleted if its non-partitioning key index is not partitioned within the server during reorganization in units of RDAREAs.

(16) -m progress-message-output-interval

<unsigned integer> ((1-1000)) <<10>>

Specifies in units of 10,000 rows the interval at which execution status messages are to be output.

(a) Criterion

Specify this option to change the default value of 10,000 rows.

(b) Notes

When the batch index creation mode is specified or batch index creation is underway during a table reload operation, the utility ignores this option, in which case messages are output at the time index creation is started and terminated.

This option is ignored if ixrc is specified in the -k option. However, this option take effect for the processing of plug-in indexes.

(17) -X response-monitoring-time-for-server-to-server-communication

<unsigned integer> ((165535)) <<300>>

If an error, such as a communication error, occurs at the server where the command was executed, the command may stop responding and the application may stop. To help you detect errors, pdrorg enables you to monitor a response time during communication for dictionary manipulation that is performed by the command.

In the -X option, set the response monitoring time (in seconds) during dictionary manipulation. If the execution time during dictionary manipulation exceeds the value set in the -X option, pdrorg treats it as a dictionary access error and cancels processing with return code 8.

Criteria

If you want to detect an error in fewer than 300 seconds in the event of a no-response from the server due to a communication error or unit down, specify a value less than 300 in the -X option.

If the system switchover facility is used, the command may keep waiting for a response even though system switchover has been completed. In such a case, you can terminate the command immediately by reducing the monitoring time.

The specified monitoring time may result in a timeout if a response from the dictionary is delayed and if the utility's preprocessing is not completed within 300 seconds, which is the default value for the -X option. This can happen when many applications and utilities are executing concurrently. In such an environment, specify a value greater than 300 in the -X option.

(18) -q generation-number

<unsigned integer> ((0-10))

Specifies the generation number of the target RDAREA when the inner replica facility is used.

Specify the generation number as follows:

0: When the original RDAREA is to be processed

1 to 10: When the replica RDAREA with the specified generation number is to be processed

(a) Criteria

Specify this option when you are using the inner replica facility and processing an RDAREA that is not the current RDAREA.

(b) Rules

When you are not using the inner replica facility, this option is not available.

When this option is omitted, the current RDAREA becomes subject to processing.

If you are processing a replica RDAREA, use the -r option to specify the name of the original RDAREA and the -q option to specify the generation number that is to be subject to processing.

pdrorg checks the generation of the target RDAREA for errors. If the following checking results in an error, pdrorg displays a message and terminates with return code 8:

Checking for an inconsistent generation number for a row-partitioned table:

When a row-partitioned table is to be processed, pdrorg checks the generations of target RDAREAs.

When the -q option is specified, pdrorg checks each target for the specified generation of RDAREA. When the -q option is omitted, pdrorg checks the current RDAREA at each target for any inconsistency in the generation number.

Checking for any inconsistent generation number for the RDAREAs storing the table and index:

pdrorg checks the generations of the RDAREAs storing the table and index.

When the -q option is specified, pdrorg checks the target RDAREA for the specified generation. When the -q option is omitted, pdrorg checks all the target current RDAREAs to determine whether or not their generations are the same.

Checking for any inconsistent replica status for the target RDAREA:

When the -q option is specified, pdrorg checks the target RDAREAs to determine whether any non-current RDAREA is mixed in the current RDAREAs.

The following table describes whether or not each file is available depending on the use of inner replica facility:

File output condition | Availability of file
Inner replica facility not used | Inner replica facility used
Original RDAREA | Replica RDAREA
Same generation*1 | Different generation
Index information file | Inner replica facility not used | Y | Y | N | N
Inner replica facility used | Original RDAREA | Y | Y | N | N
Replica RDAREA | N | N | Y | N
Unload data file | Inner replica facility not used | Y | Y | Y*2 | Y*2
Inner replica facility used | Original RDAREA | Y | Y | Y*2 | Y*2
Replica RDAREA | Y*2 | Y*2 | Y | Y*2

Legend:

Y: File can be used.

N: File cannot be used.

*1 This is the case where the generation information during file output is the same as the generation information specified in the -q option. When the -q option is omitted, this is the case where the generation information during file output is the same as the generation information for the current RDAREA.

*2 The file can be used when the following conditions are satisfied:

Conditions for reloading in 8.4.3 Whether or not reloading is permitted when the table definitions of unload table and reload table do not match are satisfied.

There is a LOB column or a column of an abstract data type with the LOB attribute and the -j option is specified.

(19) control-information-filename

<pathname>

Specifies the name of the control information file that contains pdrorg's control statements.

You can specify the following control statements in the control information file. For details about each control statement, see Sections 8.9.3 to 8.9.18.

Control statement
pdrorg's function

Table reorg
Table unldg
Table reldg
Data dict table reorg
Batch IX cr
IX recr
IX reorg

mtguide statement
emtdef statement
O
O
O
O

unload statement
R
R
R
R

index statement
O

O

R
R⁶
R⁶

idxname statement

R⁶
R⁶

idxwork statement
O¹

O¹

O
O

sort statement
O²

O²

O
O

lobunld statement
O
O³
O

unlduoc statement
O
O

E
E
E
E

tblname statement

O

array statement

O⁴

unld_func statement
O⁵
O⁸

reld_func statement
O⁵

O

constraint statement
O

O

option statement
O
O4, 7
O
O⁷
O⁷
O⁷
O⁷

report statement
O
O
O
O
O
O
O

blobtovarchar statement

O⁴

fixtext_option statement

O⁴

Legend:

Table reorg: Table reorganization

Table unldg:Table unloading

Table reldg: Table reloading

Data dict table reorg: Data dictionary table reorganization

Batch IX cr: Batch index creation

IX recr: Index re-creation

IX reorg: Index reorganization

R: Required.

O: Optional.

: Ignored, if specified.

E: Results in an error, if specified.

¹ If -i s is specified, this statement cannot be specified.

² If -i n or -i s is specified, this statement cannot be specified.

³ If the -W option is specified, this statement cannot be specified.

⁴ This statement can be specified only when the -W option is specified.

⁵ Both unld_fund and reld_func statements must be specified.

⁶ Specify either the index or idxname statement.

⁷ This statement cannot be specified for a table reorganization with the synchronization point specification.

⁸ This statement is required if a table with columns of abstract data type is to be unloaded with -W bin specified.

(a) Relationship between control statements and options

Table containing a LOB column or abstract data type column provided by a plug-in (LOB attribute)

When a table containing a LOB column is to be reorganized, the unit of reorganization depends on the specification of the unload and lobunld statements. The following table shows the relationship between the unit of reorganization for a table containing a LOB column and the -j option in the unload and lobunld statements:

Reorganization unit | unload statement | lobunld statement
-j specified | -j omitted | -j specified | -j omitted
LOB column structure base table and LOB data | Y | Y | N | Y
LOB column structure base table | N | Y | N |
LOB data | N |  | N | Y

Y: Can be specified.

N: Cannot be specified.

: Not required.

Index re-creation or reorganization

When an index is re-created or reorganized, you can use the idxname statement to process the index in units of indexes or use the index statement to process the index in units of index storage RDAREAs. The following table shows the relationship between the index re-creation or reorganization and the index, idxname, and idxwork statements:

Index re-creation or reorganization unit | index statement | idxname statement | idxwork statement | sort statement
-k ixrc | -k ixor
Indexes | N | R | O | O |
Index storage RDAREAs | R | N |  | O |

R: Required.

O: Optional.

N: Cannot be specified.

: Ignored, if specified.

(b) Files and directories specified in the control statements

The following rules apply to files and directories specified in the control statements:

You must grant access privileges to the HiRDB administrator in advance. In some cases when control statements or operands are omitted, the system assumes that the applicable file is to be created in the /tmp or /usr/tmp directory; for this reason, you must also grant access privileges to the /tmp or /usr/tmp directory.

For the names of the unload data files, index information files, and EasyMT's MT attribute files, assign unique names, regardless of their hosts.

8.9.3 mtguide and emtdef statements (specification of MT information)

To use EasyMT as an unload data file or LOB data unload file, specify the mtguide and emtdef statements.

The mtguide and emtdef statements must precede the unload or lobunld statement.

Organization of this subsection

(1) Format

(2) Explanation

(3) Notes

(1) Format

mtguide{use|nouse}
emtdef MT-attribute-definition-filename

(2) Explanation

(a) mtguide{use|nouse}

When magnetic tape is used for the unload data file or LOB data unload file, this option specifies whether MTguide is to be used for the magnetic tape mounting operation.

use

MTguide is to be used.

nouse

MTguide is not to be used.

(b) emtdef MT-attribute-definition-filename

<path name>

Specifies the name of the file that defines EasyMT's MT attribute. The following items specified in this file take effect on EasyMT processing:

bufno: Number of I/O buffer sectors

magazin: MT device allocation pattern

job: Application name

preserve: Retention days

expire: Expiration date

However, if the same item is specified in the unload statement or lobunld statement, the unload statement or lobunld statement specification takes precedence.

HiRDB/Single Server

Create the MT attribute definition file at the server machine that contains the single server.

HiRDB/Parallel Server

Create the MT attribute definition file at the server machine where the system manager is located.

(3) Notes

To use EasyMT, you need to initialize the MT to be used for the unload operation to the EasyMT-labeled volume format beforehand using EasyMT's EmtInit function or the emtinit command.

To use a multi-volume MT, you need to initialize all volumes.

The following shows the methods for specifying the initialization parameter:

Specification method | Value
Specifying in the volume attribute definition table | EMTVOL_EL
Specifying in the MT attribute definition file | voltype=EL

8.9.4 unload statement (specification of unload data file)

The unload statement specifies information about an unload data file.

Criterion

If you specify -k rorg, -k unld, or -k reld, be sure to specify the unload statement.

Rules

You can specify the following number of unload statements:

HiRDB/Single Server

Specify only one unload statement, regardless of the reorganization units (tables or RDAREAs).

HiRDB/Parallel Server

When reorganizing a row-partitioned table in units of tables, specify as many unload statements as there are servers that contain the table storage RDAREAs.

When reorganizing a row-partitioned table in units of RDAREAs or reorganizing a non-partitioned table, specify only one unload statement. Also, when unloading a table to a single unload data file specifying the -g option, specify only one unload statement.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

unload {[{server-name:|host-name:}]
             unload-data-file-name[,unload-data-file-name]...
              |(uoc)}
              [{EasyMT-information|HiRDB-file-information}]
              [uoc-information]

(2) Explanation

(a) server-name

<identifier> ((1-8))

Specifies the name of the server used to create the unload data file.

HiRDB/Single Server

Do not specify this option for a HiRDB/Single Server.

HiRDB/Parallel Server

When reorganizing a row-partitioned table in units of tables, specify the name of the server used to create the unload data file.

When reorganizing a row-partitioned table in units of RDAREAs or reorganizing a non-partitioned table, there is no need to specify this option.

When unloading a single unload data file specifying the -g option, specify the name of the server used to create the unload data file.

(b) host-name

<identifier> ((1-32))

Specifies the name of the host used to create the unload data file.

HiRDB/Single Server

When creating the unload data file on a utility special unit, specify the name of that host.

When this option is omitted, the system creates the unload data file on the unit where the single server is located.

HiRDB/Parallel Server

Do not specify this option for a HiRDB/Parallel Server.

(c) unload-data-filename

<pathname>

Specifies the absolute path name of the unload data file.

You can specify the following files as unload data files:

Regular file
You can create these files in a file system area provided by the operating system, without any preliminary steps.

Character special file
Create these files in a HiRDB file system area for utilities that was created by the pdfmkfs command.

If you have specified the type of unload data file in the -f option, specify the unload data file names as follows.

When the unload data file is EasyMT:

You can specify a maximum of two unload data files.

If using MTguide, you can specify a device symbolic name or device group name managed by MTguide.

When the unload data file is a HiRDB file:

Express the name of the unload data file as 1 to 167 characters.

To use a HiRDB file, the HiRDB file system area must have already been created by the pdfmkfs command, with UTL specified as the usage purpose in the -k option of the pdfmkfs command.

An error will result if the specified HiRDB file is in a HiRDB file system area that was created by the pdfmkfs command with an option other than -k UTL specified.

If the specified HiRDB file name is not found in the HiRDB file system area, pdrorg creates a new HiRDB file. If you specify the name of an existing HiRDB file, the utility overwrites that file.

Note about unload data files

If there is too much table data to fit in one unload data file, you can specify multiple files.

When specifying multiple unload data files, note the following:

You cannot use an NFS file.

You cannot use a direct tape unit without using EasyMT.

The file attributes must be the same as shown as follows:

EasyMT
You need to initialize all volumes as EMTVOL_EL (EasyMT-labeled volumes).

HiRDB files
You cannot mix regular files and character special files. Use either regular files only or character special files only.

(d) (uoc)

Specify this option when you use a UOC to reorganize the database or to create a UOC data file (when the unload data file is not output by pdrorg).

(uoc) is applicable only to -k unld. If (uoc) is specified, neither EasyMT information nor HiRDB file information can be specified.

(e) EasyMT-information

[file=filename]
[{,vol=volume-name|,vol=(volume-name[,volume-name]...)}]
[,bufno=buffer-sectors-count]
[,fileno={file-sequence-number|ADD}]

Specify this operand if the unload data file is an EasyMT file.

By specifying a file name and volume name, you can check to see if the actual unload data file and volume have the specified names. If you do not want to check the file or volume name, omit this operand.

If you are omitting a file name, do not specify a comma before the first specified item.

file=filename <alphanumerics> ((1-17))

Specifies the name of the file.

{,vol=volume-name|,vol=(volume-name[,volume-name]...)}

<alphanumerics> ((1-6))

Specifies the names of the volumes containing the file. You can specify up to 255 volume names, in as much as they fit in one line.

bufno=buffer-sectors-count <unsigned integer> ((1-256)) <<10>>

Specifies the number of buffer sectors to be used by EasyMT.

fileno={file-sequence-number|ADD}

Specifies the position of the unload data file on the magnetic tape.

file-sequence-number <unsigned integer> ((1-199)) <<1>>

If you have specified -k rorg or -k unld, the utility creates a file at the specified location and deletes any file following the specified location.

If you have specified -k reld, the utility reads the file at the specified location (if fileno is omitted, the utility reads the next file).

ADD

If you have specified -k rorg or -k unld, the utility creates the file at the end of the volume.

If you have specified -k reld, you cannot specify ADD.

(f) HiRDB-file-information

[init={initial-allocation-size
  |(initial-allocation-size[,initial-allocation-size]...)}]
[,incr=secondary-allocation-size
  |(secondary-allocation-size[,secondary-allocation-size]...)}

Specify this operand if the unload data file is a HiRDB file. Be sure to specify the HiRDB file information on a single line.

If you omit init, do not specify a comma (,) before incr.

init={initial-allocation-size| (initial-allocation-size[,initial-allocation-size]...)} <unsigned integer> ((1-1048574)) <<100>>

Specify in MB the size of the area to be allocated to write to the HiRDB file.

Estimation formula:

For details about determining the initial allocation size, see the section in the HiRDB Version 8 Installation and Design Guide that describes the file size during execution of the database reorganization utility (pdrorg) to obtain the size (in bytes) of the unload data file, then use the following formula:

Initial allocation size = (size of unload data file in bytes + 1024) (1024 1024) (MB)

Rules

The initial allocation size must be smaller than the value specified in the -n option when the HiRDB file system area was created with the pdfmkfs command (because the system requires an area for management purposes).

Be sure to specify a nonzero value in the -e option of the pdfmkfs command. Otherwise, the secondary allocation is not possible.

Use the pdfstatfs command to determine the initial allocation size permitted.

Specify as many allocation sizes as there are files specified in the unload statement. The system resolves a mismatch between the number of initial allocation sizes and the number of file names as follows:

Condition | Resolution
Number of files < number of initial allocation specifications | As many initial allocation specifications are valid as there are files, and subsequent initial allocation specifications are ignored.
Number of files = number of initial allocation specifications | Specification for each file is valid.
Number of files > number of initial allocation specifications | The last initial allocation specification is assigned to all the remaining files.

incr=secondary-allocation-size| (secondary-allocation-size[,secondary-allocation-size]...)} <unsigned integer> ((1-1048574)) <<10>>

Specifies the size of the extension area when the initial allocation size is not sufficient during a write operation on the HiRDB file.

The utility does not expand the HiRDB file in the following cases:

Attempt to expand the corresponding HiRDB file system area will exceed the specified number of extensions.

Attempt to expand the corresponding HiRDB file will exceed the maximum number of extensions for individual HiRDB files (23 times).

If the actual size exceeds the estimated size, specify the secondary allocation size in such a manner that neither of the previous attempts is made. Figure 8-18 shows limitations to the secondary allocation size. Specify the value of n so that the above two attempts are avoided.

Figure 8-18 Limitations to the secondary allocation size (unload statement)

When creating a new HiRDB file system area, you can specify the number of secondary allocations in the -e option of the pdfmkfs command. For an existing HiRDB file system area, check the value of available expand count in the pdfstatfs command output result.

(g) uoc-information

[uoc_lib=library-name[param='user-parameters']

Specify UOC information when you use a UOC to reorganize the database. When specifying the unlduoc statement, make sure that UOC information is also specified (if it is omitted, an error results).

uoc_lib=library-name

<path name>

Specifies the absolute path name of the shared library that contains the UOC.

param='user-parameters'

<character string> ((1-1023))

Specifies user parameters that are to be passed to the UOC (because the user cannot directly pass parameters to a UOC by methods such as the command line).

The information specified in this option is passed as is to the UOC via the UOC interface area. The character string specified as the user parameters cannot contain any spaces or tabs.

8.9.5 index statement (specification of index information file information)

The index statement specifies information about index information files.

Criteria

-k rorg or -k reld specified
If possible, always specify the index statement in order to avoid a shortage of space in the /tmp directory.
If there are many indexes or index storage RDAREAs, you should specify the idxwork statement.

-k ixmk statement
Be sure to specify the index statement.

-k ixrc or -k ixor specified
Specify the index statement to re-create an index in units of index storage RDAREAs or to reorganize an index (to process an index in units of indexes, specify the idxname statement).

Rules

Specify one index statement for each index storage RDAREA.

There is no need to specify an index statement when you are reorganizing a table with no index defined or using the index update mode.

If the index statement is omitted and the idxwork statement is also omitted, the utility creates index information files in the /tmp directory of the server that contains the index.

If both the index and idxwork statements are specified, the index statement takes effect.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

index index-identifier[RDAREA-name] index-information-filename

(2) Explanation

(a) index identifier

Specify the identifier of the index.

The system treats an index identifier enclosed in double quotation marks (") as case sensitive; otherwise, the system treats it as all uppercase letters. Enclose an index identifier in double quotation marks if it contains a space.

(b) RDAREA-name

<identifier> ((1-30))

For a row-partitioned table, specify the name of the RDAREA containing a table partition.

If you are specifying a replica RDAREA, specify its original RDAREA name in this option and then specify the target generation number in the -q option.

The system treats an RDAREA name enclosed in double quotation marks (") as case sensitive; otherwise, the system treats it as all uppercase letters. Enclose an RDAREA name in double quotation marks if it contains a space.

(c) index-information-filename

<pathname>

Specify the absolute path name of the index information file to which index information is to be output.

If you are re-creating an index using the index information file output by the delayed batch index creation facility, you can use the name of a HiRDB file for the index information file (express "HiRDB-file-system-area-name/HiRDB-file" as 1 to 167 characters). Otherwise, specify the name of a regular file.

8.9.6 idxname statement (specification of index information)

The idxname statement specifies information about an index to be re-created or reorganized.

Criterion

Specify the idxname statement to re-create or reorganize an index in units of indexes (to process an index in units of index storage RDAREAs, specify the index statement).

Rules

You can specify as many idxname statements as there are indexes. However, if name=* is specified, then only one idxname statement can be specified, in which case specifying more than one idxname statement results in an error.

If the idxname statement is specified, the utility processes all index storage RDAREAs that constitute the index. This means that multiple index statements may be replaced by only one idxname statement.

When the idxname statement is specified, the utility uses only one directory to output index information files, requiring a large space for the directory. If the idxwork statement is omitted and there is not much space available in the /tmp directory, a space shortage may occur. In such a case, specify a directory with sufficient free space in the idxwork statement.

Organization of this subsection

(1) Format

(2) Explanation

(3) Relationship between operands and the execution environment

(1) Format

idxname name=index-identifier [server=server-name[,server-name]...]

(2) Explanation

(a) name=index-identifier

Specifies the identifier of the index.

You can specify an asterisk (*) for the index identifier, in which case the utility re-creates all indexes defined for the table.

The system treats an index identifier enclosed in double quotation marks (") as case sensitive; otherwise, the system treats it as all uppercase letters. Enclose an index identifier in double quotation marks if it contains a space.

(b) server=server-name

<identifier> ((1-8))

For a HiRDB/Parallel Server, this option specifies a server name.

If you specify a server name, the utility processes only those indexes at the specified server. If you omit this option, the utility processes all indexes at all servers.

(3) Relationship between operands and the execution environment

The following table shows the relationship among the name operand, server operand, and execution environment:

name operand | server operand | Execution environment
HiRDB/Single Server | HiRDB/Parallel Server
index- identifier | server-name | Not applicable. | The utility processes all index storage RDAREAs that constitute the specified index at the specified server.
Omitted | The utility processes all index storage RDAREAs that constitute the index. | The utility processes all index storage RDAREAs that constitute the specified index at all servers.
* | server-name | Not applicable. | The utility processes all index storage RDAREAs that constitute all indexes defined for the table at the specified server.
Omitted | The utility processes all index storage RDAREAs that constitute the index defined for the table. | The utility processes all index storage RDAREAs that constitute all indexes defined for the table at all servers.

8.9.7 idxwork statement (specification of directory for index information file)

The idxwork statement specifies the name of a directory in which index information files are to be created automatically when the index statement is omitted.

Criterion

Always specify the idxwork statement, if possible, in order to avoid a shortage of space in the /tmp directory.

Rules

If both index and idxwork statements are omitted, the utility creates index information files in the /tmp directory directory at the server that contains the index storage RDAREAs.

You can specify as many idxwork statements as follows:
HiRDB/Single Server
Specify only one idxwork statement.
HiRDB/Parallel Server
For an index of a partitioned table, specify as many idxwork statements as there are servers that contain the table partitions. For a non-partitioned table or when reorganizing a partitioned table in units of RDAREAs, specify only one idxwork statement.

If both idxwork and index statements are specified, the index statement takes effect, in which case the idxwork statement is ignored.

Organization of this subsection

(1) Format

(2) Explanation

(3) Notes

(1) Format

idxwork [server-name] directory-name

(2) Explanation

(a) server-name

<identifier> ((1-8))

Specifies the name of the server used to create index information files.

HiRDB/Single Server

Do not specify this option. A single server name will be ignored, if specified.

HiRDB/Parallel Server

Specify the name of the server used to create index information files.

(b) directory-name

<pathname> ((1-255))

Specifies the absolute path name of the directory in which index information files are to be created.

(3) Notes

The following shows the name of the index information file that is created automatically.

(a) When the inner replica facility is not used

directory-name/INDEX-index-name-name-of-index-storage-RDAREA
-unique-character-string

Example:

If the idxwork statement specifies /hd400 as the directory name, IDX1 as the index name, and USER01 as the name of the index storage RDAREA, the created index information file will have the following name:

/hd0400/INDEX-IDX1-USER01-aaaa00001

(b) When the inner replica facility is used

directory-name/INDEX-index-name
-name-of-index-storage-RDAREA-GNgeneration-number-unique-character-string

Example:

If the idxwork statement specifies /hd400 as the directory name, IDX2 as the index name, USER01 as the name of the original index storage RDAREA, and 2 as the generation number of the RDAREA to be processed, the created index information file will have the following name:

/hd0400/INDEX-IDX2-USER01-GN2-aaaa00002

8.9.8 sort statement (specification of work directory for sorting)

The sort statement specifies information about a work file for sorting that is used when an index is created.

Criterion

If possible, always specify the sort statement in order to avoid a shortage of space in the /tmp directory.

Rules

When the sort statement is omitted, the utility assumes the /tmp directory at the server that contains index storage RDAREAs.

You can specify as many sort statements as follows:
HiRDB/Single Server
Specify only one sort statement.
HiRDB/Parallel Server
For an index of a partitioned table, specify as many sort statements as there are servers that contain the table partitions. For a non-partitioned table or when reorganizing a partitioned table in units of RDAREAs, specify only one sort statement.

Organization of this subsection

(1) Format

(2) Explanation

(3) Note

(1) Format

sort [server-name] directory-name[,buffer-size-for-sorting]

(2) Explanation

(a) server-name

<identifier> ((1-8))

Specifies the name of the server used to create the work file for sorting.

HiRDB/Single Server

Do not specify this option. A single server name will be ignored, if specified.

HiRDB/Parallel Server

Specify the name of the server used to create the work file for sorting.

(b) directory-name

<pathname> ((1-255))

Specifies the absolute path name of the directory in which sort work file is to be created.

(c) buffer-size-for-sorting

<unsigned integer> ((128-2097152)) <<1024>>

Specifies in KB the size of memory that is to be used as the buffer.

The system allocates this buffer at the single server for a HiRDB/Single Server and at the back-end server for a HiRDB/Parallel Server.

The sort process creates a temporary work file for sorting in a specified directory. You can use the following formula to determine a buffer size that minimizes the file size. This is just a guideline; avoid using a large value. Note that this formula provides a value that minimizes the file size, not a value that minimizes the sorting time. If there is enough memory, specify a buffer size of about several megabytes to several tens of megabytes.

n: Number of unloaded data items. For a repetition column, this is the number of elements, not the number of rows.

k: Key length (calculated as a maximum value). For details about how to determine the key length, see the example of calculating the number of index storage pages in the HiRDB Version 8 Installation and Design Guide.

x: 10, if all key component columns are fixed length; 12, if at least one of the key component columns is variable length.

c:

Number of columns composing the index

y:

For Linux version, 2; otherwise, 1.

z:

For a variable-length multicolumn index, c 4; otherwise, 0.

K:

For a variable-length multicolumn index, k + c + 8; otherwise, k + 12.

N:

For a variable-length multicolumn index, (c 2) + y; otherwise, 3 + y.

R:

k + x + z

A:

For 32-bit mode HiRDB, R + (K + 8) + 28; for 64-bit mode HiRDB, R + (K + 8) + 56.

B:

For 32-bit mode HiRDB, R + (K + 8) + 56; for 64-bit mode HiRDB, R + (K + 8) + 104.

C:

For 32-bit mode HiRDB, 2092 + (N 32) + (K + 8); for 64-bit mode HiRDB, 2112 + (N 32) + (K + 8).

(3) Note

Do not allocate NFS to the directory that is specified in the sort statement. If NFS is allocated, twice as much space is required for the work file for sorting as when a local file is used. Also, problems occur related to retention of work files for sorting.

8.9.9 lobunld statement (specification of LOB data unload file)

The lobunld statement specifies information about a LOB data unload file to reorganize a table with LOB columns.

Criteria

Specify the lobunld statement to reorganize a table with LOB columns. However, do not specify this statement if either of the following is true:

The -j option is specified.

Only the LOB column structure base table is to be reorganized.

Rules

You can specify as many lobunld statements as follows:
HiRDB/Single Server
Specify only one lobunld statement regardless of the reorganization units (tables or RDAREAs).
HiRDB/Parallel Server
When reorganizing only the LOB columns of a row-partitioned table, specify as many lobunld statements as there are servers that contain the LOB column storage RDAREAs. When reorganizing a table in units of RDAREAs or organizing a non-partitioned table, specify only one lobunld statement.
If the -g option is specified and table data is to be unloaded to a single LOB data unload file, specify only one lobunld statement.

For reorganization or reload operation with the synchronization point specification, you cannot specify the lobunld statement.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

lobunld [{server-name:|host-name:}]
           LOB-data-unload-file-name
           [,LOB-data-unload-file-name]
           [EasyMT-information|HiRDB-file-information]

(2) Explanation

(a) server-name

<identifier> ((1-8))

Specifies the name of the server used to create the LOB data unload file.

HiRDB/Single Server

Do not specify this option for a HiRDB/Single Server.

HiRDB/Parallel Server

When reorganizing multiple LOB columns of a row-partitioned table, specify the name of the server used to create the LOB data unload file. When reorganizing a row-partitioned table in units of RDAREAs or reorganizing a non-partitioned table, there is no need to specify this option.

When unloading to a single LOB data unload file specifying the -g option, specify the name of the server used to create the LOB data unload file.

(b) host-name

<identifier> ((1-32))

Specifies the name of the host used to create the LOB data unload file.

HiRDB/Single Server

When creating the LOB data unload file on a utility special unit, specify the name of that host. When this option is omitted, the system creates the LOB data unload file on the unit where the single server is located.

HiRDB/Parallel Server

Do not specify this option for a HiRDB/Parallel Server.

(c) LOB-data-unload-filename

<pathname>

Specifies the absolute path name of the LOB data unload file.

You can use the following file as a LOB data unload file:

Regular file
You can create a regular file in a file system provided by the operating system. In this case, no preparations are necessary.

Character special file
Create a character special file in a HiRDB file system area for utilities that was created by the pdfmkfs command.

If you have specified the type of LOB data unload file in the -f option, specify the LOB data unload file names as follows.

When the LOB data unload file is EasyMT:

You can specify a maximum of two LOB data unload files.

If using MTguide, you can specify a device symbolic name or device group name managed by MTguide.

When the LOB data unload file is a HiRDB file:

Express the name of the LOB data unload file as 1 to 167 characters.

To use a HiRDB file, the HiRDB file system area must have already been created by the pdfmkfs command. In this case, specify UTL as the usage purpose in the -k option of the pdfmkfs command.

An error results if the HiRDB file specified is in the HiRDB file system area that was created by the pdfmkfs command specifying a value other than UTL in the -k option.

If the HiRDB specified file name is not found in the HiRDB file system area, pdrorg creates a new HiRDB file. If you specify the name of an existing HiRDB file, the utility overwrites the file.

Note about LOB data unload files

If there is too much table data to fit in one LOB data unload file, you can specify multiple files.

When specifying multiple LOB data unload files, note the following:

You cannot use an NFS file.

You cannot use a direct tape unit without using EasyMT.

The file attributes must be the same as follows:

EasyMT
You need to initialize all volumes as EMTVOL_EL (EasyMT-labeled volumes).

HiRDB files
You cannot mix regular files and character special files. Use either regular files only or character special files only.

(d) EasyMT-information

[file=filename]
[{,vol=volume-name|,vol=(volume-name[,volume-name]...)}]
[,bufno=buffer-sectors-count]
[,fileno={file-sequence-number|ADD}]

Specify this operand if the LOB data unload file is an EasyMT file.

By specifying a file name and volume name, you can check to see if the actual LOB data unload file and volume have the specified names. If you do not want to check the file or volume name, omit this operand.

If you are omitting a file name, do not specify a comma before the first specified item.

file=filename <alphanumerics> ((1-17))

Specifies the name of the file.

[{,vol=volume-name|,vol=(volume-name[,volume-name]...)}

<alphanumerics> ((1-6))

Specifies the names of the volumes containing the file. You can specify up to 255 volume names in as much as they fit in one line.

bufno=buffer-sectors-count <unsigned integer> ((1-256)) <<10>>

Specifies the number of buffer sectors to be used by EasyMT.

fileno={file-sequence-number|ADD}

Specifies the position of the LOB data unload file on the magnetic tape.

file-sequence-number <unsigned integer> ((1-99)) <<1>>

If you have specified -k rorg or -k unld, the utility creates a file at the specified location and deletes any file following the specified location.

If you have specified -k reld, the utility reads the file at the specified location (if fileno is omitted, the utility reads the next file).

ADD

If you have specified -k rorg or -k unld, the utility creates the file at the end of the volume.

If you have specified -k reld, you cannot specify ADD.

(e) HiRDB-file-information

[init={initial-allocation-size
  |(initial-allocation-size[,initial-allocation-size]...)}]
[,incr=secondary-allocation-size
  |(secondary-allocation-size[,secondary-allocation-size]...)}

Specify this operand if the LOB data unload file is a HiRDB file. Be sure to specify the HiRDB file information on a single line.

If you omit init, do not specify a comma (,) before incr.

init={initial-allocation-size| (initial-allocation-size[,initial-allocation-size]...)} <unsigned integer> ((1-1048574)) <<100>>

Specify in MB the size of the area to be allocated to write to the HiRDB file.

Estimation formula:

For details about determining the initial allocation size, see the section in the HiRDB Version 8 Installation and Design Guide that describes the file size during execution of the database reorganization utility (pdrorg). Obtain the size of the LOB data unload file in bytes, then use the following formula:

Initial allocation size = (size of LOB data unload file in bytes + 1024) (1024 1024) (MB)

Rules

The initial allocation size must be smaller than the value specified in the -n option when the HiRDB file system area was created with the pdfmkfs command (because the system requires an area for management purposes).

Be sure to specify a nonzero value in the -e option of the pdfmkfs command. Otherwise, the secondary allocation is not possible.

Use the pdfstatfs command to determine the permitted of initial allocation size.

Specify as many allocation sizes as there are files specified in the lobunld statement. The system resolves a mismatch between the number of initial allocation sizes and the number of file names as follows:

Condition | Resolution
Number of files < number of initial allocation specifications | As many initial allocation specifications are valid as there are files, and subsequent initial allocation specifications are ignored.
Number of files = number of initial allocation specifications | Specification for each file is valid.
Number of files > number of initial allocation specifications | The last initial allocation specification is assigned to all the remaining files.

incr=secondary-allocation-size| (secondary-allocation-size[,secondary-allocation-size]...)} <unsigned integer> ((1-1048574)) <<10>>

Specifies the size of the extension area when the initial allocation size is not sufficient during a write operation on the HiRDB file.

The utility does not expand the HiRDB file in the following cases:

Attempt to expand the corresponding HiRDB file system area will exceed the specified number of extensions.

Attempt to expand the corresponding HiRDB file will exceed the maximum number of extensions for individual HiRDB files (23 times).

If the actual size exceeds the estimated size, specify the secondary allocation size in such a manner that neither of the previous attempts is made. Figure 8-19 shows limitations to the secondary allocation size. Specify the value of n so that the above two attempts are avoided.

Figure 8-19 Limitations to the secondary allocation size (lobunld statement)

When creating a new HiRDB file system area, you can specify the number of secondary allocations in the -e option of the pdfmkfs command. For an existing HiRDB file system area, check the value of available expand count in the pdfstatfs command output result.

8.9.10 unlduoc statement (specification of UOC storage library information)

The unlduoc statement specifies information about a UOC that is to be used for database reorganization.

Criteria

Specify the unlduoc statement when a UOC is to be used for database reorganization.

Rules

You can specify only one unlduoc statement.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

 unlduoc entry=function-name

        [bloblimit=memory-space-allocation-size]

        [fixrow={y|n}]

(2) Explanation

(a) entry=function-name

Specifies the name of function to be called in the library.

(b) bloblimit=memory-space-allocation-size

<unsigned integer> ((1-2097152))

Specifies the maximum size in kilobytes of the memory space that is to hold the data to be passed to the UOC. If any of the following conditions is satisfied, the utility holds in memory all data to be passed to the UOC:

When the table contains columns of an abstract data type and a constructor parameter reverse creation function corresponding to the unld_func statement is specified, the return value of the specified function has the large object data type.

The table contains columns of the large object data type.

If there are multiple columns that satisfy these conditions, this operand applies to all such columns.

Criteria

Specify this option when any of the following conditions is satisfied:

When the table contains columns of an abstract data type and a constructor parameter reverse creation function corresponding to the unld_func statement is specified, the return value of the specified function has the large object data type.

A memory shortage may occur if the memory space is allocated for data based on the defined column lengths.

The real data is clearly smaller than the defined column lengths.

Rules

For a column of the large object data type or if a defined column length is less than the memory space allocation size, the column length defined for that column becomes the memory space allocation size.

An error results if data exceeds the specified size (if the defined column length is less than the specified value or there is data that exceeds the defined column length).

(c) fixrow={y|n}

If a FIX table is to be processed, pdrorg specifies the storage method for the data to be passed to the UOC. Specifying y for a non-FIX table results in an error.

y:

Passes data in the order the columns are defined (consecutively). Specify y if you want to output all the data passed by pdrorg in the batch mode (you cannot directly reference any data type that requires alignment guarantee).

n:

Corrects the data start address according to the boundary of the data type and then passes the data. Specify n if you want to directly reference data (you can directly reference data without having to copy it to a separate area because the start address of the data type that requires alignment guarantee has already been corrected).

8.9.11 tblname statement (re-registration of table data to another table)

The tblname statement specifies that unloaded table data is to be reloaded to another table.

Criterion

Specify the tblname statement to migrate data between different tables on the same system or different systems.

Rules

You cannot specify the tblname statement in the following cases:

A table to be reloaded or a table unloaded without the -j option specified has LOB columns or abstract data type columns including the LOB attribute.

Table definitions do not match between the unloaded table and the table to be reloaded.

To specify the tblname statement, you must specify at least one unload statement. You cannot specify more than one tblname statement.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

tblname {[authorization-identifier.]table-identifier|authorization-identifier}

(2) Explanation

(a) [authorization-identifier.]table-identifier

Specifies the authorization identifier and table identifier of the unloaded table.

For details about how to specify [authorization-identifier.]table-identifier, see the explanation of the -t option.

Rules

If the authorization identifier is omitted, the system utility assumes the authorization identifier specified in the -t option or the one used to establish connection with HiRDB. Therefore, if the unloaded table and the table to be reloaded have different authorization identifiers, be sure to specify this option.

To reload to a table with an abstract data type, some plug-ins require a constructor parameter reverse creation function during the unload operation.

If you specify [authorization-identifier.]table-identifier, you cannot specify [authorization-identifier.] all in the -t option.

(b) authorization-identifier

To reload table data to another table in units of schemas, this option specifies the authorization identifier.

If you are specifying this option, you must specify [authorization-identifier.]all in the -t option.

8.9.12 array statement (specification of row data output format for repetition columns)

To unload a table with repetition columns, the array statement specifies the row data output format for the repetition columns.

Criterion

When unloading a table with repetition columns, you can specify the array statement if the -W option is specified to output data to a DAT-format or extended DAT-format file.

Rules

This control statement is ignored if specified for a file that is not in DAT or extended DAT format.

If this control statement is omitted when a table with repetition columns is to be unloaded, the utility assumes ff as the row data output format.

Organization of this subsection

(1) Format

(1) Format

array [elmtype=row-data-output-format]

(a) [elmtype=row-data-output-format]

<<ff>>

Specify either ff or vv.

ff

The utility outputs as many data items separated by separator characters as there are maximum number of elements specified for the corresponding column during table definition. For an element that has no data or a null value, the utility outputs only a separator character. If a column value is the null value, the utility outputs separator characters equal to the maximum number of elements.

To use the output data as the database load utility's (pdload's) input file, specify an appropriate null value option to handle the null value.

For details about the data output format when ff is specified, see Section 8.3.3 Format of database load utility input files.

vv

The utility outputs as many data items separated by separator characters as there are elements containing actual data, and the number of output elements at the top of the array data.

If a column value is the null value, the utility outputs 0 as the number of elements.

For details about the data output format when vv is specified, see Section 8.3.3 Format of database load utility input files.

8.9.13 unld_func statement (specification of constructor parameter reverse creation function)

The unld_func statement specifies a constructor parameter reverse creation function that reverses the creation of data values for abstract data type during an unload operation.

Criterion

Specify the unld_func statement to reorganize a table with an abstract data type provided by a plug-in that has an unloading facility.

Rules

You can specify as many unld_func statements as there are abstract data types defined for table columns.

If you are specifying the unld_func statement along with -k rorg, also specify the reld_func statement.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

unld_func type=[authorization-identifier.]abstract-data-type-name,
      func=function-name (argument-type[,argument-type...])
      [,func=function-name (argument-type[,argument-type...])...]

(2) Explanation

(a) type=[authorization-identifier.]abstract-data-type-name

Specifies the authorization identifier and name of the abstract data type.

Rules

If the authorization identifier is omitted, the authorization identifier of the user who defined the abstract data type (normally MASTER) is assumed.

If the authorization identifier or abstract data type name contains a lowercase letter or a space, enclose it in double quotation marks (").

(b) func=function-name (argument-type[,argument-type...])

Specifies the name and argument type of the constructor parameter reverse creation function. For details about the name and argument type of a constructor parameter reverse creation function, see the applicable plug-in manual.

function-name

Specify the name of the constructor parameter reverse creation function.

argument-type

Specify the data type of the argument of the constructor parameter reverse creation function. Specify the argument's data type in the following format:

Specification method
Remarks

integer
INT32

smallint
INT16

char
nchar
mchar
CHAR8

varchar
nvarchar
mvarchar
p_pdb_varchar_t

float
DOUBLE64

smallflt
REAL64

blob
BLOB

abstract-data-type-name

8.9.14 reld_func statement (specification of constructor function)

The reld_func statement specifies a constructor function that generates values of an abstract data type during a reload operation.

Criterion

Specify the reld_func statement to reorganize a table with an abstract data type provided by a plug-in that has an unloading facility.

Rules

You can specify as many reld_func statements as there are abstract data types defined for table columns.

If you are specifying the reld_func statement along with -k rorg, also specify the unld_func statement.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

reld_func type=[authorization-identifier.]abstract-data-type-name,
      func=function-name (argument-type[,argument-type...])

(2) Explanation

(a) type=[authorization-identifier.]abstract-data-type-name

Specifies the authorization identifier and name of the abstract data type.

Rules

If the authorization identifier is omitted, the authorization identifier of the user who defined the abstract data type (normally MASTER) is assumed.

If the authorization identifier or abstract data type name contains a lowercase letter or a space, enclose it in double quotation marks (").

(b) func=function-name (argument-type[,argument-type...])

Specifies the name and argument type of the constructor function. For details about the name and argument type of a constructor function, see the applicable plug-in manual.

function-name

Specify the name of the constructor function.

argument-type

Specify the data type of the argument of the constructor function. For details about the format of argument data type, see Section 8.9.13 unld_func statement (specification of constructor parameter reverse creation function). You cannot specify the name of an abstract data type.

8.9.15 constraint statement (specification of check pending status)

The constraint statement specifies settings for check pending status.

When a table for which check constraints or referential constraints have been defined is reorganized, the check pending status is not changed because constraint integrity can be guaranteed except when a row in the referenced table that is being referenced by a referencing table is deleted by a UOC. The check pending status is set only when a referenced table is reorganized by a UOC.

If reloading is performed, such as reloading using an old unload data file or reloading into a separate table, constraint integrity may no longer be guaranteed. Therefore, the applicable table and related referencing tables are placed in check pending status.

You can also specify a control statement that will prevent the check pending status from being changed (set). For details about check pending status, see the manual HiRDB Version 8 Installation and Design Guide.

Criteria

If integrity can be guaranteed, it is recommended that you specify the constraint statement (to not change (set) the table's check pending status). However, if any of the following conditions is applicable, it is recommended that you omit the constraint statement in order to maintain constraint integrity:

Reloading using an old unload data file
If data in a referencing table or referenced table is updated after it was unloaded, and reloading is performed using the unload data file that existed before the table was updated, data integrity may no longer be guaranteed between the referenced table and the referencing table because table data that existed before updating is being used.

Reloading to another table or a table whose constraint definition has been changed
When reloading is performed on a different table from the one used for unloading, data whose integrity cannot be guaranteed may be reloaded, because pdrorg does not perform data integrity checking.

Reorganizing involving row deletion by a UOC
When a UOC is used to reorganize a referenced table and to delete row data, integrity may be lost.

Rules

The constraint statement can be specified when reorganization ( -k rorg) or reloading (-k reld) is performed, and when the value of the pd_check_pending operand in the system definition is USE.
If the value of the pd_check_pending operand in the system definition is NOUSE or if another facility (such as unloading (-k unld)) is used, this control statement is ignored if it is specified, in which case the table's check pending status is not changed.

Organization of this subsection

(1) Format

(2) Explanation

(3) Notes

(4) Range of check pending status settings

(5) Example of whether or not check pending status can be set

(6) Timing of setting check pending status

(1) Format

 constraint [pending=no]

          [ref_pending=no]

(2) Explanation

(a) pending=no

Specifies that when reorganization or reloading is to be performed on a referencing table or a table for which check constraints have been defined, the table's check pending status is not to be changed (set). For details about the default value that is assumed when this operand is omitted, see (4) Range of check pending status settings.

(b) ref_pending=no

Specifies that when reorganization or reloading is to be performed on a referenced table, the check pending status of a referencing table related to the referenced table is not to be changed (set). For details about the default value that is assumed when this operand is omitted, see (4) Range of check pending status settings.

(3) Notes

For notes about setting related referencing tables in check pending status when reorganization or reloading is performed on a referenced table, see C. RDAREA Status During Command Execution.

The current RDAREA is placed in check pending status when the inner replica facility is being used and the following are applicable: data reorganization or reloading is being performed on a referenced table, the referencing table related to the referenced table is to be placed in check pending status, and the replica RDAREA storing the referencing table is not in the generation specified in the -q option.

The table is placed in check pending status even when the reload count is 0 and constraint integrity can be guaranteed.

If reorganization involving the setting of check pending status results in an error and reorganization is re-executed, the table is placed in check pending status again.

When check pending status is set, the related resources are locked. Once the setting of the check pending status has been completed, the resources are unlocked. For details about the lock, see B.2 Lock mode for utilities.

(4) Range of check pending status settings

Table 8-17 shows the pdrorg execution conditions and whether or not the check pending status is set.

Table 8-17 pdrorg execution conditions and whether or not the check pending status is set

Execution condition | Whether or not check pending status is set
pd_check_pending operand value in the system definition | Exe facility | Operand specification in the constraint statement | Use of UOC | Target table
Ref'd table | Ref'ing table | Table with check constraints defined
USE | Reorg | pending=no | Yes | Yes | NC | NC | NC
No | NC | NC | NC
No | Yes | NC | NC | NC
No | NC | NC | NC
ref_pending=no | Yes | Yes | NC | NC | NC
No | NC | NC | NC
No | Yes | S | NC | NC
No | NC | NC | NC
Reload | pending=no | Yes |  | NC | NC | NC
No |  | NC | S | S
ref_pending=no | Yes |  | NC | NC | NC
No |  | S | NC | NC
Other |  |  |  | NC | NC | NC
Other |  |  |  |  | NC | NC | NC

Legend:

Exe facility: Executing facility

Ref'd table: Referenced table

Ref'ing table: Referencing table

Reorg: Reorganization

S: Check pending status is set.

NC: Check pending status is not changed (current status is maintained).

: Not applicable

Table 8-18 shows the range of check pending status settings for check constraints during reorganization or reloading. Table 8-19 shows the range of check pending status settings for referential constraints.

Table 8-18 Range of check pending status settings for check constraints

Unit of execution
Range of check pending status settings for check constraints

Data dictionary table
Table information in RDAREA

SQL_TABLES table
CHECK_PEND2 column
SQL_CHECKS table
CHECK_PEND2 column
Check constraint status

Table
C
C
T*

RDAREA
C
C
R*

Server
C
C
A*

Legend:

C: Sets the check pending status.

T: Sets table information (check constraint status) in all RDAREAs that store the table.

R: Sets table information (check constraint status) in the RDAREA that was specified in the -r option.

A: Sets table information (check constraint status) in all RDAREAs that store tables in the back-end servers in all unload statements specified.

* If the inner replica facility is used, the following generations are subject to check pending status setting:

If the -q option is specified, the generation specified in the -q option is subject to setting.

If the -q option is omitted, the current generation is subject to setting.

Table 8-19 Range of check pending status settings for referential constraints

Unit of execution | Target table
Referenced table | Referencing table
Check pending status of the referencing table related to referenced table | Check pending status of referencing table
Data dictionary table | TIRDA | Data dictionary table | TIRDA
SQLTC | SQLTC | REFCS | SQLTC | SQLTC | REFCS
Table | C | C | T* | C | C | T*
RDAREA | C | C | T* | C | C | R*
Schema | C | C | T* | C | C | T*
Server | C | C | T* | C | C | A*

Legend:

TIRDA: Table information in RDAREA

SQLTC: SQL_TABLES table CHECK_PEND column

SQLRC: SQL_REFERENTIAL_CONSTRAINS table CHECK_PEND column

REFCS: Referential constraint status

C: Sets the check pending status.

T: Sets table information (check constraint status) in all RDAREAs that store the table.

R: Sets table information (check constraint status) in the RDAREA that was specified in the -r option.

A: Sets table information (check constraint status) in all RDAREAs that store tables in the back-end servers in all unload statements specified.

Note:

If a UOC is used, the check pending status is set.

* If the inner replica facility is used, the following generations are subject to check pending status setting:

If the -q option is specified, the generation specified in the -q option is subject to setting. However, if reorganization or reloading is to be performed on a referenced table and the replica RDAREA storing the related referencing table is not in the generation specified in the -q option, the current RDAREA generation becomes subject to setting.

If the -q option is omitted, the current generation is subject to setting.

(5) Example of whether or not check pending status can be set

This subsection describes whether or not check pending status can be set for tables T1 through T5 when the pending and ref_pending operands are specified in the constraint statement.

Description of the tables

T1: Table with the primary key (referenced table for T2)

T2: Table with the primary key and the foreign key that references T1's primary key (referencing table for T1 and referenced table for T3)

T3: Table with the foreign key that references T2's primary key (referencing table for T2)

T4: Table for which check constraints have been defined

T5: Table with no constraint definition

Table 8-20 shows the table's check pending status when reloading is performed on tables T1 through T5.

Table 8-20 Table's check pending status when reloading is performed

Table subject to reloading and whether or not there are constraint definitions | Operand specification in the constraint statement | Check pending status for table
Table name | Referential constraint | Check constraint | pend | ref_pend | T1 | T2 | T3 | T4 | T5
Referenced table | Referencing table
T1 | Y | N | N | Omit'd | Omit'd |  | P |  |  |
Spec'd |  | N |  |  |
Spec'd | Omit'd |  | P |  |  |
Spec'd |  | N |  |  |
T2 | Y | Y | N | Omit'd | Omit'd |  | P | P |  |
Spec'd |  | P | N |  |
Spec'd | Omit'd |  | N | P |  |
Spec'd |  | N | N |  |
T3 | N | Y | N | Omit'd | Omit'd |  |  | P |  |
Spec'd |  |  | P |  |
Spec'd | Omit'd |  |  | N |  |
Spec'd |  |  | N |  |
T4 | N | N | Y | Omit'd | Omit'd |  |  |  | P |
Spec'd |  |  |  | P |
Spec'd | Omit'd |  |  |  | N |
Spec'd |  |  |  | N |
T5 | N | N | N | Omit'd | Omit'd |  |  |  |  |
Spec'd |  |  |  |  |
Spec'd | Omit'd |  |  |  |  |
Spec'd |  |  |  |  |

Legend:

pend: pending

ref_ pend: ref_pending

Y: Defined

N: Not defined

Omit'd: Omitted

Spec'd: Specified

P: Check pending status is set.

N: Check pending status is not changed (the current status is maintained).

: Not applicable (pending and ref_pending operands are ignored).

(6) Timing of setting check pending status

The target table subject to reorganization or reloading and the referencing tables related to that target table are placed in check pending status before reorganization or reloading is executed. If pdrorg rolls back due to an error after it has set the table's check pending status, the table is still placed in check pending status because setting of the check pending status has been completed (commit is completed).

If reorganization or reloading is performed for each schema, each target table is placed in check pending status before reorganization or reloading is executed. If the process that sets the check pending status on the table results in an error, pdrorg terminates with an error. Therefore, all tables processed before the occurrence of the error are placed in check pending status, but unprocessed tables are not placed in check pending status.

8.9.16 option statement (specification of data processing information)

The option statement specifies the optional data processing functions.

Criteria

Specify the option statement to use any of the following optional functions:

Specifying the space conversion level (spacelvl operand)

Changing the percentage of free space during a reload operation (tblfree operand)

Changing the percentage of free space during index creation (idxfree operand)

Data reorganization or reloading with the synchronization point specification (job operand)

Monitoring the pdrorg execution time (exectime operand)

Forcibly placing the table in normal status during re-execution of table reorganization (tblstatus operand)

Changing the lock mode of the table to be unloaded (unldenq operand)

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

option spacelvl = {0|1|3}
    [tblfree = {percentage-of-unused-space|
    ([percentage-of-unused-space],
    percentage-of-free-pages-in-segment)}]
    [idxfree = percentage-of-unused-area]
    [job = [job-name], [lines-count-between-synchronization-points]
    [, CLR]]
    [exectime=pdrorg-execution-monitoring-time]
    [tblstatus=clear]
    (unldenq={tblenq|rdenq|nowait})

(2) Explanation

(a) spacelvl = {0|1|3}

Specifies whether or not to execute space conversion on data during reorganization. Available space conversion levels are 0, 1, and 3.

0

The system does not execute space conversion on the data.

1

The system executes space conversion on the unload data during a reload operation.

Criteria

Specify this space conversion level in the following cases:

To use the same space code consistently throughout the existing data

When migrating table data to another system, the same space code is to be used consistently in the target system.

3

The system executes the same space conversion as for 1 and the space conversion on unload data during an unload operation specifying the -W option.

Criterion

Specify this space conversion level to use the same space code consistently through the unload data, such as when using a UAP to process the unload data that is output with the -W option specified.

Notes

The following table shows whether or not space conversion is executed depending on the specification:

Type of pdrorg processing | Option | Value of spacelvl
-c | -k | -W | 0 | 1 | 3
Reorganization | user | rorg |  | N | Y¹ | Y¹
Unloading | user | unld | Specified | N | N | Y²
Not specified | N | N | N
Reloading | user | reld |  | N | Y¹ | Y¹
Data dictionary table reorganization | dic | rorg |  | N | N | N

Y: Space conversion is executed.

N: Space conversion is not executed.

: Not applicable.

¹ If a table column being processed has the national or mixed character string type, the system converts space in the unload data during a reload operation as follows:

National character string type

The system converts two consecutive single-byte spaces in the unload data to one double-byte space, in units of two bytes from the top.

Mixed character string type

The system converts each double-byte space in the unload data to two consecutive single-byte spaces.

² If a table column being processed has the national character string type, the system converts each double-byte space in the unload data to two single-byte spaces during an unload operation.

When the character codes are utf-8, the system converts one double-byte space (3 bytes) to two single-byte spaces. For MCHAR, the system sets trailing single-byte spaces up to the definition length. For MVARCHAR, the data length remains shortened.

If the table contains an abstract data type, space conversion depends on the abstract data type reloading method shown as follows:

Abstract data type reloading method | Constructor function's argument data type | Value of spacelvl in option statement
Omitted or 0 | 1 or 3
Reloading from the unload data file obtained by the plug-in's unload facility |  | N | N
Using a constructor function to reload from the unload data file obtained by the plug-in's constructor parameter reverse creation function | NCHAR, NVARCHAR, MCHAR, MVARCHAR | N | Y*
Other | N | N
Reloading without using any of these facilities |  | N | N

Y: Space conversion is executed.

N: Space conversion is not executed.

: Not applicable.

* Space conversion is executed for the data type of the constructor function argument (argument type specified in the func operand of the reld_func statement for the corresponding abstract data type).

If the column used as the cluster key or index key contains a national character string type and the data is to be unloaded in the order of key values, the system unloads the data in the order of their values stored in the database, regardless of the spacelvl option specification. Therefore, if space conversion is executed during an unload operation specifying the -W option, the output data may not be sorted in the order of key values. In this case, you can sort data in the order of key values by reorganizing the data without space conversion after the data load operation.
In the case of a table partitioned and stored at multiple servers, the data is not always unloaded in the order of key values regardless of the execution of space conversion, as is the case with the data unload operation in the order of cluster key or index key values. To store data in the order of key values, you need to sort the data after the unload operation.

If you specify spacelvl=1 or spacelvl=3 in the option statement to reorganize a database that contains more than one kind of space code, the following events occur:

The data unloaded in the order of key values may no longer be sorted in the order of key values. In this case, the data can be stored in the order of key values by reorganizing it again without space conversion.

If the column used as the unique key index or primary key index is subject to space conversion, duplicate key values may result in the index. In this case, determine whether or not it must be a unique key or primary key and modify the corresponding data (such as by changing the key value or deleting unneeded rows) before executing space conversion.

If the column used as the partitioning key is subject to space conversion, the storage RDAREA may change, depending on the partitioning conditions. In this case, specify the -g option so that data can be processed even if its storage location changes. If the table contains LOB columns, specify the -g and -j options.

(b) tblfree = {percentage-of-unused-space| ([percentage-of-unused-space], percentage-of-free-pages-in-segment)}

Specify this operand to change the percentage of free space specified with CREATE TABLE (value of PCTFREE) for storing data during a reload operation.

For the reorganization in units of schemas, the specified value takes effect on all tables.

Criteria

Suppose that you have specified a non-zero value as the percentage of free space during table definition, and a space shortage has occurred while processing this table.

In this case, if you execute pdrorg on the table in the RDAREA with no free space, a shortage of RDAREA may occur because the defined percentage of free space takes effect during the execution of pdrorg. In this case, if you specify the tblfree operand, you can complete the pdrorg processing without temporarily expanding the RDAREA.

percentage-of-unused-space

You can specify a value in the range from 0 to 99.

percentage-of-free-pages-in-segment

You can specify a value in the range of 0 to 50.

(c) idxfree = percentage-of-unused-area

If you are creating indexes, specify this operand to change the percentage of unused area specified with CREATE INDEX (value of PCTFREE). The permitted value range is from 0 to 99.

For the reorganization in units of schemas, the specified value takes effect on all tables.

Criteria

Suppose that you have specified a non-zero value as the percentage of unused space during index definition and a space shortage has occurred while processing this table. In this case, if you execute pdrorg on the indexes in the RDAREA with no free space, a shortage of RDAREA may occur because the defined percentage of free area takes effect during the execution of pdrorg. In this case, if you specify the idxfree operand, you can complete the processing without temporarily expanding the RDAREA.

(d) job = [job-name], [lines-count-between-synchronization-points][, CLR]

Specify this operand to execute reorganization or reloading with the synchronization point specification.

Reorganization with the synchronization point specification or reload operation with the synchronization point specification is a method of reorganizing or reloading data in which a transaction is settled each time the specified number of data items are stored. If an error occurs while data is stored, this method enables you to restore the database in a short period of time without having to store data again from the beginning.

job-name <alphanumerics> ((1-3))

Specify the name of the job that executes reorganization or reload operation with the synchronization point specification.

This job name is used during re-execution in the event the utility terminates abnormally during reorganization or during a reload operation. If this job name is the same as a pdrorg job name, a malfunction results. Therefore, make sure that the specified job name is unique in the HiRDB system.

lines-count-between-synchronization-points ((1-1000)) <<100>>

Specify the number of data items as an interval at which a transaction is to be settled. For example, a value of 100 sets a synchronization point at every one million data items.

A small value settles a transaction after a small number of data items; therefore, rollback processing would take a short time in the event of abnormal termination. However, transaction generation and settlement and process restart occur frequently, resulting in a large overhead. On the other hand, a large value has a little effect on the performance, but the error recovery time would be long.

An error results if you specify only the number of lines between synchronization points without specifying a job name.

CLR

Specify this operand if there is no need to re-execute pdrorg or if pdrorg is to be re-executed after clearing the current synchronization point information in the data base.

If the utility terminates abnormally, the synchronization point information remains in the database. If this information is retained during the next execution, the utility may not function correctly.

Note that if you specify CLR, the system clears all synchronization point information, whether it was specified by another user or utility.

To determine if the synchronization point information is present in the database, use the database condition analysis utility (pddbst) to execute condition analysis in units of tables.

Criterion

This option is useful for loading a large amount of data, which takes a considerable amount of time to store the data. However, this has adverse effects on performance due to synchronization point processing. Additionally, for data pages, the number of pages required for storing data is greater than with normal reorganization because data storage begins in a new page at each synchronization point. Therefore, if there is not much free space in the RDAREA, we recommend that you do not use this option.

Example of job operand specification

Reorganizing or reloading data with a synchronization point specified for every one million data items
job=JOB,100 or job=JOB

Clearing the current synchronization point information and specifying new synchronization points at every one million data items to execute reorganization or reload operation
job=JOB,100,CLR or job=JOB,,CLR

Clearing the current synchronization point information and executing normal reorganization or reload operation
job=,,CLR

Notes

Reorganization with the synchronization point specification is not applicable to data dictionary tables.

Synchronization point information is managed by the job name. Suppose that pdrorg(A) was executing reorganization or a reload operation with the synchronization point specification and it terminates abnormally. If you execute pdload(B) specifying the same job name for the same table, pdload(B) uses the synchronization point information that was left by pdrorg(A). Therefore, the job names must be controlled so that they are not duplicated.

If reorganization or reload operation with the synchronization point specification terminates abnormally, you cannot execute the normal reorganization or reload operation (without the synchronization point specification) on the same table until you re-execute the reorganization or reload operation with the synchronization point specification with the same job name.

The synchronization point information is managed in units of RDAREAs. For a row partitioned table, inconsistency occurs on the synchronization point information for the entire table in the following cases:

Only some of the RDAREAs were re-initialized.

An error occurred during reorganization or reload operation with the synchronization point specification in units of RDAREAs.

If the job name is the same, but the number of lines does not match, you cannot use the synchronization point information managed by each RDAREA for re-execution. If some of the RDAREAs have synchronization point information while the others do not, you can re-execute data loading using the retained synchronization point information. The following shows how the system handles reorganization or reload operation when the job name for synchronization point information is the same but the number of lines does not match:

Retained synchronization point information (number of lines between synchronization points) | Input begin line for reorganization or reload operation with synchronization point specification in units of tables
RDAREA 1 | RDAREA 2 | RDAREA 3
0 | 0 | 0 | Item 0
0 | n | 0 | Item n
n | 0 | m | Cannot be executed.
n | m | p | Cannot be executed.

0: No synchronization point information retained

n, m, p: Retained number of lines between synchronization points:

Reorganization or reload operation with the synchronization point specification is not recommended if all the following conditions are met:

HiRDB/Parallel Server is used.

The table is partitioned and stored at multiple servers.

The -g option is omitted.

In this case, processing takes place at each server; therefore, in the event of an error, some servers may be unloading while others are reloading or some server processing may have already been terminated. In such cases, the user must specify an appropriate re-execution method for each server in the event of abnormal termination, resulting in complex operations.

If reorganization or reload operation with the synchronization point specification terminates abnormally, you cannot modify the index creation method during re-execution (-i option).

If EasyMT is remounted before a reorganization or reload operation with synchronization point specification terminates abnormally, mount volume one again during the re-execution.

If reorganization or reload operation with the synchronization point specification terminates abnormally, and you re-initialize RDAREAs or execute the PURGE TABLE statement before re-execution, the existing synchronization point information is deleted.

If you are executing reorganization or reload operation with synchronization point specification only on a LOB column structure base table and the processing terminates abnormally, specify CLR during the re-execution. Otherwise, the search performance on the reorganized LOB columns may be reduced.

The maximum number of data items that can be controlled during reorganization or reloading with the synchronization point specification is 4,294,960,000. To reorganize more data than this amount, consider one of the following operations:

Reorganizing in units of RDAREAs

Creating multiple input data files for pdload by specifying -W and then performing data loading with synchronization point specification more than once with pdload

(e) exectime=pdrorg-execution-monitoring-time

<unsigned integer> ((1-35791394)) <<0>>

Specifies the pdrorg execution monitoring time in minutes. If you omit this operand, the utility does not monitor the execution time. If pdrorg processing does not terminate within the specified monitoring time, the utility terminates the pdrorg process forcibly and collects error information to investigate the cause of the no-response.

This operand takes precedence over the pd_utl_exec_time operand in the system definition.

Criterion

If you specify a monitoring time for nighttime batch processing, and pdrorg is placed in no-response status due to an error, such as a communication error (including a transient error) or a disk error, pdrorg will terminate abnormally. This enables you to detect an error and start recovery processing at an early stage.

Guideline for the specification value

The purpose of this operand is to detect a no-response error, not to monitor the execution time of a long transaction. Therefore, the specified time must be sufficient for processing the applicable table. For example, to monitor the execution time of a pdrorg that should terminate in 7-8 minutes, specify exectime=20, not exectime=10. If the amount of data increases proportionally, the specified value should be re-evaluated as needed.

(f) tblstatus=clear

Specify this option to forcibly place the table in the normal status during re-execution of table reorganization. In such a case, table reorganization will not restart.

Criteria

Specify this option to forcibly place the table in normal status such, as when you want to use SQL statements to reference an RDAREA (table) that has been placed in reload-not-completed data status.

Notes

You can specify this operand only when you specify -k rorg. If you specify this operand at any other time, an error results.

If you specify this operand to place the table in normal status and then you reorganize the table, reorganization will not restart. In such a case, you must restore the table from its backup copy. If you reorganize the table without restoring it first, the unload data file is overwritten and the number of data items becomes invalid (zero).

(g) unldenq={tblenq|rdenq|nowait}

This option specifies whether or not other transactions are to be permitted to update the table during unloading (changes the lock mode of the table that is to be unloaded). Note that only the areas of the table that are not being accessed can be updated during unloading.

tblenq

Allows other transactions only to reference the table. In this case, the table is placed in the protected retrieval mode and the RDAREA is placed in the shared retrieval mode.

rdenq

Allows other transactions only to reference the RDAREA. In this case, the table is placed in the shared retrieval mode and the RDAREA is placed in the protected retrieval mode.

nowait

Allows other transactions to reference the table and update the RDAREAs that are not subject to unloading. In this case, only the RDAREA is placed in the shared retrieval mode, enabling the table being unloaded to be updated. Use this operand only when there is a guarantee that the table to be unloaded (RDAREA) will not be updated, because if data loading or reloading is performed using the unload data file created by unload processing at the same time that update processing is being performed, data duplication or data loss may occur.

Example

If only table T1 in RDAREA1 (shaded part) is unloaded with the table and RDAREA layout shown below, whether or not other transactions can update the table and RDAREA depends on the operand specification.

Explanation

The following table shows whether or not other transactions can update the table and RDAREA:

unldenq value | Lock mode | Whether or not other transactions can execute
RDAREA | Table | NW TBL | Table T1 | T2
RDAREA1 | RDAREA2 | RDAREA1 | RDAREA2
REF | UP | REF | UP | REF | UP | REF | UP
tblenq | SR | PR |  | Y | N | Y | N | Y | Y | Y | Y
rdenq | PR | SR |  | Y | N | Y | Y | Y | N | Y | Y
nowait | SR |  | SR | Y | N* | Y | Y | Y | Y | Y | Y

Legend:

NW TBL: NOWAIT Table

REF: Referencing

UP: Updating

SR: Locked in the shared retrieval mode

PR: Locked in the protected retrieval mode

: Not locked

Y: Executable

N: Not executable

* The user must ensure that data for table T1 in RDAREA1 will not be updated.

8.9.17 report statement (specification of a file to which pdrorg tuning information is output)

The report statement specifies a file to which the tuning information is to be output during the execution of pdrorg.

Criterion

Specify the report statement if you want to output the tuning information.

Rules

You can specify only one report statement.

The system does not output the tuning information unless the report statement is specified.

Organization of this subsection

(1) Format

(2) Explanation

(3) Output format

(1) Format

report file=process-results-filename

(2) Explanation

(a) process-results-filename

<pathname>

Specifies the absolute path name of the file to which the tuning information is to be output.

This file must be located at the host where pdrorg is executed.

(3) Output format

(a) Tuning information

pdrorg VV-RR(Object Option) *** DB REORGANIZATION *** 2003-03-31 11:06:07 ...........1

*** statistics report ***

execute time :   0: 1:46 ............................................................2
prepare time :   0: 0: 0 ............................................................3

*** shell/server information ***

name       cpu svrup(first) reciv  wait  sort  send unlod ixunl delet dtlod ixlod unldr
unldw(expnd) unput dtins ...........................................................4
-

pdrorg       0     0(    0) ***** ***** ***** ***** ***** ***** ***** ***** ***** *****
*****(*****) ***** *****
pdrorgm      8     7(    7)    27 ***** ***** 12.5k ***** ***** ***** ***** *****  248k
124k(*****)     3 *****
bes1        24 *****(*****)    14     0     2 6.24k     6 *****     1    16    57 *****
*****(*****) *****    16
bes2        26 *****(*****)    10     0     2 6.24k     6 *****     1    18    57 *****
*****(*****) *****    19
-

total       58     7(    7)    51     0     4 25.0k    12 *****     2    34   114  248k
124k(*****)     3    35 ............................................................5

*** buffer information ***

server   maxio minio sumio brreq bwreq bfhit hitrt  read write lrreq lbrht lbrrt lwreq lbwht
lbwrt lread lwrit flush bfupd bfred bfwrt cinsm cafls cafwr cfmax cfavg ldirc ldiuc ldihc
ldird ldiwt lbfshc .................................................................6

-

bes1         0     0    53 79.9k 44.3k 60.7k 76.1% 6.95k 12.2k     0     0 *****     0     0
*****     0     0 16.5k     0     0     0     0     0     0     0 1.00k 11.4k 11.4k     0
   0 11.4k 10.6k
bes2         0     0    52 79.9k 44.3k 60.8k 76.1% 6.95k 12.2k     0     0 *****     0     0
*****     0     0 16.5k     0     0     0     0     0     0     0 1.00k 11.4k 11.4k     0
   0 11.4k 10.6k

-

total        0     0   105  160k 88.6k  121k 76.1% 13.9k 24.3k     0     0 *****     0     0
*****     0     0 33.1k     0     0     0     0     0     0     0 1.00k 22.8k 22.8k     0
   0 22.8k 21.3k

pdrorg terminated, return code=0 ...................................................7

Explanation

Header information (version number and pdrorg start time)

pdrorg processing time

pdrorg preprocessing time

Each server information:
name: Shell name or server name
cpu: CPU processing time (seconds)
svrup(first): Server startup time (initial server access time) (seconds)
reciv: Total wait time for communication from other processes (seconds)
wait: Total time required for allocating locked resources (seconds)
sort: Sorting time (seconds)
send: Number of communications to other processes
unlod: Unloading time (seconds)
ixunl: Time spent to create index information files (applicable to index re-creation or index reorganization) (seconds)
delet: Data deletion time (seconds)
dtlod: Data loading time (seconds)
ixlod: Time spent to create indexes from index information files (seconds)
unldr: Unload data file input count
unldw(expnd): Unload data file output count
unput: Communication message processing time during unload operation (seconds)
dtins: Communication message processing time during reload operation (seconds)

Total value for each server information

Each buffer information
server: Name of back-end server
maxio: Maximum input/output time (seconds)
minio: Minimum input/output time (seconds)
sumio: Total input/output time (seconds)
brreq: Number of READ requests for data and index buffer
bwreq: Number of WRITE requests for data and index buffer
bfhit: Data and index buffer hit count
hitrt: Data and index buffer hit ratio (%)
read: Data and index buffer READ count
write: Data and index buffer WRITE count
lrreq: Number of READ requests for LOB buffer
lbrht: LOB buffer READ hit count
lbrrt: LOB buffer READ hit ratio (%)
lwreq: Number of WRITE requests for LOB buffer
lbwht: LOB buffer WRITE hit count
lbwrt: LOB buffer WRITE hit ratio (%)
lread: LOB buffer READ count
lwrit: LOB buffer WRITE count
flush: Buffer flush count
bfupd: READ wait count during buffer updating
bfred: READ wait count during buffer READ
bfwrt: WRITE wait count during buffer WRITE
cinsm: Internal information used by the system
cafls: Internal information used by the system
cafwr: Internal information used by the system
cfmax: Internal information used by the system
cfavg: Internal information used by the system
ldirc: Number of times the random access local buffer was used to reference index pages
ldiuc: Number of times the random access local buffer was used to update index pages
ldihc: Of bfhit, buffer hit count for index pages in the random access local buffer
ldird: Of read, the number of real READs for index pages in the random access local buffer
ldiwt: Of write, the number of real WRITEs for index pages in the random access local buffer
ldfshc: Of flush, number of times the random access local buffer was flushed

pdrorg's return code

Notes

Each item is displayed with a maximum length of three digits. If a value exceeds three digits, the system rounds up the fourth digit and displays the value with a decimal point and one of the units shown as follows:
k: Kilo ( 10³ for time and count)
M: Mega ( 10⁶ for time and count)
G: Giga ( 10⁹ for time and count)

If there is no corresponding output information, the system displays *****.

The processing time less than one second is rounded off. This means that a value less than one second is displayed as 0 second.

(b) Processing result of reorganization in units of schemas

-k unld

pdrorg VV-RR(Object Option) *** DB REORGANIZATION *** 2000-11-16 13:27:36 .......1

*** schema unload processing list ***

schema name : USER01 ............................................................2

No.1     table name : TABLE11                    generation : 01 ............3

        rdarea name ...........4           row count ...........................5
        RD011                                 31,267
        RD021                                 31,540
        RD012                                 31,167
        RD013                                 31,169
        RD014                                 31,363
        RD022                                 31,366
        RD023                                 31,024
        RD024                                 31,104
                                 total       250,000 ...........................6

        return code=0 ..........................................................7

No.2     table name : TABLE21                     generation : 01

        rdarea name                        row count
        RD011                                  1,246
        RD021                                  1,310
        RD012                                  1,264
        RD013                                  1,300
        RD014                                  1,286
        RD022                                  1,228
        RD023                                  1,165
        RD024                                  1,201
                                 total        10,000

        return code=0

[Tuning information of (a)]

pdrorg terminated, return code=0 ................................................8

Explanation

Header information (version number and pdrorg start time)

Schema name

Table identifier and generation number (the generation number is displayed only when the inner replica facility is used)

Table storage RDAREA name

Number of rows unloaded per RDAREA

Number of rows unloaded per table

Return code when one table was unloaded

pdrorg's return code

-k reld

pdrorg VV-RR(Object Option) *** DB REORGANIZATION *** 2000-11-16 17:02:01 .......1

*** schema reload processing list ***

schema name : USER01 ............................................................2

No.1     table name : TABLE11                    generation : 01 ...........3

        rdarea name ...........4           row count ...........................5
        RD011                                 31,267
        RD021                                 31,540
        RD012                                 31,167
        RD013                                 31,169
        RD014                                 31,363
        RD022                                 31,366
        RD023                                 31,024
        RD024                                 31,104
                                 total       250,000 ...........................6

*** index information file assign list *** ......................................7

index INDEX11 RD011 /tmp/INDEX-TABLE11-RD011-aaaa14376
index INDEX11 RD021 /tmp/INDEX-TABLE11-RD021-aaaa14380
index INDEX11 RD012 /tmp/INDEX-TABLE11-RD012-baaa14376
index INDEX11 RD013 /tmp/INDEX-TABLE11-RD013-caaa14376
index INDEX11 RD014 /tmp/INDEX-TABLE11-RD014-daaa14376
index INDEX11 RD022 /tmp/INDEX-TABLE11-RD022-baaa14380
index INDEX11 RD023 /tmp/INDEX-TABLE11-RD023-caaa14380
index INDEX11 RD024 /tmp/INDEX-TABLE11-RD024-daaa14380

        return code=0 ..........................................................8

No.2     table name : TABLE12                        skipped.....................9

        return code=4

No.3     table name : TABLE21                        generation : 01

        rdarea name                        row count
        RD011                                  1,246
        RD021                                  1,310
        RD012                                  1,264
        RD013                                  1,300
        RD014                                  1,286
        RD022                                  1,228
        RD023                                  1,165
        RD024                                  1,201
                                 total        10,000

*** index information file assign list ***

index INDEX21 RD011 /tmp/INDEX-TABLE21-RD011-aaaa14378
index INDEX21 RD021 /tmp/INDEX-TABLE21-RD021-aaaa14745
index INDEX21 RD012 /tmp/INDEX-TABLE21-RD012-baaa14378
index INDEX21 RD013 /tmp/INDEX-TABLE21-RD013-caaa14378
index INDEX21 RD014 /tmp/INDEX-TABLE21-RD014-daaa14378
index INDEX21 RD022 /tmp/INDEX-TABLE21-RD022-baaa14745
index INDEX21 RD023 /tmp/INDEX-TABLE21-RD023-caaa14745
index INDEX21 RD024 /tmp/INDEX-TABLE21-RD024-daaa14745

        return code=0

[Tuning information of (a)]

pdrorg terminated, return code=4 ...............................................10

Explanation

Header information (version number and pdrorg start time)

Schema name

Table identifier and generation number (the generation number is displayed only when the inner replica facility is used)

Table storage RDAREA name

Number of rows reloaded per RDAREA

Number of rows reloaded per table

Information about index information files (applicable if -i n is specified)
index index-identifier index-storage-RDAREA-name index-information-filename

Return code when one table was reloaded

Indicates that reload processing was skipped, in which the system outputs the return code when one table was reloaded

pdrorg's return code

-k rorg

pdrorg VV-RR(Object Option) *** DB REORGANIZATION *** 2000-11-16 13:57:08 .......1

[Information for -k unld]

[Information for -k reld]*

[Tuning information of (a)]

pdrorg terminated, return code=0 ................................................2

* The schema name is not output.

Explanation

Header information (version number and pdrorg start time)

pdrorg's return code

8.9.18 blobtovarchar statement (specification of column subject to data conversion)

The blobtovarchar statement specifies the name of an abstract data type column with BLOB attribute to be converted to the column VARCHAR type before unloading it.

Criterion

Specify the blobtovarchar statement to convert a column of abstract data type with BLOB attribute to the VARCHAR type before unloading it. This statement is applicable only to the abstract data type for which a constructor parameter reverse creation function returns a value of BLOB type.

Rules

You can specify only one blobtovarchar statement.

The blobtovarchar statement is applicable only to an unload operation specifying -W bin.

A data conversion error occurs if the size of data is 32 KB or greater (the maximum size of data definable as VARCHAR type is 32 KB).

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

blobtovarchar column-name[,column-name]...

(2) Explanation

(a) column-name

Specifies the name of an abstract data type column that has a constructor parameter reverse creation function.

The system treats a column name enclosed in double quotation marks as case sensitive; otherwise, the system treats it as all uppercase letters.

You can specify a column name for which the constructor parameter reverse creation function returns a value of BLOB type. Specifying any other column results in an error.

8.9.19 fixtext_option statement (specification of output data during creation of input data file in fixed-size data format)

When an input data file in the fixed-size data format is created with the -W fixtext option, the fixtext_option statement specifies information about the output data.

Criteria

When an input data file in the fixed-size data format is created (with the -W fixtext operand), the fixtext_option statement is specified in order to edit the output data.

Rules

Only one fixtext_option statement can be specified.

When you specify multiple operands, delimit them with the space character (0x20).

Do not specify the fixtext_option statement without any operand specified.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

 fixtext_option [cntlcode={nocheck|check|replace[,replacement-character]}]

              [enclose=enclosing-character]

              [format=data-type,output-format]

(2) Explanation

(a) cntlcode={nocheck|check|replace[,replacement-character]}

For the character string data, national character data, and mixed character string data types, specifies how to control data output when the character string data contains control characters (ASCII codes 0x00 through 0x1f).

nocheck:

Output the column data in the database as is without checking for control characters. You specify this operand in order to output the column data in the database as is.

check:

Check for control characters; if the column data contains a control character, do not output the corresponding row to the unload data file. You specify this operand to suppress output of rows that contain control characters.

replace[,replacement-character]:

Check for control characters; if the column data contains a control character, replace it with the specified replacement character and then output the corresponding row to the unload data file. You specify this operand to output column data containing control characters in such a manner that the control characters can be viewed by a program such as Text Viewer.

Specify the replacement character as a 1-byte character.

Specification rules for the replacement character

When you omit the replacement character, the system assumes a colon.

None of the following characters can be specified as the replacement character:
space, tab, asterisk, underscore

None of the following characters is suitable for the replacement character because they may be the same as codes used in the output data:
Characters used in the output data
Numeric data sign characters (+ and -)
Characters whose code is the same as that of a multi-byte character (, , , , , , , , )
Hyphen used in date interval, time interval, and time stamp data
Colon used in time and time stamp data
Period used in numeric value, date interval, time interval, and time stamp data

Rules for the cntlcode operand

When the cntlcode operand or fixtext_option statement is omitted, cntlcode=nocheck is assumed.

You can specify only one cntlcode operand in the fixtext_option statement.

The following table explains the relationships between whether or not there are control statements in column data, the cntlcode operand value, and the pdrorg processing:

Condition | pdrorg's processing
Whether or not there are control characters in column data | cntlcode operand value | Checking for control characters | Data output method
Yes | check | Y* | Resumes processing without outputting the corresponding row (pdrorg terminates normally with return code 4).
replace | Replaces the control characters and then outputs the data.
nocheck | N | Outputs the data in the database as is.
No | check | Y* | Outputs the data in the database as is.
replace
nocheck | N

Legend:

Y: Checks for control characters

N: Does not check for control characters

* Checks for 1-byte characters only; does not check for multi-byte characters.

(b) enclose=enclosing-character

When a column data item is to be enclosed with a character in order to identify the data, specifies the 1-byte enclosing character to be used. Rules for the enclosing character are the same as for the replacement character in the cntlcode operand.

Criteria

Specify this operand when you wish to identify a column data item by enclosing it with a particular character. When a variable-length character string (character string data, national character data, or mixed character string data type) is shorter than the length defined for the column data or is the null value, the system pads the data up to the defined length (the default uses the space character). If the length of the column data is 0 bytes, the resulting data cannot be identified from 0-byte character string data, null value data, or data consisting of only space characters. By specifying the enclose operand, the column data in such cases can be identified because it will be enclosed with the specified enclosing character.

The following table shows output examples when the data type is varchar(8) and the padding character is the space character:

Data | Output data
enclose operand omitted | enclose="
0-byte characters |  | ""
Null value |  |
All space characters |  | ""

Legend:

: One space character

Rules for the enclose operand

Only one enclose operand can be specified in the fixtext_option statement.

The following table describes whether or not the enclosing character is used when the enclose operand is specified:

Data type of column | Data value in column | Whether or not enclosing character is used
CHAR, VARCHAR, NCHAR, NVARCHAR, MCHAR, and MVARCHR | Null value | Not used (padding character is used)*
Real value | Used*
Other | Null value | Not used
Real value

* The output length increases by 2 bytes.

(c) format=data-type,output-format

Specifies that the output format for column data is to be changed. The supported data types are INTEGER and SMALLINT.

data-type:

Specifies the data type of the column or parameter (constructor parameter reverse creation function) whose output format is to be changed. Specify either INTEGER or SMALLINT.

Rules

The same data type cannot be specified more than once (value of data-type).

If the table does not contain the specified data type, the specification is ignored.

output-format:

Specifies the output format for the data type, as either type1 or type2.

When this operand is omitted, type1 is assumed. If the data type is neither INTEGER nor SMALLINT, type 1 is assumed.

For details about type1 and type2, see 8.3.3(3)(a) Output format.

8.10 Reorganization using a UOC

If you use a UOC, you can pass data retrieved from the database to the UOC, use the UOC to edit the data, and then output the data to an unload data file.

Organization of this section

8.10.1 How to use a UOC during reorganization

8.10.2 Relationships between options and control statements

8.10.3 Overview of UOC processing

8.10.4 UOC interface

8.10.5 Example of a UOC

8.10.1 How to use a UOC during reorganization

You use the reorganization method that uses a UOC mainly in the following cases:

Deleting unneeded data
Use a UOC for reorganization when you want to reorganize a table and delete unneeded data at the same time or when you want to reload an unload data file from which unneeded data has been deleted to another table.

Updating data for use by applications
Use a UOC for reorganization when you want to update data to create an input data file for pdload or you want to output data in a desired format for use by applications.

Organization of this subsection

(1) Deleting unneeded data

(2) Updating data for use by applications

(1) Deleting unneeded data

You can output only data that is needed to an unload data file by using a UOC during the unload operation for table reorganization or during the table unload operation to determine which data is needed.

Figure 8-20 provides an overview of reorganization using a UOC (deleting unneeded data).

Figure 8-20 Overview of reorganization using a UOC (deleting unneeded data)

(2) Updating data for use by applications

When you unload a table, you can use a UOC to update or edit the data and output it to an unload data file. The resulting unload data file is in pdload's input data file format.

You can also use a UOC to update or edit data and save it in a file in a desired format. The obtained file is called a UOC data file.

Figure 8-21 provides an overview of reorganization using a UOC (updating data for use by applications).

Figure 8-21 Overview of reorganization using a UOC (updating data for use by applications)

Note that you can update data for use by applications only when -k unld is specified, in which case you also need to specify the -W option.

Checking post-update data by pdrorg
pdrorg checks the data values set in the post-update data address list in the UOC interface area that is returned from the UOC. If pdrorg finds any invalid data, it cancels the processing and terminates with return code 8.
Table 8-21 lists the check items for each data type in the post-update data.

Table 8-21 Check items for each data type in the post-update data

Data type | Check item
Length of variable-length data*1 | Sign*2 | Data range*3 | Repetition column
Number of elements | Null value
INTEGER, SMALLINT, FLOAT, SMALLFLT |  | N | N | Y | Y
DECIMAL |  | Y | Y | Y | Y
CHAR, MCHAR, NCHAR |  |  | N | Y | Y
DATE, TIME |  |  | Y*4 | Y | Y
INTERVAL YEAR TO DAY, INTERVAL HOUR TO SECOND |  | Y | Y*4 | Y | Y
VARCHAR, MVARCHAR, NVARCHAR | Y |  | N | Y | Y
TIMESTAMP |  |  | Y*4 | Y | Y
BINARY | Y |  | N |  |
BLOB (BLOB attribute) | Y |  | N |  |
Abstract data type (parameter value) | Depends on the data type of each parameter.

Legend:

Y: Checked.

N: Not checked.

: Not applicable

*1 Checks the length part of the variable-length character string, BINARY, or large object data type. If the value of the length part is negative, an error results.

In the case of a variable-length character string, an error results if the value of the length part exceeds 32,000 bytes.

If a column has the large object data type or the return value of the constructor parameter reverse creation function specified in the unld_func statement has the large object data type, bloblimit is specified in the unlduoc statement, and the data exceeds the specified memory space allocation size, an error results. If bloblimit is not specified in the unlduoc statement, an error results if the data size exceeds 2 gigabytes.

*2 Checks the sign part (4 bits) in the packed format. An error results if the sign part is not 0xC, 0xD, or 0xF.

*3 For the packed format, an error results if the packed data (4 bits) is none of 0x0 to 0x9. For other formats, pdrorg does not check the contents of data values.

*4 An error results if the value is invalid as date, time, or time stamp data (such as the month part of date data exceeding 12).

8.10.2 Relationships between options and control statements

Organization of this subsection

(1) Options and control statements that are specified during reorganization using a UOC

(2) Option specification rules for reorganization using a UOC

(3) Control statement specification rules for reorganization using a UOC

(4) Relationship between the host and the server that calls the UOC

(5) Data that is passed to the UOC and pdrorg's data conversion timing

(1) Options and control statements that are specified during reorganization using a UOC

Table 8-22 shows the options and control statements that are specified during reorganization using a UOC.

Table 8-22 Options and control statements that are specified during reorganization using UOC

Type | Option | Control statement | Output to file
-k | -W | unload statement | unlduoc statement | pdrorg | UOC
Deleting unneeded data*1 | Table reorganization | rorg | N | Y*3 | Y | Output | Optional
Table unload + reload operation | Unload operation | unld |  | Y*3 | Y | Output | Optional
Reload operation | reld |  | Y*3 |  |  |
Updating data for use by applications*2 | File output by pdrorg | unld | Y | Y*3 | Y | Output | Optional
File output by UOC | unld | N | Y*4 | Y | Not applicable | Required

Legend:

Y: Specify.

N: Cannot be specified (results in an error if specified).

: Ignored, if specified.

*1 If the table contains columns of an abstract data type, data is passed to the UOC only for the abstract data type columns for which the constructor parameter reverse creation function has been specified in the unld_func statement. In this case, the null value is passed to the UOC, but the retrieved data is stored in the unload data file. Therefore, the UOC cannot determine whether or not the data is needed.

*2 If the table contains columns of an abstract data type, specify the unld_func statement for all such abstract data type columns. If the unld_func statement is not specified, an error results.

*3 Specify the name of the unload data file in the unload statement.

*4 Specify (uoc) in the unload statement.

(2) Option specification rules for reorganization using a UOC

The following are the option specification rules for reorganization using a UOC:

You can use a UOC for reorganization during table reorganization (-k rorg) or a table unload operation (-k unld).

If the table contains a column of large object data type or an abstract data type with the large object data attribute, you must specify the -j option. An error results if the -j option is omitted.

dic (data dictionary table is to be processed) cannot be specified in the -c option. Specifying dic results in an error.

If you specify (uoc) in the unload statement, you cannot specify the -W option. Specifying the -W option results in an error.

If you specify (uoc) in the unload statement, specifying the -f option results in an error.

(3) Control statement specification rules for reorganization using a UOC

The following are the control statement specification rules for reorganization using a UOC:

To use a UOC for reorganization, you must always specify the following two control statements:

unlduoc statement

unload statement

The lobunld statement cannot be specified.

(4) Relationship between the host and the server that calls the UOC

Table 8-23 describes the relationship between the host and the server that calls the UOC. You must provide the shared library that contains the applicable UOC on the appropriate host, as indicated in Table 8-23.

Table 8-23 Relationship between the host and the server that calls the UOC

Execution environment | Server | Host
HiRDB/Single Server | -g omitted | Single server | Host where the single server is located
-g specified | Utility server (pdrorgm) | Host specified in the unload statement
HiRDB/Parallel Server | -g omitted | In units of tables | Non-partitioned table | Back-end server | Host where the server containing the table is located
Partitioned table | All hosts where the servers specified in the unload statement are located
In units of RDAREAs | Host where the server containing the specified RDAREA is located
-g specified | Utility server (pdrorgm) | Host specified in the unload statement

(5) Data that is passed to the UOC and pdrorg's data conversion timing

pdrorg provides a function for converting the data according to specified options and control statements. Reorganization using a UOC can also use this function. This data conversion function passes unconverted data to the UOC and converts data before saving the data in the unload data file. Table 8-24 describes the data to be passed to the UOC and pdrorg's data conversion timing.

Table 8-24 Data that is passed to the UOC and pdrorg's data conversion timing

Type
Option or control statement available for data conversion
Data passed to UOC
Data conversion timing

Deleting unneeded data (table reorganization)
-S
Data with spaces
When unload data file is output

-W

-W dat,sup or
-W extdat,sup

spacelvl in option statement
Data without space conversion
When table is reloaded

blobtovarchar statement

Deleting unneeded data (table unload + reload operations)
-S
Data with spaces
When unload data file is output

-W

-W dat,sup or
-W extdat,sup

spacelvl in option statement
Data without space conversion
When table is reloaded

blobtovarchar statement

Updating data for use by applications (file output by pdrorg)
-S

-W
Data before being converted to DAT or binary format
When unload data file is output*

-W dat,sup or
-W extdat,sup
Data with spaces
When unload data file is output*

spacelvl in option statement
Data without space conversion
When unload data file is output*

blobtovarchar statement
Data in the BLOB format
When unload data file is output*

Updating data for use by applications (file output by UOC)
-S
Data with spaces

-W

-W dat,sup or
-W extdat,sup

spacelvl in option statement
Data without space conversion

blobtovarchar statement

Legend:

: Not applicable

Note

If the table contains a column of DECIMAL type for which SUPPRESS was specified in the table definition, the data obtained after expansion is passed to the UOC. The data is converted when the table is reloaded.

* The data obtained after editing by the UOC is converted.

8.10.3 Overview of UOC processing

Figure 8-22 provides an overview of UOC processing and Figure 8-23 shows the call sequence between pdrorg and UOC.

Figure 8-22 Overview of UOC processing

Explanation:

Control is passed from pdrorg to the UOC and processing is started. When the processing is finished, control is returned to pdrorg.

Checks the call type set by pdrorg in the UOC interface area.

Performs start processing, such as initialization and UOC data file open processing.

Updates or edits the data set by pdrorg in the UOC interface area.

When there is no more data, the UOC performs termination processing, such as closing the UOC data files.

If pdrorg processing or internal UOC processing results in an error, the UOC performs termination processing, such as closing the UOC data files and deleting unneeded UOC data files.

Checks the row data to determine whether or not it is needed. If the row data is needed, the UOC updates or edits the data and sets the storage flag in the UOC interface area to Y. If the row data is not needed, the UOC sets the storage flag in the UOC interface area to N. If the UOC is to create a UOC data file, it saves the updated or edited row data in the UOC data file.

Sets the return code in the UOC interface area.

Figure 8-23 Call sequence between pdrorg and UOC

Explanation:

In the case of reorganization or an unload operation in units of schemas, steps 1-11 are repeated for each table in the schema. If an error occurs during table processing, pdrorg processing is cancelled immediately.

pdrorg sets the start request as the call type and calls the UOC.

If the type of call from pdrorg is a start request, the UOC executes the following processing:

If the UOC is to output a UOC data file, it creates (opens) the UOC data file.

The UOC performs preparations for starting processing, such as allocation of various areas.

If the preparations are completed successfully, the UOC sets return code 0 in the UOC interface area; if not, the UOC sets return code 8 and returns control.

If return code 8 is set, you must perform post-processing, such as closing the UOC data file because the UOC can no longer be called (no stop request is issued).

pdrorg checks the UOC's return code set in the UOC interface area. If it is neither 0 nor 4, pdrorg cancels its processing immediately.

pdrorg retrieves data in the database.

If pdrorg was able to retrieve table data, it set the retrieved data in the data address list, sets a data update request as the call type, and calls the UOC. When there is no more data to be retrieved, pdrorg performs step 10 (termination processing).
The data update request is processed repeatedly until any of the following conditions is satisfied:

There is no more table data.

The UOC sets a return code other than 0 or 4 in the UOC interface area.

An internal processing error occurs in pdrorg.

If the type of call from pdrorg is a data update request, the UOC executes the following processing:
If each process terminates normally, UOC sets return code 0 in the UOC interface area; if a process terminates abnormally, the UOC sets return code 8 and returns control.

(a) When deleting unneeded data for table reorganization or the unload operation

The UOC references the data that was passed from pdrorg to the data address list in the UOC interface area. If the data is needed, the UOC sets the storage flag to Y in the UOC interface area. If the data is not needed, the UOC sets the storage flag to N.

(b) When updating data for use by applications

The UOC executes processing such as data updating.

If the UOC has updated data, it sets the post-update data address list in the UOC interface area and sets the storage flags to Y.

If the data is unneeded, the UOC sets the storage flag to N in the UOC interface area.

If the UOC is to output a UOC data file, it saves the needed data in the UOC data file.

If the UOC has set return code 8 in the UOC interface area, pdrorg sets a stop request as the type of call and calls the UOC.

If the type of call from pdrorg is a stop request, the UOC executes termination processing. After this call, pdrorg cannot call the UOC again.

If you have created a UOC data file, close it. If you no longer need the created UOC data file, delete it at this stage.

Perform post-processing, such as freeing the allocated memory.

If pdrorg is to output an unload data file and the storage flag in the UOC interface area is set to Y, pdrorg outputs data to the unload data file. If the storage flag is set to N, pdrorg does not output the data. If the data is to be updated (-W option is specified), pdrorg references the post-update data address list in the UOC interface area and outputs the data updated by the UOC to the unload data file in the format specified in the -W option.

If all the following conditions are satisfied, pdrorg sets a termination request as the type of call and calls the UOC:

All data has been retrieved from the specified table.

An internal error occurred in pdrorg.

The return codes set by the UOC in the UOC interface area are all normal (0 or 4).

If the type of call from pdrorg is a termination request, the UOC executes termination processing.

If you have created a UOC data file, close it.

Perform post-processing, such as freeing the allocated memory.

8.10.4 UOC interface

Organization of this subsection

(1) Structure and contents of the UOC interface area

(2) Format of data values

(1) Structure and contents of the UOC interface area

An interface area is used to exchange information between pdrorg and a UOC. It is called a UOC interface area.

pdrorg always allocates this area except for the update buffer. The UOC receives the address of this area in the first argument of a call function to reference and update information.

Figures 8-24 and 8-25 show the structure of the UOC interface area.

Figure 8-24 Structure of the UOC interface area (1/2)

Note 1

Square brackets [ ] enclose the numeric value for HiRDB in the 64-bit mode.

Note 2

For details about the contents of the UOC interface are, see Table 8-25; for details about the contents of the column definition information address list, see Table 8-26; for details about the contents of the column definition information area, see Table 8-27; for details about the contents of the abstract data-type reverse-creation parameter information area, see Table 8-28.

Figure 8-25 Structure of UOC interface area (2/2)

Note 1

Square brackets [ ] enclose the numeric value for a HiRDB in the 64-bit mode.

Note 2

For details about the contents of the data address list, see Table 8-31; for details about the contents of the post-update data address list, see Table 8-32.

Table 8-25 Contents of the UOC interface area

Relative location
Field name
Length (bytes)
Attribute
Program setting the value
Description

32
64
32
64

0
0
Eye-catcher
8
8
char
pdrorg
Interface area ('*UOCINF*')

8
8
Running program
4
4
int
pdrorg
Program that has control:
0: pdrorg
1: UOC

12
12
Call type
4
4
int
pdrorg
Type of processing request to the UOC:
o: Start request
e: Data update request
c: Termination request
t: Stop request

16
16
Length of authorization identifier
2
2
short
pdrorg
Length of the target table's owner name

18
18
Authorization identifier
30
30
char
pdrorg
Target table's owner name

48
48
Length of table identifier
2
2
short
pdrorg
Length of the target table name

50
50
Table identifier
30
30
char
pdrorg
Name of the target table

80
80
Row length
4
8
long
pdrorg
If the data storage method is Y, this field sets the row length.

84
88
Address of the data address list
4
8
void*
pdrorg
Start address of the data address list that contains the address of the data retrieved by pdrorg

88
96
Information used by the system
4
8
long
pdrorg
Information used by the system (UOC may not use this information)

92
104
Address of the post-update data address list
4
8
void*
UOC
If the data updated by the UOC is to be returned to pdrorg, this field sets the start address of the post-update data address list that contains the address of the data created within the UOC. If the data is not to be updated, this field sets 0.

96
112
Address of user parameter
4
8
void*
pdrorg
Address of the character string that was specified in the param operand of the unlduoc statement (the character string ends with /0). If the param operand was omitted, the null value is set.

100
120
Address of the column definition information address list
4
8
void*
pdrorg
Start address of the column definition information address list for the target table

104
128
Reserved
1
1
char
pdrorg
Reserved area (UOC may not use this information)

105
129
Table attribute
1
1
char
pdrorg
Attribute of the target table:
F: FIX table
blank: Non-FIX table

106
130
Number of columns
2
2
short
pdrorg
Number of columns in the target table

108
132
Storage flag
1
1
char
UOC
Storage flag:
Y: Stores data in unload data file.
N: Does not store data in unload data file.
If pdrorg is used to create an unload data file, make sure that this flag is set (if the UOC is used to create a UOC data file, there is no need to set this flag).

109
133
Data storage method
1
1
char
pdrorg
For a FIX table, this field sets the value of the fixrow operand specified in the unlduoc statement (when fixrow is omitted, the field sets N).
Y: Passes data in the order the columns were defined (consecutively).
N: Passes the start address of the data that has been corrected according to the boundary of data type.

110
134
Reserved
10
10
char
pdrorg
Reserved area (UOC may not use this information)

120
144
Return code
4
4
int
UOC
Return code.
The UOC that has received control from pdrorg must set a return code for each call according to the following guidelines:

0:

Set this code if the processing for each request was executed normally.

4:

Set this code if you want to display a message even when processing was normal, such as for debugging. The meaning is the same as for 0. When the return code is set to 4, the message is displayed up to three times. Note that once the message has been displayed three times, the utility ignores return code 4, if set again, in which case there is no more message display.

8:

Set this code if an error occurs during UOC processing.

If the set return code is none of the above, pdrorg cancels processing. When the return code is 4 or 8, pdrorg outputs the contents of the message-embedded area to the standard output and message log. Make sure that the message consists of no more than 131 bytes of a character string that ends with \0. pdrorg does not output any message that begins with \0.

124
148
Message-embedded area
132
132
char
pdrorg
UOC
Storage area for the message that is output to the standard output and message log (pdrorg places \0 at the beginning of the message before passing it).

Legend:

32: Shows the relative location or length for a HiRDB in the 32-bit mode.

64: Shows the relative location or length for a HiRDB in the 64-bit mode.

Note 1

For the start address, pdrorg guarantees a 4-byte boundary for a HiRDB in the 32-bit mode and an 8-byte boundary for a HiRDB in the 64-bit mode.

Note 2

The following table describes whether or not each field can be referenced and updated:

Field name | Call type
Start request | Data update request | Termination request | Stop request
Eye-catcher | R | R | R | R
Running program | R | R | R | R
Call type | R | R | R | R
Length of authorization identifier | R | R | R | R
Authorization identifier | R | R | R | R
Length of table identifier | R | R | R | R
Table identifier | R | R | R | R
Row length | N | R | N | N
Address of the data address list | N | R | N | N
Address of the post-update data address list | N | Y | N | N
Address of user parameter | R | R | R | R
Address of the column definition information address list | R | R | R | R
Table attribute | R | R | R | R
Number of columns | R | R | R | R
Data storage method | N | Y | N | N
Message-embedded area | Y | Y | Y | Y
Return code | Y | Y | Y | Y
Storage flag | N | Y | N | N

Legend:

Y: Value can be set.

R: Value can be referenced.

N: Value cannot be referenced (value is not guaranteed).

Table 8-26 Contents of column definition information address list

Relative location | Field name | Length (bytes) | Attribute | Program setting the value | Description
32 | 64 | 32 | 64
0 | 0 | Definition information address for column ID1 | 4 | 8 | void* | pdrorg | Sets the address of the column definition information for column ID1.
4 | 8 | Definition information address for column ID2 | 4 | 8 | void* | pdrorg | Sets the address of the column definition information for column ID2.
(n - 1) 4 | (n - 1) 8 | Definition information address for column IDn | 4 | 8 | void* | pdrorg | Sets the address of the column definition information for column IDn.

Legend:

32: Shows the relative location or length for a HiRDB in the 32-bit mode.

64: Shows the relative location or length for a HiRDB in the 64-bit mode.

Note 1

For the start address, pdrorg guarantees a 4-byte boundary for a HiRDB in the 32-bit mode and an 8-byte boundary for a HiRDB in the 64-bit mode.

Note 2

The contents of the column definition information address list are passed consecutively in the order of the column definitions.

Table 8-27 Contents of column definition information area

Relative location
Field name
Length (bytes)
Attribute
Program setting the value
Description

32
64
32
64

0
0
Length of column name
2
2
short
pdrorg
Sets the length of the column name.

2
2
Column name
30
30
char
pdrorg
Sets the column name.

32
32
Column ID
2
2
short
pdrorg
Sets the column ID.

34
34
Reserved 1
1
1

35
35
Data type
1
1
unsigned char
pdrorg
Sets the data type of the column. For details about the data code and data value boundary for each data type, see Table 8-30.

36
36
Defined length
2
2
short
pdrorg
Sets the defined length of the column. For details about the length and contents of the definition length area for columns, see Table 8-29.

38
38
Repetition count
2
2
short
pdrorg
Sets the repetition count for the column.

40
40
BLOB or BINARY length
8
8
int[2]
pdrorg
This field is set if the column's data type is large object data or BINARY. The first 4 bytes are set to 0 and the remaining 4 bytes contain the defined length of large object data type in bytes.

48
48
Number of parameter
2
2
short
pdrorg
For an abstract data type, this field sets the number of functions in the corresponding unld_func statements (number of parameters). A value of 0 is set in the following cases:

The column's data type is not an abstract data type.

No unld_func statement is specified for the abstract data type.

50
50
Reserved 2
6
6
char
pdrorg
Reserved area

56
56
Extended address
4
8
void*
pdrorg
Sets the start address of the abstract data type reverse-creation parameter information. A value of 0 is set if the number of parameters is 0.

60
64
Reserved 3
64
64
char
pdrorg
Reserved area

Legend:

32: Shows the relative location or length for a HiRDB in the 32-bit mode.

64: Shows the relative location or length for a HiRDB in the 64-bit mode.

Note

For the start address, pdrorg guarantees a 4-byte boundary for a HiRDB in the 32-bit mode and an 8-byte boundary for a HiRDB in the 64-bit mode.

Table 8-28 Contents of the abstract data type reverse-creation parameter information area

Relative location | Field name | Length (bytes) | Attribute | Program setting the value | Description
0 | Parameter number | 2 | short | pdrorg | Parameter number (beginning with 1)
2 | Data type | 1 | unsigned char | pdrorg | Data type of the parameter. For details about the data code and data value boundary for each data type, see Table 8-30.
3 | Reserved 1 | 3 | char | pdrorg | Reserved area
6 | Defined length | 2 | short | pdrorg | Length defined for the parameter. For details about the length and contents of the definition length area for columns, see Table 8-29.
8 | BLOB or BINARY length | 8 | int[2] | pdrorg | If the parameter's data type is large object data or BINARY, this field sets the BLOB length. The first 4 bytes are set to 0 and the remaining 4 bytes contain the defined length of large object data type in bytes.
16 | Reserved 2 | 112 | char | pdrorg | Reserved area

Note 1

For the start address, pdrorg guarantees a 4-byte boundary for a HiRDB in the 32-bit mode and an 8-byte boundary for a HiRDB in the 64-bit mode.

Note 2

The contents of the abstract data type reverse-creation parameter information area are passed consecutively in the order of functions (parameters) specified in the unld_func statement.

Table 8-29 Length and contents of the definition length area for columns

Data type
Area size
Description

DECIMAL, LARGE DECIMAL,
INTERVAL YEAR TO DAY, and
INTERVAL HOUR TO SECOND
Leading 1 byte
Precision specified in the definition

Trailing 1 byte
Unit specified in the definition

TIMESTAMP(p)
2 bytes
7 + p/2

BLOB, abstract data type, and BINARY
2 bytes
Value is not guaranteed

Other
2 bytes
Defined length

Table 8-30 Data code and data value boundary for each data type

Data type | Data code (hexadecimal) | Boundary (in bytes)
NOT NULL constraint omitted | NOT NULL constraint specified
MVARCHAR | A1 | A0 | 2
MCHAR | A5 | A4 |
NVARCHAR | B1 | B0 | 2
NCHAR | B5 | B4 |
VARCHAR | C1 | C0 | 2
CHAR | C5 | C4 |
FLOAT | E1 | E0 | 8
SMALLFLT | E3 | E2 | 4
DECIMAL | E5 | E4 |
INTEGER | F1 | F0 | 4
SMALLINT | F5 | F4 | 2
INTERVAL YEAR TO DAY | 65 | 64 |
DATE | 71 | 70 |
TIME | 79 | 78 |
INTERVAL HOUR TO SECOND | 6F | 6E |
TIMESTAMP | 7D | 7C |
BINARY | 91 | 90 | 4
BLOB | 93 | 92 | 4
Abstract data type | Address list of abstract data type parameter | 83 | 82 | 4 for a HiRDB in the 32-bit mode and 8 for a HiRDB in the 64-bit mode
Data for parameter | Depends on the data type of the parameter

Legend:

: Address boundary is not adjusted.

Table 8-31 Contents of data address list

Relative location | Field name | Length (bytes) | Attribute | Program setting the value | Description
32 | 64 | 32 | 64
0 | 0 | Data storage address for column ID1 | 4 | 8 | void* | pdrorg | Sets the address of the data for column ID1.
4 | 8 | Data storage address for column ID2 | 4 | 8 | void* | pdrorg | Sets the address of the data for column ID2.
(n - 1) 4 | (n - 1) 8 | Data storage address for column IDn | 4 | 8 | void* | pdrorg | Sets the address of the data for column IDn.

Legend:

32: Shows the relative location or length for a HiRDB in the 32-bit mode.

64: Shows the relative location or length for a HiRDB in the 64-bit mode.

Note 1

For the start address, pdrorg guarantees a 4-byte boundary for a HiRDB in the 32-bit mode and an 8-byte boundary for a HiRDB in the 64-bit mode.

Note 2

The contents of the data address list are passed consecutively in the order defined.

Note 3

If the column value is null, 0 is set.

Note 4

In the case of a FIX table, if the data storage method is Y in the UOC interface area, the data buffer stores a contiguous area equivalent to the row length of the UOC information beginning at the address indicated by the data storage address for column ID1. Data is stored in the order of column IDs.

Note 5

If the data storage method is N in the UOC interface area, the start address of the data is adjusted at the specified boundary for each data type. Data is not consecutive for each column.

Note 6

If the number of parameters in the column definition information area is 0, a value of 0 is set.

Table 8-32 Contents of post-update data address list

Relative location | Field name | Length (bytes) | Attribute | Program setting the value | Description
32 | 64 | 32 | 64
0 | 0 | Data storage address for column ID1 | 4 | 8 | void* | UOC | Sets the address of the data for column ID1.
4 | 8 | Data storage address for column ID2 | 4 | 8 | void* | UOC | Sets the address of the data for column ID2.
(n - 1) 4 | (n - 1) 8 | Data storage address for column IDn | 4 | 8 | void* | UOC | Sets the address of the data for column IDn.

Legend:

32: Shows the relative location or length for a HiRDB in the 32-bit mode.

64: Shows the relative location or length for a HiRDB in the 64-bit mode.

Note 1

For the start address, guarantee a 4-byte boundary for a HiRDB in the 32-bit mode and a 8-byte boundary for a HiRDB in the 64-bit mode.

Note 2

After data has been updated, set the data address list in consecutive areas in the order of column definitions.

Note 3

You may set the data storage address contained in the data address list as the data address value. Make sure that the data value is not updated.

Note 4

There is no need to guarantee the boundary for the data address.

Note 5

Set 0 if you are changing to null the value of a column for which the NOT NULL constraint was not specified in the column definition. The following table describes whether or not data can be changed, depending on the NOT NULL constraint specification.

Column attribute | Data before updating | Data after updating
Non-null value | Null value
NOT NULL constraint omitted | Null value | Y | Y
Non-null value | Y | Y
NOT NULL constraint specified | Non-null value | Y | N

Legend:

Y: Can be changed.

N: Cannot be changed.

(2) Format of data values

This section explains the data values of each data type.

(a) INTEGER or SMALLINT

HP-UX, Solaris, and AIX 5L

Linux

(b) FLOAT or SMALLFLT

HP-UX, Solaris, and AIX 5L

Linux

(c) DECIMAL

(d) CHAR, VARCHAR, MCHAR, or MVARCHAR

(e) NCHAR or NVARCHAR

(f) DATE

(g) TIME

(h) INTERVAL YEAR TO DAY

(i) INTERVAL HOUR TO SECOND

(j) TIMESTAMP

(k) BINARY

(l) BLOB

(m) Abstract data type

For an abstract data type, the address list of an abstract data-type parameter is stored. Figure 8-26 shows the structure of the address list for an abstract data-type parameter, and Table 8-33 describes the contents of the address list for an abstract data-type parameter.

Figure 8-26 Structure of the address list for an abstract data-type parameter

Note

Square brackets [ ] enclose the numeric value for HiRDB in 64-bit mode.

Table 8-33 Contents of the address list for an abstract data-type parameter

Relative location | Field name | Length (bytes) | Attribute | Program setting the value | Description
32 | 64 | 32 | 64
0 | 0 | Data address for parameter 1 | 4 | 8 | void* | pdrorg | Sets the address of the data for parameter 1.
4 | 8 | Data address for parameter 2 | 4 | 8 | void* | pdrorg | Sets the address of the data for parameter 2.
(n - 1) 4 | (n - 1) 8 | Data address for parameter n | 4 | 8 | void* | pdrorg | Sets the address of the data for parameter n.

Legend:

32: Shows the relative location or length for a HiRDB in the 32-bit mode.

64: Shows the relative location or length for a HiRDB in the 64-bit mode.

Note 1

For the start address, pdrorg guarantees a 4-byte boundary for a HiRDB in the 32-bit mode and an 8-byte boundary for a HiRDB in the 64-bit mode.

Note 2

The start address of the parameter data is adjusted by the boundary set for each data type.

Note 3

The contents of the address list for an abstract data-type parameter are passed consecutively in the order of functions (parameters) specified in the unld_func statement.

(n) Repetition columns

8.10.5 Example of a UOC

This section presents an example of table reorganization and the table unload operation using a UOC.

The example of UOC coding shown here is provided as a sample database. It is stored in the directory $PDDIR/sample/sampleUOC.

Organization of this subsection

(1) Example of table reorganization using a UOC

(2) Example of table unload operation using a UOC

(1) Example of table reorganization using a UOC

During table reorganization, this example deletes data whose database registration date is year 2001 or earlier.

(a) Database table definition

 CREATE TABLE MEMBVER_DIRECTORY (MEMBER_NUMBER INTEGER,
                    MEMBER_NAME NCHAR(20),
                    MEMBER_ADDRESS NVARCHAR(100),
                    JOINED_DATE_AND_TIME DATE NOT NULL WITH DEFAULT);

(b) Command format

pdrorg -k rorg -t MEMBVER_DIRECTORY control-information-file

(c) Contents of control information file

unload unload-data-file-name uoc_lib=library-name
unlduoc entry=old_data_delete

(d) Example of UOC coding

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <pdutluoc.h>   ..........................................................1

void old_data_delete (
   UTL_UOC_INF         *uocinf             /* A(UOC interface area)      */   ...2
) {
   UTL_UOC_DATA_BUF    *addr_list;         /* A(data address list)       */
   unsigned char       *date_adr;          /* A(DATE)                    */
   static unsigned char cyear[2];          /* compare year               */

   switch(uocinf->req_cd){   ....................................................3
   case UTL_UOC_START:
/* */
/*  START                                                                 */
/* */
       cyear[0] = 0x20;                    /* The 21st century           */
       cyear[1] = 0x01;                    /* (2001)                     */
       uocinf->rtn_code = UTL_UOC_NML;
       break;
   case UTL_UOC_EDIT:
/* */
/*  EDIT                                                                  */
/* */
       addr_list = uocinf->data_adr;
       date_adr = addr_list->data[3];
       if (memcmp(date_adr,cyear,sizeof(cyear)) < 0){
           uocinf->unload_flg = UTL_UOC_ROWNOPUT;
       }else{
           uocinf->unload_flg = UTL_UOC_ROWPUT;
       }   ......................................................................4
       uocinf->rtn_code = UTL_UOC_NML;
       break;
   case UTL_UOC_END:
   case UTL_UOC_TERM:
/* */
/*  END                                                                 */
/* */
       uocinf->rtn_code = UTL_UOC_NML;
       break;
   default:
       strcpy(uocinf->err_msg,"Invalid request code");
       uocinf->rtn_code = UTL_UOC_ERR;
   }
   return;
}

Explanation:

Includes the header for UOC creation that is provided by HiRDB.

Receives the address of the UOC interface area as an argument.

Checks the call type and executes appropriate processing.

Checks the data (date) and sets the storage flag.

(2) Example of table unload operation using a UOC

This example edits BLOB data in CSV format when a table is unloaded. The example creates UOC data files based on one data item per file.

(a) Database table definition

 CREATE TABLE IMAGE_TBL
          (COL1 INTEGER NOT NULL,
           COL2 CHAR(20) NOT NULL,
           COL3 INTEGER NOT NULL,
           COL4 CHAR(5) NOT NULL,
           COL5 BLOB(100K) IN (LOB_AREA) NOT NULL)
          IN DATA_AREA;

(b) Command format

pdrorg -k unld -j -t IMAGE_TBL control-information-file

(c) Contents of control information file

unload (uoc) uoc_lib=library-name param='/usr/tmp/lob,/tmp/uoc_file'
unlduoc entry=blob_file_create

(d) Example of UOC coding

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <fcntl.h>
#include <pdutluoc.h>

#define     INT         0xf0                /* INTEGER                   */
#define     CHAR        0xc4                /* CHAR                      */
#define     BLOB        0x92                /* BLOB                      */

void blob_file_create (
   UTL_UOC_INF         *uocinf             /* A(UOC interface area)     */
) {
   static  char         token[] = ",";     /* parameter token           */
   static  char         prefix[40];        /* path name prefix          */
   static  char         filename[80];      /* CSV file name             */
   static  char        *buff = NULL;       /* row edit buffer           */
   static  int          counter = 0;       /* row counter               */
   static  int          file_id = 0;       /* CSV file file ID          */
   int                  lobfid;            /* BLOB file                 */
   int                  leng;              /* total length              */
   int                  int_len;           /* INTEGER length            */
   int                  i;                 /* counter for column        */
   int                  rc;                /* return code               */
   int                 *nagasa;            /* BLOB size                 */
   void                *blobadr;           /* A(BLOB data)              */
   char                *wkadr;             /* work address              */
   UTL_UOC_DATA_BUF    *addr_list;         /* A(data address list)      */
   UTL_UOC_COLUMN_INFO *col_inf;           /* A(column information)     */
   char                *sepachr = ",";     /* separator character       */
   char                *linechr = "\n";    /* line field character      */
   char                 dmyname[16];       /* temporary name            */
   char                 blobfile[128];     /* BLOB file name            */

   switch(uocinf->req_cd){
   case UTL_UOC_START:
/* -*/
/*  START                                                                */
/* -*/
       if (uocinf->user_param == NULL){
           strcpy(uocinf->err_msg,"Required parameter not specified");
           goto OWARI;
       }

      wkadr = strtok(uocinf->user_param,token);
       if ((wkadr == NULL) ||
           (strlen(wkadr) >= sizeof(prefix))){
           strcpy(uocinf->err_msg,"Invalid parameter");
           goto OWARI;
       }
       strcpy(prefix,wkadr);   ...................................................1
       wkadr = strtok(NULL,token);
       if ((wkadr == NULL) ||
           (strlen(wkadr) >= sizeof(filename))){
           strcpy(uocinf->err_msg,"Invalid parameter");
           goto OWARI;
       }
       strcpy(filename,wkadr);   .................................................1

       file_id = create(filename,0666);
       if (file_id == -1){
           strcpy(uocinf->err_msg,strerror(errno));
           goto OWARI;
       }
       buff = malloc(1024);
       if (buff == NULL){
           strcpy(uocinf->err_msg,strerror(errno));
           goto OWARI;
       }

       counter = 0;
       strcpy(uocinf->err_msg,"FILE NAME:");
       strcat(uocinf->err_msg,filename);
       uocinf->rtn_code = UTL_UOC_DBG;
       break;
   case UTL_UOC_EDIT:
/* */
/*  EDIT                                                                */
/* */
       counter++;
       col_inf = uocinf->dic_inf;
       addr_list = uocinf->data_adr;
       leng = 0;
       wkadr = buff;
       for(i = 0; i < uocinf->col_num; i++){
           switch(col_inf->colinf[i]->clm_type){
           case INT:   ..........................................................2
               int_len = sprintf(wkadr,"%d",*((int*)addr_list->data[i]));
               leng += int_len;
               wkadr += int_len;
               break;
           case CHAR:   .........................................................2
               strncpy(wkadr,addr_list->data[i],col_inf->colinf[i]->clm_len);
               leng += col_inf->colinf[i]->clm_len;
               wkadr += col_inf->colinf[i]->clm_len;
               break;

           case BLOB:   .........................................................3
               sprintf(dmyname,"%010d",counter);
               strcpy(blobfile,prefix);
               strcat(blobfile,dmyname);
               lobfid = create(blobfile,0666);
               if (lobfid == -1){
                   strcpy(uocinf->err_msg,strerror(errno));
                   goto OWARI;
               }
               nagasa = (int *)((int)(addr_list->data[i]) + sizeof(int));
               blobadr = (void *)((int)(addr_list->data[i]) +
                                                       (sizeof(int) * 2));
               rc = write(lobfid,blobadr,*nagasa);
               if (rc != *nagasa){
                   strcpy(uocinf->err_msg,strerror(errno));
                   goto OWARI;
               }
               rc = close(lobfid);
               if (rc == -1){
                   strcpy(uocinf->err_msg,strerror(errno));
                   goto OWARI;
               }
               strcpy(wkadr,blobfile);
               leng += strlen(blobfile);
               wkadr += strlen(blobfile);
               break;
           default:
               strcpy(uocinf->err_msg,"Not support data type");
               goto OWARI;
           }
           strcpy(wkadr,sepachr);
           leng += 1;
           wkadr++;
       }
       wkadr;
       strcpy(wkadr,linechr);

       rc = write(file_id,buff,leng);
       if (rc != leng){
           strcpy(uocinf->err_msg,strerror(errno));
           goto OWARI;
       }
       uocinf->rtn_code = UTL_UOC_NML;
       break;

   case UTL_UOC_END:
   case UTL_UOC_TERM:
/* */
/*  END                                                                 */
/* */
       if (buff != NULL){
           free(buff);
           buff = NULL;
       }
       if (file_id != 0){
           rc = close(file_id);
           file_id = 0;
           if (rc == -1){
               strcpy(uocinf->err_msg,strerror(errno));
               goto OWARI;
           }
       }
       uocinf->rtn_code = UTL_UOC_NML;
       break;
   default:
       strcpy(uocinf->err_msg,"Invalid request code");
       goto OWARI;
   }
   return;

OWARI:
   uocinf->rtn_code = UTL_UOC_ERR;
   return;
}

Explanation:

Expands the user parameters specified in the control information file into variables within the UOC.

Outputs the data for an INTEGER or CHAR column in characters to a UOC data file.

Saves the data for a BLOB column in rows to a file and then outputs the file name to a UOC data file.

8.11 Notes on executing pdrorg on special tables

Organization of this section

8.11.1 Table with an abstract data type

8.11.2 Falsification prevented table

8.11.1 Table with an abstract data type

Organization of this subsection

(1) Unloading a table

(2) Reloading to a table

(3) Relationship between pdrorg functions and the control information file

(4) Reloading when abstract data type definitions differ between the unloaded table and the table to be reloaded

(5) Reloading when table partitioning conditions have changed

(6) When data was unloaded without using the constructor parameter reverse creation function

(1) Unloading a table

When unloading a table that contains an abstract data type, note the following:

(a) Unloading only the table for which an abstract data type with a LOB attribute is defined

You can unload the table only if the plug-in defined for the abstract data type column has an unload facility or a constructor parameter reverse creation function.

To execute the unload operation only, specify the -j option.

(b) Unloading a table to migrate it to another table or system

To transfer data from one table to another table in the same system, the source table is unloaded. With some plug-ins, you can execute such a data transfer only if the plug-in has the unload facility or constructor parameter reverse creation function. To determine whether or not table migration is permitted, see the applicable plug-in documentation.

Transferring data from one table to another table in the same system may be supported only when the plug-in has the constructor parameter reverse creation function. For details about whether or not data can be transferred, see the applicable plug-in documentation.

To unload a table when the plug-in has a constructor parameter reverse creation function, you need to specify the constructor parameter reverse creation function in the unld_func statement.

(c) Changing the partitioning conditions of a table with an abstract data type

To modify a table's partitioning conditions, first unload the table. With some plug-ins, you can change the table partitioning conditions only if the plug-in has an unload facility or constructor parameter reverse creation function. To determine whether or not you can change table partitioning conditions, see the applicable plug-in manual.

To unload a table when the plug-in has a constructor parameter reverse creation function, you need to specify the constructor parameter reverse creation function in the unld_func statement.

(2) Reloading to a table

When reloading data to a table that contains an abstract data type, note the following:

(a) Table for which an abstract data type with a LOB attribute is defined

If you have specified the -j option during the unload operation, be sure to specify the -j option also during the reload operation.

(b) Another table or a table in another system

To reload data to another table or to a table in another system, specify the tblname statement.

To use the unload data file obtained by specifying a constructor parameter reverse creation function during an unload operation, you need to specify the constructor function in the reld_func statement. This constructor parameter must correspond to the constructor parameter reverse creation function that was specified during the unload operation. For the correspondence between constructor function and constructor parameter reverse creation function, see the applicable plug-in manual.

(c) Changing the partitioning conditions of a table with an abstract data type

If you have unloaded a table by specifying a constructor parameter reverse creation function during the unload operation, you need to specify the constructor function in the reld_func statement during the reload operation after changing the partitioning conditions. When specifying a constructor function to reload a table, you can use only the unload data file that was obtained by specifying the constructor parameter reverse creation function.

The specified constructor function must correspond to the constructor parameter reverse creation function that was specified during the unload operation. For details about the correspondence between constructor function and constructor parameter reverse creation function, see the applicable plug-in manual.

(3) Relationship between pdrorg functions and the control information file

Table 8-34 shows the relationship between pdrorg functions and the control information file.

Table 8-34 Relationship between pdrorg functions and the control information file

pdrorg function | -k option | -j option | Control information file
unload stmt | lobunld stmt | tblname stmt | unld_func stmt | reld_func stmt
Reorganization of LOB column structure base table only (1) | rorg |  | R | N | N | N | N
unld
reld
Reorganization of LOB columns only (3) | rorg |  | N | R | N | N | N
reld
Reorganization of LOB column structure base table, LOB column storage RDAREAs, and LOB attribute storage RDAREAs (1, 2, and 3) | rorg | R | R | N | N | O² | O²
unld | O³ | N
reld | N | O³
Modification of table partitioning conditions1 (1, 2, and 3)¹ | unld | R | R | N | N | O | N
reld | N | O
Migration to another table or system1 (1, 2, and 3)¹ | unld | R | R | N | N | O | N
reld | R | N | O

R: Required.

O: Optional.

N: Cannot be specified.

: Not applicable.

stmt: statement

Note

A number in parentheses in the pdrorg function column indicates the RDAREA being processed, which corresponds to the following table definition:

CREATE TABLE ...
   C1 INT,
   C2 SGMLTEXT ALLOCATE(sgmltext IN lob01)     2
   C3 BLOB(10K) IN LOB02                       3
   IN USER01                                   1

¹ With a HiRDB/Parallel Server, if the table is divided and stored at multiple back-end servers, the -g option must be specified.

² The unld_fund and reld_func statements must both be specified.

³ If specified for the unload operation, also specify it for the reload operation.

(4) Reloading when abstract data type definitions differ between the unloaded table and the table to be reloaded

Abstract data type definitions may not match between the unloaded table and the table to be reloaded due to data migration to another table or plug-in upgrading. In this case, when executing a reload operation, note the following:

You can reload to the table if both of the following conditions are met:

The unload data file to be used was unloaded by specifying a constructor parameter reverse creation function in the unld_func statement during the unload operation.

The reld_func statement specifies the constructor function with a parameter count and attribute that match those of the constructor parameter reverse creation function specified during unload operation.

If no constructor function has been specified, you can execute a reload operation if the following information is the same for both the unload and reload tables:

Name of abstract data type

Plug-in ID

Number of attributes

Attribute's data type and definition length

LOB attribute storage RDAREA

(5) Reloading when table partitioning conditions have changed

With some plug-ins, you need to specify a constructor parameter reverse creation function during the unload operation to change the table partitioning conditions before reloading the table. In this case, unload the table specifying the constructor parameter reverse creation function in the unld_func statement, change the table partitioning conditions, and then reload the table, specifying the constructor function in the reld_func statement.

In this case, note the following:

With a HiRDB/Parallel Server, if the table is partitioned and stored at multiple back-end servers, specify the -g option during both the unload and reload operations.

When reloading a table in units of RDAREAs, if the table partitioning conditions do not match, an error results.

For a table with LOB columns or columns of abstract data type including the LOB attribute, specify the -j option.

(6) When data was unloaded without using the constructor parameter reverse creation function

When data is unloaded without using the constructor parameter reverse creation function, do not register or delete plug-ins until reloading is completed.

8.11.2 Falsification prevented table

Organization of this subsection

(1) Limitations

(2) Execution conditions

(3) Reload-not-completed data status

(1) Limitations

Even when a deletion prevention duration is specified, pdrorg rearranges data; therefore, row data is deleted once. Falsification of data is prevented by executing the unload and reload operations one after another. You can perform only table reorganization (-k rorg) on a falsification prevented table. The table unload (-k unld) and reload (-k reld) operations are permitted only under specific conditions.

(a) For table reorganization (-k rorg)

During table reorganization, the following functions are disabled:

Reorganization using a UOC

Reorganization with synchronization point specification

(b) For table unload operation (-k unld)

Basically, the table unload operation is prohibited for falsification prevented tables. However, you can unload a table for which the -W option has been specified.

(c) For table reload operation (-k reld)

Basically, the table reload operation is prohibited for falsification prevented tables. However, if a reload operation for table reorganization (-k rorg) terminates abnormally, you can re-execute that reload operation (-k reld). During such a re-execution, do not change any control statement or option other than the -k option (if execution with the unload and lobunld statements both specified results in an error, re-execute the operation with only one of those statements specified).

(2) Execution conditions

Before executing table reorganization (-k rorg) or a table reload operation (-k reld), you must use the pdhold command to shut down the RDAREA that contains a falsification prevented table (to protect its data from being compromised).

(3) Reload-not-completed data status

During reorganization of a falsification prevented table, the reload operation may not be completed due to an error. This status is called the reload-not-completed data status.

You can determine whether or not an RDAREA is in reload-not-completed data status from the results of RDAREA logical analysis or table analysis by pddbst. When the RDAREA is in reload-not-completed data status, you cannot use any of the following pdrorg functions:

Table reorganization (-k rorg)

Batch index creation (-k ixmk)

Index re-creation (-k ixrc)

Index reorganization (-k ixor)

8.12 Rules and notes

Organization of this section

(1) Rules

(2) Notes

(3) Using a file that contains a BOM

(1) Rules

(a) Executing the utility

You can execute the database reorganization utility only while HiRDB is active.

Execute the database reorganization utility at the server machine containing the single server or the server machine where the system manager is located.

To execute pdrorg, you set the LANG environment variable. To use in a pdrorg execution environment character codes that are not supported by the OS, you must set the PDLANG environment variable. For details about LANG and PDLANG, see the HiRDB Version 8 UAP Development Guide.

(b) Whether the utility can be executed

Whether or not the database reorganization utility can be executed depends on the open attribute of the table, index, and RDAREA containing LOB columns and the status of the RDAREA; for details, see Appendix C. RDAREA Status During Command Execution.

To reorganize a data dictionary table, place the RDAREA containing the data dictionary table in shutdown status by the pdhold command.

(c) Maximum number of concurrently executable utilities

The maximum number of database reorganization utilities that can be executed at any one time depends on the value of the pd_utl_exec_mode operand in the system common definitions.

pd_utl_exec_mode=0

A maximum of 32 utilities can be executed concurrently.

pd_utl_exec_mode=1

The value of the pd_max_users operand determines the maximum number of concurrently executable utilities.

Note that during execution of pdreclaim and pdpgbfon, the maximum number of pdrorg commands that can be executed concurrently is reduced because pdreclaim and pdpgbfon call pdrorg internally. For example, if pd_utl_exec_mode=0 is specified, theoretically a maximum of 32 pdrorg commands can be executed; however, if 10 pdreclaim commands are executing, the maximum number of pdrorg commands that can be executed concurrently is reduced to 22.

(d) Tables and indexes during utility processing

A table or index cannot be accessed by another UAP or utility while it is being processed by pdrorg because the target resource is locked. In the case of -k unld, whether or not a table or index is accessible depends on the unldenq operand specification in the option statement. For details, see 8.9.16 option statement (specification of data processing information).

If you shut down the RDAREAs containing the table to be reorganized, a UAP attempting to access that table results in a shutdown error. This prevents the utility's execution from being placed in lock-release wait status due to UAP execution, or prevents a UAP from being placed in lock-release wait status due to utility execution. For details about pdrorg's lock mode, see B.2 Lock mode for utilities.

Do not execute a definition SQL statement on a table or index while it is being reorganized. If a definition SQL statement is executed, pdrorg terminates abnormally. When reorganization is performed in units of schemas, all tables and indexes that belong to the corresponding schema become the target of processing. To prevent execution of a definition SQL statement on a table or index being reorganized, you must place the RDAREAs containing the table and indexes being reorganized on shutdown status with the pdhold command. To reference another table in the same RDAREA during table reorganization, place it in reference-possible shutdown status by the pdhold command.

If the database load utility is executed on a table or index in an RDAREA that is being processed by a definition SQL statement, the table or index will be placed in lock-release wait.

While a table is being reorganized, do not change its definitions or execute a UAP or another utility. If a UAP or another utility is executed, it will result in a lock error. If unload and reload operations are executed separately with the shell, the number of table data items may be set to zero, or the updating results may become invalid.

(e) Changing partitioning key ranges

If the partitioning key ranges are changed before a reload operation and the unloaded data does not fit in a redefined range, an error results and processing will terminate when that data is encountered during the reload operation. In this case, redefine the partitioning key ranges so that all the unloaded data fits within defined ranges, and reload the data.

(f) Log-acquisition mode during utility execution on an extracted database subject to data linkage

To execute the database reorganization utility on an extracted database subject to data linkage, specify n or p in the -l option (to execute in no-log mode or pre-update log acquisition mode). If you execute the utility in the log acquisition mode, conformity may be lost between the extracted database and the target database because only a portion of the data updated in the extracted database is sent to the target database.

(g) Facility for conversion to a DECIMAL signed normalized number

The database reorganization utility does not normalize the sign part of DECIMAL type, whether or not the facility for conversion to a DECIMAL signed normalized number is used. Therefore, if the unload data file was created by a HiRDB system that does not use the facility for conversion to a DECIMAL signed normalized number, you cannot reload this file to a table in a HiRDB system that uses this facility.

To normalize the sign part of a DECIMAL type in a database, create an unload data file with the -W option specified, then store the data again using the database load utility. For details about the facility for conversion to a DECIMAL signed normalized number, see the HiRDB Version 8 System Operation Guide.

(h) Output destination of index information files

The output destination of index information files depends on the type of pdrorg processing and the specified control statements, as shown in the following table:

Type of pdrorg processing
Control statement
Output destination of index information files

index statement
idxname statement
idxwork statement

-k rorg,
-k reld,
-k ixmk
Specified*
N

Index information file specified in the index statement

Not specified
N
Specified
Directory specified in the idxwork statement

Not specified
N
Not specified
/tmp

-k ixrc,
-k ixor
N
Specified
Specified
Directory specified in the idxwork statement

N
Specified
Not specified
/tmp

Specified
N

Index information file specified in the index statement

N: Cannot be specified.

: Specification has no effect on the output destination of index information files.

* For a row-partitioned table, only the specified RDAREAs are being processed; therefore, the items with index statement not specified apply to the unspecified RDAREAs.

(i) Reorganizing a rebalancing table

If you have added an RDAREA to a rebalancing table but have not executed pdrbal on the rebalancing table (return code = 0), you cannot reorganize the added RDAREA (in units of RDAREAs).

Table 8-35 shows whether or not pdrorg can be executed on an RDAREA that has been added to a rebalancing table.

Table 8-35 Whether or not pdrorg can be executed on an RDAREA that has been added to a rebalancing table

-k option
Table status

RDAREA addition up to pdrbal execution
during pdrbal processing*
(return code = 4)
After completion of pdrbal processing
(return code = 0)

Existing
Added
Existing
Added

unld
Y

Y
Y
Y

rorg, reld
By table
Y

Y*
Y*
Y

By RDAREA
Y

Y

ixmk
Y

Y
Y
Y

ixrc
Y

Y
Y
Y

ixor
Y

Y
Y
Y

Existing: Existing RDAREA specified in the table definition (CREATE TABLE)

Added: RDAREA added by ALTER TABLE ADD RDAREA

Y: pdrorg can be executed.

: pdrorg cannot be executed.

* To reload data while rebalancing the table, specify the -g option. If the table contains a LOB column or a column of an abstract data type with the LOB attribute, also specify the -j option. When a table is reorganized with the -g option specified, data is rearranged but its rebalancing is not completed. Therefore, make sure that pdrabl is executed after the reload operation and that its return code is 0.

To add an RDAREA to an unloaded table and then reload it, use the following procedure:

Execute pdrorg (-k unld).

Add an RDAREA with ALTER TABLE ADD RDAREA.

Delete all rows with PURGE TABLE.

Execute pdrbal.

Execute pdrorg (-k reld)

When executing the previous procedure, be sure to specify the -g option in pdrorg. Otherwise, an error results. For a rebalancing table with LOB columns or columns of abstract data type, also specify the -j option.

(j) Processing an RDAREA in frozen update status

Executing -k rorg (reorganization) or reld (reload operation) on an RDAREA that is in frozen update status results in an error, because the utility cannot update the management area for the user LOB RDAREA. An attempt to reorganize or reload only a LOB column structure base table also results in the same error.

(k) Processing an external table

pdrorg executed on an external table terminates with an error.

(l) Reloading a table with SEGMENT REUSE specified

When reloading a table, the SEGMENT REUSE specification is ignored.

(m) About a table that is row-partitioned by the hash function with the rebalancing facility

If a table that has been FIX hash-partitioned by the rebalancing facility is to be reorganized, and if the partitioning conditions are changed between the unload and the reload processes, a shortage of RDAREA may occur due to lack of available segments even though there are free pages in the table storage RDAREA. This is because a change in the storage conditions requires data to be reloaded into a different segment from the one used during unloading, but there is no new segment that can be allocated. In such a case, expand the RDAREA before you execute reloading.

(n) Compatibility in unload data files between the 32-bit and the 64-bit version of HiRDB

Data can be migrated between the 32-bit version and the 64-bit version of HiRDB by reloading the unload data files created by the 32-bit or 64-bit HiRDB. The migration conditions are the same as for migration between HiRDBs that use the same bit mode.

(2) Notes

(a) Return code

The following are the pdrorg utility's return codes:

0: Normal termination

4: Normal termination (some of the processing was skipped)

8: Abnormal termination

(b) Collecting a synchronization point dump

The system does not collect synchronization point dumps during the execution of pdrorg, because a transaction is not settled until one process is completed. One process means an unload operation, a reload operation, or index creation.

If other UAPs are executed at the same time as pdrorg and a system failure occurs during processing, the time required for restart increases. For this reason, you should not execute UAPs while pdrorg is executing, if possible.

For a reorganization or reload operation with the synchronization point specification, you can collect synchronization point dumps at intervals of specified number of lines. This reduces the time required for restart in the event of abnormal termination, compared with the reorganization or reload operation with no synchronization point dump collected.

(c) Canceling processing during utility execution

To cancel processing during execution of pdrorg, use the pdcancel command. To treat the pdrorg command as resulting in a no-response error (such as when a routine reorganization job should finish within a known amount of time, but it does not) and forcibly terminate the command, redirect the display results of the pdls command (with -d rpc -a specified) to a file and then execute the pdcancel -d command.

In this case, processing will be rolled back. For details about the database status and recovery method, see 8.13 Database status in the event of an error and recovery method.

If you are using the facility for predicting reorganization time and you forcibly terminate pdrorg by a signal interrupt such as the kill command, the database management table cannot be updated. To forcibly terminate pdrorg while the facility for predicting reorganization time is used, make sure that you use the pdcancel command.

(d) Modifying definition information during utility execution

Once a table has been unloaded, do not specify the following definition SQL statements until the table has been reloaded:

ALTER TABLE

Re-creation of table definition with DROP TABLE and CREATE TABLE

However, you can execute these definition SQL statements when changing the partitioning key partitioning condition or the hash function.

(e) Results of utility execution

You can check the result of the database reorganization utility using the database condition analysis utility.

(f) Changing partitioning conditions for a partitioning key during reloading

An error will occur during a reload operation if you specify either of the following options when changing the partitioning key partitioning condition:

rorg in the -k option

-r option

(g) Using a multi-volume MT

Because MTguide is used for the volume switching operation when multi-volume magnetic tape is used, MTguide must be installed at the server machine.

(h) Status of an index during the reinitialization of the RDAREA

If you have reinitialized an RDAREA by the database structure modification utility, any index related to the RDAREA may be placed in incomplete status. If a non-partitioning key index is placed in incomplete status due to reinitialization, reorganize the table in the batch index creation mode in units of tables. If you create an index in batch mode using the index file that was output before reinitializing the RDAREA, the database may be damaged.

(i) Using the system switchover facility

If you are using the system switchover facility, we recommend that you execute -k unld and -k reld instead of executing -k rorg for table reorganization. This method enables you to continue the reload operation at the target system using the unload data file on which the unload operation has been completed. In such a case, use for the unload data file a magnetic tape device (such as a DAT) or a HiRDB file created by a character string special file. If you use a regular file for block input/output operations to create an unload data file, the contents of the unload data file cannot be guaranteed even when the unload operation terminates with return code 0, because the OS buffer is deleted during system switchover.

(j) Abnormal termination of pdrorg during creation of an unload file

If pdrorg terminates abnormally while an unload data file is being created, invalid files may remain. Re-executing pdrorg when this happens results in the remaining files being overwritten. If you do not re-execute the utility, you should delete these files. If the files to be deleted are regular files, use the OS's rm command to delete them; if they are HiRDB files, use the pdfrm command to delete them.

If pdrorg terminates abnormally while a table is being reorganized or reloaded, the processing is rolled back and data is deleted from the database. To restore the database, use the unload data file created by unload processing to execute reloading only. If multiple tables are output one after another to a single unload data file, the unload data file is overwritten when unloading of another table is performed after abnormal termination of pdrorg. As a result, data is lost from both the unload data file and the database. Therefore, if the database cannot be restored from its backup, make sure that you specify a separate unload data file for each table.

(k) Unloading and reloading between systems

The following notes apply to unloading and reloading tables between systems:

You cannot execute an unload or reload operation between the systems with a different magnitude of byte size.

You cannot execute an unload or reload operation between the systems with different character organizations.

An unload data file contains HiRDB version-specific control information in addition to the row data. Upward compatibility is supported; that is, an unload data file created by one version of HiRDB can be reloaded to a later version of HiRDB, but downward compatibility is not guaranteed. To reload data to a later version of HiRDB, use the unload data file created with the -W option specified.

If a column of an abstract data type has been defined in the table, you must use the constructor parameter reverse creation function to unload the table.

(l) Modifying the partitioning key range or the hash function

When the partitioning key ranges are changed or the hash function is changed, the utility divides data and stores it into RDAREAs based on the changed partitioning conditions only at the following times (excluding the cases in which the partitioning key column is changed or the -j option is omitted for a table containing a LOB column):

When reloading with a HiRDB/Single Server

When reloading from an unload data file with the -g option specified with a HiRDB/Parallel Server

For details about how to switch among key range partitioning, flexible hash partitioning, and FIX hash partitioning, see the HiRDB Version 8 System Operation Guide.

(m) Unloading and reloading using identical table definitions

If the table definitions are the same, a table unloaded from a HiRDB/Single Server can be reloaded to a table in a HiRDB/Parallel Server, and vice versa. If the table contains a LOB column, you need to specify the -j option during the unload and reload operations.

If a table to be unloaded from a HiRDB/Parallel Server is partitioned and stored in multiple servers, you need to specify the -g option to create a single unload data file before you can reload it to a table in a HiRDB/Single Server.

If the table definitions are different or if you want to use the unload data files that are output for individual servers, execute the unload operation specifying the -W option, then use the database load utility to load the data. In this case, if -W bin is specified, but the -j option is omitted, the null value is set in any LOB columns. When you transfer a LOB column, specify both options, -W bin and -j. If a cluster key index has been defined for a row-partitioned table, data in the unload data file is sorted by the cluster key in each RDAREA, but it is not sorted by the cluster key in the entire table. In such a case, a clustering order error occurs. Therefore, you must specify the -x option in pdload or perform processing in units of RDAREAs.

(n) Using large files

Use of large files enables you to handle files whose size is 2 gigabytes or greater. Table 8-36 describes whether or not pdrorg supports large files. The maximum file size that can be created by the process is determined by the settings of the operating system in use. For the limit value of system resources for the HiRDB administrator and root user, either specify a value that is greater than the size of file that is created or do not limit the value. Special attention is needed under AIX-5L because its default file size is 1 gigabyte. You can check the limit value of system resources with the OS's limit or ulimit command. To change the limit value for file size in AIX 5L, you must also change the /etc/security/limits file. For details, see the applicable OS and shell documentation. Because HiRDB is an INIT startup process, you must restart the operating system before a value changed by the root user can take effect.

Table 8-36 Whether or not large files can be used for pdrorg processing

File type | Availability of large file system
Unload data file | Y
LOB data unload file | Y
Index information file | Y
Work file for sorting | Y
MT attribute definition file | N
Process results file | Y

Y: Can be used.

N: Cannot be used.

(o) Reloading a table with columns of the abstract data type

If you have re-initialized an RDAREA that stores a LOB column structure base table, LOB columns, or LOB attribute, you can reload only the unload data file created with the -j option specified. In such a case, you must also specify the -j option during reloading.

To process a table in units of tables without specifying the -g option, you need as many dictionary server processes as there are back-end servers containing the table.

(p) Whether batch index creation and index re-creation are supported for a plug-in index

The following table shows whether batch index creation and index re-creation are supported for a plug-in index:

Provided function | Batch index creation | Index re-creation
Plug-in index delayed batch creation facility | Executable | Executable
Batch plug-in index creation partial recovery facility | Executable | Executable
None of the these facilities available | Not executable | Executable

To execute batch index creation on a plug-in index (by specifying -k ixmk), the plug-in must provide the batch plug-in index creation partial recovery facility. If the plug-in does not provide this facility, you need to re-create the index (by specifying -k ixrc).

If batch index creation that uses the index information file created by the plug-in index delayed batch creation facility terminates normally, the system deletes the that index information file. Note that the index information file output directory (directory with pd_plugin_ixmk_dir specified in the server definition) used by this facility should not be used as a file I/O area for the database reorganization utility unless the utility processing is batch index creation (-k ixmk).

(q) Index updated by the utility using the differential index function of the HiRDB Text Search Plug-in

When using the differential index function of the HiRDB Text Search Plug-in, the database reorganization utility updates the following indexes:

Index creation method | Specification of environmental variable PDPLUGINNSUB
Y | N | Not specified
Re-creating an index (-k ixrc specified) | M | M | M
Creating an entire index (-k ixmk specified) | M | M | M
Creating an index for additional data (-k ixmk specified) | S | M | S

M: Updates the MASTER index.

S: Updates the differential index.

(r) List created using a table being reorganized or reloaded

If you have created a list using a table being reorganized or reloaded, searching this list after the reorganization or reload operation results in the following events:

A wrong row is retrieved.

Specified row is not found.

In this case, you need to re-create the list before searching the list.

(s) Locked resources required per server during the execution of the database reorganization utility

During the execution of the database reorganization utility, each server requires the following amount of locked resources:

Resources used for lock control outside the transaction

X = 2 (a + b + c + 1) (b d)

Note
The value of the pd_lck_until_disconnect_cnt operand in the system definitions must be at least the value of X.

Resources used for lock control within the transaction

Y = e + f + g

Note
The value of the pd_lck_pool_size operand in the system definitions must be at least Y X KB. Because the utility's preprocessing requires (209 + A) resources, at least (209 + A) resources are required for Y. The resources allocated during preprocessing are released before reorganization begins; therefore, if the obtained value of Y is (209 + A) or greater, use that value.

Explanation:

a: Number of table storage RDAREAs

b: Number of index storage RDAREAs

c: Number of LOB column storage RDAREAs

d: Number of indexes

e: Number of segments used by RDAREAs for table

f: Number of segments used by RDAREAs for index

x: 4 for a HiRDB in the 32-bit mode, and 6 for a HiRDB in the 64-bit mode

(t) Use of DVD-RAM devices

You can use a DVD-RAM device for unload data files for the pdrorg command. Note that the supported device depends on the operating system in use.

To use as regular files, you can create a file system on a medium in the same manner as conventional devices such as magnetic disks.

To use as HiRDB files, you must specify a sector length during creation of the HiRDB file system area (during the pdfmkfs command's execution).

(u) File media available during utility execution

The table below shows the file media that are available during execution of pdrorg. When regular files are used, file open processing accompanies the use of the maxfiles, nfile, and nflocks operating system parameters (kernel parameters).

File | Regular file | HiRDB file | Blocked fixed-length tape | Blocked variable-length tape
Unload data file | Y | Y | Y | Y
Unload data file for LOB data | Y | Y | Y | Y
Index information file | Y | If | N | N
Work file for sorting | Y | N | N | N
Process results file | Y | N | N | N

Legend:

Y: Can be used.

If: Can be used if the delayed batch index creation facility is used.

N: Cannot be used.

(v) Messages displayed in the command execution window

pdrorg outputs progress messages to the standard output during processing. In the event of an error, pdrorg outputs an error message to the standard error output. If pdrorg is executed in an environment in which output to the standard output and standard error output is suppressed, pdrorg may be placed in the message output wait status and stop responding, or may output the KFPL20003-E message to the message log file and then terminate abnormally. Therefore, you should not execute pdrorg in an environment in which messages cannot be output to the standard output or standard error output. Note that the sequence and number of messages that are output to the standard output and standard error output may not match those in the message log file and syslogfile. To obtain the correct messages, view the message log file or syslogfile.

(w) Reorganizing a shared table

When a shared table is reorganized, the system places the RDAREAs containing the shared table and shared indexes defined for the target table in the EX lock mode. If the corresponding RDAREAs contain other tables and indexes, these tables and indexes cannot be referenced or updated. For details about the lock mode when a shared table is reorganized, see Appendix B.2 Lock mode for utilities.

(x) Reorganizing a table for which referential constraints or check constraints have been defined

When reorganization or reloading is to be executed, for details about whether or not the check pending status can be set for a table for which referential constraints or check constraints have been defined, see 8.9.15 constraint statement (specification of check pending status). For details about the check pending status, see the manual HiRDB Version 8 Installation and Design Guide.

When all of the following conditions are satisfied, a table in check pending status cannot be reorganized (-k rorg):

Reorganization is by table (-r option is omitted)

The table has been partitioned by flexible hash partitioning or by a matrix partitioning including flexible hash partitioning.

Either a HiRDB/Single Server, or a HiRDB/Parallel Server with the -g option specified is used.

Whether or not the table is in check pending status is determined from the value of the CHECK_PEND or CHECK_PEND2 column in the data dictionary table (SQL_TABLES table) (if the column value is 'C', the table is in check pending status).

(y) Relationship with the facility for predicting reorganization time

The history of table and index reorganization is applied to the result of reorganization time prediction.

If pdrorg has terminated abnormally, executing pddbst's condition analysis result accumulation facility results in an invalid prediction result* because the reorganization timing cannot be predicted in the reorganization completed status. Therefore, if pdrorg terminates abnormally, re-execute pdrorg to terminate it normally, then execute pddbst's condition analysis result accumulation facility.

* For example, if rollback occurs due to abnormal termination during reloading, empty database information may be accumulated and used for prediction.

(3) Using a file that contains a BOM

If you selected utf-8 as the character encoding in the pdsetup command, you may be able to use a file with a BOM as the input file for pdrorg. Table 8-37 shows the files with a BOM in pdrorg. Note that even when a file with a BOM is used as the input file to pdrorg, the BOM is skipped. No BOM is included in the file that is output by pdrorg.

Table 8-37 Whether or not files with a BOM can be used in pdrorg (applicable to UTF-8)

Control statement | Input file | Use of file with a BOM
| Control information file | Y
emtdef | MT attribute definition file | N
unload | Unload data file | N
EasyMT information file | N
index | Index information file | N
lobunld | LOB data unload file | N
EasyMT information file | N

Legend:

Y: Can be used

N: Cannot be used

: Not applicable

8.13 Database status in the event of an error and recovery method

If an error occurs during execution of pdrorg, check Tables 8-38 and 8-39 to determine the progress of the processing and take appropriate action. In the case of reorganization (-k rorg) that involves consecutive execution of unload and reload operations, if an error occurs during a reload operation, the data for the corresponding table is placed in reload-not-completed data status, in which case only the reload operation (-k reld) can be re-executed. You cannot use pdload on such a table that is in reload-not-completed data status to execute data loading in the addition mode, nor can you use pdrbal to execute rebalancing. If reloading is not possible because the unload data file has been deleted, you can release the reload-not-completed data status by executing the PURGE TABLE statement or pdload in the creation mode.

Table 8-38 Message output during execution of pdrorg and action to be taken (1/2)

Option value during execution of pdrorg
Message output during execution of pdrorg

712 and 732
uld
714 and 734
uld
721
712 and 732
rld
714 and 734
rld
725
715
716

-k rorg -j omitted
8.13.1
8.13.1
8.13.2
8.13.2
8.13.2

8.13.2
8.13.2

-k rorg -j specified

-k unld -j omitted

-k unld -j specified

-k reld -j omitted

8.13.2
8.13.2
8.13.2
8.13.2
8.13.2

-k reld -j specified

-k ixmk

8.13.3
8.13.3

-k ixrc
8.13.3

-k ixor
8.13.4
8.13.4
8.13.4

Legend:

: Not applicable

712 and 732 uld: Data unloading started

712 and 732 rld: Data reloading started

714 and 734 uld: Data unloading completed

714 and 734 rld: Data reloading completed

715: Index creation started

716: Index creation completed

721: Data deleted

725: Index information searched

Note

Messages are abbreviated. For example, 712 means KFPL00712-I and 732 means KFPL00732-I.

Table 8-39 Message output during execution of pdrorg and action to be taken (2/2)

Option value during execution of pdrorg
Message output during execution of pdrorg

712 and 732
uld
714 and 734
uld
721
712 and 732
rld
714 and 734
rld

-k rorg -j omitted
8.13.5
8.13.5
8.13.6
8.13.6
8.13.6

-k rorg -j specified

-k unld -j omitted
8.13.5
8.13.5

-k unld -j specified

-k reld -j omitted
8.13.5
8.13.5
8.13.6
8.13.6
8.13.6

-k reld -j specified

-k ixmk

-k ixrc

-k ixor

Legend:

: Not applicable

712 and 732 uld: Unloading of LOB data started

712 and 732 rld: Reloading of LOB data started

714 and 734 uld: Unloading of LOB data completed

714 and 734 rld: Reloading of LOB data completed

721: LOB data deleted

Note

Messages are abbreviated. For example, 712 means KFPL00712-I and 732 means KFPL00732-I.

Organization of this section

8.13.1 Error when unloading

8.13.2 Error when reloading

8.13.3 Error when creating an index in batch mode or re-creating an index

8.13.4 Error when reorganizing an index

8.13.5 Error when unloading LOB data

8.13.6 Error when reloading LOB data

8.13.1 Error when unloading

During an unload operation, an error does not affect the contents of the database. If an error occurs, you can simply re-execute the unload operation after eliminating the cause of the error.

8.13.2 Error when reloading

Table 8-40 shows the database status and recovery method in the event of an error during a reload operation. The recovery method depends on the options specified for execution of the database reorganization utility. If an error occurs during reload operation, check the specified options and the message output immediately before the error occurred, as shown in Table 8-40, and then recover the error.

Table 8-40 Database status and recovery method in the event of an error during reload operation

Option | Status/Recovery method | Message output immediately before error occurred
-l | -i | None | 721 | 712 and 732 | 714 and 734 | 715 | 716
a | s | Status | Status before exe | Null*2 | Null*2, *4 | Table crtn cmpled |  |
Recovery | Re-exe | Re-exe reload*1 | Re-exe reload*1 |
c | Status | Status before exe | Null*2 | Null*2, *4 | Table crtn cmpled | Index not created | Index crtn cmpled
Recovery | Re-exe | Re-exe reload*1 | Re-exe reload*1 |  | Create index | Unnecessary
p | s | Status | Status before exe | Null*2 | Null*2, *4 | Table crtn cmpled |  |
Recovery | Re-exe | Re-exe reload*1 | Re-exe reload*1 |
c | Status | Status before exe | Null*2 | Null*2, *4 | Table crtn cmpled | Index not created | Index crtn cmpled
Recovery | Re-exe | Re-exe reload*1 | Re-exe reload*1 | Create index | Create index |
n | s | Status | Not guaranteed | Null*2 | Not guaranteed | Table crtn cmpled |  |
Recovery | Re-exe after recover database | Re-exe reload after recover database | Re-exe reload after recover database |
c | Status | Not guaranteed | Null*2 | Not guaranteed | Table crtn cmpled | Index not created | Index crtn cmpled
Recovery | Re-exe after recover database | Re-exe reload after recover database | Re-exe reload after recover database | Re-exe reload after recover database*3 | Re-exe reload after recover database*3 |

Legend:

721: Row data deleted

712 and 732: Data reloading started

714 and 734: Data reloading completed

715: Index creation started

716: Index creation completed

: Not applicable

cmpled: completed

crtn: creation

exe: execution

Re-exe: Re-execution

recover: recovering

Note

Messages are abbreviated. For example, 712 means KFPL00712-I and 732 means KFPL00732-I.

*1 If an error occurs during execution in the log acquisition mode or the pre-update log acquisition mode, the table data may become empty. If you execute an unload operation, null data is unloaded and the table data is lost. In such a case, re-execute the reload operation only.

If reorganization with the unload and lobunld statements specified and without the -j option results in re-execution of the reload operation, reorganize the table with the following procedure:

Specify only the unload statement to reload data into the LOB column structure base table.

Specify only the lobunld statement to reorganize the table.

*2 Only the RDAREA indicated in a KFPL00721-I message becomes empty.

*3 If the table storage RDAREA is different from the index storage RDAREA, an alternative method is to release the table storage RDAREA from shutdown status, re-initialize the index storage RDAREA, and then re-create the index (-k ixrc). For details, see the procedures for handling errors during batch index creation in the HiRDB Version 8 System Operation Guide.

*4 When synchronization point specification is used, the utility stores as many rows of data as displayed in the KFPL00800-I message.

8.13.3 Error when creating an index in batch mode or re-creating an index

Table 8-41 shows the status of the database and recovery method in the event of an error during re-creation or batch creation of an index.

Table 8-41 Status of database and recovery method in the event of error during re-creation or batch creation of an index

-l option | Status/Recovery method | Message output immediately before error occurred
None | 725 | 715 | 716
a or p | Status | Status before execution | Status before execution | Index not created | Index creation completed
Recovery | Re-execute re-creation | Re-execute re-creation | Execute batch creation* | Unnecessary
n | Status | Table | Status before execution | Status before execution | Status before execution | Status before execution
Index | Status before execution | Status before execution | Not guaranteed | Creation completed
Recovery | Table | Unnecessary | Unnecessary | Unnecessary | Unnecessary
Index | Re-execute re-creation | Re-execute re-creation | Re-execute batch creation after recovering database* | Unnecessary

Legend:

725: Index unloading started

715: Batch index creation started

716: Batch index creation completed

Note

Messages are abbreviated. For example, 725 means KFPL00725-I.

* If the index to be recovered is a plug-in index, the utility can be executed only if the batch plug-in index creation partial recovery facility is provided. Otherwise, the index re-creation process is re-executed.

8.13.4 Error when reorganizing an index

Table 8-42 shows the status of the database and recovery method in the event of an error during index reorganization.

Table 8-42 Status of database and recovery method in the event of error during index reorganization

-l option | Status/Recovery method | Message output immediately before error occurred
None | 725 | 715 | 716
a or p | Status | Status before execution | Status before execution | Index not created | Index creation completed
Recovery | Re-execute reorganization | Re-execute reorganization | Execute batch creation* | Unnecessary
n | Status | Table | Status before execution | Status before execution | Status before execution | Status before execution
Index | Status before execution | Status before execution | Not guaranteed | Creation completed
Recovery | Table | Unnecessary | Unnecessary | Unnecessary | Unnecessary
Index | Re-execute reorganization | Re-execute reorganization | Re-execute batch creation after recovering database* | Unnecessary

Legend:

725: Index unloading started

715: Batch index creation started

716: Batch index creation completed

Note

Messages are abbreviated. For example, 725 means KFPL00725-I.

* If you recovered the index storage RDAREA by re-initializing the RDAREA instead of using its backup copy, re-execute the index re-creation.

8.13.5 Error when unloading LOB data

If an error occurs while LOB data is being unloaded, the contents of the database remain unchanged from when the unload operation started. In the event of an error, eliminate the cause of the error and then re-execute the unload operation only on the LOB column. When the LOB column structure base table is reorganized separately from the LOB column, the unload and lobunld statements are both specified. If an error occurs while LOB data is being unloaded, in order to start processing from the unloading of the LOB data, delete the unload statement and re-execute the unload operation with only the lobunld statement specified.

8.13.6 Error when reloading LOB data

Table 8-43 describes the database status and recovery method in the event of an error during a LOB data reload operation.

Table 8-43 Database status and recovery method in the event of an error during LOB data reload operation

-l option | Status/Recovery method | Message output immediately before error occurred
None | 721 | 712 and 732 | 714 and 734
a or p | Status | Table or index | Status before execution | Reorganization of LOB column structure base table completed | Reorganization of LOB column structure base table completed | Table reorganization completed
LOB column | Status before execution | Null | Null | LOB column reorganization completed
Recovery | Table or index | Unnecessary | Unnecessary | Unnecessary | Unnecessary
LOB column | Re-execute reloading of LOB column only | Re-execute reloading of LOB column only | Re-execute reloading of LOB column only | Unnecessary
n | Status | Table or index | No-log shutdown | No-log shutdown | No-log shutdown | Table reorganization completed
LOB column | Not guaranteed | Not guaranteed | Not guaranteed | LOB column reorganization completed
Recovery | Table or index | Re-execute after recovering database* | Re-execute after recovering database* | Re-execute after recovering database* | Unnecessary
LOB column | Re-execute after recovering database* | Re-execute after recovering database* | Re-execute after recovering database* | Unnecessary

Legend:

721: LOB data deleted

712 and 732: Reloading of LOB data started

714 and 734: Reloading of LOB data completed

Note 1

Messages are abbreviated. For example, 712 means KFPL00712-I and 732 means KFPL00732-I.

Note 2

When both the LOB column structure base table and the LOB column are reorganized without the -j option specified, the unload and lobunld statements are both used. In the event of an error during the unload or reload operation on the LOB column, you must delete the unload statement and re-execute the processing with only the lobunld statement specified, because reorganization of the LOB column structure base table has been completed. In the event of abnormal termination of the unload operation, you can re-execute -k rorg as is; however, in the event of abnormal termination of the reload operation, you must change it to -k reld.

* If the reload operation on a LOB column terminates abnormally in the no-log mode, you must recover the table (LOB column structure base table, LOB column, columns of an abstract data type with the LOB attributes, and indexes) from its backup and then re-execute table reorganization.

9. Dictionary Import/Export Utility (pdexp)

This chapter explains the dictionary import/export utility (pdexp) that migrates table definition information, trigger definition information, and stored procedure information between HiRDB systems.

This chapter contains the following sections:

Organization of this chapter

9.1 Overview

9.2 Command format

9.3 Rules and notes

9.4 Examples

9.1 Overview

Executor: User with DBA privilege

The dictionary import/export utility migrates table definition information, trigger definition information, and stored procedure information between HiRDB systems.

This utility outputs table definition information, trigger definition information, or stored procedure information to an export file and migrates the information by using the export file as the input file to another HiRDB system. Output of table definition information, trigger definition information, or stored procedure information to an export file is called exporting; input of the contents of an export file to a HiRDB system is called importing. This utility can also generate a definition SQL on the basis of the definition information in export files.

Figure 9-1 provides an overview of the dictionary import/export utility (pdexp) (importing and exporting table definition information, trigger definition information, or stored procedure information), and Figure 9-2 provides an overview of generating a definition SQL.

You import or export table definition information, trigger definition information, or stored procedure information in the following cases:

When the same table, trigger, or stored procedure is to be used by multiple HiRDB systems

When a test system is to be migrated to the actual system

When existing tables, triggers, or stored procedures are to be exported and then imported back to the same system for reasons such as system reconstruction

You generate a definition SQL in the following case:

When the definition SQL for an existing table, trigger, or stored procedure is to be used as the basis for creating a different table, trigger, or stored procedure

Figure 9-1 Overview of dictionary import/export utility (pdexp) (importing and exporting table definition information, trigger definition information, or stored procedure information)

Figure 9-2 Overview of dictionary import/export utility (pdexp) (generating a definition SQL)

Organization of this section

9.1.1 Table definition information import/export

9.1.2 Trigger definition information import/export

9.1.3 Stored procedure information import/export

9.1.4 Generation of a definition SQL

9.1.1 Table definition information import/export

Import/export of table definition information involves migration of table definition information. The table definition information remains in the export source dictionary tables after transfer. The following types of table definition information can be imported and exported:

Table definition information for base tables

Definition information for indexes

Table definition information for view tables

Base table and view table comment information

Table alias definition information

Because only the definition information is transferred by table definition information import/export, the database reorganization utility (pdrorg) must be used in order to transfer the table data. A definition SQL can also be generated from the export file definition information.

9.1.2 Trigger definition information import/export

Import/export of trigger definition information involves migration of trigger definition information. The trigger definition information remains in the source data dictionary table after migration. You can generate a definition SQL on the basis of the definition information in the export file.

9.1.3 Stored procedure information import/export

Import/export of stored processing information involves migration of the definition source statements of stored procedures. The stored procedure information remains in the source data dictionary table after migration.

The utility exports the definition source statements of a stored procedure during export processing, and HiRDB creates an object on the basis of the definition source statements of the stored procedure during import processing.

You can also generate a definition SQL on the basis of the definition information in the export file.

9.1.4 Generation of a definition SQL

A definition SQL is generated and output to a file on the basis of the export file definition information. The following table lists the definition SQL statements that can be generated:

Type
Index definition
Comment definition
Definition SQL statements to be generated

Base table
Specified
Specified
CREATE TABLE
CREATE INDEX
COMMENT

Not specified
CREATE TABLE
CREATE INDEX

Not specified
Specified
CREATE TABLE
COMMENT

Not specified
CREATE TABLE

View table

Specified
CREATE VIEW
COMMENT

Not specified
CREATE VIEW

Alias table

CREATE ALIAS

Trigger

CREATE TRIGGER

Stored procedure

CREATE PROCEDURE

Legend: : Not applicable

9.2 Command format

Organization of this section

9.2.1 Format

9.2.2 Options

9.2.1 Format

Import and export of table definition information, trigger definition information, or stored procedure information:

pdexp{-e export-filename| -i export-filename}
    [-f control-statements-filename][-u authorization-identifier]

Generation of definition SQL:

pdexp -i export-filename [-f control-statements-filename]
     -o definition-SQL-output-filename [-a] [-u authorization-identifier]

9.2.2 Options

-e export-filename<[identifier:] pathname> ((up to 1023 bytes))

For exporting table definition information, trigger definition information, or stored procedure information:

Specifies a name for the export file.

For generating a definition SQL:

Specifies the name of the export file used at the time of export of the table definition information, trigger definition information, or stored procedure information that is to be created.

A colon and the absolute pathname of the host that contains the export file must also be specified. If the identifier is omitted, the host name of the server machine where the dictionary import/export utility is executed (server machine where the pdexp command is entered) is assumed. If the specified export file is not found, a new file belonging to the user who started the HiRDB is created.

-i export-filename<[identifier:] pathname> ((up to 1023 bytes))

Specifies the name of the export file for importing table definition information, trigger definition information, or stored procedure information or for generating a definition SQL.

A colon and the absolute pathname of the host that contains the export file must also be specified. If the identifier is omitted, the host name of the server machine where the dictionary import/export utility is executed (server machine where the pdexp command is entered) is assumed.

-f control-statements-filename<pathname> ((up to 1023 bytes))

Specifies the name of the file that contains the dictionary import/export utility control statements.

Create the control statement file on the server machine where the dictionary import/export utility will be executed (server machine where the pdexp command will be entered). You can omit this specification if all table definition information, trigger definition information, or stored procedure information in the export file is to be imported or if all definition information in the export file is to be used to generate a definition SQL.

Rules for control statements

You can specify a maximum of 64 tables, triggers, or stored procedures for import or export.

Only one item can be specified per line.

A single specification cannot span multiple lines.

Null lines are ignored.

PUBLIC, MASTER, ALL, and HiRDB cannot be used as schema names. (You can specify PUBLIC for a table.)

Specifications of tables (-t), triggers (-g), and stored procedures (-p) cannot be intermixed.

Importing or exporting table definition information or generating a definition SQL:

   -t schema-name.{table-identifier|table-name} [-w]
 [-t schema-name.{table-identifier|table-name} [-w]]

Importing or exporting trigger definition information or generating a definition SQL:

   -g schema-name.trigger-identifier [-w]
 [-g schema-name.trigger-identifier [-w]]

Importing or exporting stored procedure information or generating a definition SQL:

   -p schema-name.routine-identifier
 [-p schema-name.routine-identifier]

-t schema-name.{table-identifier|table-name}

Specifies a table that is to be imported, exported, or subject to definition SQL generation.

The same table cannot be specified more than once. To specify both base and view tables in a single control statement file, specify the base tables first.

External tables cannot be specified. If an external table is specified, the utility skips its processing.

To import or export a public view, specify PUBLIC as the schema name.

schema-name<identifier> ((1-30))

Specifies the schema name. If a schema name is enclosed in double quotation marks ("), it is handled as case sensitive; otherwise, it is handled as all uppercase letters.

{table-identifier|table-name}<identifier> ((1-30))

Specifies a table identifier or table name. If a table identifier or table name is enclosed in double quotation marks ("), it is treated as being case sensitive; otherwise, it is treated as in all uppercase letters. If a table identifier or table name contains a space, enclose the entire table identifier or table name in double quotation marks (").

-w

Specifies that the table definition of a referencing table for which WITH PROGRAM was not specified is to be imported as the table definition of a referencing table for which WITH PROGRAM is specified. When the -w option is omitted or the specified table definition is for a table other than a referencing table, the system imports its table definition as a definition in which WITH PROGRAM is specified. This option is ignored during export processing.

-g schema-name.trigger-identifier[-w]

Specifies a trigger that is to be imported, exported, or subject to definition SQL generation.

The same trigger cannot be specified more than once.

schema-name<identifier> ((1-30))

Specifies a schema name. If a schema name is enclosed in double quotation marks ("), it is treated as being case-sensitive; otherwise, it is treated as in all uppercase letters.

trigger-identifier<identifier> ((1-30))

Specifies a trigger identifier. If a trigger identifier is enclosed in double quotation marks ("), it is treated as being case-sensitive; otherwise, it is treated as in all uppercase letters. If a trigger identifier contains a space, enclose the entire trigger identifier in double quotation marks (").

-w

Specifies that a trigger definition without WITH PROGRAM specified is to be imported to a trigger definition with WITH PROGRAM specified. If the -w option is specified to import a trigger definition with WITH PROGRAM specified, the system ignores any existing SQL object whose functions and procedures for the target table are in effect.

Notes when multiple triggers are defined for a single table

If multiple triggers are defined for a single table, the triggers function in the order they are defined. If the order of trigger definitions at the time of import processing is different from the order at the time of export processing, the order in which the triggers function will be different before and after migration. To achieve the same trigger operations before and after migration, you must specify the trigger names in the control statements in the order they are defined.

The following describes how to create control statements in the order of the trigger definitions:

When importing or exporting all triggers defined for a specific table:

The following SQL statement obtains the trigger owner, trigger identifier, and trigger definition time of each trigger defined for table in the order of the trigger definitions:

 SELECT TRIGGER_SCHEMA,TRIGGER_NAME,CREATE_TIME
   FROM "MASTER".SQL_TRIGGERS
   WHERE TABLE_SCHEMA='owner' AND TABLE_NAME='table-name'
   ORDER BY CREATE_TIME WITHOUT LOCK NOWAIT;

In the control statement, specify the schema names and trigger identifiers in chronological order of the trigger definition times.

When importing or exporting all defined triggers:

The following SQL statement obtains the trigger owner, trigger identifier, and trigger definition time of each trigger defined for tables in the order of the trigger definitions:

 SELECT TRIGGER_SCHEMA,TRIGGER_NAME,CREATE_TIME
   FROM "MASTER".SQL_TRIGGERS
   ORDER BY CREATE_TIME WITHOUT LOCK NOWAIT;

In the control statement, specify the schema names and trigger identifiers in chronological order of the trigger definition times.

-p schema-name.routine-identifier

Specifies a stored procedure to be imported, exported, or subject to definition SQL generation.

The same stored procedure cannot be specified more than once.

schema-name<identifier> ((1-30))

Specifies a schema name. If a schema name is enclosed in double quotation marks ("), it is treated as being case-sensitive; otherwise, it is treated as in all uppercase letters.

routine-identifier<identifier> ((1-30))

Specifies a routine identifier. If a routine identifier is enclosed in double quotation marks, it is handled as case sensitive; otherwise, it is handled as all uppercase letters. A routine identifier must be enclosed in double quotation marks if it includes a blank.

-u authorization-identifier<identifier> ((1-8))

Specifies the authorization identifier of the user who will execute the dictionary import/export utility. When this option is specified, a message will be displayed requesting entry of the specified user's password. When the user responds by entering his/her authorization identifier/password, HiRDB checks whether or not that authorization identifier has access privileges to the specified tables; if so, the user is connected to the HiRDB system.

Do not specify this option in an environment in which a response cannot be entered, such as in the background mode where & is appended in the shell or in a remote shell.

When this option is omitted, one of the following assumptions is made about the authorization identifier/password:

The value set in the PDUSER environment variable is assumed when the dictionary import/export utility is executed. If you execute the utility in an environment in which a password cannot be entered, such as in the background mode where & is appended in the shell or in a remote shell, make sure that you specify PDUSER.

If the PDUSER environment variable is not set, the user name entered in the log-in window is assumed. A message will be displayed requesting entry of the password, at which time the password must be entered as the response.
If an authorization identifier is enclosed in double quotation marks, it is handled as case sensitive; otherwise, it is handled as in all uppercase letters. If you use the Bourne shell (sh), C shell (csh), or Korn shell (ksh), it is also necessary to enclose the authorization identifier in single quotation marks.

-o definition-SQL-output-filename<pathname> ((up to 1023 bytes))

Specifies the name of the file to which the generated definition SQL is to be output. If the specified file already exists, it is overwritten; otherwise, it is created.

-a

Specifies that both import and definition SQL generation are to be executed. If this option is specified but the -o option omitted, only import is executed.

9.3 Rules and notes

Organization of this section

(1) Rules

(2) Rules for importing and exporting table definition information, trigger definition information, or stored procedure information

(3) Rules for definition SQL generation

(4) Rules for importing and exporting tables for which referential constraints are defined

(5) Notes

(6) Example of correcting errors when a definition SQL statement created during import processing exceeds 2 megabytes

(7) Using the files with a BOM

(1) Rules

The dictionary import/export utility can be executed only while HiRDB is active. For a HiRDB/Single Server, the single server must already be started; for a HiRDB/Parallel Server, the following servers must be already be started:

Table definition information import/export

For export: Front-end server, dictionary server, and all back-end servers

For import: Front-end server, dictionary server, and object back-end servers

The master directory RDAREA, data directory RDAREA, and data dictionary RDAREAs must be placed in open status and released from shutdown status when exporting or importing is executed.

Stored procedure information and trigger information import/export

For export: Front-end server and dictionary server

For import: Front-end server and dictionary server

For import, data dictionary LOB RDAREAs must be defined in advance.

The dictionary import/export utility must be executed at the server machine containing the single server or the server machine where the system manager is located.

After the dictionary import/export utility has executed, a message is displayed requesting entry of the user's password; the password must then be entered (the entered password is not displayed). A password must be enclosed in double quotation marks if it includes lowercase letters.

For the status of RDAREAs associated with the execution of the dictionary import/export utility, see Appendix C. RDAREA Status During Command Execution.

To execute the dictionary import/export utility, set the LANG environment variable. To use character codes that are not supported by the OS in an environment in which the dictionary import/export utility is executed, you must set the PDLANG environment variable. For details about LANG and PDLANG, see the HiRDB Version 8 UAP Development Guide.

If the specified export file is not found during export processing, the utility creates a new file belonging to the user who started the HiRDB. For this reason, the user who starts the HiRDB must have file creation privilege.

During import processing, specify an export file that was created successfully during export processing. The HiRDB administrator must have referencing privilege for that export file.

For a HiRDB/Parallel Server, the correspondences between servers and RDAREAs must be the same after importing as they were before exporting.

Import/export processing cannot be performed between systems with a different magnitude of byte size or between systems with different character organizations.

If you are using the SQL reserved word deletion facility, use the command execution window to set the PDDELRSVWDFILE client environment definition, and then execute the dictionary import/export utility. If the value of PDDELRSVWDFILE exceeds 8 (bytes), the PDDELRSVWDFILE setting is ignored. Furthermore, if the following conditions are not satisfied, an SQL syntax error may occur during import processing:

The value of PDDELRSVWDFILE in the client environment definition matches the value specified when the resources such as tables were defined.

The exporting and importing systems both have the same pd_delete_reserved_word_file operand value in the system common definition.

The exporting and importing systems both have the same files under $PDDIR/conf/pdrsvwd.

(2) Rules for importing and exporting table definition information, trigger definition information, or stored procedure information

Importing and exporting cannot both be specified in the same execution of the utility.

Table definition information, trigger definition information, or stored procedure information is exported in the order it is specified in the -t, -g, or -p option in the control statement file. The import order is the same as the order in which the same information was exported, regardless of the specification of the -t, -g, or -p option. Import or export processing is completed for each individual table, trigger, or stored procedure before going on to the next table or stored procedure.

If there exists at the import destination the same table (a table with the same authorization-identifier.table-identifier), the same trigger (a trigger with the same authorization-identifier.trigger-identifier), or the same stored procedure (a stored procedure with the same authorization-identifier.routine-identifier), an import error results for that table, trigger, or stored procedure.

Before starting import processing, make sure that the import destination system has been initialized and that schemas have been defined for the tables, triggers, or stored procedures to be imported.

The dictionary import/export utility transfers table definition information from the export source to the import destination as is. Therefore, RDAREAs for storing the tables must have already been defined at the import destination with the same names as at the export source.

The owner of a table, trigger, or stored procedure to be imported must have usage privileges for the RDAREAs that will store the table, trigger, or stored procedure.

To import a stored procedure, the tables to be used by the stored procedure must have already been defined at the import destination. If a required table is not defined, the stored procedure cannot be imported.

The -t, -g, and -p options cannot all be specified in the same control statement file.

Import processing is disabled if an attempt is made to execute an SQL statement whose size exceeds 2 megabytes (size of an SQL statement defining tables, triggers, or stored procedures exceeding 2 megabytes).

Definition information and stored procedure information about any of the following tables cannot be exported:

Table definitions containing an abstract data type (CREATE TABLE)

Index definitions specifying an index type (CREATE INDEX)

Function definitions (CREATE FUNCTION and system-defined scalar function)

Abstract data type definitions (CREATE TYPE)

Stored procedures containing an abstract data type (CREATE PROCEDURE)

Stored procedures that are declared in an abstract data type (CREATE TYPE)

Procedure calling another procedure from within a procedure definition (CREATE PROCEDURE)

Procedure calling a function definition (CREATE FUNCTION and system-defined scalar function) from within a procedure definition (CREATE PROCEDURE)

Comments that have an abstract data type column in the table specified in TABLE (COMMENT)

Comments for which the column specified in COLUMN is an abstract data type (COMMENT)

When a shared table is imported using a HiRDB/Parallel Server, all the RDAREAs storing the shared table and shared indexes defined for the shared table in the target environment must be shared RDAREAs. If any are not shared RDAREAs, an SQL error occurs. If a non-shared table is to be imported but a table storage RDAREA is a shared RDAREA, an SQL error occurs. The table below describes the relationship between shared tables and target RDAREAs. This relationship does not apply to shared tables for a HiRDB/Single Server because shared RDAREAs are not created for a HiRDB/Single Server.

Type of source table | RDAREA definition in the target system | Can be defined? | pdexp processing after error*
Table storage RDAREA | RDAREA storing index defined for the table | Table | Index
Shared table | Shared RDAREA | Shared RDAREA | Y | Y | Not applicable.
Shared RDAREA | Not a shared RDAREA | Y | E | Cancels processing and ignores the table definition.
Not a shared RDAREA | Shared RDAREA | E | N | Cancels processing.
Not a shared RDAREA | Not a shared RDAREA | E | N
Non-shared table | Shared RDAREA | Shared RDAREA | E | N
Shared RDAREA | Not a shared RDAREA | E | N
Not a shared RDAREA | Shared RDAREA | Y | E | Cancels processing and ignores the table definition.
Not a shared RDAREA | Not a shared RDAREA | Y | Y | Not applicable.

Legend:

Y: Yes, can be defined.

E: Yes, can be defined, but an SQL error results.

N: No, cannot be defined.

* pdexp suppresses internal COMMIT of the definition SQL statement and performs rollback if an error occurs during processing.

A trigger created internally during definition of the referencing table cannot be exported. If such a trigger is specified during export processing, the utility displays the KFPX28504-W message (in which case the utility skips the corresponding trigger and exports the next trigger).

(3) Rules for definition SQL generation

A definition SQL statement is not generated during export processing (-e option specified) even if the -o option is specified.

Definition SQL statements are generated in the order they are exported.

Definition SQL statements for the following tables, procedures, and functions are not generated:

Table definitions containing an abstract data type (CREATE TABLE)

Procedures specifying an abstract data type as a data type for a procedure parameter (CREATE PROCEDURE)

Procedures within a procedure definition (CREATE PROCEDURE)

Procedures and functions that are declared in an abstract data type (CREATE TYPE)

Index definitions specifying an index data type (CREATE INDEX)

Function definitions (CREATE FUNCTION)

A semicolon (;) is added at the end of each line of a generated definition SQL statement so that the definition SQL can be used as an input to the database definition utility. In the case of CREATE PROCEDURE and CREATE TRIGGER, end_proc; is added.

When CREATE PROCEDURE and CREATE TRIGGER are to be created, the values specified for the SQL optimization option and SQL extension optimizing option are converted to numeric values.

When a definition SQL is to be created for a table for which a foreign key or check constraint has been defined, the utility creates a definition SQL statement for the foreign key or check constraint together with the definition SQL statement for the table. When a definition SQL statement for a foreign key or check constraint is created, the location where the foreign key or check constraint name is defined is determined by the value of PDCNSTRNTNAME in the client environment definition and the pd_constraint_name operand value in the system definition. For details about PDCNSTRNTNAME, see the HiRDB Version 8 UAP Development Guide; for details about the pd_constraint_name operand, see the manual HiRDB Version 8 System Definition.

The following table describes the linefeed conditions for definition SQL statements that are generated:

Generated definition SQL statement
Linefeed condition

CREATE TABLE

Between CREATE and the table identifier

At each column definition

At each table storage RDAREA

At each table option

At each foreign key

At each check constraint definition

At WITH PROGRAM

At every 80th byte, in the case of a row that exceeds 80 bytes

CREATE INDEX

Between CREATE and the index identifier

Between ON and the table identifier

At each column definition

At each index storage RDAREA

At each index option

At every 80th byte, in the case of a row that exceeds 80 bytes

CREATE ALIAS
At every 80th byte, in the case of a row that exceeds 80 bytes

COMMENT
At every 80th byte, in the case of a row that exceeds 80 bytes

CREATE VIEW

Between CREATE and AS

At every 80th byte, in the case of a row that exceeds 80 bytes

CREATE PROCEDURE

Between CREATE and a parameter mode specification

At a linefeed code in a definition source statement

At the SQL compile option

At an SQL procedure statement

At every 80th byte, in the case of a row that exceeds 80 bytes

CREATE TRIGGER

Between CREATE and the trigger operation

At a linefeed code in a definition source statement

At the SQL compile option

At WITH PROGRAM

At every 80th byte, in the case of a row that exceeds 80 bytes

(4) Rules for importing and exporting tables for which referential constraints are defined

(a) Exporting

When a referencing table and a referenced table are exported, the definitions of their primary key and foreign key are also exported unconditionally.

If you are exporting both a referencing table and a referenced table at the same time, specify the referenced table first in the control statement (because tables are imported in the order they were exported).

(b) Importing

When a referencing table and a referenced table are imported, the definitions of their primary key and foreign key are also imported unconditionally.

When a referencing table is imported, the referenced table must have been defined. If an attempt is made to import a referencing table for which no referenced table has been defined, CREATE TABLE results in an SQL error. In such a case, the utility terminates import processing without processing the next table.

If the import target contains a constraint with the same name, CREATE TABLE results in an SQL error. In such a case, the utility terminates import processing without processing the next table.

For the primary and cluster keys, new index and table numbers are assigned in the target system.

The index identifier for the primary key is determined by the table number used during import processing. Therefore, it may not be the same as for the source system.

The following table describes the handling of SQL objects that use a referenced table when a referencing table is imported:

Referencing action during table definition
-w option
Handling of SQL object that uses referenced table
Remarks

CASCADE
Specified
To maintain data integrity between the referencing table and referenced table, a trigger is created internally. Because the SQL object is created at that time, the function, procedure, and triggered SQL object that use the referenced table are ignored.
If the function, procedure, and triggered SQL object that use the referenced table already exist, the SQL object is disabled. Therefore, you must re-create the SQL object after importing the referencing table.

Omitted
The function, procedure, and triggered SQL object that use the referenced table are ignored. CREATE TABLE results in an SQL error because data integrity cannot be maintained between the referencing table and referenced table unless that SQL object is re-created.

RESTRICT
Specified
If the function, procedure, and triggered SQL object that use the referenced table are enabled, data integrity is lost because rows are updated or deleted in the referenced table. Therefore, the SQL object is disabled.
If the function, procedure, and triggered SQL object that use the referenced table already exist, the SQL object is disabled. Therefore, you must re-create the SQL object after importing the referencing table.

Omitted
The function, procedure, and triggered SQL object that use the referenced table are ignored. CREATE TABLE results in an SQL error because data integrity cannot be maintained between the referencing table and referenced table unless that SQL object is re-created.

(5) Notes

The results of the dictionary import/export utility can be checked on the basis of the return value set by the utility and by whether or not there are any error messages. The utility returns one of the following values:
0: Terminated normally
4: Warning error occurred
8: Some processing terminated normally, but some processing was skipped
12: Terminated without completing any processing

After importing, the table access privilege must be set to GRANT in the definition SQL.

When a view table is to be imported, the corresponding base table (or tables) must have already been imported or defined and access privileges set.

Multiple instances of the dictionary import/export utility cannot be executed simultaneously. If the utility is already executing, it cannot be executed again until the current execution has terminated.

Import processing is functionally the same as executing the following definition SQL statements at the import destination system (the specification of each SQL should be checked before import processing is executed):
Table definition information import/export

ALTER TABLE

COMMENT

CREATE ALIAS

CREATE INDEX

CREATE TABLE

CREATE VIEW

Trigger definition information import/export

CREATE TRIGGER

Stored procedure information import/export

CREATE PROCEDURE

For details about the SQL specifications, see the HiRDB Version 8 SQL Reference.

If export processing is interrupted by forced termination of the utility or a server interrupt, the table definition information, trigger definition information, or stored procedure information may not have been exported to the export file, even if the KFPX28402-I message is displayed. In such a case, re-execute the dictionary import/export utility and terminate export processing normally.

To execute pdexp, access privileges for the export file and definition SQL output file must have been granted to the HiRDB administrator.

(6) Example of correcting errors when a definition SQL statement created during import processing exceeds 2 megabytes

When importing data, pdexp creates a definition SQL statement and then executes the statement. It is possible that the size of the SQL statement will exceed the permitted maximum length of 2 megabytes, because syntax for default values is also created for the definition SQL statement.

The following example corrects CREATE TABLE because the size of this definition SQL statement exceeds 2 megabytes.

Example of CREATE TABLE whose size exceeds 2 megabytes:

When CREATE TABLE exceeds 2 megabytes, the utility deletes the column definitions starting with the largest column ID so as to keep its size within 2 megabytes. To add the deleted column definitions, the utility creates ALTER TABLE. The following shows a coding example:

CREATE TABLE "root"."T1"
("C1" INTEGER NOT NULL,
"C2" CHAR(100),
    :
    :
"C98" VARCHAR(100)
) IN (("RDUSER01") "C100" < 1500
("RDUSER02"))
PCTFREE=(30,10)
FOREIGN KEY ("C1","C2") REFERENCES "root"."T2"
 ON DELETE RESTRICT ON UPDATE RESTRICT CONSTRAINT CNST01
;   ................................................1
ALTER TABLE "root"."T1"
ADD "C99" INTEGER
;   .................................................2
ALTER TABLE "root"."T1"
ADD "C100" INTEGER NOT NULL
;   .................................................2

Explanation

CREATE TABLE is created without columns C99 and C100.

ALTER TABLE is created to add columns C99 and C100, which were deleted from CREATE TABLE.

SQL error resulting from deleting a column definition in CREATE TABLE:

An SQL error occurs if a column deleted in 1 above is any of the following:

Partitioning key

Cluster key

Column specified in a referential constraint

Column specified in a check constraint search condition

In this example, CREATE TABLE results in an SQL error because the partitioning key C100 has been deleted.

How to avoid SQL errors:

You can use the following procedure to avoid SQL errors:

Specify the -o option during import processing and create the definition SQL statement (output the definition SQL to a file).

Delete the default value section from the CREATE TABLE definition SQL statement that was output in step 1.

In the definition SQL statement output in step 1, move the first ALTER TABLE through the corresponding ALTER TABLE (the column definitions that result in the SQL error because they were deleted from CREATE TABLE) to the column definitions of CREATE TABLE.

Use pddef to execute the edited definition SQL statement.

The following show an example of editing the above definition SQL statement:

CREATE TABLE "root"."T1"
("C1" INTEGER NOT NULL,
"C2" CHAR(100),
    :
    :
"C98" VARCHAR(100)
"C99" INTEGER   ...............Added in step 3
"C100" INTEGER NOT NULL   .....Added in step 3
) IN (("RDUSER01") "C100" < 1500
("RDUSER02"))
PCTFREE=(30,10)
FOREIGN KEY ("C1","C2") REFERENCES "root"."T2"
 CONSTRAINT CNST01   .........Partially deleted in step 2
;

(7) Using the files with a BOM

If you selected utf-8 as the character encoding in the pdsetup command, you may be able to use a file with a BOM as the input file for pdexp. Table 9-1 shows whether or not files with a BOM can be used with pdexp. Note that even when a file with a BOM is used as the input file for pdexp, the BOM is skipped. No BOM is included in the file that is output by pdexp.

Table 9-1 Whether or not files with a BOM can be used in pdexp (applicable to UTF-8)

Option | Input file | Use of file with a BOM
-l | Export file | N
-f | Control statements file | Y

Legend:

Y: Can be used

N: Cannot be used

9.4 Examples

Examples 1-4 show examples of the use of the dictionary import/export utility.

Example 1

Export the definition information for the following tables (schema name: USER01):

TABLE1

TABLE2

Overview

Command execution

pdexp -e host1:/usr/export_file1
      -f /usr/seifile/expfl01

Explanation:

Name of export file: host1:/usr/export_file1

Name of control statement file: /usr/seifile/expfl01

Contents of control statement file (/usr/seifile/expfl01)

-t USER01.TABLE1
-t USER01.TABLE2

Explanation:

Name of table to which table definition information will be exported: USER01.TABLE1

Name of table to which table definition information will be exported: USER01.TABLE2

Example 2

Import all table definition information in an export file.

Overview

Command execution

pdexp -i host2:/usr/export_file1

Explanation:

Name of export file: /usr/export_file1

Example 3

This example exports definition information about the following stored procedures (schema name: USER01):

proc1

proc2

Overview

Command execution

pdexp -e host1:/usr/export_file1
      -f /usr/seifile/expfl02

Explanation:

Export file: host1:/usr/export_file1

Control statement file: /usr/seifile/expfl01

Contents of the control statement file (/usr/seifile/expfl02)

-p USER01.PROC1
-p USER01.PROC2

Explanation:

Name of the routine that exports definition information about the stored procedure: USER01.PROC1

Name of the routine that exports definition information about the stored procedure: USER01.PROC2

Example 4

This example imports all table definition information from an export file. At the same time, it generates definition SQL statements based on the definition information obtained from the export file.

Overview

Command execution

pdexp -i host2:/usr/export_file1   .................1
      -o /usr/defsql_file   ........................2
      -a   .........................................3

Explanation:

Export file: host2:/usr/export_file1

Definition SQL output file: /usr/defsql_file

Simultaneous generation of import and definition SQL statements

10. Rebalancing Utility (pdrbal)

This chapter explains the rebalancing utility (pdrbal) that rebalances a table partitioned by the hash partitioning method. Rebalancing involves addition of new RDAREAs to handle an increase in the amount of data, and rearrangement of data between the existing RDAREAs and added RDAREAs.

This chapter contains the following sections:

Organization of this chapter

10.1 Overview

10.2 Examples

10.3 Command format

10.4 Notes about the execution of SQL on FIX hash-partitioned tables during a rebalance operation

10.5 Whether or not SQL is executable during a rebalance operation

10.6 Notes

10.7 Error handling procedures

10.1 Overview

Organization of this section

10.1.1 Functions of the rebalancing utility

10.1.2 Operation modes of the rebalancing utility

10.1.3 Execution environment

10.1.4 Executors

10.1.1 Functions of the rebalancing utility

If an RDAREA is added to accommodate new data for a hash-partitioned table, an imbalance of data occurs between the existing RDAREAs and the added RDAREA. The rebalancing utility (pdrbal) is used to correct such a data imbalance. Correcting an imbalance of data in a hash-partitioned table is called the rebalancing facility for hash row partitioning.

The rebalancing utility rearranges data in units of hash groups. This is called table rebalancing. The table partitioned by a hash function (HASHA to HASHF) is called a rebalancing table.

Figure 10-1 shows an overview of the rebalancing utility and Figure 10-2 shows an overview of rebalancing.

Figure 10-1 Overview of the rebalancing utility

Figure 10-2 Overview of rebalancing

Explanation:

Start of rebalancing

This is the point at which the first pdrbal is executed after an RDAREA has been added (ALTER TABLE ADD RDAREA) to the rebalancing table.

Rebalancing initialization processing

This is the initialization processing executed at the first execution of pdrbal after an RDAREA has been added.

Rebalancing completion processing

This is the completion processing executed when pdrbal has terminated with return code 0.

End of rebalancing

This is the point at which rebalancing of all table data is completed (pdrbal terminated with return code 0).

Rebalancing

This is a period during which rebalancing is underway.

10.1.2 Operation modes of the rebalancing utility

Table 10-1 shows the operation modes of the rebalancing utility.

Table 10-1 Operation modes of the rebalancing utility

Operation mode | Description
Shared mode | Accesses to the table are permitted during execution of pdrbal. Use this mode for a system that cannot stop online applications due to 24-hour operation.
Exclusive mode | Accesses to the table are not permitted during execution of pdrbal. Use this mode for a system that can deny access to the table and execute batch processing at night.

Organization of this subsection

(1) Shared mode

(2) Exclusive mode

(1) Shared mode

In the shared mode, a table being rebalanced is accessible. To execute the utility in the shared mode, specify share in the -k option.

The shared mode requires acquisition of log information as well as repeated allocation and release of the resources that are required by concurrently executing SQL. Therefore, the time required for a rebalance operation in the shared mode is longer than in the exclusive mode.

Recommended operation method

When executing the rebalancing utility in the shared mode, you should choose a period of time with little traffic on the rebalancing table. Figure 10-3 shows an example of rebalancing utility execution in the shared mode.

Figure 10-3 Example of rebalancing utility execution in shared mode

(2) Exclusive mode

In the exclusive mode, no access is allowed to a table being processed by the rebalancing utility. To execute the rebalancing utility in the exclusive mode, specify exclusive in the -k option.

In the exclusive mode, acquisition of log information is optional. The required resources are allocated and released only once, and batch index creation is permitted; therefore, the time required for the rebalancing operation is less than in the shared mode.

Recommended operation method

When executing the rebalancing utility in the shared mode, you should choose a period of time during which the rebalancing table is not accessed. Figure 10-4 shows an example of rebalancing utility execution in the exclusive mode.

Figure 10-4 Example of rebalancing utility execution in exclusive mode

10.1.3 Execution environment

You can execute the rebalancing utility only when HiRDB is active.

You can execute the rebalancing utility at the server machine containing the single server or the server machine where the system manager is located.

To execute the rebalancing utility, set the LANG environment variable. To use character codes that are not supported by the OS in an environment in which the rebalancing utility is executed, you must set the PDLANG environment variable. For details about LANG and PDLANG, see the HiRDB Version 8 UAP Development Guide.

The rebalancing utility does not support a utility special unit.

Whether or not you can execute the rebalancing utility depends on the open attribute and status of the RDAREAs that contain the rebalancing table and indexes. For details about whether or not the rebalancing utility can be executed, see Appendix C. RDAREA Status During Command Execution.

When a recovery-unnecessary front-end server is used, whether or not pdrbal is executable depends on the applicability of the recovery-unnecessary front-end server and the operating status of the front-end servers, as shown below:

Recovery-unnecessary front-end server | Whether or not pdrbal is executable
Front-end servers that have not been applied | Front-end servers that have been applied
All active | None | Y
Some inactive | N (because the front-end server is inactive)
All inactive | N (because the table definition cannot be acquired)
All active | All active | Y
Some inactive | Y
All inactive | Y
None | All active | Y
Some inactive | Y
All inactive | N (because the table definition cannot be acquired)

Legend:

Y: Executable

N: Not executable

10.1.4 Executors

The following users can execute the rebalancing utility:

Users with the DBA privileges

Users with the SELECT, INSERT, and DELETE privileges

When the Directory Server linkage facility is used, the system permits execution of the rebalancing utility only when the above privileges are included in the pdrbal executor's privileges or in the executor's role privileges.

10.2 Examples

This section presents examples (1-4) of using the rebalancing utility.

Organization of this section

(1) Shared mode

(2) Exclusive mode

(1) Shared mode

Example 1

This example adds an RDAREA (user03) to a table (reb_table) in a HiRDB/Single Server and executes the rebalancing utility in the shared mode.

Table definition:

CREATE TABLE reb_table(hkeys INT NOT NULL,names CHAR(30))
   FIX HASH HASHA BY hkeys IN (user01,user02)

Index definition:

CREATE INDEX idx1 ON reb_table(hkeys) IN ((idx01),(idx02))

Adding an RDAREA with ALTER TABLE

ALTER TABLE reb_table ADD RDAREA user03 FOR INDEX idx1 in idx03

Explanation:

This statement adds RDAREA user03 to table reb_table. It also adds RDAREA idx03 to index idx1.

pdrbal command

pdrbal -k share -t reb_table control_file

Explanation:

-k share: Operation mode (shared mode)

-t reb_table: Name of the rebalancing table

control_file: Control information file

Contents of the control information file (control_file)

execstop time,9:00 1
report /dsk01/rest_file 2

Explanation:

Terminates pdrbal nine hours later.

Outputs the execution result of pdrbal to the process results file (/dsk01/rest_file).

Example 2

This example adds an RDAREA (user03) to a table (sgml_table) in a HiRDB/Single Server and executes the rebalancing utility in the shared mode. The sgml_table table contains the columns of abstract data type provided by a plug-in.

Table definition:

CREATE TABLE sgml_table (
   hkeys INT NOT NULL,
   doctext SGMLTEXT ALLOCATE (sgmltext IN ((LOB1D),
                             (LOB2D)))
   PLUGIN '<DTD>NEWSPAPER</DTD><EXTRACTparm>extract.prm
                    </EXTRACTparm>'
   )
   FIX HASH HASHA BY hkeys IN (user01,user02)

Index definition:

CREATE INDEX idx1 ON sgml_table(hkeys) IN ((idx01),(idx02))
CREATE INDEX ngram_index USING TYPE MASTER.NGRAM on sgml_table(doctext)
   in ((LOB1I),(LOB2I))

Adding an RDAREA with ALTER TABLE

ALTER TABLE sgml_table ADD RDAREA user03
  FOR COLUMN doctext ALLOCATE(sgmltext IN LOB3D)
  FOR INDEX idx1 in idx03,ngram_index in LOB3I

Explanation:

This statement adds RDAREA user03 to table sgml_table. It also adds RDAREA idx03 to index idx1 and RDAREA LOB3I to plug-in index ngram_index.

pdrbal command

pdrbal -k share -t sgml_table control_file

Explanation:

-k share: Operation mode (shared mode)

-t sgml_table: Name of the rebalancing table

control_file: Control information file

Contents of the control information file (control_file)

execstop time,12:00 1
unld_func type=sgmltext,func=unsgmltext(sgmltext) 2
reld_func type=sgmltext,func=sgmltext(blob) 3
report /dsk01/rest_file 4

Explanation:

Terminates pdrbal 12 hours later.

Specifies a constructor parameter reverse creation function.
sgmltext: Name of the abstract data type
unsgmltext: Name of the constructor parameter reverse creation function
sgmltext: Type of argument

Specifies a constructor function.
sgmltext: Name of the abstract data type
sgmltext: Name of the constructor function
blob: Type of argument

Outputs the execution result of pdrbal to the process results file (/dsk01/rest_file).

(2) Exclusive mode

Example 3

This example adds an RDAREA (user03) to a table (reb_table) in a HiRDB/Single Server and executes the rebalancing utility in the exclusive mode.

Table definition:

CREATE TABLE reb_table(hkeys INT NOT NULL,names CHAR(30))
   FIX HASH HASHA BY hkeys IN (user01,user02)

Index definition:

CREATE INDEX idx1 ON reb_table(hkeys) IN ((idx01),(idx02))

Adding an RDAREA with ALTER TABLE

ALTER TABLE reb_table ADD RDAREA user03 FOR INDEX idx1 in idx03

Explanation:

This statement adds RDAREA user03 to table reb_table. It also adds RDAREA idx03 to index idx1.

pdrbal command

pdrbal -k exclusive -t reb_table -l n control_file

Explanation:

-k exclusive: Operation mode (exclusive mode)

-t reb_table: Name of the rebalancing table

-l n: no-log mode

control_file: Control information file

Contents of the control information file (control_file)

idxwork /idxwork1   1
sort /sortwork   2
report /dsk01/rest_file   3

Explanation:

Specifies a directory for index information files (/idxwork1).

Specifies a work directory for sorting (/sortwork).

Outputs the execution result of pdrbal to the process results file (/dsk01/rest_file).

Example 4

This example adds an RDAREA (user03) to a table (reb_table) in a HiRDB/Parallel Server and executes the rebalancing utility in the exclusive mode.

Table definition:

CREATE TABLE reb_table(hkeys INT NOT NULL,names CHAR(30))
   FIX HASH HASHA BY hkeys IN (user01,user02)

Index definition:

CREATE INDEX idx1 ON reb_table(hkeys) IN ((idx01),(idx02))

Relationship among servers, RDAREAs, table, and index

Adding an RDAREA with ALTER TABLE

ALTER TABLE reb_table ADD RDAREA user03 FOR INDEX idx1 in idx03

Explanation:

This statement adds RDAREA user03 to table reb_table. It also adds RDAREA idx03 to index idx1.

pdrbal command

pdrbal -k exclusive -t reb_table -l n control_file

Explanation:

-k exclusive: Operation mode (exclusive mode)

-t reb_table: Name of the rebalancing table

-l n: no-log mode

control_file: Control information file

Contents of the control information file (control_file)

idxwork bes2 /idxwork_bes2    1
sort bes2 /sortwork_bes2    2
report /dsk01/rest_file    3

Explanation:

Specifies a directory for index information files (/idxwork_bes2) at the bes2 back-end server.

Specifies a work directory for sorting (/sortwork_bes2) at the bes2 back-end server.

Outputs the execution result of pdrbal to the process results file (/dsk01/rest_file).

10.3 Command format

Organization of this section

10.3.1 Format

10.3.2 Options

10.3.3 index statement (specification of index information file information)

10.3.4 idxwork statement (specification of directory for index information files)

10.3.5 sort statement (specification of work directory for sorting)

10.3.6 execstop statement (specification of pdrbal execution time)

10.3.7 unld_func statement (specification of constructor parameter reverse creation function)

10.3.8 reld_func statement (specification of constructor function)

10.3.9 report statement (specification of a process results file)

10.3.10 option statement (specification of optional functions)

10.3.1 Format

This section explains the format of the pdrbal command. In the following table, each number corresponds to the number assigned to each option.

No.
Format

1

pdrbal [-k operation-mode]

2

      -t [authorization-identifier.]table-identifier

3

      [-i index-creation-method]*

4

      [-l log-acquisition-method]*

5

      [-u authorization-identifier]

6

      [-c commit-unit]

7

      [-n [batch-input/output-local-buffer-sectors-count],
               [random-access-local-buffer-sectors-count]]*

8

      [-m progress-message-output-interval]

9

      [control-information-filename]

Note

If you specify control-information-filename, be sure to specify it as the last option.

* This option is ignored if specified in the shared mode (-k share).

10.3.2 Options

Organization of this subsection

(1) -k operation-mode

(2) -t [authorization-identifier. ]table-identifier

(3) -i index-creation-method

(4) -l log-acquisition-method

(5) -u authorization-identifier

(6) -c commit-unit

(7) -n [batch-input/output-local-buffer-sectors-count],[random-access-local-buffer-sectors-count]

(8) -m progress-message-output-interval

(9) control-information-filename

(1) -k operation-mode

<<share>>

Specifies pdrbal's operation mode.

share

Allows other users to reference and update the table during execution of pdrbal (shared mode). Use this mode when executing pdrbal without terminating online applications for the table.

exclusive

Does not allow other users to reference or update the table during execution of pdrbal (exclusive mode). Use this mode when executing pdrbal by terminating all online applications for the table.

(2) -t [authorization-identifier. ]table-identifier

Specifies the name of the rebalancing table being processed by the rebalancing utility.

When the authorization identifier is omitted, the system assumes the authorization identifier of the user who established the connection with HiRDB.

Rules

You cannot specify either of the following tables:

View tables

Foreign tables

Non-rebalancing tables (partitioned by a HASH function (HASHA to HASHF))

If an authorization identifier or table identifier is enclosed in double quotation marks ("), the command treats it as being case sensitive. If it is not enclosed in double quotation marks ("), the command treats it as in all uppercase letters. If you are using sh (Bourne shell), csh (C shell), or ksh (Korn shell), you need to enclose the entire identifier in single quotation marks (').

Table 10-2 shows whether or not pdrbal can be executed on a rebalancing table containing an abstract data type.

Table 10-2 Whether or not pdrbal can be executed on a rebalancing table containing an abstract data type

Contents of abstract data type | Execution of pdrbal
User-defined abstract data type | N
Abstract data type provided by plug-in | With BLOB attribute | Y*
No BLOB attribute | Y

Y: Executable.

N: Not executable.

* With some plug-ins, pdrbal is executable only when a constructor reverse creation function for database reorganization is specified.

(3) -i index-creation-method

<<c>>

Specifies the index creation method.

In the shared mode, this operand, if specified, is ignored (in which case s is assumed).

c

Indicates the batch index mode. When this mode is specified, the utility rebalances row data and then creates an index in batch mode.

Criterion:

Specify this option if you want to rebalance row data in the exclusive mode and then create an index for the row data at high speed. Note that if you specify the execstop statement, the utility creates an index in the batch mode after the data has been moved; therefore, you may not be able to stop pdrbal until index creation for the moved data has been completed.

s

Indicates the index update mode. In this mode, the utility updates indexes each time row data is moved.

Criterion:

Specify this option if only a small amount of row data is rebalanced in the exclusive mode or it is impossible to allocate an index information file or work directory for sorting. Also specify this option if you want to make sure that pdrbal stops within the execution time specified in the execstop statement.

Note

When -i c is specified, the command creates as many index information files as the number of indexes number of added table storage RDAREAs. Because these files are opened simultaneously, the maximum number of files permitted per process may be exceeded. If this is the case, increase the pd_max_open_fds operand value in the system definition. If the value of the pd_max_open_fds operand is exceeded, check and, if necessary, revise the number of table partitions per server and the number of defined indexes or specify -i s.

If the index and idxwork statements are omitted, the system outputs the index information file to the /tmp directory using the following naming convention:
/tmp/INDEX-index-name-index-storage-RDAREA-name-unique-character-string
If pdrbal terminates abnormally, this file is not deleted. If you re-execute pdrbal, another index information file is created under a different name. Because this may result in a space shortage in the /tmp directory, you should delete unneeded index information files with the OS's rm command.

(4) -l log-acquisition-method

<<a>>

Specifies the database update log acquisition method during the execution of pdrbal.

If you have specified the exclusive mode, be sure to specify the -l option. This option is ignored in the shared mode (in which case a is assumed).

a

Indicates the log acquisition mode in which the system acquires database update log information required for rollback and rollforward.

Criteria:

Specify this option if only a small amount of row data is rebalanced or if you do not want to make backup copies before and after the execution of pdrbal.

When pdrbal is executed in the log acquisition mode, there is no need to make backup copies before and after the execution of pdrbal, but the performance is lower than in the no-log mode.

n

Indicates the no-log mode. The system does not collect database update log information.

Criteria:

Specify this option when a large amount of row data is to be rebalanced.

When pdrbal is executed in the no-log mode, the execution time is shorter than in the log acquisition mode. However, you need to make a backup copy before executing pdrbal to protect against possible abnormal termination. Because the system does not collect database update log information, you also need to make a backup copy after the execution of pdrbal.

If pdrbal terminates abnormally, the table storage RDAREAs are placed in error shutdown status. In this case, you need to restore the RDAREAs from their backup copy made prior to the execution of pdrbal.

Rules

If the RDAREAs can be restored from a previous backup copy, there is no need to make a backup copy prior to the execution of pdrbal.

In the no-log mode, the system outputs the following amount of ENQ log per server instead of the database update log:
ENQ log = (p + q + r) T
p: Number of table storage RDAREAs
q: Number of LOB column (LOB attribute) storage RDAREAs
r: Number of index storage RDAREAs
T: Amount of transaction log (see the -c option)

For details about how to operate in no-log mode, see the HiRDB Version 8 System Operation Guide.

If the execstop statement is specified to execute pdrbal in multiple segments, you need to make a backup copy each time pdrbal is executed.

If you use Real Time SAN Replication based on the log-only synchronous method, and if you execute pdrbal with -l n specified at the transaction execution site, you must perform the preparations for log application. For details about the preparations for log application, see the manual HiRDB Version 8 Disaster Recovery System Configuration and Operation Guide.

(5) -u authorization-identifier

Specifies the authorization identifier of the user executing pdrbal.

For the default for this option, see Default value as follows.

If this option is specified, the system displays a message requesting an entry of a password. If no password is required, enter null in response to the message.

The system establishes connection with HiRDB using the specified authorization identifier and checks execution privileges.

Criterion

Specify this option to execute pdrbal using a different authorization identifier than the one specified in the PDUSER environment variable.

Default value

When this option is omitted, the system assumes the authorization identifier and password as follows:

The system assumes the value of the PDUSER environment variable during the execution of pdrbal. Be sure to specify PDUSER if you are executing the utility in the background with & attached by the shell, or in a remote shell environment when a password cannot be entered.Following are examples of the PDUSER environment variable:
Specifying a password:
setenv PDUSER '"authorization-identifier"/"password"'
Not specifying a password:
setenv PDUSER '"authorization-identifier"'

If the PDUSER environment variable is not specified, the system assumes the login window's user name. Enter the password when a message is displayed requesting password entry. If no password is required, enter null in response to the message.

Rules

Do not specify this option if you are executing the utility in the background with & attached by the shell, or in a remote shell environment where a password cannot be entered.

If you enclose an authorization identifier in double quotation marks, the system treats it as case sensitive; otherwise, the system treats it as in all uppercase letters. If you use the Bourne shell (sh), C shell (csh), or Korn shell (ksh), you need to enclose the authorization identifier in single quotation marks (').

(6) -c commit-unit

<unsigned integer> ((1-1000000)) <<shared mode: 10, exclusive mode: 100000>>

Specifies the number of rows to be moved before a commit point is reached when rearranging row data during a rebalance operation.

If 0 is specified, the utility does not limit the number of rows that can be moved per transaction (the utility moves rows, treating processing through the end of rebalancing or up to the time specified in the execstop statement as one transaction).

With a HiRDB/Parallel Server, a commit may be reached before the specified number of rows depending on the number of rows stored in each RDAREA.

Recommended value

In the shared mode, pdrbal locks both source and target RDAREAs when moving data. This means that the source and target RDAREAs are not accessible until pdrbal stops moving data (until a commit point is reached). Therefore, in the shared mode, you can reduce the lock release wait time by specifying a small value for the commit unit.

If UAP processing is more important than the rebalance operation, specify a small value; if the rebalance operation is more important than UAP processing, specify a large value.

If an index has been defined for the target table in the exclusive and no-log mode, you can improve performance by specifying 0 as the commit unit (an improvement in performance can be expected because the global buffer updated by index maintenance at the time of commit is flushed only once, thereby also reducing the number of commits). However, the number of locked resources increases according to the increase in the number of rows to be processed, because the processing is performed by a single transaction. Also, the interval during which no synchronization point dump is collected becomes longer.

Notes

If there are comparatively many transactions for online applications, you should specify a value of 100 or less.

If a small value is specified for the commit unit, the rebalance processing requires a long time. As the number of commit points increases, the amount of output transaction log increases. A transaction log is always output regardless of the specification of the -l option, and its amount can be determined by the following formula:

Amount of transaction log
       = (1328 + 176 3) (a b + 1024 c) (bytes)

a: Number of data items being rebalanced

b: Value of -c option

c: Number of table storage RDAREAs

Each time a commit point is reached, the system outputs this amount of transaction log to each server's system log file. Each server means each and every front-end server and back-end server that contains the table storage RDAREAs. If the table has an abstract data type, transaction log is also output to the dictionary server.

If you specify a large value for the commit unit, a synchronization point dump cannot be collected for a long period of time. If an error occurs when executing the utility concurrently with another UAP, the time required for restart processing increases.

You can specify 0 as the commit unit only in the exclusive and no-log mode; otherwise, 0 cannot be specified.

(7) -n [batch-input/output-local-buffer-sectors-count],[random-access-local-buffer-sectors-count]

Specifies that rebalancing is to be executed in the exclusive mode using a local buffer. By specifying this option, you can use a local buffer to access the database, thereby reducing the number of input/output operations by batch input/output operations.

When this option is omitted, the utility uses the global buffer to input/output one page at a time.

batch-input/output-local-buffer-sectors-count<unsigned integer> ((2-4096))

Specifies the number of batch input/output local buffer sectors. The batch input/output local buffer is used for data pages.

We recommend that you specify a value in the range 16-32 as the number of batch input/output local buffer sectors. The guideline is 64 kilobytes/page length.

random-access-local-buffer-sectors-count<unsigned integer> ((4-125000))

Specifies the number of random access local buffer sectors. The random access local buffer is used for index pages.

You should change the combination of the number of batch input/output local buffer sectors and the number of random access local buffer sectors according to the table definition. Table 10-3 shows the recommended -n option value.

Table 10-3 Recommended -n option specification (pdrbal)

Table type | Column definition | Specification of -n option
FIX table or non-FIX table | All columns are NULL | -n random-access-local-buffer-sectors-count
Non-FIX table | A variable-length data type column is defined | -n random-access-local-buffer-sectors-count
An abstract data type column is defined
A BINARY column is defined
FIX table or non-FIX table | Other | -n batch-input/output-local-buffer-sectors-count

About the buffers used by pdrbal

When the -n option is omitted, the utility uses the global buffer. In such a case, the transaction performance of a UAP that uses the global buffer drops because a large amount of global buffer space is used during rebalancing. When the -n option is specified, such buffer contention is eliminated. Figure 10-5 shows the relationship between pdrbal and buffers.

Figure 10-5 Relationship between pdrbal and buffers

Explanation:

When only the global buffer is used (-n option is omitted), buffer contention occurs between pdrbal and the UAP.

When both local and global buffers are used (-n option is specified), no buffer contention occurs between pdrbal and the UAP. However, during rebalancing of a table with LOB columns, the utility uses the global buffer even if the -n option is specified.

Rules

When this option is omitted, the utility assumes a value of 1 and uses the global buffer. Therefore, batch I/O operations do not take place.

If this option is specified for a rebalancing table partitioned by the FIX hash partitioning method, the system allocates a buffer with a size of pages specified for each hash group; therefore, more memory is used than for a rebalancing table partitioned by the flexible hash partitioning method. A hash group is one of the 1024 groups created by HiRDB based on the result of hashing the partitioning key. The utility allocates RDAREA segments to each of these groups and stores data during the rebalance operation.

When this option is omitted (in which case the global buffer is used), at least the following number of buffer sectors is needed to achieve reasonable performance:

Number of buffer sectors per RDAREA
  = 1024 number of RDAREAs containing rebalancing table
    2 + 3

(8) -m progress-message-output-interval

<unsigned integer> ((1-1000)) <<10>>

Specifies in units of 10,000 lines an interval at which a message is displayed indicating the progress of the current process.

Progress messages are output for each RDAREA.

(9) control-information-filename

<pathname>

Specifies the name of the control information file that contains the control statements of pdrbal.

Table 10-4 lists the control statements that can be specified in the control information file. For details about each control statement, see Sections 10.3.3 index statement (specification of index information file information) to 10.3.10.

Table 10-4 Control statements specifiable in the control information file

Control statement (description)
Operation mode (-k option)

Shared mode
(share)
Exclusive mode
(exclusive)

index statement
(Specification of index information file information)

Y

idxwork statement
(Specification of index information file directory)

Y

sort statement
(Specification of sort work directory information)

Y

execstop statement
(Specification of pdrbal execution time information)
Y
Y

unld_func statement
(Specification of constructor parameter reverse creation function)
Y*
Y*

reld_func statement
(Specification of constructor function)
Y*
Y*

report statement
(Specification of execution result file)
Y
Y

option statement
(Specification of optional functions)
Y
Y

Y: Specifiable.

: Not specifiable.

* With some plug-ins, specification is required. For details, see the applicable plug-in documentation.

The following rules apply to the files and directories that are specified in the control statements:

You must grant access privileges to the HiRDB administrator in advance. When some control statements or operands are omitted, the system assumes that the applicable file is to be created in the /tmp or /usr/tmp directory; therefore, you must also grant access privileges to the /tmp or /usr/tmp directory.

10.3.3 index statement (specification of index information file information)

When creating an index in the batch index creation mode (-i c), the index statement specifies information about an index information file to which index information is output.

Criteria

If possible, always specify the index statement in order to avoid a shortage of space in the /tmp directory.

If there are many indexes or index storage RDAREAs, you should specify the idxwork statement.

Rules

Specify one index statement for each index storage RDAREA added by ALTER TABLE.

There is no need to specify an index statement for a table with no index defined.

If the index statement is omitted and the idxwork statement is also omitted, the utility creates an index information file in the /tmp directory.

If both index and idxwork statements are specified, the index statement takes effect.

If a specified index information file already exists, the utility overwrites the file.

When the index creation process terminates normally, the system automatically deletes the specified index information file.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

index index-identifier[RDAREA-name] index-information-filename

(2) Explanation

(a) index-identifier

<identifier> ((1-30))

Specify the identifier of the index.

The system treats an index identifier enclosed in double quotation marks (") as case sensitive; otherwise, the system treats it as all uppercase letters. Enclose an index identifier in double quotation marks if it contains a space.

(b) RDAREA-name

<identifier> ((1-30))

Specify the name of the index storage RDAREA that was added by ALTER TABLE.

The system treats an RDAREA name enclosed in double quotation marks (") as case sensitive; otherwise, the system treats it as all uppercase letters. Enclose an RDAREA name in double quotation marks if it contains a space.

(c) index-information-filename

<pathname>

Specify the absolute path name of the index information file to which index information is to be output.

This must be the name of a regular file.

10.3.4 idxwork statement (specification of directory for index information files)

The idxwork statement specifies the name of a directory in which index information files are to be created automatically when the index statement is omitted in the batch index creation mode (-i c).

Criterion

If possible, always specify the idxwork statement in order to avoid a shortage of space in the /tmp directory.

Rules

If the index and idxwork statements are both omitted, the utility creates index information files in the /tmp directory on the server that contains the index storage RDAREA added by ALTER TABLE.

For a HiRDB/Single Server, specify only one idxwork statement.
For a HiRDB/Parallel Server, specify as many idxwork statements as there are servers that contain the index storage RDAREAs added by ALTER TABLE.

If both idxwork and index statements are specified, the index statement takes effect, in which case the idxwork statement is ignored.

When the index creation process terminates normally, the system automatically deletes the index information files from the specified directory.

Organization of this subsection

(1) Format

(2) Explanation

(3) Names of the index information files to be created

(1) Format

idxwork [server-name] directory-name

(2) Explanation

(a) server-name

<identifier> ((1-8))

Specify the name of the server used to create the directory for index information files. For a HiRDB/Single Server, do not specify the server name.

(b) directory-name

<pathname> ((1-255))

Specify the absolute pathname of the directory in which index information files are to be created.

(3) Names of the index information files to be created

The utility assigns the following name to each created index information file:

directory-name/INDEX-index-name-index-storage-RDAREA-name-unique-character-string

The following shows an example:

Conditions
Index name: IDX1
Index storage RDAREA: USER01
Contents of idxwork statement: idxwork /hd0400

Name of the index information file to be created
/hd0400/INDEX-IDX1-USER01-aaaa00001

10.3.5 sort statement (specification of work directory for sorting)

The sort statement specifies information about a work file for sorting that is used when an index is created in the batch index creation mode (-i c).

Criterion

If possible, always specify the sort statement in order to avoid a shortage of space in the /tmp directory.

Rules

If the sort statement is omitted, the utility assumes the /tmp directory on the server that contains the index storage RDAREAs.

For a HiRDB/Single Server, specify only one sort statement.
For a HiRDB/Parallel Server, specify as many sort statements as there are servers that contain the index storage RDAREAs added by ALTER TABLE.

Organization of this subsection

(1) Format

(2) Explanation

(3) Note

(1) Format

sort [server-name] directory-name[,buffer-size-for-sorting]

(2) Explanation

(a) server-name

<identifier> ((1-8))

Specify the name of the server used to create the work file for sorting.

For a HiRDB/Single Server, do not specify the server name.

(b) directory-name

<pathname> ((1-255))

Specify the absolute pathname of the directory in which the sort work file is to be created.

(c) buffer-size-for-sorting

<unsigned integer> ((128-2097152)) <<1024>>

Specify, in KB, the size of memory that is to be used as the buffer.

The system allocates this buffer at the single server for a HiRDB/Single Server and at the back-end server for a HiRDB/Parallel Server.

The sort process creates a temporary work file in a specified directory. You can use the following formula to determine a buffer size that minimizes the file size. This is just a guideline. If there is not enough memory, avoid using a large value.

n: Number of data items to be rebalanced. For a repetition column, the number of data items means the number of elements, not the number of rows.

k: Key length (calculated as a maximum value). For details about how to determine the key length, see the example of calculating the number of index storage pages in the HiRDB Version 8 Installation and Design Guide.

x: 10 if all key component columns have a fixed length; 12 if at least one of the key component columns has a variable length.

c:

Number of columns composing the index.

y:

For Linux version; 2; otherwise, 1.

z:

For a variable-length multicolumn index, c x 4; otherwise, 0.

K:

For a variable-length multicolumn index, k + c + 8; otherwise, k + 12.

N:

For a variable-length multicolumn index, (c x 2) + y; otherwise, 3 + y.

R:

k + x + z

A:

For 32-bit mode HiRDB, R + (K + 8) + 28; for 64-bit mode HiRDB, R + (K + 8) + 56.

B:

For 32-bit mode HiRDB, R + (K + 8) + 56; for 64-bit mode HiRDB, R + (K + 8) + 104.

C:

For 32-bit mode HiRDB, 2092 + (N x 32) + (K + 8); for 64-bit mode HiRDB, 2112 + (N x 32) + (K + 8).

(3) Note

Do not allocate NFS to the directory specified in the sort statement. If NFS is allocated, twice as much space is required for the work file for sorting as when a local file is used. Also, problems occur related to retention of work files for sorting.

10.3.6 execstop statement (specification of pdrbal execution time)

The execstop statement specifies a pdrbal execution time to stop pdrbal at a specific time.

Criterion

Specify the execstop statement to avoid executing pdrbal when there are many online transactions, such as during business hours.

Rules

When the execstop statement is omitted, the utility continues the rebalance operation until it is completed.

Even when the specified termination time is reached, the utility continues processing until all row data (including indexes) involved in the rebalance operation has been moved. Therefore, the utility's processing may not terminate by the specified time. In the batch index creation mode, the index is created in the batch mode after data has been moved. Take this into account when you specify the termination time.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

execstop time,pdrbal-execution-time

(2) Explanation

(a) pdrbal-execution-time

Specify the pdrbal execution time (HH:MM).

HH: Hours (00-168)

MM: Minutes (00 or 30)

This value cannot be greater than 168 hours (one week). If 00 is specified for both HH and MM, the utility terminates immediately without executing the rebalance operation (however, at the startup, pdrbal executes the access procedure for search, deletion, and update processing, deletion of SQL objects, and recompilation of a procedure/function for which an SQL object is invalid).

Example:

Execute pdrbal from 21:00 to 9:00 (12 hours) when there is not much traffic:

execstop time,12:00

10.3.7 unld_func statement (specification of constructor parameter reverse creation function)

When pdrbal is executed on a table with columns of abstract data type, the utility uses the plug-in's unload facility to rebalance the table. The unld_func statement specifies a constructor parameter reverse creation function that reverses the creation of data values for the abstract data type during the unload operation.

Criterion

Specify the unld_func statement to rebalance a table with an abstract data type provided by a plug-in that has an unloading facility.

Rules

Be sure to specify the unld_func statement if the table has an abstract data type provided by a plug-in and the plug-in has an unload facility.

You can specify as many unld_func statements as there are abstract data types defined for the table columns.

When specifying an unld_func statement, also specify a reld_func statement as a pair.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

unld_func type=[authorization-identifier.]abstract-data-type-name,
      func=function-name (argument-type[,argument-type...])
      [,func=function-name (argument-type[,argument-type...])...]

(2) Explanation

(a) type=[authorization-identifier.]abstract-data-type-name

Specify the authorization identifier and name of the abstract data type.

Rules

If the authorization identifier is omitted, the authorization identifier of the user who defined the abstract data type (normally MASTER) is assumed.

If the authorization identifier or abstract data type name contains a lowercase letter or a space, enclose it in double quotation marks (").

(b) func=function-name (argument-type[,argument-type...])

Specify the name and argument type of the constructor parameter reverse creation function. For details about the name and argument type of a constructor parameter reverse creation function, see the applicable plug-in documentation.

function-name

Specify the name of the constructor parameter reverse creation function.

argument-type

Specify the data type of the argument of the constructor parameter reverse creation function. Table 10-5 shows the data types of the argument.

Table 10-5 Data types of argument (pdrbal)

Specification method
Remarks

integer
INT32

smallint
INT16

char
nchar
mchar
CHAR8

varchar
nvarchar
mvarchar
p_pdb_varchar_t

float
DOUBLE64

smallflt
REAL64

blob
BLOB

abstract-data-type-name
None

binary
p_pdb_binary_t

10.3.8 reld_func statement (specification of constructor function)

When pdrbal is executed on a table with columns of abstract data type, the utility uses the plug-in's unload facility to rebalance the table. The reld_func statement specifies a constructor function that generates values of an abstract data type during the reload operation.

Criterion

Specify the reld_func statement to reorganize a table with an abstract data type provided by a plug-in that has an unloading facility.

Rules

Be sure to specify the reld_func statement if the table has an abstract data type provided by a plug-in and the plug-in has an unload facility.

You can specify as many reld_func statements as there are abstract data types defined for table columns.

When specifying a reld_func statement, also specify an unld_func statement as a pair.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

reld_func type=[authorization-identifier.]abstract-data-type-name,
      func=function-name (argument-type[,argument-type...])

(2) Explanation

(a) type=[authorization-identifier.]abstract-data-type-name

Specify the authorization identifier and name of the abstract data type.

Rules

If the authorization identifier is omitted, the authorization identifier of the user who defined the abstract data type (normally MASTER) is assumed.

If the authorization identifier or abstract data type name contains a lowercase letter or a space, enclose it in double quotation marks (").

(b) func=function-name (argument-type[,argument-type...])

Specify the name and argument type of the constructor function. For details about the name and argument type of a constructor function, see the applicable plug-in documentation.

function-name

Specify the name of the constructor function.

argument-type

Specify the data type of the argument of the constructor function. For details about the format of the argument data type, see Section 10.3.7 unld_func statement (specification of constructor parameter reverse creation function). You cannot specify the name of an abstract data type.

10.3.9 report statement (specification of a process results file)

The report statement specifies a file to which the processing result of pdrbal is to be output.

Criterion

Specify the report statement to create a process results file in a directory other than /tmp on the host where pdrbal is executed.

Rules

When the report statement is omitted, the utility creates a process results file in /tmp on the host where pdrbal is executed.

The contents of the process results file are not guaranteed until pdrbal is terminated.

If pdrbal terminates with return code = 8, the utility may not output the part of the information following Moved data information. If output, the information was obtained after rollback (at the commit point immediately before the occurrence of the error).

Organization of this subsection

(1) Format

(2) Explanation

(3) Name of the process results file created when the report statement is omitted

(4) Output format

(1) Format

report process-results-filename

(2) Explanation

(a) process-results-filename

<pathname>

Specify the absolute path name of the file to which the processing result is to be output.

This must be the name of a regular file located at the host where pdrbal is executed.

(3) Name of the process results file created when the report statement is omitted

The utility assigns the following name to a created process results file:

/tmp/REPORT-table-identifier-unique-character-string

For example, if the table name is TABLE1, then the following name is assigned to a created process results file:

/tmp/PEPORT-TABLE1-aaaa00001

(4) Output format

The following shows the output format of a pdrbal process results file:

pdrbal VV-RR(Object Option) *** DB REBALANCE *** yyyy-mm-dd HH:MM:SS [1]
------------------------------------------------------------------------

*** Table rebalance processing list ***

Schema name  : robinson  [2]
Table name   : rev_table  [3]
Table status : completed  [4]

** Moved data information **
[5]  [6]           [7]                           [8]            [9]
No. Server   Table rdarea name                Remove row     Insert row
  1 sds      user01                            1,000,000              0
  2 sds      user02                            2,000,000              0
  3 sds      user03                                    0      3,000,000
                                      Total    3,000,000      3,000,000
                                                 [10]           [11]
** Rebalance information **
[12] [13]          [14]                        [15]
No. Server   Table rdarea name                 Status
  1 sds      user01                            finished
  2 sds      user02                            finished
  3 sds      user03                              

*** Exclusive execute information ***

 Start time : 2000-05-05 11:12:13  [16]
 End   time : 2000-05-05 19:20:21  [17]

pdrbal terminated, return code=0  [18]

Explanation

Header information for the process results
VV-RR: Version number
yyyy-mm-dd HH:MM:SS: Date and time pdrbal was started

Schema name

Table identifier

Table rebalancing status
completed: Rebalancing completed
processing: Rebalancing underway

Sequence number of the source or target RDAREA

Name of the server containing the source or target RDAREA

Name of the source or target RDAREA

Number of rows moved (deleted) from the source RDAREA

Number of rows moved (added) to the target RDAREA

Total number of rows moved (deleted) from the source RDAREAs

Total number of rows moved (added) to the target RDAREAs

Sequence number of table storage RDAREA

Name of the server containing the table storage RDAREA

Number of table storage RDAREA

RDAREA rebalancing status
finished: Rebalancing completed
processing: Rebalancing underway
error: Terminated with error
blank: Added RDAREA

Date and time rebalance operation started

Date and time rebalance operation terminated

pdrbal's return code

10.3.10 option statement (specification of optional functions)

The option statement specifies pdrbal's optional functions.

Criteria

Specify the option statement to change the interval at which the utility is to check whether or not pdrbal can be executed in the shared mode.

Rule

You can specify only one option statement.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

..option [check_itv=executability-checking-interval]

(2) Explanation

(a) check_itv=executability-checking-interval

<unsigned integer> ((10-180000)) <<10>>

In the shared mode (-k share), pdrbal checks whether or not there is any UAP that accesses the target table. If there is no such UAP, pdrbal moves the data. Specify this executability checking interval in milliseconds.

In the exclusive mode (-k exclusive), you cannot specify this option.

Criteria

Normally, the default value is used.

If the pdrbal workload is large and online applications may be affected adversely, specifying a value that is greater than the default value increases the monitoring interval at which pdrbal checks UAP operation, which is to the benefit of the online applications.

10.4 Notes about the execution of SQL on FIX hash-partitioned tables during a rebalance operation

For a table partitioned by the FIX hash partitioning method, you can specify an RDAREA in which data is to be stored or searched for by the hash key value. However, if you add an RDAREA to a table partitioned by the FIX hash partitioning method (HASHA to HASHF), the utility assumes the access procedure for a table partitioned by the flexible hash partitioning method during search operation. If this happens, the search performance decreases for the following SQL:

Search operation specifies a partitioning key as the condition.

The column specified in the GROUP BY clause contains all partitioning keys.

Figure 10-6 shows the relationship between the rebalance processing and the period during which search performance decreases. While rebalance processing is underway, the number of processes required for SQL execution increases.

Figure 10-6 Relationship between rebalance processing and the period during which search performance decreases

For a table partitioned by the flexible hash partitioning, the rebalance processing has no effect on the access procedure for a search operation.

10.5 Whether or not SQL is executable during a rebalance operation

Table 10-6 shows whether or not SQL is executable during a rebalance operation.

Table 10-6 Whether or not SQL is executable during a rebalance operation

SQL statement | Rebalance operation | While rebalance operation is underway or stopped
Shared mode | Exclusive mode
SELECT statement | Y |  | Y
UPDATE statement | Y¹ |  | Y¹
INSERT statement | Y² |  | Y²
DELETE statement | Y |  | Y
LOCK statement | Y |  | Y
PURGE TABLE statement³ | ⁴ |  | Y
DROP TABLE | ⁴ |  | Y
CREATE INDEX | ⁴ |  | Y
DROP INDEX | ⁴ |  | Y
ALTER TABLE | ⁴ |  |

Y: Executable.

: Not executable.

¹ A column constituting a unique key index cannot be updated (updating such a column results in an error).

² The SQL statement is not executable if a unique key index is defined for the table that is to be rebalanced (executing the SQL statement results in an error).

³ If you add an RDAREA and then execute the PURGE TABLE statement or reinitialize the RDAREA before executing pdrbal, storage processing does not take place on the added RDAREA because rebalance initialization processing has not been executed. If you execute the PURGE TABLE statement or reinitialize the RDAREA before pdrbal terminates with return code 0, SQL search performance on a FIX hash-partitioned table remains low because rebalance completion processing has not been executed. In this case, execute pdrbal immediately after executing the PURGE TABLE statement or reinitializing the RDAREA. This results in the execution of rebalancing initialization or completion processing.

4 If a recovery-unnecessary front-end server is used, a definition SQL or PURGE TABLE statement may be executed during execution of pdrbal (if a recovery-unnecessary front-end server is not used, the front-end server prevents a definition SQL or PURGE TABLE statement from being executed illegally by allocating the locked resources). Therefore, make sure that neither a definition SQL nor a PURGE TABLE statement is executed during execution of pdrbal. If you execute pdrbal in the exclusive mode, a definition SQL statement is placed on lock-release wait because the table is locked by the back-end server.

10.6 Notes

Following are pdrbal's return codes:
0: Normal termination (rebalancing completed)
4: Normal termination (rebalancing underway)
8: Abnormal termination

You cannot execute a definition SQL statement on a table being rebalanced.

No other UAP or utility can access a table or index that is being rebalanced in the exclusive mode (-k exclusive).

If a list has been created based on a rebalancing table, a search process using this list may not produce a valid result during a rebalance operation. In this case, re-create the list before using it for a search process.

When a rebalance operation is underway in the shared mode, if you specify a commit between acquisition of row identifier and actual data manipulation to search, update, or delete data using the row identifier with a UAP, the result may be invalid.

You cannot execute pdrbal if the rebalancing table contains a number of table storage RDAREAs, that does not match the number of index storage RDAREAs (non-partitioning key index that is not partitioned within the same server). To rebalance such a table, delete the non-partitioning key index that is not partitioned within the same server, then execute pdrbal. After the rebalance operation is completed, redefine the index. You cannot define such an index during the rebalance operation. If you define a non-partitioning key index for a rebalancing table, store the index in the same number of index storage RDAREAs as the table storage RDAREAs within the same server.

The database update log information output by pdrbal is not applicable to HiRDB DataReplicator's data linkage facility.

For index deletion or creation for the data being rebalanced, the utility always uses the global buffer regardless of the specification of the -n option. Therefore, execute pdrbal in an environment where sufficient global buffer is available. Especially for the source RDAREA, you should allocate a global buffer for each index. If there is not enough global buffer, contention may occur on the buffer, resulting in the I/O busy status, thereby reducing the performance.

If there are multiple generations of RDAREAs while the inner replica facility is being used, pdrbal terminates with an error.

An attempt to rebalance a table that contains a user LOB RDAREA that is in frozen update status will cause pdrbal to terminate with an error.

During rebalancing initialization and completion processing, pdrbal recompiles all procedures and functions in the database for which an SQL object is invalid. An error results if any such procedures or functions cannot be recompiled. If an error occurs, check the error message, take an appropriate action, then recompile the procedure or function using ALTER PROCEDURE or ALTER ROUTINE (recompilation does not take place during re-execution of pdrbal).
To check for a procedure or function with an invalid SQL object that cannot be recompiled prior to the execution of pdrbal, use SQL Executer. Figure 10-7 shows the procedure for checking for a procedure or function with an invalid SQL object that cannot be recompiled.

Figure 10-7 Procedure for checking for a procedure or function with invalid SQL object that cannot be recompiled

Table 10-7 shows the availability of file medium and large files for pdrbal.

Table 10-7 Availability of file medium and large files for pdrbal

File | Medium | Large file
Regular file | Fixed- or variable-length block tape
Control information file | Y |  | Y
Index information file | Y |  | Y
Work file for sorting | Y |  | Y
Process results file | Y |  | Y

Y: Usable.

Not usable.

You cannot execute pdrbal if a falsification prevented table is to be rebalanced and that falsification prevented table is in reload-not-completed data status.

If pdrbal is executed in the shared mode in a HiRDB/Parallel Server system, all front-end servers to which a recovery-unnecessary front-end server is not applied must be active.

pdrbal cannot be executed while the table is in check pending status (value of the CHECK_PEND or CHECK_PEND2 column in the SQL_TABLES data dictionary table is C (check pending status)).

If you selected utf-8 as the character encoding in the pdsetup command, you may be able to use a file with a BOM as the input file for pdrbal. Table 10-8 shows whether or not files with a BOM can be used with pdrbal. Note that even when a file with a BOM is used as the input file for pdrbal, the BOM is skipped. No BOM is included in the file that is output by pdrbal.

Table 10-8 Whether or not files with a BOM can be used in pdrbal (applicable to UTF-8)

Control statement | Input file | Use of file with a BOM
| Control information file | Y
index | Index information file | N

Legend:

Y: Can be used

N: Cannot be used

: Not applicable

10.7 Error handling procedures

If pdrbal's return code is 8, check the error message, correct the error, then re-execute pdrbal.

If the KFPL33003-I message (STATUS=END) is displayed during the execution of pdrbal, table rebalance processing has terminated normally. Therefore, once this message is issued, there is no need to re-execute pdrbal, even if an error occurs thereafter.

If an error occurs during batch index creation in the exclusive mode (return code = 8), eliminate the cause of the error and then execute batch index creation (-k ixmk) using pdrorg along with the index information files for the index that resulted in an error. Then, execute pdrbal.

If rollback occurs during the execution of pdrbal, the action to be taken depends on the log acquisition method (-l option). Table 10-9 shows the action to be taken in the event of a rollback during the execution of pdrbal.

Table 10-9 Action to be taken in the event of a rollback during the execution of pdrbal

Log acquisition method (-l option)
pdrbal processing

Rebalancing
Batch index creation
(exclusive mode)

a
Database status
The row data that was rolled back has not been moved. The preceding row data have already been moved.
Index is placed in unfinished status.

Action
Re-execute pdrbal.
Execute batch index creation (-k ixmk) using pdrorg. In this case, use the index information files that resulted in an error.

n
Database status
There is no guarantee.
There is no guarantee.

Action
Restore the database from its backup copy, then re-execute pdrbal.
Reinitialize the corresponding index storage RDAREAs and re-create the index (-k ixrc) using pdrorg.

11. Free Page Release Utility (pdreclaim)

This chapter explains the free page release utility (pdreclaim) that enables you to release free pages (used free pages) during online operation.

Organization of this chapter

11.1 Overview

11.2 Examples

11.3 Command format

11.4 pdreclaim processing results

11.5 Notes

11.1 Overview

Organization of this section

11.1.1 About free pages

11.1.2 Overview of pdreclaim

11.1.3 Functions of pdreclaim

11.1.4 Difference in functions from pdrorg

11.1.5 Execution environment

11.1.6 Executor

11.1.1 About free pages

Before describing the pdreclaim command, this section describes pages and segments. Pages and segments can be in the statuses shown in Table 11-1.

Table 11-1 Page and segment status

Page and segment status | Description
Used page | A page containing table or index data. A page that is filled with data and in which no more data can be stored is called a full page; a page that contains no data due to data deletion is called a used free page.
Unused page | A page that has never been used.
Free page | A page that contains no data. Used free pages and unused pages are both free pages.
Used segment* | A segment containing table or index data. A segment that is filled with data and to which no more data can be added is called a full segment; a segment whose pages are all empty due to data deletion (used free pages or unused pages) is called a used free segment.
Unused segment | A segment that has never been used. All tables (or indexes) in RDAREAs can use unused segments.
Free segment | A segment that contains no data. Used free segments and unused segments are both free segments.

* A used segment is available only to the table or index whose data is currently stored in it. No other table or index can use such a segment.

11.1.2 Overview of pdreclaim

Continuous database operation and repeated data additions, updating, and deletions affect the arrangement of indexes and data in a database, resulting in reduced data storage efficiency and processing performance. You can repair the data and index arrangement by executing the database reorganization utility (pdrorg command). However, you must stop online services during execution of pdrorg because a table cannot be referenced or updated while it is being processed by the pdrorg command (except when the inner replica facility is used).

The free page release utility (pdreclaim) is able to release used free pages, which is an element of the reorganization processing executed by the pdrorg command, during online operation. The pdreclaim command executes pdrorg internally. Note that used free pages cannot be released when an application program that places the table in the lock mode (EX) is executing or when a utility is executing. Free segments can be released only when neither an application program nor a utility is accessing the subject RDAREA.

Use pdreclaim in the following cases:

Database reorganization is not appropriate to the system's mode of operation because it is not feasible to stop online service.*

The database reorganization interval (operation cycle) needs to be increased without compromising storage efficiency.

* For details about the limitations when database reorganization is not performed by pdreclaim, see 11.1.4 Differences in functions from pdrorg. If you cannot use pdreclaim due to the limitations, you must use the online reorganization function that combines pdrorg and the inner replica facility.

11.1.3 Functions of pdreclaim

Organization of this subsection

(1) Releasing used free pages

(1) Releasing used free pages

pdreclaim has the following two functions:

Releasing used free pages from a table

Releasing used free pages from a table's indexes

Executing pdreclaim without the -j option specified releases used free pages. If used free segments are created as a result, executing pdreclaim with the -j option specified releases the used free segments. The following table shows whether or not pdreclaim can be executed depending on the specification of the -j option:

Option specification in pdreclaim | Releases used free pages | Releases used free segments
-j option omitted | Y | N
-j option specified | N | Y

Legend:

Y: Executed

N: Not executed

Note that you cannot release used free segments without first releasing used free pages. However, if either of the following operations is executed, used free segments are created; therefore, pdreclaim with the -j option specified can release used free segments without releasing the used free pages by pdreclaim without the -j option specified.

Deletion of data from a locked table

Execution of pdload (with yes specified in the nowait operand of the option statement) during data loading that results in abnormal termination and rollback

Effects of releasing used free pages from a table

Releasing used free pages from a table provides the following advantages:

Improvement of global search performance
Pages whose usage percentage is 0% become unused pages that no longer need to be searched during a global search, resulting in an improvement of global search performance.

Elimination of errors during execution of UPDATE and INSERT statements on branch rows
When there are no more unused pages, an UPDATE or INSERT statement on branch rows results in an error (KFPA11756-E). You can eliminate such errors by changing the pages whose usage percentage is 0% to unused pages.

Elimination of page compaction during execution of INSERT and UPDATE statements
Because page compaction is executed on all used free pages in the batch mode, you can eliminate the page compaction that is executed as an extension of INSERT and UPDATE statements.

Effects of releasing used free pages from indexes

Releasing used free pages from indexes provides the following advantages:

Elimination of area shortages when used free pages are available

Elimination of adverse effects on performance that are caused by referencing used free pages during index searches

After releasing used free pages from indexes, the utility first allocates those unused pages that were released by means of used free space search processing. The utility allocates unused pages in used segments preferentially, thereby achieving efficient space utilization and reducing the overhead of used free space search processing.

(a) Releasing used free pages in a table

Figure 11-1 provides an overview of releasing used free pages in a table.

Figure 11-1 Overview of releasing used free pages in a table

By releasing used free pages in a table, you can select release of used free segments, release of used free pages, or execution of page compaction. Note that release of used free pages in a table is not applicable to LOB columns or columns of an abstract data type with the LOB attribute.

Releasing used free segments and used free pages

Deletion of a large amount of data results in used free pages that contain no data but which remain allocated. For all tables other than SEGMENT REUSE tables (tables for which the SEGMENT REUSE option is specified in CREATE TABLE or ALTER TABLE), HiRDB uses unused pages as well as unused segments for storing data. If no new space is available, HiRDB reuses used free pages, in which case performance is not as good as when new space can be allocated due to the overhead of searching for free space in the used pages. Even with a SEGMENT REUSE table, if there are used free pages, a global search involves unneeded searching of empty pages. Note that only the tables and indexes in the corresponding used segments are reusable.

Execution of pdreclaim has the following effects because this utility releases used free pages that are not immediately reused:

A segment from which all data has been deleted becomes an unused segment; therefore, it becomes available to all tables and indexes.

A page from which all data has been deleted becomes an unused page; therefore, it can be reused by the table in the corresponding used segment. Especially with a SEGMENT REUSE table, the effects are great because the overhead of searching the pages to be reused is eliminated.

As a part of effect 1, if the same RDAREA stores multiple tables, it is possible to prevent a shortage of RDAREA space that may result if table B cannot allocate a new unused segment because Table A has used free segments that contain no data. Figure 11-2 shows the effects of pdreclaim when the same RDAREA stores multiple tables.

Figure 11-2 Effects of pdreclaim when the same RDAREA stores multiple tables

Page compaction in tables

Figure 11-3 provides an overview of page compaction in tables.

Figure 11-3 Overview of page compaction in tables

Explanation

Before execution of pdreclaim, any data larger than row 2 or 5 cannot be stored as is in the free space created by deleting rows 2 and 5. If these two free spaces are made contiguous, then data can be stored. Reorganizing these scattered free spaces into a single contiguous space is called page compaction. Page compaction is also executed as an extension of SQL statements. However, online performance is reduced when page compaction is executed as an extension of SQL statements. You can avoid such adverse effects on online performance by using pdreclaim to execute page compaction in advance.

(b) Releasing used free pages from indexes

Figure 11-4 provides an overview of releasing used free pages in indexes.

Figure 11-4 Overview of releasing used free pages in indexes

By releasing used free pages in indexes, you can select release of used free segments or release of used free pages. Note that release of used free pages is not applicable to plug-in indexes.

Releasing used free segments and used free pages

As is the case with a table, if a large amount of data is deleted from an index, unused free pages are created that are not reusable. Especially, used free pages that are created by deleting existing data with small key values remain allocated (remain connected by pointers) to make them available should the same key values be stored again; these used free pages cannot be reused when new data with a large key value is added. Therefore, in the operation mode where key values of stored data simply increase as previous data is deleted, a steadily increasing number of nonreusable used free pages is created. If you use pdreclaim on such an index, data with the large key values can be stored because the used free pages are released and unused pages are created. This utility can also create unused pages from intermediate pages with no downward page pointers.

Page compaction in indexes

In indexes, page compaction is executed only when the target of free page release is a unique index.

Figure 11-5 provides an overview of page compaction in indexes.

Figure 11-5 Overview of page compaction in indexes

Explanation

Before pdreclaim is executed, the deleted keys 2 and 5 are retained as remaining entries. Releasing these remaining entries and defragmenting their spaces into a contiguous space is called page compaction. Page compaction is also executed as an extension of SQL statements. However, when it is executed as an extension of SQL statements, online performance is adversely affected. You can avoid such adverse effects on online performance by executing page compaction in advance with pdreclaim.

If remaining entries are left as is, a lock-release wait or deadlock may occur. By executing page compaction with pdreclaim, you can also avoid lock-release waits and deadlock.

11.1.4 Difference in functions from pdrorg

The pdrorg utility should be used for reorganization when online operations can be suspended or when the inner replica facility can be used for reorganization in the online mode. This is because pdrorg provides more data rearrangement functions than pdreclaim. When pdrorg is used, data is rearranged as shown in Figure 11-6, thereby releasing more used free pages and used free segments.

Figure 11-6 When pdrorg is used to release used free pages and used free segments

Compared with pdrorg, pdreclaim provides the following advantages:

You can reference and update a table and its indexes from a UAP while the utility is executing (except when the inner replica facility is used).

There is no need for an unload data file or work files.

Therefore, if all of the following conditions are satisfied, we recommend that you use pdreclaim:

No variable-length character strings have been updated (no branch rows have been created).

There have been no changes in the number of elements of repetition columns (no branch rows have been created).

No null values have changed to real data, or vice versa (no branch rows have been created).

No cluster key index is defined (there is no need to handle cluster keys).

There is no LOB column or column of an abstract data type with the LOB attribute.

During data deletions, a large amount of physically adjacent data was deleted at the same time (used free pages were created). Or, the table is a SEGMENT REUSE table.

A SEGMENT REUSE table with the FIX attribute for which no cluster key index is defined is an ideal candidate for pdreclaim processing. Even if these conditions are not all satisfied, pdreclaim can avoid the extreme performance degradation that can result from a free space search in used pages, because the utility releases used free pages. This could make it possible to change from weekly execution of pdrorg to monthly execution.

For indexes, use of pdreclaim is most suitable if deleted key values will never be re-registered. If key values are frequently updated and deleted, pdreclaim can reduce the frequency of space shortages in RDAREAs for indexes without having to reorganize the indexes with pdrorg.

To determine which utility should be used, check the results of executing the database condition analysis utility. If there are many pages whose usage is 0%, execute pdreclaim; if there are many pages whose usage is greatly different from the value specified for PCTFREE in the CREATE TABLE statement, execute pdrorg.

11.1.5 Execution environment

You can execute pdreclaim only while HiRDB is running.

Execute pdreclaim at the server machine that contains the single server or the system manager.

To execute pdreclaim, set the LANG environment variable. To use character codes that are not supported by the OS in an environment in which pdreclaim is executed, you must set the PDLANG environment variable. For details about LANG and PDLANG, see the HiRDB Version 8 UAP Development Guide.

You can execute pdreclaim on an RDAREA as long as it is in open status. If you specify the -j option, we recommend that you place the RDAREA in open and command shutdown status. For details about whether or not pdreclaim can be executed, see Appendix C. RDAREA Status During Command Execution.

You cannot execute multiple pdreclaim commands on the same table or indexes at the same one time (if executed, an error results). You can execute multiple pdreclaim commands concurrently on individual RDAREAs storing tables or indexes.

11.1.6 Executor

When data dictionary tables are processed
You need the DBA privilege.

Other
You need the DBA privilege (audit privilege if you are processing an audit trail table) or INSERT and DELETE privileges for the table to be processed.

When the Directory Server linkage facility is used, the indicated privilege must be assigned to the executor's specified authorization identifier or role.

11.2 Examples

This section presents four examples of pdreclaim.

Organization of this section

(1) HiRDB/Single Server

(2) HiRDB/Parallel Server

(1) HiRDB/Single Server

Example 1:

This example releases used free pages in a table (TBL1). The example assumes that the table and indexes are defined as follows:

Table definition

 CREATE FIX TABLE TBL1(C1 INTEGER,C2 CHAR(10),C3 DEC(15))
     IN ((USER01) C1>0,(USER02))

Index definitions

CREATE INDEX IDX01 ON TBL1(C1) IN ((USER01),(USER02))
CREATE INDEX IDX02 ON TBL1(C3) IN USER03

Overview

pdreclaim command

pdreclaim -k table -t TBL1

Explanation

-k table: Specifies that used free pages in a table are to be released.

-t TBL1: Specifies the table whose used free pages are to be released.

Example 2:

This example releases used free pages in all indexes defined for a table (TBL1). The example assumes that the table and indexes are defined as follows:

Table definition

 CREATE FIX TABLE TBL1(C1 INTEGER,C2 CHAR(10),C3 DEC(15))
     IN ((USER01) C1>0,(USER02))

Index definitions

CREATE INDEX IDX01 ON TBL1(C1) IN ((USER01),(USER02))
CREATE INDEX IDX02 ON TBL1(C3) IN USER03

Overview

pdreclaim command

pdreclaim -k index -t TBL1

Explanation

-k index: Specifies that used free pages in indexes are to be released.

-t TBL1: Specifies the table whose used free pages are to be released.

(2) HiRDB/Parallel Server

Example 3:

This example releases used free pages in a table (TBL1). The example assumes that the table and indexes are defined as follows:

Table definition

 CREATE FIX TABLE TBL1(C1 INTEGER,C2 CHAR(10),C3 DEC(15))
     IN ((USER11) C1>0,(USER21))

Index definitions

CREATE INDEX IDX01 ON TBL1(C1) IN ((USER12),(USER22))
CREATE INDEX IDX02 ON TBL1(C3) IN ((USER13),(USER23))

Overview

pdreclaim command

pdreclaim -k table -t TBL1

Explanation

-k table: Specifies that used free pages in a table are to be released.

-t TBL1: Specifies the table whose used free pages are to be released.

Example 4:

This example releases used free pages in an index (IDX01) defined for a table (TBL1). The example assumes that the table and indexes are defined as follows:

Table definition

 CREATE FIX TABLE TBL1(C1 INTEGER,C2 CHAR(10),C3 DEC(15))
     IN ((USER11) C1>0,(USER21))

Index definitions

CREATE INDEX IDX01 ON TBL1(C1) IN ((USER12),(USER22))
CREATE INDEX IDX02 ON TBL1(C3) IN ((USER13),(USER23))

Overview

pdreclaim command

pdreclaim -k index -t TBL1 control_file

Explanation

-k index: Specifies that used free pages in indexes are to be released.

-t TBL1: Specifies the table whose used free pages are to be released.

control_file: Control information file

Contents of the control information file (control_file)

idxname name=IDX01    [1]

Explanation

Specifies the index whose used free pages are to be released.

Example 5:

This example releases used free pages from an index storage RDAREA (USER12) for an index (IDX01) defined for a table (TBL1). The example assumes that the table and indexes are defined as follows:

Table definition

 CREATE FIX TABLE TBL1(C1 INTEGER,C2 CHAR(10),C3 DEC(15))
     IN ((USER11) C1>0,(USER21))

Index definitions

CREATE INDEX IDX01 ON TBL1(C1) IN ((USER12),(USER22))
CREATE INDEX IDX02 ON TBL1(C3) IN ((USER13),(USER23))

Overview

pdreclaim command

pdreclaim -k index -t TBL1 control_file

Explanation

-k index: Specifies that used free pages in indexes are to be released.

-t TBL1: Specifies the table whose used free pages are to be released.

control_file: Control information file

Contents of the control information file (control_file)

idxname name=IDX01 rdarea=USER12    [1]

Explanation

Specifies the index whose used free pages are to be released and its index storage RDAREA.

11.3 Command format

Organization of this section

11.3.1 Format

11.3.2 Options

11.3.3 idxname statement (specification of index information)

11.3.4 option statement (specification of optional information)

11.3.1 Format

This section describes the format of the pdreclaim command. In the following table, each number corresponds to the number assigned to each option.

No.
Format

1

 pdreclaim -k target-resource

2

           -t {[authorization-identifier.]table-identifier|[authorization-identifier.]all}

3

           [-r RDAREA-name]

4

           [-c target]

5

           [-m commit-interval]

6

           [-u authorization-identifier]

7

           [-w concurrently-executed-transaction-settlement-wait-time]

8

           [-X response-monitoring-time-for-server-to-server-communication]

9

           [-q generation-number]

10

           [-j]

11

           [-o]

12

     (-x)

13

     (-p)

14

           [-n lock-retries-count]

15

           [-s server-name]

16

        [control-information-file-name]

Note

If you specify control-information-file-name, be sure to specify it as the last option.

Relationships between options

Table 11-2 shows the relationships between options when -c user is specified, and Table 11-3 shows the relationships between options when -c dic is specified.

Table 11-2 Relationships between options when -c user is specified

Option
-k option
-t option

table
index
table-identifier
all

-r RDAREA-name

Y
N
Y
N

-m commit-interval

Y
Y
Y
Y

-u authorization-identifier

Y
Y
Y
Y

-w concurrently-executed-transaction-settlement-wait-time

Y
Y
Y
Y

-X response-monitoring-time-for-server-to-server-communication

Y
Y
Y
Y

-q generation-number

Y
Y
Y
Y

-j

Y
Y
Y
Y

-o

Y
N
Y
Y

-x

N
Y
Y
Y

-p

Y
Y
Y
Y

-n lock-retries-count

Y
Y
Y
Y

-s server-name

Y
Y
Y
Y

control-information-file-name

Y
Y
Y
Y

Legend:

Y: Can be specified

N: Cannot be specified

Table 11-3 Relationships between options when -c dic is specified

Option
-k option

table
index

-t {[authorization-identifier.]table-identifier|[authorization-identifier.]all}

N
N

-r RDAREA-name

N
N

-m commit-interval

Y
Y

-u authorization-identifier

Y
Y

-w concurrently-executed-transaction-settlement-wait-time

Y
Y

-X response-monitoring-time-for-server-to-server-communication

Y
Y

-q generation-number

N
N

-j

Y
Y

-o

Y
N

-x

N
Y

-p

Y
Y

-n lock-retries-count

Y
Y

-s server-name

N
N

control-information-file-name

Y
Y

Legend:

Y: Can be specified

N: Cannot be specified

11.3.2 Options

Organization of this subsection

(1) -k target-resource

(2) -t {[authorization-identifier.]table-identifier|[authorization-identifier.]all}

(3) -r RDAREA-name

(4) -c target

(5) -m commit-interval

(6) -u authorization-identifier

(7) -w concurrently-executed-transaction-settlement-wait-time

(8) -X response-monitoring-time-for-server-to-server-communication

(9) -q generation-number

(10) -j

(11) -o

(12) -x

(13) -p

(14) -n lock-retries-count

(15) -s server-name

(16) control-information-file-name

(1) -k target-resource

Specifies the type of resource (table or index) whose used free pages are to be released.

table:

Specifies that a table is to be processed.

index:

Specifies that indexes are to be processed.

(2) -t {[authorization-identifier.]table-identifier|[authorization-identifier.]all}

<identifier>

Specifies the name of the table whose used free pages are to be released.

If you omit the authorization identifier, the utility assumes the user name used to connect to HiRDB.

If you specify all, the utility processes all tables or indexes that belong to the schema whose name is the specified authorization identifier. In this case, you cannot specify the idxname statement.

(3) -r RDAREA-name

<identifier>

Specifies the name of the RDAREA that is to be processed (among the RDAREAs storing the table specified with the -t option).

You can specify this option only when -k table is specified. If you specify -k index, specify the idxname statement.

You can specify only a user RDAREA. Batch specification of RDAREA names is not permitted.

(4) -c target

<<user>>

Specifies the type of RDAREA that is to be the target of this processing (user RDAREA or data dictionary RDAREA).

user:

Specifies that a user RDAREA is to be processed.

dic:

Specifies that a data dictionary RDAREA is to be processed.

(5) -m commit-interval

<unsigned integer> ((0-100000)) <<1000>>

Specifies the transaction settlement interval for the used free page release processing, expressed as the number of pages released. When the number of released pages per RDAREA for the table or index reaches the specified value, the transaction is settled. The utility executes only page compaction on the released pages, including pages that could not become used free pages.

If you specify 0, the transaction settles when all used free pages in the corresponding RDAREA have been released.

By specifying a large value, you can reduce the amount of transaction log information. However, pdreclaim becomes a long-running transaction, losing the timing of synchronization point validation.

(6) -u authorization-identifier

Specifies the authorization identifier of the user who executes pdreclaim.

For details about the authorization identifier, see 8.9.2(10) -u authorization-identifier.

(7) -w concurrently-executed-transaction-settlement-wait-time

<unsigned integer> ((0-3600)) <<0>>

Specifies a wait time for pdreclaim (in seconds). When a UAP or another utility accesses a table or index while its free pages or free segments are being released, pdreclaim is placed in lock-release wait status or in transaction settlement wait status. This option specifies that wait time.

pdreclaim is placed in this wait status in the following situations:

When pdreclaim is placed in lock-release wait status
pdreclaim is placed in lock-release wait status when either of the following occurs:

A UAP or another utility is accessing the table or index whose free segments are to be released

When free pages are being released, transaction processing that places the RDAREA in the EX lock mode is executing: for instance, data loading by RDAREA is underway or a UAP using the local buffer is executing.

When pdreclaim is placed in transaction settlement wait status
If a UAP is updating the index page that is to be released, pdreclaim is placed in UAP transaction settlement wait status.

Table 11-4 shows the relationship between the -w option specification and pdreclaim's wait time.

Table 11-4 Relationship between -w option specification and pdreclaim's wait time

Processing | Specification of -w option | Transaction settlement wait time | Lock-release wait time per resource
Releasing free pages in a table | Yes |  | -w option value
No |  | Waits indefinitely until the lock status is released
Releasing free pages in an index | Yes | -w option value | -w option value
No | Waits indefinitely until the other transaction is settled | Waits indefinitely until the lock status is released
Releasing free segments in a table | Yes |  | -w option value
No |  | Waits indefinitely until the lock status is released
Releasing free segments in an index | Yes |  | -w option value
No |  | Waits indefinitely until the lock status is released

Legend:

: Not applicable because it has nothing to do with the transaction settlement wait status

Rules

If the UAP's transaction is not settled within the specified amount of time after pdreclaim is placed in the wait status, pdreclaim cancels processing with return code 4. If the lock-release wait status is not released, pdreclaim cancels processing with return code 8.

If the -w option is omitted or 0 is specified in the -w option, pdreclaim waits without monitoring until the UAP's transaction is settled or the lock is released.

(8) -X response-monitoring-time-for-server-to-server-communication

<unsigned integer> ((1-65535)) <<300>>

If an error, such as a communication error, occurs at the server where the command was executed, the command may stop responding and the application may stop. To detect errors, pdreclaim enables you to monitor a response time during communication for dictionary manipulation that is performed by the command.

You set in the -X option the response monitoring time during dictionary manipulation (in seconds). If the execution time during dictionary manipulation exceeds the value set in the -X option, pdreclaim treats it as a dictionary access error and cancels processing with return code 8.

Criteria

If you want to detect an error in less time than 300 seconds in the event of a no-response from the server due to a communication error or unit down, specify a smaller value than 300 in the -X option.

If the system switchover facility is used, the command may keep waiting for a response even though system switchover has been completed. In such a case, you can terminate the command immediately by reducing the monitoring time.

The specified monitoring time may result in a timeout if a response from the dictionary is delayed and if the utility's preprocessing is not completed within 300 seconds, which is the default value of the -X option. This can happen when many applications and utilities are executing concurrently. In such an environment, specify a value greater than 300 in the -X option.

(9) -q generation-number

<unsigned integer> ((0-10))

When the inner replica facility is used, this option specifies the generation number of the target RDAREA.

Specify the generation number as follows:

0: Processes the original RDAREA.

1 to 10: Processes the replica RDAREA with the specified generation number.

Criteria

Specify this option to process an RDAREA other than the current RDAREA using the inner replica facility.

Rules

When the inner replica facility is not used, this option is disabled.

When this option is omitted, the current RDAREA is assumed.

If a replica RDAREA is to be processed, specify the name of the original RDAREA in the -r option and the target generation number in the -q option.

pdreclaim checks the target RDAREA to determine whether its generation number matches the specification. Table 11-5 shows the RDAREAs whose generations are checked by pdreclaim.

Table 11-5 RDAREAs subject to generation checking by pdreclaim

Type of processing
Target RDAREA
Specification of option or in control information file

For storing a table
For storing an index

Releasing used free pages in table
In units of tables
Y

-k table

In units of RDAREAs
Y

-k table -r RDAREA-name

Releasing used free pages in index
In units of indexes
Y
Y
-k index

In units of servers
Y
Y
-k index
idxname statement (with server specified)

In units of RDAREAs
Y
Y
-k index
idxname statement (with rdarea specified)

Legend:

Y: Checked

: Not checked

(10) -j

Specifies that if there is a used free segment and all its pages become unused, the used free segment is to be released (to create an unused segment).

Criteria

When you specify the -j option, the table or index being processed becomes inaccessible. Therefore, use this option as explained below:

During daytime online operation, execute pdreclaim without specifying -j.

During nighttime batch operation, execute pdreclaim with -j specified.

Rules

When you specify the -j option, the released unused segments become available to any table or index, whether or not it has been using the segments. However, if you specify -k table or -k index, the table storage RDAREA or index storage RDAREA is placed in the EX lock mode, in which case pdreclaim can no longer be concurrently executable with a UAP.

(11) -o

Specifies that free pages are to be released in the table, but that page compaction is not to be executed.

When page compaction is executed to release free space in a page that resulted from updating and deleting rows, database update log information (FJ) is output and its volume is proportional to the amount of free space in the page that is released. You specify the -o option in order to reduce the volume of this log output. You specify this option even when the purpose is to release free pages whose usage rate is 0%. This specification can reduce pdreclaim's execution time.

(12) -x

Specifies that page compaction is to be executed in order to release remaining entries in a unique index when free index pages are released. By executing page compaction, you can maintain online performance and avoid lock-release wait and deadlock.

When page compaction is executed to release remaining entries, database update log information (FJ) is output and its volume is proportional to the amount of key space that is released.

Note that page compaction is executed only when the index to be released is a unique index. For any other type of index, the -x option is ignored.

Criteria

Specifying the -x option results in overhead for page compaction. If you want to reduce the volume of the database update log information (FJ) or if performance is more important, do not specify the -x option.

(13) -p

Specifies that the update buffer is to be applied to the database at the point of commit. If you specify the -p option when you execute the utility at the same time as you execute a UAP, you can reduce the workload of synchronization point processing, thereby reducing the effects on the performance of other transactions. Note that the performance of pdreclaim is lower than when the -p option is omitted.

Specify the -m option to set the commit interval in such a manner that a commit is acquired before a synchronization point dump is acquired.

There is a relationship between the pdreclaim processing and the pd_max_commit_write_reclaim_no operand value in the system common definition. Table 11-6 describes the pdreclaim processing when the pd_max_commit_write_reclaim_no operand and the -p option are specified.

Table 11-6 pdreclaim processing when the pd_max_commit_write_reclaim_no operand and the -p option are specified

pd_max_commit_write_reclaim_no operand specification | pdreclaim processing when the -p option is specified
Specified | 0 | pdreclaim terminates with an error.
Other than 0 | There can be as many concurrent executions per server of the pdreclaim utility with the -p option specified as the value specified in the pd_max_commit_write_reclaim_no operand. Any excess pdreclaim utility executions terminate with an error.
Omitted | v7compatible or v6compatible is specified in the pd_sysdef_default_option operand | pdreclaim terminates with an error.
Other | There can be up to 10 concurrent executions per server of the pdreclaim utility with the -p option specified. Any excess pdreclaim utility executions terminate with an error.

(14) -n lock-retries-count

<unsigned integer> ((0-3600)) <<0>>

Specifies the maximum number of lock acquisition requests to be released in the case of releasing free segments. Because the -n option is applicable only when free segments are released, you must also specify the -j option when you specify the -n option.

The following describes release of lock acquisition requests in order to release free segments.

If you specify the -j option to release free segments, the target RDAREA is placed in the EX lock mode. If an attempt is made to release free segments in an RDAREA that is being processed by another transaction, the processing may be placed in lock-release wait status.

If another transaction acquires a lock on the RDAREA while the free segment release processing is in lock-release wait status, the first transaction that acquired a lock on the RDAREA and the free segment release processing are both placed in wait status until the lock is released.

When the -n option is specified, the lock acquisition request for the free segment release processing is released when the time specified in the -w option has elapsed, thereby giving preferences to the other transactions' lock-release wait status. The free segment release processing waits for lock release for the amount of time specified in the -w option. Therefore, if you specify the -n option, you must also specify the -w option.

If free segments are not released, the lock acquisition request for free segment release processing is cancelled and then issued again.

Figure 11-7 shows the relationship between the lock acquisition request and the lock-release wait queue.

Figure 11-7 Relationship between lock acquisition request and lock-release wait queue

When the -n option is specified, the utility waits for lock release for as long as the amount of time obtained from -w option value x -n option value. If this value exceeds the pdreclaim execution monitoring time specified in the exectime operand in the option statement, pdreclaim displays the KFPL11111-E message while waiting for lock release and terminates itself forcibly. It is important that you specify an appropriate value in the -n option, taking into account the following:

Relationship between the -n option and the pdreclaim execution monitoring time

A + B + C < D x 60

Legend:

A: Transaction settlement wait time (-w option value)

B: Lock-release wait time for the free segment release processing (-w option value x -n option value)

C: Execution time for free segment release processing

D: pdreclaim execution monitoring time specified in the exectime operand of the option statement

(15) -s server-name

<identifier>

This option is applicable to a HiRDB/Parallel Server only (it is ignored if specified for a HiRDB/Single Server).

Specifies the name of the back-end server that is to manage execution of pdreclaim.

Criteria

When this option is omitted, one of the back-end servers is selected automatically; therefore, normally there is no need to specify this option.

Specify this option if you execute many pdreclaim commands concurrently and the number of utility processes per server (0mrorg) is 32 or greater. You can determine the value of 0mrorg by checking the result of the pdls -d prc command for the number of process IDs (0mrorg).

(16) control-information-file-name

<path name>

Specifies the name of the control information file that contains the control statements for pdreclaim.

You can specify the following control statements in the control information file; for details about each control statement, see Sections 11.3.3 and 11.3.4:

idxname statement

option statement

11.3.3 idxname statement (specification of index information)

The idxname statement specifies information about an index from which used free pages are to be released (-k index).

Criteria

When -k index is specified, the utility processes all indexes defined for the table that is specified with the -t option. You specify the idxname statement to process only a particular index, server, or RDAREA.

Rules

Specify the name operand before the server and rdarea operands.

Enclose an identifier in double quotation marks (") if it contains any spaces or lowercase letters. Lowercase letters are treated as uppercase letters, if not enclosed in double quotation marks.

Once you specify an idxname statement with the rdarea operand specified, you cannot specify another idxname statement specifying only the name operand or an idxname statement specifying the server operand.

You cannot specify more than one idxname statement specifying the same index identifier, except when the rdarea operand is specified.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

 idxname name={index-identifier|*}
         [{server=server-name[,server-name]...
             |rdarea=RDAREA-name[,RDAREA-name]...}]

(2) Explanation

(a) name={index-identifier|*}

index-identifier<identifier>

Specifies the identifier of the index whose used free pages are to be released.

There is no need to specify the authorization identifier, because the utility assumes the authorization identifier of the table specified with the -t option.

* Specifies that used free pages are to be released from all indexes defined for the table.

The system processes all indexes for the table both when the idxname statement specifying * (without the server operand) is specified and when the idxname statement is omitted. If you specify the idxname statement specifying both * and the server operand, the utility processes only those indexes located at the back-end server specified in the server operand.

When * is specified, there can be only one idxname statement.

(b) server=server-name[,server-name]...

<identifier>

This operand is applicable to a HiRDB/Parallel Server only. Specifies the name of the server (back-end server name) when only the part of the index specified in the name operand that is located at the specified server is to be processed. When this operand is omitted, the utility assumes all servers that contain the index.

(c) rdarea=RDAREA-name[,RDAREA-name]...

<identifier>

Specifies the names of RDAREAs for the index that is specified in the name operand. When this option is omitted, the utility assumes all RDAREAs that store the index. This operand cannot be specified when an asterisk (*) is specified in the name operand.

11.3.4 option statement (specification of optional information)

The option statement specifies pdreclaim's execution monitoring time.

Criteria

Specify the option statement to monitor the execution time of pdreclaim.

Rules

The utility ignores any operand other than exectime (such as those permitted in the option statement of pdrorg), if specified. Specifying other operands will not result in a control statement error.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

 option exectime=pdreclaim-monitoring-time

(2) Explanation

(a) exectime=pdreclaim-monitoring-time

<unsigned integer> ((0-35791394))

Specifies the pdreclaim execution monitoring time in minutes.

Guideline for the specification value

The purpose of this operand is to detect a no-response error, not to monitor the execution time of a long transaction. Therefore, you should specify a sufficient time for processing the applicable table. For example, to monitor the execution time of a pdreclaim that should terminate in 7-8 minutes, specify exectime=20, not exectime=10.

Rules

If you omit this operand or specify 0, the system will not monitor the execution time.

This operand takes the precedence over the pd_utl_exec_time operand in the system definition. Table 11-7 describes the relationship between the exectime operand and the pd_utl_exec_time operand in the system definition.

Table 11-7 Relationship between the exectime operand and the pd_utl_exec_time operand in the system definition (pdreclaim)

exectime operand value | pd_utl_exec_time operand value in the system definition
Omitted or 0 | A
Omitted |  | Monitoring with value A
0 |  |
B | Monitoring with value B | Monitoring with value B

Legend:

: Execution time is not monitored.

If pdreclaim processing does not terminate within the specified time, terminate the utility process forcibly and collect troubleshooting information to determine the cause of the no-response error. Note that this statement monitors the execution time of the utility process that releases used free pages (0mrorg) and the single server (or back-end server). If an error occurs in the command process (pdreclaim or pdrorg), the process cannot be terminated forcibly. For details about the error information to be collected, see the pd_utl_exec_time operand in the manual HiRDB Version 8 System Definition.

11.4 pdreclaim processing results

If the return code from execution of pdreclaim is 0 or 4, the pdreclaim processing results are output to the standard output.

Organization of this section

(1) Processing results of pdreclaim (with -j not specified) (releasing used free pages in a table)

(2) Processing results of pdreclaim (with -j specified) (releasing used free segments in a table)

(3) Processing results of pdreclaim (with -j not specified) (releasing used free pages in indexes)

(4) Processing results of pdreclaim (with -j specified) (releasing used free segments in indexes)

(5) Notes on the processing results

(1) Processing results of pdreclaim (with -j not specified) (releasing used free pages in a table)

pdreclaim VV-RR        *** DB RECLAIM ***       YYYY-MM-DD hh:mm:ss[1]

TABLE NAME : USERA.TBL01 [2]
[3]     [4]                                 [5]          [6]
No.  RDAREA NAME                        PAGE COUNT  SEGMENT COUNT
 1  USER01                                 11,395            244
 2  USER02                                 11,403            252

14284 16:22:54 un01    KFPL00739-I Pdreclaim terminated, return code=0

Explanation:

Header for the processing results
VV-RR: Version, revision number
YYYY-MM-DD hh:mm:ss: pdreclaim start date and time

Name of the table that was processed
If the processing was in units of schemas, the information beginning with this item is repeated.

Serial numbers

Names of the table storage RDAREAs

Numbers of pages released

Numbers of segments that can be released
Each RDAREA's number of segments that can be released includes not only segments that can be changed to unused segments by releasing used free pages by pdreclaim, but also segments that can be changed to unused segments by the DELETE statement for a table on which the LOCK statement was executed (executing the DELETE statement in the no-log mode automatically places the segments in LOCK-executed status).

(2) Processing results of pdreclaim (with -j specified) (releasing used free segments in a table)

pdreclaim VV-RR        *** DB RECLAIM ***        YYYY-MM-DD hh:mm:ss[1]

TABLE NAME : USERA.TBL01 [2]
[3]      [4]                                [5]           [6]
No.  RDAREA NAME                        PAGE COUNT  SEGMENT COUNT
 1  USER01                                      -            244
 2  USER02                                      -            252

16066 16:23:57 un01   KFPL00739-I Pdreclaim terminated, return code=0

Explanation:

Header for the processing results
VV-RR: Version, revision number
YYYY-MM-DD hh:mm:ss: pdreclaim start date and time

Name of the table that was processed
If the processing was in units of schemas, the information beginning with this item is repeated.

Serial numbers

Names of the table storage RDAREAs

Always - when the -j option was specified

Numbers of segments released

(3) Processing results of pdreclaim (with -j not specified) (releasing used free pages in indexes)

pdreclaim VV-RR        *** DB RECLAIM ***        YYYY-MM-DD hh:mm:ss[1]

INDEX NAME : USERA.(PRIMARY0000131193) [2]
[3]      [4]                                [5]           [6]
No.  RDAREA NAME                        PAGE COUNT  SEGMENT COUNT
 1  USER01                                     32              0
 2  USER02                                     32              0

INDEX NAME : USERA.IDX01
No.  RDAREA NAME                        PAGE COUNT  SEGMENT COUNT
 1  USER01                                    815             15
 2  USER02                                    815             15

INDEX NAME : USERA.IDX02
No.  RDAREA NAME                        PAGE COUNT  SEGMENT COUNT
 1  USER01                                     93              1

1273 16:58:26 un01    KFPL00739-I Pdreclaim terminated, return code=0

Explanation:

Header for the processing result
VV-RR: Version, revision number
YYYY-MM-DD hh:mm:ss: pdreclaim start date and time

Name of the index that was processed
If multiple indexes were processed, the information beginning with this item is repeated.

Serial numbers

Names of the index storage RDAREAs

Numbers of pages released

Numbers of segments that can be released
Each RDAREA's number of segments that can be released includes not only segments that can be changed to unused segments by releasing used free pages by pdreclaim, but also segments that can be changed to unused segments by the DELETE statement for a table on which the LOCK statement was executed (executing the DELETE statement in the no-log mode automatically places the segments in LOCK-executed status).

(4) Processing results of pdreclaim (with -j specified) (releasing used free segments in indexes)

pdreclaim VV-RR        *** DB RECLAIM ***        YYYY-MM-DD hh:mm:ss[1]

INDEX NAME : USERA.(PRIMARY0000131193) [2]
[3]      [4]                                [5]          [6]
No.  RDAREA NAME                        PAGE COUNT  SEGMENT COUNT
 1  USER01                                      -              0
 2  USER02                                      -              0

INDEX NAME : USERA.IDX01
No.  RDAREA NAME                        PAGE COUNT  SEGMENT COUNT
 1  USER01                                      -             15
 2  USER02                                      -             15

INDEX NAME : USERA.IDX02
No.  RDAREA NAME                        PAGE COUNT  SEGMENT COUNT
 1  USER01                                      -              1

1381 16:59:34 un01    KFPL00739-I Pdreclaim terminated, return code=0

Explanation:

Header for the processing results
VV-RR: Version, revision number
YYYY-MM-DD hh:mm:ss: pdreclaim start date and time

Name of the index that was processed
If multiple indexes were processed, the information beginning with this item is repeated.

Serial numbers

Names of the index storage RDAREAs

Always - when the -j option was specified

Numbers of segments released

(5) Notes on the processing results

The processing results are output in the order that processing of the resources was completed.

When the -j option is specified, the numbers of pages released as displayed by pdreclaim may not match the numbers of pages that can be released (Collect Prearranged Page) that is displayed as the analysis result of pddbst. Also, the numbers of segments that can be released (processing results of pdreclaim without the -j option specified) may not match the numbers of segments released (processing results of pdreclaim with the -j option specified). The reasons are explained below.

(a) When a page is expected to be releasable, but pdreclaim is unable to release it

To allow concurrent execution of a UAP and utility update processing, pdreclaim does not release any used free page that may result in concurrent updating. Also, the utility releases used free pages in such a manner that the number of index levels is not reduced.

If pdrorg or pdrorg with the synchronization point specification terminates abnormally, pdreclaim does not release the first segment allocated to the corresponding table even if that segment contains no data.

If pdreclaim is executed concurrently with update processing, a used free page or segment that was determined to be releasable may be used for update processing.

(b) When a page is expected to be nonreleasable, but pdreclaim can release it

An intermediate page of an index is released when all of its lower leaf pages are released by pdreclaim. However, if pddbst is executing, the usage of the intermediate page cannot be treated as being 0% because there are leaf pages.

11.5 Notes

The maximum number of pdreclaim commands that can be executed concurrently is the same as for the pdrorg command because pdreclaim executes pdrorg internally. Specifically, the maximum number of pdreclaim commands that can be executed concurrently equals the maximum number of pdrorg commands that can be executed concurrently minus the number of pdrorg commands that are currently executing.

pdreclaim cannot process view tables or external tables.

pdreclaim cannot process LOB RDAREAs. This means that pdreclaim cannot process any LOB RDAREA containing an abstract data type or plug-in index.

If a UAP accesses a page in an index that is being released, pdreclaim is placed in wait status until the corresponding process transaction is settled. You can specify a wait time for pdreclaim in the -w option.

To terminate pdreclaim forcibly, use the pdcancel command. Other commands such as the OS's kill command cannot terminate pdreclaim.

When executing pdreclaim with the -j option specified, we recommend that you shut down the applicable RDAREAs with the pdhold command to protect UAPs from being placed in lock-release wait status unnecessarily.
When the -j option is specified in pdreclaim, the RDAREA storing the specified table and index is placed in the EX lock mode, making the entire RDAREA inaccessible. This lock control functions based on the specification of the -w and -n options, as shown in Table 11-8.

Table 11-8 Lock control during free segment release processing

Option value
Lock-release wait time per processing
In the event of a lock error

-w
-n
Lock-release wait timeout error
Other error

Retry locking
Retries count
Processing
Processing

Not specified

Indefinite

Specified
Not specified
Time specified in the -w option
No
0
Displays an error message and then cancels processing.
Processing

Specified
Yes
Count specified in the -n option
Retries locking as many times as the value specified in the -n option.
If all retries result in a timeout, the system displays an error message and then cancels processing.

Legend:

: Not applicable

Table 11-9 shows the resources that are locked during free segment release processing.

Table 11-9 Resources that are locked during free segment release processing

Resource name | Resource number | Node | Purpose | Whether or not locking is retried
pdreclaim | 5006 | EX | Suppression of multiple concurrent executions of pdreclaim on the same resource | There are no retries because processing is cancelled if pdreclaim is executing.
RDAREA ID | 0001 | EX | Suppression of access to an RDAREA that is the subject of free segment release processing | Locking is retried when a lock-release wait timeout error occurs and the -n option is specified.
RRAMB | 0102 | SR | No timeout error occurs because this resource is acquired only after the RDAREA has been placed in the EX lock mode. Therefore, there are no retries.

Table 11-10 shows the return codes of pdreclaim.

Table 11-10 Return codes of pdreclaim

Return code | Description | Action
0 | Release of used free pages or segments has been completed. | None
4 | Processing was cancelled because a timeout occurred while waiting for settlement of a UAP transaction. | The table and index status is guaranteed because release of used free pages was cancelled due to a timeout. The table and indexes can be accessed from UAPs as is. To release the remaining used free pages, re-execute pdreclaim.
8 | Processing terminated abnormally. | The table and index status is guaranteed because release of used free pages was cancelled due to an error. Even after abnormal termination, the table and indexes can be accessed from UAPs. To re-execute pdreclaim, first check the displayed error messages and eliminate the cause of the error.

If the target table contains a user-defined column of an abstract data type, pdreclaim cannot be executed.

To execute pdreclaim on a shared table or shared index, the system places the RDAREAs containing the shared table or shared index in the EX lock mode. If the corresponding RDAREAs contain other tables or indexes, these tables and indexes cannot be referenced or updated. For details about the lock mode used for executing pdreclaim, see Appendix B.2 Lock mode for utilities.

For a HiRDB/Parallel Server, if a transmission message from a back-end server to pdreclaim is delayed for 1 second or more due to traffic on the communication line, the corresponding back-end server's processing result may not be displayed at the standard output. In this case, check the KFPL00714-I message that is output to the message log file or syslogfile to determine the processing result.

Do not execute a definition SQL statement on a table or index that is being processed by pdreclaim. If a definition SQL statement is so executed, pdreclaim terminates abnormally. If pdreclaim is executing in units of schemas, it processes all tables and indexes that belong to the corresponding schema.

If you selected utf-8 as the character encoding in the pdsetup command, you can use a file with a BOM as the control statements file for pdreclaim; however, the BOM is skipped.

12. Global Buffer Residence Utility (pdpgbfon)

This chapter explains the global buffer residence utility (pdpgbfon) that can be used to read data pages, such as table data pages and index pages, into a global buffer immediately after HiRDB starts (before starting online jobs, for example).

Organization of this chapter

12.1 Overview

12.2 Examples

12.3 Command format

12.4 pdpgbfon processing results

12.5 Notes

12.1 Overview

Organization of this section

12.1.1 Overview of pdpgbfon

12.1.2 Functions of pdpgbfon

12.1.3 Execution environment

12.1.4 Executor

12.1.1 Overview of pdpgbfon

When a database is accessed, finding the desired target data in a global buffer without having to perform any physical input/output operation is called a buffer hit. When the probability of a buffer hit (buffer hit rate) is high, database access performance is stable. When HiRDB has just started, there is no information about tables and indexes in global buffers, so the buffer hit rate is low, resulting in unstable database access performance.

The global buffer residence utility (pdpgbfon) reads information about tables and indexes into global buffers in advance. If you execute pdpgbfon as soon as HiRDB has started, such as before startup of online jobs, you can expect stable database access performance.

For example, in an environment where all tables and indexes can be read from the database to a global buffer, high-speed database operations can be achieved without any physical input/output operations.

Figure 12-1 shows the effects of pdpgbfon.

Figure 12-1 Effects of pdpgbfon

Explanation

When pdpgbfon is not used:

UAP accesses the table.

Page information is read from the table because the global buffer does not contain the page information (physical input/output operation occurs).

The result is returned. Whenever this page information is accessed again subsequently, a table read operation will not be necessary because the page has been read into the global buffer. When page information from another page is accessed, the read operation of step 2 will be required.

When pdpgbfon is used:

pdpgbfon is executed, reading table page information into the global buffer.

UAP accesses the table.

The result is returned without reading the page information from the table because the page information is already in the global buffer. Whenever this table is accessed again subsequently, a read operation on the table will not be necessary (no physical input/output operation will occur).

12.1.2 Functions of pdpgbfon

Organization of this subsection

(1) Overview of functions

(2) Operating method

(1) Overview of functions

pdpgbfon is used to improve the buffer hit rate, even immediately after startup of online jobs. It does this by reading the applicable pages of resources (tables or indexes) into global buffers. Once an applicable page has been placed in a global buffer, page read operations are not needed.

To execute pdpgbfon, there must be more global buffer sectors than the number of pages used to store the target resource (before execution of pdpgbfon, enough global buffer space to store all the data for the target resource must have been allocated).

Because pdpgbfon pre-reads data in the order that the pages are stored, the prefetch facility is enabled. When you define the global buffer, you can reduce execution time by specifying the prefetch count.

If there are not enough global buffer sectors, the LRU management method removes the oldest page information from the global buffer (the page in the global buffer that was accessed least recently according to the pd_dbbuff_lru_option operand value in the system definition). Therefore, executing pdpgbfon serves no purposes when there are not enough global buffer sectors. You can use the pdbufls command to check the number of global buffer sectors and the database condition analysis utility (pddbst) to check the number of pages being used to store the target resource.

To determine whether or not pdpgbfon read all pages of the target resource into the global buffer, you check the pdpgbfon return code or a processing result output to the standard output (reference buffer flush count). Note that the pdpgbfon processing result contains only information about the resource processed by pdpgbfon. To obtain all the global buffer processing results and global buffer status details, use the pdbufls command.

(2) Operating method

Figure 12-2 shows an example of the pdpgbfon operating method.

Figure 12-2 Example of pdpgbfon operating method

Explanation

pdbufls command is executed to display global buffer statistical information. The purpose is to initialize the statistical information (the displayed information is not used).

pdpgbfon is executed as many times as there are resource elements to be read into the global buffer (table data pages or index pages). If the pdpgbfon return code is 0 every time is executes, there is no need to execute step 3.

pdbufls command is executed again to display global buffer statistical information. If the displayed reference buffer flush count (RFFLS) or update buffer flush count¹ (UPFLS) is not 0, some pages have been swept out of the global buffer. In this case, either increase the size of the global buffer or consider reorganization of the table.² Note that the reference GET count (REFGET) is greater than the actual number of data storage pages because it includes the management page re-read count.

1 pdpgbfon does not update data. Because the global buffer may be used by multiple processes, this item must be checked if there are processes other than pdpgbfon that have accessed the global buffer.

2 If the cause is an increase in the number of data items stored in the database, increase the global buffer size. If the cause is an increase in the number of storage pages due to disorganization of the database, execute the free page release utility (pdreclaim) or the database reorganization utility (pdrorg) to obtain the appropriate number of storage pages.

12.1.3 Execution environment

You can execute pdpgbfon only while HiRDB is running.

Execute the pdpgbfon command at the server machine containing the single server or the server machine where the system manager is located.

To execute pdpgbfon, set the LANG environment variable. To use character codes that are not supported by the OS in an environment in which pdpgbfon is executed, you must set the PDLANG environment variable. For details about LANG and PDLANG, see the HiRDB Version 8 UAP Development Guide.

You can execute pdpgbfon on an RDAREA as long as it is in open or command shutdown status. For details about whether or not pdpgbfon can be executed, see Appendix C. RDAREA Status During Command Execution.

When you will be executing pdpgbfon, allocate a sufficient number of global buffer sectors so that all data in the target table's data pages or index pages can be read. If a space shortage occurs in the global buffer, the first page read will be swept out of the global buffer.

12.1.4 Executor

When data is read in units of schemas
You must have the DBA privilege or you must be the owner of the schema.

Other
You must have the DBA privilege or the SELECT privilege for the table.

If you have the DBA privilege, you can also process the audit trail table. When the Directory Server linkage facility is used, the indicated privilege must be assigned to the executor's specified authorization identifier or role.

12.2 Examples

This section presents five examples of pdpgbfon.

Organization of this section

(1) HiRDB/Single Server

(2) HiRDB/Parallel Server

(1) HiRDB/Single Server

Example 1

This example reads data pages of a table (TBL1) into the global buffer. The example assumes that the table and indexes are defined as follows:

Table definition

 CREATE FIX TABLE TBL1(C1 INTEGER,C2 CHAR(10),C3 DEC(15))
     IN ((USER01) C1>0,(USER02))

Index definitions

CREATE INDEX IDX01 ON TBL1(C1) IN ((USER01),(USER02))
CREATE INDEX IDX02 ON TBL1(C3) IN USER03

Overview

pdpgbfon command

pdpgbfon -k table -t TBL1

Explanation

-k table: Specifies that a table's data pages are to be read.

-t TBL1: Specifies the table to be read.

Example 2

This example reads index pages of a table (TBL1) into the global buffer. The example assumes that the table and indexes are defined as follows:

Table definition

 CREATE FIX TABLE TBL1(C1 INTEGER,C2 CHAR(10),C3 DEC(15))
     IN ((USER01) C1>0,(USER02))

Index definitions

CREATE INDEX IDX01 ON TBL1(C1) IN ((USER01),(USER02))
CREATE INDEX IDX02 ON TBL1(C3) IN USER03

Overview

pdpgbfon command

pdpgbfon -k index -t TBL1

Explanation

-k index: Specifies that a table's index pages are to be read.

-t TBL1: Specifies the table whose index pages are to be read.

(2) HiRDB/Parallel Server

Example 3

This example reads data pages of a table (TBL1) into the global buffer. The example assumes that the table and indexes are defined as follows:

Table definition

 CREATE FIX TABLE TBL1(C1 INTEGER,C2 CHAR(10),C3 DEC(15))
     IN ((USER11) C1>0,(USER21))

Index definitions

CREATE INDEX IDX01 ON TBL1(C1) IN ((USER12),(USER22))
CREATE INDEX IDX02 ON TBL1(C3) IN ((USER13),(USER23))

Overview

pdpgbfon command

pdpgbfon -k table -t TBL1

Explanation

-k table: Specifies that a table's data pages are to be read.

-t TBL1: Specifies the table to be read.

Example 4

This example reads index pages of a table (TBL1) into the global buffer in units of indexes. The example assumes that the table and indexes are defined as follows:

Table definition

 CREATE FIX TABLE TBL1(C1 INTEGER,C2 CHAR(10),C3 DEC(15))
     IN ((USER11) C1>0,(USER21))

Index definitions

CREATE INDEX IDX01 ON TBL1(C1) IN ((USER12),(USER22))
CREATE INDEX IDX02 ON TBL1(C3) IN ((USER13),(USER23))

Overview

pdpgbfon command

pdpgbfon -k index -t TBL1 control_file

Explanation

-k index: Specifies that a table's index pages are to be read.

-t TBL1: Specifies the table whose index pages are to be read.

control_file: Specifies the control information file.

Contents of the control information file (control_file)

idxname name=IDX01    [1]

Explanation

Specifies the name of the index that is to be read into the global buffer.

Example 5

This example reads index pages of a table (TBL1) into the global buffer in units of RDAREAs. The example assumes that the table and indexes are defined as follows:

Table definition

 CREATE FIX TABLE TBL1(C1 INTEGER,C2 CHAR(10),C3 DEC(15))
     IN ((USER11) C1>0,(USER21))

Index definitions

CREATE INDEX IDX01 ON TBL1(C1) IN ((USER12),(USER22))
CREATE INDEX IDX02 ON TBL1(C3) IN ((USER13),(USER23))

Overview

pdpgbfon command

pdpgbfon -k index -t TBL1 control_file

Explanation

-k index: Specifies that a table's index pages are to be read.

-t TBL1: Specifies the table whose index pages are to be read.

control_file: Specifies the control information file.

Contents of the control information file (control_file)

idxname name=IDX01 rdarea=USER12    [1]

Explanation

Specifies the names of the index and RDAREA that are to be read into the global buffer.

12.3 Command format

Organization of this section

12.3.1 Format

12.3.2 Options

12.3.3 idxname statement (specification of index information)

12.3.4 option statement (specification of optional information)

12.3.1 Format

This section describes the format of the pdpgbfon command. In the following table, each number corresponds to the number assigned to each option.

No.
Format

1

 pdpgbfon -k target-resource

2

           -t {[authorization-identifier.]table-identifier|[authorization-identifier.]all}

3

           [-r RDAREA-name]

4

           [-u authorization-identifier]

5

           [-X response-monitoring-time-for-server-to-server-communication]

6

           [-q generation-number]

7

           [-s server-name]

8

           [-b]

9

        [control-information-file-name]

Note

If you specify control-information-file-name, be sure to specify it as the last option.

Relationships between options

Table 12-1 shows the relationships between options.

Table 12-1 Relationships between options (pdpgbfon)

Option
-k option
-t option

table
index
table-identifier
all

-k target-resource

M
M

-t {[authorization-identifier.]table-identifier|[authorization-identifier.]all}

M
M

-r RDAREA-name

Y
N
Y
N

-u authorization-identifier

Y
Y
Y
Y

-X response-monitoring-time-for-server-to-server-communication

Y
Y
Y
Y

-q generation-number

Y
Y
Y
Y

-s server-name

Y
Y
Y
Y

-b

Y
N
Y
Y

control-information-file-name

Y
Y
Y
Y

Legend:

M: Specification is mandatory

Y: Can be specified

N: Cannot be specified

: Not applicable

12.3.2 Options

Organization of this subsection

(1) -k target-resource

(2) -t {[authorization-identifier.]table-identifier|[authorization-identifier.]all}

(3) -r RDAREA-name

(4) -u authorization-identifier

(5) -X response-monitoring-time-for-server-to-server-communication

(6) -q generation-number

(7) -s server-name

(8) -b

(9) control-information-file-name

(1) -k target-resource

Specifies the type of resource (data pages or index pages) that is to be read into the global buffer.

table:

Specifies that data pages are to be read.

index:

Specifies that index pages are to be read.

(2) -t {[authorization-identifier.]table-identifier|[authorization-identifier.]all}

<identifier>

Specifies the table name of the target resources.

When you omit the authorization identifier, the user name used to connect to HiRDB is assumed.

When all is specified, the utility reads all tables or indexes that belong to that authorization identifier (schema). In this case, the idxname statement cannot be specified.

You cannot specify a data dictionary table, view table, foreign table, or a table containing a user-defined abstract data-type column.

(3) -r RDAREA-name

<identifier>

Specifies the name of the RDAREA in the table specified in the -t option that is to be read into the global buffer.

This option is applicable to -k table. If you have specified -k index, use the idxname statement to specify this information.

A LOB RDAREA cannot be specified. A batch specification of RDAREA names cannot be used.

Criteria

For a table for a HiRDB/Parallel Server whose rows are partitioned among servers, the system performs parallel processing in units of RDAREAs using multiple server processes even when this option is not specified. On the other hand, in the case of a HiRDB/Single Server or a table for a HiRDB/Parallel Server whose rows are partitioned within a server, the system does not perform parallel processing because each RDAREA is processed by one server process. For the latter, you can use this option to perform parallel processing in units of RDAREAs using multiple server processes.

(4) -u authorization-identifier

Specifies the authorization identifier of the user who executes pdpgbfon.

For details about the authorization identifier, see 8.9.2(10) -u authorization-identifier.

(5) -X response-monitoring-time-for-server-to-server-communication

<unsigned integer> ((1-65535)) <<300>>

If an error, such as a communication error, occurs at the server where the command was executed, the command may stop responding and the application may stop. To detect errors, pdpgbfon enables you to monitor a response time during communication for dictionary manipulation that is performed by the command.

You set in the -X option the response monitoring time during dictionary manipulation (in seconds). If the execution time during dictionary manipulation exceeds the value set in the -X option, pdpgbfon treats it as a dictionary access error and cancels processing with return code 8.

Criteria

If you want to detect an error in less time than 300 seconds in the event of a no-response from the server due to a communication error or unit down, specify a smaller value than 300 in the -X option.

If the system switchover facility is used, the command may keep waiting for a response even though system switchover has been completed. In such a case, you can terminate the command immediately by reducing the monitoring time.

The specified monitoring time may result in a timeout if a response from the dictionary is delayed and if the utility's preprocessing is not completed within 300 seconds, which is the default value of the -X option. This can happen when many applications and utilities are executing concurrently. In such an environment, specify a value greater than 300 in the -X option.

(6) -q generation-number

<unsigned integer> ((0-10))

When the inner replica facility is used, specifies the generation number of the RDAREA to be read.

Specify the generation number as follows:

0: Original RDAREA is to be read.

1 to 10: Specified generation of the replica RDAREA that is to be read.

For details about the rules, see 11.3.2(9) -q generation-number.

(7) -s server-name

<identifier>

Specifies the name of the back-end server that is to control execution of pdpgbfon.

This option is applicable to a HiRDB/Parallel Server only (for a HiRDB/Single Server, the option is ignored, if specified).

Criteria

Normally, there is no need to specify this option because the system automatically selects one of the back-end servers when the option is omitted.

Specify this option when the maximum number of concurrently activated server processes is exceeded because many instances of pdpgbfon are being executed concurrently.

(8) -b

Specifies that data stored in a branched BINARY-type column in a separate segment is to be read when a table data page is read and the table contains a BINARY-type column whose defined length is 256 bytes or greater.

If the table contains a BINARY-type column with a defined length of 256 bytes or greater and this option is omitted, the utility reads BINARY-type columns stored in the same segment as for a non-BINARY-type column, but not a branched BINARY-type column in a separate segment.

(9) control-information-file-name

<path name>

Specifies the name of the control information file that contains the control statements for pdpgbfon.

You can specify the following control statements in the control information file; for details about each control statement, see 12.3.3 and 12.3.4:

idxname statement

option statement

12.3.3 idxname statement (specification of index information)

When index pages are to be read into the global buffer (-k index), the idxname statement specifies information about the target index.

Criteria

When -k index is specified, the utility processes all indexes defined for the table that is specified with the -t option. You specify the idxname statement to read only a particular index, server, or RDAREA.

Rules

Specify the name operand before the server and rdarea operands.

Enclose an identifier in double quotation marks (") if it contains any spaces or lowercase letters. Lowercase letters are treated as uppercase letters, if not enclosed in double quotation marks.

Once you specify an idxname statement with the rdarea operand specified, you cannot specify another idxname statement specifying only the name operand or an idxname statement specifying the server operand.

You cannot specify more than one idxname statement specifying the same index identifier, except when the rdarea operand is specified.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

 idxname name={index-identifier|*}

         [{server=server-name[,server-name]...

             |rdarea=RDAREA-name[,RDAREA-name]...}]

(2) Explanation

(a) name={index-identifier|*}

index-identifier<identifier>

Specifies the identifier of the index that is to be read into the global buffer.

There is no need to specify the authorization identifier, because the utility assumes the authorization identifier of the table specified with the -t option.

An asterisk (*) specifies that all indexes defined for the table are to be read.

The system reads all indexes for the table both when the idxname statement specifying * (without the server operand) is specified and when the idxname statement is omitted. If you specify the idxname statement specifying both * and the server operand, the utility reads only those indexes located at the back-end server specified in the server operand.

When * is specified, there can be only one idxname statement.

(b) server=server-name[,server-name]...

<identifier>

This operand is applicable to a HiRDB/Parallel Server only.

Specifies the name of the server (back-end server name) when only the portion of the index specified in the name operand that is located at the specified server is to be processed. When this operand is omitted, the utility assumes all servers that contain the index.

In the case of a shared index, the utility performs processing at the updatable back-end server and all reference-only back-end servers regardless of this operand's specification.

(c) rdarea=RDAREA-name[,RDAREA-name]...

<identifier>

Used to target specific index RDAREAs, this operand specifies the names of RDAREAs for the index that is specified in the name operand. When this option is omitted, the utility assumes all RDAREAs that store the index.

If * is specified in the name operand, this operand cannot be specified.

12.3.4 option statement (specification of optional information)

The option statement specifies pdpgbfon's execution monitoring time.

Criteria

Specify the option statement to monitor the execution time of pdpgbfon.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

 option exectime=pdpgbfon-monitoring-time

(2) Explanation

(a) exectime=pdpgbfon-monitoring-time

<unsigned integer> ((0-35791394))

Specifies the pdpgbfon execution monitoring time in minutes.

Guideline for the specification value

The purpose of this operand is to detect a no-response error, not to monitor the execution time of a long transaction. Therefore, you should specify a sufficient time for processing the applicable table. For example, to monitor the execution time of a pdpgbfon that should terminate in 7-8 minutes, specify exectime=20, not exectime=10.

Rules

If you omit this operand or specify 0, the system will not monitor the execution time.

This operand takes precedence over the pd_utl_exec_time operand in the system definition. Table 12-2 describes the relationship between the exectime operand and the pd_utl_exec_time operand in the system definition.

Table 12-2 Relationship between the exectime operand and the pd_utl_exec_time operand in the system definition (pdpgbfon)

exectime operand value | pd_utl_exec_time operand value in the system definition
Omitted or 0 | A
Omitted |  | Monitoring with value A
0 |  |
B | Monitoring with value B | Monitoring with value B

Legend:

: Execution time is not monitored.

If pdpgbfon processing does not terminate within the specified time, terminate the utility process forcibly and collect troubleshooting information to determine the cause of the no-response error. Note that this statement monitors the execution time of the single server (or back-end server) that actually issues access requests to the global buffer and the utility process (0mrorg). If an error occurs in the command process (pdpgbfon or pdrorg), the process cannot be terminated forcibly. For details about the error information to be collected, see the pd_utl_exec_time operand in the manual HiRDB Version 8 System Definition.

12.4 pdpgbfon processing results

When pdpgbfon terminates normally, its processing results are displayed at the standard output where the command was executed.

Organization of this section

(1) When data pages are read into the global buffer

(2) When index pages are read into the global buffer

(1) When data pages are read into the global buffer

pdpgbfon VV-RR     *** BUFFER INFORMATION ***     YYYY-MM-DD hh:mm:ss [1]

TABLE NAME : USERA.TBL1 [2]
[3]  [4]              [5]            [6]           [7]
No.  SERVER           RFGET          READ         RFFLS
 1  bes1             1,275           596             0
 2  bes2             1,271           594             0
 3  bes3             1,273           596             0

8365 20:03:54 un01          KFPL00738-I Pdpgbfon terminated, return code=0

Explanation

Header for the processing results
VV-RR: Version and revision numbers
YYYY-MM-DD hh:mm:ss: Date and time execution of pdpgbfon started

Name of the resource that was processed

Serially assigned numbers

Names of the server

Reference GET counts*
Each is the number of times pdpgbfon referenced the global buffer.
This count is higher than the number of corresponding resource pages used because it includes the management (directory) page reference count. If a referenced page has already been read in the global buffer, no real READ occurs.

Real READ counts*
Each is the number of input requests issued to the database by pdpgbfon because the target page was not found in the global buffer.

Reference buffer flush counts*
Each is the number of times an unupdated page was flushed out of the global buffer by the LRU method because a space shortage occurred in the global buffer when pdpgbfon read a page into the global buffer.
If this value is not 0 when pdpgbfon is executed while the global buffer contains no other resource page information (such as immediately after HiRDB startup), the global buffer is not large enough to read all pages.

* The maximum count that can be displayed is 4,294,967,295. If this value is exceeded, an overflow occurs.

(2) When index pages are read into the global buffer

pdpgbfon VV-RR     *** BUFFER INFORMATION ***     YYYY-MM-DD HH:MM:SS [1]

INDEX NAME : USERA.(PRIMARY0000131193)[2]
[3]  [4]              [5]            [6]           [7]
No.  SERVER           RFGET          READ         RFFLS
 1  bes1                75            69             0
 2  bes2                75            69             0
 3  bes3                75            69             0

INDEX NAME : USERA.IDX01
No.  SERVER           RFGET          READ         RFFLS
 1  bes1               525           478             0
 2  bes2               523           476             0
 3  bes3               524           477             0

8373 20:04:04 un01          KFPL00738-I Pdpgbfon terminated, return code=0

Explanation

See the explanation in (1) When data pages are read into the global buffer. Even when an index-dedicated global buffer is allocated, the utility uses the global buffer allocated to the RDAREA (if it is not specified, the global buffer specified in the -o option) to access the management (directory) page of the RDAREA that stores the corresponding index. Therefore, if a space shortage occurs in the global buffer allocated to the RDAREA, the reference buffer flush count is displayed even when there is sufficient space in the index-dedicated global buffer.

12.5 Notes

The maximum number of pdpgbfon commands that can be executed concurrently is the same as for the pdrorg command because pdpgbfon executes pdrorg internally. Specifically, the maximum number of pdpgbfon commands that can be executed concurrently equals the maximum number of pdrorg commands that can be executed concurrently minus the number of pdrorg commands that are currently executing.

pdpgbfon cannot process LOB RDAREAs. This means that pdpgbfon cannot process any LOB RDAREA containing an abstract data type or plug-in index.

To terminate pdpgbfon forcibly, use the pdcancel command. Other commands such as the OS's kill command cannot terminate pdpgbfon.

When a shared table or shared index is read, the updatable back-end server and all reference-only back-end servers are processed by pdpgbfon.

Executing pdpgbfon on an RDAREA that has the SCHEDULE attribute and that is not open serves no purposes (because the RDAREA will be closed after the processing).

For a HiRDB/Parallel Server, if a transmission message from the back-end server to pdreclaim is delayed for 1 second or more due to traffic on the communication line, the corresponding back-end server's processing result may not be displayed at the standard output. In such a case, you can check the KFPL00714-I message that is output to the message log file or syslogfile to determine the processing result.

If the target table contains a user-defined column of an abstract data type, pdpgbfon cannot be executed.

Table 12-3 shows the pdpgbfon return codes.

Table 12-3 Return codes of pdpgbfon

Return code
Description
Action

0
Global buffer read operation was completed.
None

4
Buffer miss occurred (some pages were not read), because there were not enough buffer sectors when data was read into the global buffer.
If necessary, increase the number of global buffer sectors.
If a single global buffer is shared among multiple resources, a page of another resource may be read into the global buffer by another job before or during execution of pdpgbfon. In this case, sweeping a page of the other resource out of the global buffer is also treated as a buffer miss; therefore, whether the buffer miss applies to the target resource's page or another resource's page cannot be determined. If you are using only the return code to determine whether or not all pages were read into the global buffer successfully, do not execute any other job until pdpgbfon has terminated.

8
pdpgbfon terminated abnormally (global buffer read operation was cancelled).
The table and index status is guaranteed and can be accessed from UAPs even after abnormal termination.
To re-execute pdpgbfon, see the displayed error message and eliminate the cause of the error.

12
pdrorg terminated abnormally (pdrorg that runs as an extension of pdpgbfon terminated abnormally).
The table and index status is guaranteed and can be accessed from UAPs even after abnormal termination.
To re-execute pdpgbfon, see the displayed error message, eliminate the cause of the error, then re-execute pdpgbfon.

Do not execute a definition SQL statement on a table or index that is being processed by pdpgbfon. If a definition SQL statement is so executed, pdpgbfon terminates abnormally. If pdpgbfon is executing in units of schemas, it processes all tables and indexes that belong to the corresponding schema.

If you selected utf-8 as the character encoding in the pdsetup command, you can use a file with a BOM as the control statements file for pdpgbfon. Note that even when a file with a BOM is used as the control statements file, the BOM is skipped.

13. Integrity Check Utility (pdconstck)

This chapter explains the integrity check utility (pdconstck) that performs integrity checking and manipulates the check pending status on tables for which referential constraints or check constraints have been defined.

Organization of this chapter

13.1 Overview

13.2 Functions of pdconstck

13.3 Examples

13.4 Command format

13.5 pdconstck processing results

13.6 Notes

13.1 Overview

The integrity check utility (pdconstck) performs integrity checking and manipulates (sets or releases) the check pending status on tables for which referential constraints or check constraints have been defined.

Organization of this section

(1) Prerequisites

(2) Authorization identifier during execution of pdconstck

(1) Prerequisites

(a) Operating conditions

Table 13-1 describes the prerequisites for executing pdconstck.

Table 13-1 Prerequisites for executing pdconstck

Item
Prerequisites

Execution privilege
A user with the DBA privilege or the subject table's owner can execute the utility.

RDAREA status
For details about the relationship between pdconstck and the status of an RDAREA to be processed, see C. RDAREA Status During Command Execution.

Concurrent execution
Only one instance of pdconstck can be executed on the same table at the same time. If multiple instances of pdconstck are executed concurrently, deadlock may occur between the subject table's TABLE resource type (resource type 0002) and DICT resource type (resource type 3005).
Multiple instances of pdconstck can be executed concurrently as long as there is no duplication among the target tables. However, when the check pending status is changed, the utility is placed in lock-release wait status.

Maximum number of utilities that can be executed concurrently
The maximum number of instances of pdconstcks that can be executed concurrently is equal to the value of the pd_max_users operand/2.

Number of resources
Because pdconstck locks the target table and a referenced table that is referenced by a foreign key, you must pay attention to the following values in the system definition:

Number of base tables that can be accessed concurrently
In the pd_max_access_tables operand in the system definition, specify a value that is at least (number of foreign keys for the target table + 1).

Sum of the number of locked tables and the number of RDAREAs for which UNTIL DISCONNECT is specified per server
In the pd_lck_until_disconnect_cnt operand in the system definition, specify a value that is at least the value of X in the following formula:
X = (2 + number of foreign keys for the target table + number of RDAREAs that store the target table + total number of RDAREAs that store the table whose primary key is referenced by the foreign keys)

Lock pool size per server
In the pd_lck_pool_size operand in the system definition, specify a value that is at least Yx.

In a HiRDB/Single Server:
Y = 209 + A + f + (a + c + (d b)) e
In a HiRDB/Parallel Server:
Dictionary server
Y = 209 + A + (a + c + (d b)) e
Front-end server
Y = 2 + f
Back-end server
Y = (d b) e

Legend:

a: Number of table storage RDAREAs

b: Number of index storage RDAREAs

c: Number of LOB column storage RDAREAs

d: Number of indexes

e: Number of generations that have replica RDAREAs

f: Number of plug-ins defined for the target table and the table whose primary key is referenced by foreign keys

x: 6 for 32-bit mode HiRDB, 4 for 64-bit mode HiRDB

A: MAX (number of columns in the table, number of indexes for the table, number of table storage RDAREAs, number of foreign keys for the table, number of check constraints for the table)

Change of check pending status
Executing pdconstck changes the check pending status, regardless of the specification of the pd_check_pending operand in the system definition.

Inner replica facility
If you use the inner replica facility, make sure that all RDAREAs associated with the target table (table storage RDAREAs, LOB column storage RDAREAs, and index storage RDAREAs) have the same number of replica definitions. Also, make sure that all the replica RDAREAs are of the same generation. If the target table is a referencing table, pdconstck can be executed on the RDAREAs that are related to the table referenced by the referencing table even if its replica definition is different from that for the corresponding table.

Target table
If all the replica RDAREAs related to the target table are generations that are in command shutdown and closed status, the table is not subject to processing.
If the target table is partitioned among multiple servers and the local server contains no replica RDAREAs, the local server processes the current RDAREA.

Table (referenced table) that is referenced by the target table (referencing table)
If all generations are subject to processing, and if the generation of the replica RDAREAs related to the referenced table that is referenced by the target table (referencing table) is different from the generation of the replica RDAREA that corresponds to the target table, integrity checking is performed on the current RDAREA.
If an individual generation is subject to processing and the specified generation does not contain a replica RDAREA related to the referenced table that is referenced by the referencing table, integrity checking is performed on the current RDAREA.
If the generation of the current RDAREA is subject to processing, integrity checking is performed on the current RDAREA for the referenced table that is referenced by the referencing table.

(b) Operating environment

Table 13-2 describes the operating environment for pdconstck.

Table 13-2 Operating environment for pdconstck

Item
Operating environment

HiRDB environment
Location of command execution
Execute pdconstck at the server machine that contains the single server, or where the system manager is located.

Server status
When you execute pdconstck, the following server(s) must be running:

In a HiRDB/Single Server: Single server

In a HiRDB/Parallel Server: Dictionary server, front-end server, and back-end server (in the case of multiple front-end servers, at least one of them must be running)

PDDIR environment variable
In the PDDIR environment variable, set the absolute path name of the HiRDB directory.

PDCONFPATH environment variable
In the PDCONFPATH environment variable, set the absolute path name of the directory that stores the HiRDB system definition files.

OS environment
LANG environment variable
In the LANG environment variable, set the value appropriate for the character encoding specified in the pdsetup command. For details about LANG, see the manual HiRDB Version 8 UAP Development Guide.

File and directory specified in the -o option
Access privileges must have been granted to the user who executes pdconstck.
If the -o option was omitted, access privileges must be granted in the same manner; otherwise, the system assumes that files are to be created in the /tmp directory.

(2) Authorization identifier during execution of pdconstck

When you execute pdconstck, you can specify the authorization identifier used to connect to HiRDB as well as the authorization identifiers for the target table and the constraint name. Table 13-3 lists the authorization identifier used to connect to HiRDB and the authorization identifiers for the target table and constraint name.

Table 13-3 Authorization identifier used to connect to HiRDB and authorization identifiers for the target table and constraint name

Specification condition | Connection with HiRDB | Auth identifier for the target table or constraint name
Auth identifier used to connect to HiRDB (-u option) | PDUSER environment variable | Auth identifier for target table or constraint name (-t or -c option) | Auth identifier | Password
Auth identifier | Password
Specified | Specified | Specified | Specified | Authorization identifier specified in the -u option | Entered in response to a message* | Authorization identifier specified in the -t or -c option
Not specified | Authorization identifier specified in the -u option
Omitted | Specified | Authorization identifier specified in the -t or -c option
Not specified | Authorization identifier specified in the -u option
PDUSER environment variable omitted | Specified | Authorization identifier specified in the -t or -c option
Not specified | Authorization identifier specified in the -u option
Not specified | Specified | Specified | Specified | Authorization identifier specified in the PDUSER environment variable | Password specified in the PDUSER environment variable | Authorization identifier specified in the -t or -c option
Not specified | Authorization identifier specified in PDUSER environment variable
Omitted | Specified | Omitted | Authorization identifier specified in the -t or -c option
Not specified | Authorization identifier specified in PDUSER environment variable
PDUSER environment variable omitted | Specified | User name (authorization identifier) in the login window | Entered in response to a message* | Authorization identifier specified in the -t or -c option
Not specified | User name (authorization identifier) in the login window

Legend:

Auth: Authorization

* A message requesting entry of a password is displayed. Enter the appropriate password as the response to this message. If NULL is entered as the response, the system assumes that no password was set.

13.2 Functions of pdconstck

pdconstck has the following two functions:

Integrity check facility

Checks for constraint integrity errors in a table for which referential constraints or check constraints have been defined. This facility also releases or sets the table's check pending status based on whether or not a constraint violation is detected.

Facility for changing check pending status forcibly

Forcibly sets or releases a table's check pending status.

This section provides the details of these facilities.

Organization of this section

13.2.1 Integrity check facility

13.2.2 Facility for changing check pending status forcibly

13.2.1 Integrity check facility

The integrity check facility checks referential constraints or check constraints for integrity errors. If no row violates any constraints, the facility releases the check pending status.

Integrity checking on referential constraints

Based on the referential constraints, the facility checks to see if the foreign key of the target table has the same value as the primary key of the table referenced by the target table. If the checking result indicates that no row violates the constraints, the facility releases the check pending status. If there is a row that violates the constraints, the facility sets the check pending status. Note that the facility does not check rows whose foreign key value is the null value. Integrity checking on referential constraints may take time, depending on the size of the database. To determine the execution time, use the SQL statement presented in (2)(a) How to perform integrity checking on referential constraints.

Integrity checking on check constraints

The facility checks to see if row values are within the ranges of the check constraints in the check constraint definitions. If the checking results indicate that no row violates the constraints, the facility releases the check pending status. If any row violates a constraint, the facility sets the check pending status. Integrity checking on check constraints may take time, depending on the size of the database. To determine the execution time, use the SQL statement presented in (3)(a) How to perform integrity checking on check constraints.

Organization of this subsection

(1) Execution unit of the integrity check facility

(2) Integrity checking on referential constraints

(3) Integrity checking on check constraints

(4) Changing the check pending status based on the results of integrity checking

(5) Order of integrity checking and whether or not integrity checking is executed

(1) Execution unit of the integrity check facility

You can execute the integrity check facility in units of a table or a constraint, as explained below.

By table
All referential constraints and check constraints defined for the table are subject to processing.

By constraint
Only one constraint is subject to processing.

When the inner replica facility is used to perform processing by table, the integrity check facility can be executed in the following units:

By all generations
The original RDAREA and all generations of its replica RDAREAs are subject to processing.

By generation
Only one generation is subject to processing.

By the current RDAREA's generation
The current RDAREA's generation is subject to processing.

(a) By table

The facility checks all of the referential and check constraints defined for the table that have been placed in check pending status. You specify the -t option to perform integrity checking on a table.

Integrity checking by table is applied in the following cases:

When a single execution of pdconstck is used both to check for violations in the referential and check constraints defined for the table that have been placed in check pending status, and to release their check pending status.

When an RDAREA is to be re-initialized by pdmod to release tables and constraints from the RDAREA's check pending status, such as when the data dictionary table cannot be released from check pending status (for details, see 7.5.4 Table and index status after reinitialization).

By all generations

For every referential constraint and check constraint that has been defined for the table and that has resulted in check pending status, integrity checking is performed on the original RDAREA and on each of its replica RDAREA generations that stores the table. The criteria are the same as for checking by table. You specify -q all to perform integrity checking on all generations.

By generation

For every referential constraint and check constraint that has been defined for the table and that has resulted in check pending status, integrity checking is performed only on the generation specified in the -q option. You specify the desired generation number in the -q option to perform integrity checking by generation.

Integrity checking by generation is applied when only the specific generation resulting in the check pending status is to be checked for violations, and when only its check pending status is to be released.

By the current RDAREA's generation

For every referential constraint and check constraint that has been defined for the table and that has resulted in check pending status, integrity checking is performed on the current RDAREA's generation. You omit the -q option to perform integrity checking by generation of the current RDAREA.

If a utility such as pdload is executed on the current RDAREA's generation and if the table results in check pending status, integrity checking by the current RDAREA's generation is applied in order to check only the current RDAREA's generation for violations, and then to release the check pending status.

(b) By constraint

In this case the facility checks only one constraint at a time for integrity errors, regardless of the check pending status. You specify the -c option to perform integrity checking by constraint. When the inner replica facility is used, integrity checking is performed on the original RDAREA that stores the table for which the constraint has been specified, as well as on all generations of its replica RDAREAs.

Integrity checking by constraint is applied in the following case:

When an individual constraint is to be checked for a violation.

(2) Integrity checking on referential constraints

(a) How to perform integrity checking on referential constraints

To perform integrity checking for referential constraints, you use the SQL statement shown below for each constraint to be checked. When the inner replica facility is used, integrity checking is performed on the applicable constraint in a generation.

SQL statement for integrity checking on a referential constraint

SELECT  DISTINCT "foreign-key-component-column-1", "foreign-key-component-column-2", ..., "foreign-key-component-column-n"
FROM "referencing-table's-owner-name"."referencing-table's-table-identifier" RIC_REF_TBL
WHERE ("foreign-key-component-column-1" IS NOT NULL AND
      "foreign-key-component-column-2" IS NOT NULL AND ... "foreign-key-component-column-n" IS NOT NULL)
AND NOT EXISTS (SELECT * FROM "referenced-table's-owner-name"."referenced-table's-table-identifier" RIC_RFD_TBL
WHERE (RIC_RFD_TBL."primary-key-component-column-1", RIC_RFD_TBL."primary-key-component-column-2",
       ..., RIC_RFD_TBL."primary-key-component-column-n") =
     (RIC_REF_TBL."foreign-key-component-column-1", RIC_REF_TBL."foreign-key-component-column-2",
       ..., RIC_REF_TBL."foreign-key-component-column-n"))
ORDER BY  "foreign-key-component-column-1" ASC|DESC, "foreign-key-component-column-2" ASC|DESC,
         ..., "foreign-key-component-column-n" ASC|DESC
WITHOUT LOCK NOWAIT

Note:

Because this SQL statement must create a work table, a work table file for storing the work table is required in the single server or back-end server. For details about how to estimate the size of a work table file, see the manual HiRDB Version 8 Installation and Design Guide.

(b) Checking whether or not integrity has been maintained

Table 13-4 shows the relationship between the execution result (SQLCODE) of the SQL shown in (a) and whether or not integrity has been maintained.

Table 13-4 Relationship between SQL's execution result and whether or not integrity has been maintained (referential constraint)

SQLCODE (number of selection rows) | Whether or not integrity has been maintained
100 (0) | Yes
0 (1 or greater) | No
Other | Execution error

(c) Output of key values resulting in constraint violations

After execution of the SQL statement described in (a), the key values resulting in constraint violations are output to the process results file. The key values resulting in constraint violations are output after duplicates have been eliminated.

(d) Cancellation of integrity checking because of the maximum number of key value violations that can be output

If the number of row data items resulting in constraint violations exceeds the maximum output count for violation key values, the facility terminates integrity checking on that constraint (generation). You use the -w option to change the maximum number of violation key values that can be output.

(3) Integrity checking on check constraints

(a) How to perform integrity checking on check constraints

To perform integrity checking for check constraints, you use the SQL statement shown below for each constraint to be checked. When the inner replica facility is used, integrity checking is performed on the applicable constraint in a generation.

SQL statement executed for integrity checking on a check constraint

SELECT DISTINCT* "check-constraint-target-column-1", "check-constraint-target-column-2", ..., "check-constraint-target-column-n"
FROM "name-of-owner-of-table-for-which-check-constraint-was-defined"."table-identifier-of-table-for-which-check-constraint-was-defined"
WHERE NOT(check-constraint-search-condition) WITHOUT LOCK NOWAIT

Note:

Because this SQL statement must create a work table, a work table file for storing the work table is required in the single server or back-end server. For details about how to estimate the size of a work table file, see the manual HiRDB Version 8 Installation and Design Guide.

* DISTINCT must be omitted when the column definition specified in the search condition is the BLOB or BINARY type. In this case, no work table is created.

(b) Checking whether or not integrity has been maintained

Table 13-5 shows the relationship between the execution result (SQLCODE) of the SQL shown in (a) and whether or not integrity has been maintained.

Table 13-5 Relationship between SQL's execution result and whether or not integrity has been maintained (check constraint)

SQLCODE (number of selection rows) | Whether or not integrity has been maintained
100 (0) | Yes
0 (1 or more) | No
Other | Execution error

(c) Output of key values resulting in constraint violation

After execution of the SQL statement described in (a), the key values resulting in constraint violations are output to the process results file. If the data types of the columns specified in the search conditions do not include BLOB or BINARY, the key values resulting in constraint violations are output after duplicates have been eliminated. If the columns include any that are of the BLOB or BINARY type, duplicates of key values resulting in constraint violations are not eliminated.

(d) Cancellation of integrity checking because of the maximum number of key value violations that can be output

If the number of row data items resulting in constraint violations exceeds the maximum output count for violation key values, the facility terminates integrity checking on that constraint (generation). You use the -w option to change the maximum number of violation key values that can be output.

(4) Changing the check pending status based on the results of integrity checking

pdconstck sets a table, constraint, or RDAREA in check pending status or non-check pending status on the basis of the results of integrity checking for each constraint (and when the inner replica facility is used, for each generation for each constraint). The change in the check pending status for an RDAREA depends on the unit of execution of pdconstck.

This subsection describes the change in check pending status for a constraint, table, and RDAREA. A change in check pending status for a table, constraint, or RDAREA occurs separately for check constraints and referential constraints.

Change in the check pending status for a constraint

The check pending status for constraints changes for each constraint (each generation) based on the results of integrity checking. Table 13-6 shows the change in the check pending status for a constraint.

Table 13-6 Change in the check pending status for a constraint

Inner replica facility | Result of integrity checking on a constraint* | Constraint check pending status (setting)
Not used | Integrity is maintained | Non-check pending status (NULL value)
Integrity is not maintained | Check pending status ('C')
Used | Integrity is maintained in all generations | Non-check pending status (NULL value)
Integrity is maintained in some of the generations | Check pending status ('C')

* The facility assumes that integrity is maintained for a constraint (generation) whose integrity was not checked.

Change in the check pending status for a table

The check pending status for a table changes based on each constraint's check pending status. Table 13-7 shows the change in the check pending status for a table.

Table 13-7 Change in the check pending status for a table

Constraint check pending status | Table check pending status (setting)
All constraints are in non-check pending status | Non-check pending status (NULL value)
At least one constraint is in check pending status (even if the others are in non-check pending status) | Check pending status ('C')

Change in the check pending status for an RDAREA

The check pending status for an RDAREA changes for each constraint (each generation) based on the results of integrity checking. Table 13-8 shows the change in the check pending status for an RDAREA.

Table 13-8 Change in the check pending status for an RDAREA

Result of integrity checking | RDAREA check pending status (setting)
Integrity is maintained for all constraints | Non-check pending status (NULL value)
Integrity is not maintained for at least one constraint (even if it is maintained for the others) | Check pending status ('C')

(a) Changes in the check pending status when integrity checking is performed by table

When integrity checking is performed by table, the check pending status of the table, constraints, or RDAREAs changes based on the results of integrity checking for each constraint.

Figure 13-1 shows an example of executing integrity checking by table on a table for which referential constraints have been defined. Table 13-9 shows the changes in the check pending status in this example.

Figure 13-1 Example of integrity checking by table

Legend:

T1, T2: Tables in which the primary key has been defined

T3: Table in which the foreign keys (REF1 and REF2) have been defined

CHK1, CHK2: Referential constraints

USR1 to USR4: User RDAREAs storing the table

REF1, REF2: Foreign keys that reference another table

Table 13-9 Changes in the check pending status by table (example)

Result of integrity checking | Check pending status
Integrity of REF1 | Integrity of REF2 | Table check pending status | Constraint check pending status | Table storage RDAREA check pending status
REF1 | REF2 | USR1 | USR2
Maintained | Maintained | N | N | N | N | N
Lost | P | N | P | P | P
Lost | Maintained | P | P | N | P | P
Lost | P | P | P | P | P

Legend:

P: Check pending status

N: Non-check pending status

(b) Changes in the check pending status when integrity checking is performed on all generations

If integrity checking is performed on all generations when the inner replica facility has been used, the check pending status of the table, constraints, or RDAREAs changes based on the results of integrity checking for each constraint (or each generation).

Figure 13-2 shows an example of performing integrity checking on all generations when the inner replica facility has been used to create one generation of replica RDAREAs containing a table for which check constraints have been defined. Table 13-10 shows the changes in the check pending status in this example.

Figure 13-2 Example of integrity checking by all generations

Legend:

U1, U2: Original RDAREAs

U1G1, U2G1: Replica RDAREAs

CHK1, CHK2: Check constraints for table T1

Table 13-10 Changes in the check pending status by all generations (example)

Result of integrity checking | Check pending status
Integrity of CHK1 | Integrity of CHK2 | Table check pend status | Constraint check pending status | RDAREA check pending status
GEN 0 | GEN 1 | GEN 0 | GEN 1 | CHK1 | CHK2 | U1 | U2 | U1G1 | U2G1
Mntd | Mntd | Mntd | Mntd | N | N | N | N | N | N | N
Mntd | Mntd | Mntd | Lost | P | N | P | N | N | P | P
Mntd | Mntd | Lost | Mntd | P | N | P | P | P | N | N
Mntd | Mntd | Lost | Lost | P | N | P | P | P | P | P
Mntd | Lost | Mntd | Mntd | P | P | N | N | N | P | P
Mntd | Lost | Mntd | Lost | P | P | P | N | N | P | P
Mntd | Lost | Lost | Mntd | P | P | P | P | P | P | P
Mntd | Lost | Lost | Lost | P | P | P | P | P | P | P
Lost | Mntd | Mntd | Mntd | P | P | N | P | P | N | N
Lost | Mntd | Mntd | Lost | P | P | P | P | P | P | P
Lost | Mntd | Lost | Mntd | P | P | P | P | P | N | N
Lost | Mntd | Lost | Lost | P | P | P | P | P | P | P
Lost | Lost | Mntd | Mntd | P | P | N | P | P | P | P
Lost | Lost | Mntd | Lost | P | P | P | P | P | P | P
Lost | Lost | Lost | Mntd | P | P | P | P | P | P | P
Lost | Lost | Lost | Lost | P | P | P | P | P | P | P

Legend:

GEN: Generation

Table check pend status: Table check pending status

Mntd: Maintained

P: Check pending status

N: Non-check pending status

(c) Changes in the check pending status when integrity checking is performed by generation

When the inner replica facility is used and integrity checking is performed by generation, the check pending status of the table, constraints, or RDAREAs changes based on the results of integrity checking on the specified generation for each constraint.

Table 13-11 shows the changes in the check pending status of a constraint and RDAREA based on the results of integrity checking by generation.

Table 13-11 Changes in the check pending status of a constraint and RDAREA based on the results of integrity checking by generation

Execution result | Constraint check pending status | RDAREA check pending status
Result of checking on the corresponding generation | Check pending status in other generations of the RDAREA
Integrity is maintained in all constraints | All non-check pending status | All constraints are placed in non-check pending status. | The corresponding generation is placed in non-check pending status.
Other | No change | The corresponding generation is placed in non-check pending status.
Other | Constraint whose integrity is maintained |  | No change | The corresponding generation is placed in check pending status.
Constraint whose integrity is lost |  | Placed in check pending status. | The corresponding generation is placed in check pending status.

Legend:

: Not applicable

Table 13-12 shows the changes in the check pending status when integrity checking is performed by generation on Generation 1 based on the example shown in Figure 13-2.

Table 13-12 Changes in the check pending status by generation (example)

Result of integrity checking | RDAREA check pending status | Check pending status
Table check pending status | Constraint check pending status | RDAREA check pending status
Integrity of CHK1 | Integrity of CHK2 | GEN 0 | CHK1 | CHK2 | U1G1 | U2G1 | U1 | U2
Mntd | Mntd | Non-check pending status | N | N | N | N | N | (N) | (N)
Mntd | Mntd | Check pending status | (P) | (P) | (P) | N | N | (P) | (P)
Mntd | Lost | Non-check pending status | P | (P) | P | P | P | (N) | (N)
Mntd | Lost | Check pending status | P | (P) | P | P | P | (P) | (P)
Lost | Mntd | Non-check pending status | P | P | (P) | P | P | (N) | (N)
Lost | Mntd | Check pending status | P | P | (P) | P | P | (P) | (P)
Lost | Lost | Non-check pending status | P | P | P | P | P | (N) | (N)
Lost | Lost | Check pending status | P | P | P | P | P | (P) | (P)

Legend:

GEN: Generation

Mntd: Maintained

P: Check pending status

N: Non-check pending status

(P): No change (remains in check pending status)

(N): No change (remains in non-check pending status)

(d) Changes in the check pending status when integrity checking is performed by the current RDAREA's generation

When the inner replica facility is used and integrity checking is performed by the current RDAREA's generation, the check pending status of the table, constraints, or the specified generation of RDAREA changes based on the results of integrity checking on the specified generation for each constraint.

The changes in the check pending status when integrity checking is performed by the current RDAREA's generation are the same as in (c) Changes in the check pending status when integrity checking is performed by generation.

(e) Changes in the check pending status when integrity checking is performed by constraint

When integrity checking is performed by constraint, the check pending status of the table, the specified constraint, or the RDAREA changes based on the results of integrity checking on the specified constraint. The following describes the changes in the check pending status.

Changes in the check pending status (when the inner replica facility is not used)

When the inner replica facility is not used, the constraint's check pending status changes based on the results of integrity checking on the specified constraint.

Table 13-13 shows the changes in the check pending status when integrity checking is performed by constraint on constraint CHK1 based on the example shown in Figure 13-1.

Table 13-13 Changes in the check pending status by constraint (example)

Result of integrity checking | Constraint check pending status | Check pending status
Integrity of CHK1 | CHK2 | Table check pending status | Constraint check pending status | RDAREA check pending status
CHK1 | CHK2 | U1 | U2
Maintained | Non-check pending status | N | N |  | N | N
Maintained | Check pending status | P | N |  | P | P
Lost | Non-check pending status | P | P |  | P | P
Lost | Check pending status | P | P |  | P | P

Legend:

P: Check pending status

N: Non-check pending status

: The status remains unchanged.

Changes in the check pending status (when the inner replica facility is used)

When the inner replica facility is used, the check pending status of a constraint, each generation of the RDAREA, and the table change based on the results of integrity checking performed on the specified constraint in each generation.

Table 13-14 shows the changes in the check pending status when integrity checking is performed by constraint on constraint CHK1 based on the example shown in Figure 13-2.

Table 13-14 Change in the check pending status by generation (example)

Result of integrity checking | Other check pending status | Check pending status
Table check pending status | Constraint check pending status | RDAREA check pending status
Integrity of CHK1 generation 0 | Integrity of CHK1 generation 1 | CHK2 | CHK1 | CHK2 | U1 | U2 | U1G1 | U2G1
Maintained | Maintained | Non-check pending status | N | N |  | N | N | N | N
Maintained | Maintained | Check pending status | P | N |  | P | P | P | P
Maintained | Lost | Non-check pending status | P | P |  | P | P | P | P
Maintained | Lost | Check pending status | P | P |  | P | P | P | P
Lost | Maintained | Non-check pending status | P | P |  | P | P | P | P
Lost | Maintained | Check pending status | P | P |  | P | P | P | P
Lost | Lost | Non-check pending status | P | P |  | P | P | P | P
Lost | Lost | Check pending status | P | P |  | P | P | P | P

Legend:

P: Check pending status

N: Non-check pending status

: The status remains unchanged.

(5) Order of integrity checking and whether or not integrity checking is executed

(a) By table

Order of integrity checking

When integrity checking is performed by table, the order in which it is performed is as follows:

Order between referential and check constraints

If referential constraints and check constraints are both defined for the table specified in the -t option, the referential constraints (foreign keys) are checked first, and then the check constraints are checked.

Order within the same type of constraints

If multiple constraints of the same type are defined for the table specified in the -t option, integrity is checked in the alphanumeric order of the constraint names.

Table 13-15 shows an example of the order in which integrity checking is performed by table.

Table 13-15 Example of order in which integrity checking is performed by table

Constraint for table | Order of integrity checking
Referential constraint (foreign key) | Check constraint | Referential constraint (foreign key) | Check constraint
F1 | F2 | C1 | C2
Maintained | Maintained | 1. | 2. | 3. | 4.
Lost | 1. | 2. |  |
Lost | Maintained |  |  | 1. | 2.
Lost |  |  |  |

Legend:

F1, F2: Constraint names for referential constraints (foreign key)

C1, C2: Constraint names for check constraints

1. to 4.: Order in which constraint checking is performed

: Not applicable

Order of integrity checking by generation and whether or not integrity checking is executed by generation when the inner replica facility is used

Integrity checking by table (by all generations) is performed on the original RDAREAs (generation number 0) and then on their replicas for each constraint in ascending order of the generation numbers (starting at 1).

Whether or not integrity checking is executed

Integrity checking by table is performed only on constraints resulting in check pending status. When the inner replica facility is used, integrity checking is performed only on the generations of a constraint that have resulted in check pending status. Table 13-16 shows the conditions for performing integrity checking and whether or not integrity checking is executed.

Table 13-16 Conditions for performing integrity checking and whether or not integrity checking is executed

Check pending status | Whether or not integrity checking is executed | Remarks
Table check pending status | Constraint check pending status | Table storage RDAREA check pending status¹
Check pending status ('C') | Check pending status ('C') | Check pending status | Yes | pdconstck determines that the status is normal (check pending status).
Non-check pending status | Yes | pdconstck checks integrity because the data dictionary table is in check pending status although the RDAREA is in non-check pending status.
Non-check pending status (NULL value)² | Check pending status | No | pdconstck determines that the status is normal (other constraints are in check pending status).
Non-check pending status | Yes | pdconstck checks integrity because the data dictionary table is in check pending status although the RDAREA is in non-check pending status.
Non-check pending status (NULL value) | Check pending status ('C') | Check pending status | No | pdconstck terminates with an error because the data dictionary table is invalid.
Non-check pending status | No
Non-check pending status (NULL value)² | Check pending status | Yes | pdconstck checks integrity because the RDAREA is in check pending status.
Non-check pending status | No | pdconstck determines that the status is normal (non-check pending status).

1

A partitioned table is placed in check pending status or non-check pending status depending on the table information in each RDAREA that stores the table. Table 13-17 shows the check pending status based on the table information in each table storage RDAREA.

When the inner replica facility is used, the status (check pending status or non-check pending status) depends on the generation. Table 13-18 shows the check pending status based on the table information in each table storage RDAREA in the generation.

2

If consistency is lost between the table's check pending status and the constraint's check pending status, pdconstck terminates with an error. Table 13-19 shows the pdconstck processing when the data dictionary table is in check pending status.

Table 13-17 Check pending status based on the table information in each table storage RDAREA

Condition | Table information in table storage RDAREA
All storage RDAREAs are in check pending status | Check pending status
Some storage RDAREAs are in check pending status and some are in non-check pending status | Check pending status
All storage RDAREAs are in non-check pending status | Non-check pending status

Table 13-18 Check pending status based on the table information in each table storage RDAREA in the generation

Condition | Table information in table storage RDAREA
All storage RDAREAs subject to processing in the generation are in check pending status | Check pending status
Storage RDAREA subject to processing in the generation is in non-check pending status | Check pending status
All storage RDAREAs subject to processing in the generation are in non-check pending status | Non-check pending status

Table 13-19 pdconstck processing when the data dictionary table is in check pending status

Check pending status | pdconstck processing
Table check pending status | Constraint check pending status
Check pending status | Some constraints were placed in check pending status | Resumes processing
All constraints are in non-check pending status | Terminates with an error
Non-check pending status | Some constraints were placed in check pending status | Terminates with an error
All constraints are in non-check pending status | Resumes processing

(b) By constraint

Order of integrity checking

When integrity checking is performed by constraint, there is no specific order in which integrity checking is performed, because only constraints are checked. However, if the inner replica facility is used, integrity is checked in the following order:

Checking order by generation when the inner replica facility is used

Integrity checking by constraint is performed on the original RDAREAs (generation number 0) and then on their replicas in ascending order of the generation numbers (starting at 1).

Whether or not integrity checking is executed

Integrity checking by constraint is performed in the above order, regardless of the table's check pending status.

13.2.2 Facility for changing check pending status forcibly

Organization of this subsection

(1) Overview of function

(2) Execution unit of the facility for changing check pending status forcibly

(3) Forced setting of check pending status

(4) Forced release of check pending status

(1) Overview of function

The facility for changing check pending status forcibly changes the check pending status; this facility does not check the integrity of referential constraints or check constraints. This facility provides two functions, forced setting of check pending status and forced release of check pending status.

Forced setting of check pending status

This function forces a table into check pending status. You specify -k set to use this function.

Forced setting of check pending status is used in the following cases:

The pd_check_pending operand value in the system definition was changed from NOUSE to USE and the integrity of referential constraints or check constraints is not clear.

In a system in which the pd_check_pending operand was omitted in the system definition, HiRDB was upgraded to version 07-03 or later and the integrity of referential constraints or check constraints is not clear.

Table manipulation by the user must be regulated temporarily.

Because a constraint violation was detected during integrity checking, the check pending status was released forcibly, the data resulting in the constraint violation during SQL execution was corrected, and now integrity checking is to be performed again.

Forced release of check pending status

This function forces a table into the non-check pending status (releases the check pending status). You specify -k release to use this function.

Forced release of check pending status is used in the following cases:

The check pending status needs to be forcibly released in order to resume operations, such as when there is no need to perform integrity checking because the user has confirmed the integrity of the constraints.

A row resulting in a violation of a referential constraint is to be corrected by using SQL statements to update or delete a referencing table's foreign key.

A row resulting in a violation of a check constraint is to be corrected using SQL statements.

(2) Execution unit of the facility for changing check pending status forcibly

The facility for changing check pending status forcibly can be executed by table to update all referential constraints and check constraints defined for a table, or by constraint to update only an individual constraint. When the inner replica facility is used to perform processing by table, you can execute the facility for changing check pending status forcibly by all generations to process the original RDAREAs and all generations of their replica RDAREAs, by generation to process only a single generation, or by the current RDAREA's generation to process the generation of the current RDAREA. When the facility is executed by constraint, it is executed by all generations.

When the facility for changing check pending status forcibly is executed, information about the check pending status in data dictionary tables changes. Tables 13-20 and 13-21 show the locations in data dictionary tables where the check pending status changes.

Table 13-20 Locations in data dictionary tables where check pending status changes (when the inner replica facility is not used)

Exe unit | -c option spec | Table constraint | Locations in data dictionary table where check pending status changes
Ref const | Check const | SQL_TABLES table | SQL_REFERENTIAL_CONSTRAINS table | SQL_CHEKS table
CHECK_PEND column | CHECK_PEND2 column | CHECK_PEND column | CHECK_PEND2 column
By table | Not applicable | No | Yes |  | Y |  | Y¹
Yes | No | Y |  | Y¹ |
Yes | Yes | Y | Y | Y¹ | Y¹
By constraint | Ref const | Yes | No | Y |  | Y² |
Yes | Yes | Y |  | Y² |
Check constraint | No | Yes |  | Y |  | Y²
Yes | Yes |  | Y |  | Y²

Legend:

Exe unit: Execution unit

-c option spec: -c option specification

Ref const: Referential constraint

Check const: Check constraint

Y: Check pending status changes.

: Check pending status remains unchanged (the current status is maintained).

¹

The check pending status of all referential constraints or check constraints defined for the table is changed.

²

The check pending status of only the constraint specified in the -c option is changed.

Table 13-21 Locations in data dictionary tables where check pending status changes (when the inner replica facility is used)

Execution unit | -c option spec | Table constraint | Locations in data dictionary table where check pending status changes
Ref const | Check const | SQL_TABLES table | SQL_REFERENTIAL_CONSTRAINS table | SQL_CHEKS table
CHECK_PEND column | CHECK_PEND2 column | CHECK_PEND column | CHECK_PEND2 column
By all generations, by generation, or by current RDAREA generation | Not applicable | No | Yes |  | Y |  | Y¹
Yes | No | Y |  | Y¹ |
Yes | Yes | Y | Y | Y¹ | Y¹
By constraint | Ref const | Yes | No | Y |  | Y² |
Yes | Yes | Y |  | Y² |
Check const | No | Yes |  | Y |  | Y²
Yes | Yes |  | Y |  | Y²

Legend:

-c option spec: -c option specification

Ref const: Referential constraint

Check const: Check constraint

Y: Check pending status changes.

: Check pending status remains unchanged (the current status is maintained).

¹

The check pending status of all referential constraints or check constraints defined for the table is changed.

²

The check pending status of only the constraint specified in the -c option is changed.

Tables 13-22 and 13-23 show the locations of table information in an RDAREA where check pending status changes.

Table 13-22 Locations of table information in an RDAREA where check pending status changes (when the inner replica facility is not used)

Execution unit | -c option spec | Table constraint | Locations of table information in an RDAREA where check pending status changes
Referential constraint | Check constraint | Referential constraint status | Check constraint status
By table | Not applicable | No | Yes |  | Y
Yes | No | Y |
Yes | Yes | Y | Y
By constraint | Referential constraint | Yes | No | Y |
Yes | Yes | Y |
Check constraint | No | Yes |  | Y
Yes | Yes |  | Y

Legend:

-c option spec: -c option specification

Y: Check pending status changes. If there is no target replica RDAREA, Y becomes .

: Check pending status remains unchanged (the current status is maintained).

Table 13-23 Locations of table information in an RDAREA where check pending status changes (when the inner replica facility is used)

Execution unit | Const with -c option spec | Table constraint | Locations of table information in RDAREA where check pending status changes²
Ref const | Check constr | Generation 0 (original RDAREA) | Generation 1 (replica RDAREA) | Generation n (replica RDAREA)
Ref const status | Check const status | Ref const status | Check const status | Ref const status | Check const status
By all generations | N/A | No | Yes |  | Y |  | Y |  | Y
Yes | No | Y |  | Y |  | Y |
Yes | Yes | Y | Y | Y | Y | Y | Y
By generation¹ | N/A | No | Yes |  |  |  | Y |  |
Yes | No |  |  | Y |  |  |
Yes | Yes |  |  | Y | Y |  |
By current RDAREA generation | N/A | No | Yes |  |  |  |  |  | Y
Yes | No |  |  |  |  | Y |
Yes | Yes |  |  |  |  | Y | Y
By constraint | Ref const | Yes | No | Y |  | Y |  | Y |
Yes | Yes | Y |  | Y |  | Y |
Check const | No | Yes |  | Y |  | Y |  | Y
Yes | Yes |  | Y |  | Y |  | Y

Legend:

Const with -c option spec: Constraint with -c option specified

N/A: Not applicable

Ref const: Referential constraint

Check const: Check constraint

Y: Check pending status changes. If there is no target replica RDAREA, Y becomes .

: Check pending status remains unchanged (the current status is maintained).

¹ -q 1 is displays (generation 1).

² This applies to all RDAREAs that store the table (original and replica RDAREAs).

(a) By table

When the facility is executed by table, it changes all the defined referential constraints or check constraints. You specify the -t option to execute the facility by table.

You use execution by table in the following case:

pdconstck is to be executed only once to change the check pending status of all referential constraints and check constraints defined for the table.

When the inner replica facility is used, pdconstck can be executed by table as well as in the following units:

By all generations

Among all referential constraints and check constraints defined for the table, pdconstck changes the check pending status for all generations of the original and replica RDAREAs that store the table. The criteria are the same as for execution by table. You specify -q all to execute pdconstck by all generations.

By generation

Among all referential constraints and check constraints defined for the table, pdconstck changes the check pending status of the generation specified in the -q option for each constraint. You specify the target generation number in the -q option to execute pdconstck by generation.

You use execution by generation when you are changing the check pending status of a specific generation.

By the current RDAREA's generation

Among all referential constraints and check constraints defined for the table, pdconstck changes the check pending status of the current RDAREA's generations for each constraint. You omit the -q option to execute pdconstck by the current RDAREA's generation.

You use execution by the current RDAREA's generation in order to release the check pending status of only the current RDAREA's generation, such as when the table was placed in check pending status as a result of executing a utility such as pdload on the current RDAREA's generation.

(b) By constraint

The facility changes only one referential constraint or check constraint defined for the table. You specify the -c option to execute the facility by constraint. When the inner replica facility is used, pdconstck changes all generations of the original and replica RDAREAs that store the table.

You use execution by constraint in order to change the check pending status for an individual constraint.

(3) Forced setting of check pending status

This function places a table, constraints, and RDAREAs in check pending status.

(4) Forced release of check pending status

This function releases a table, constraints, and RDAREAs from check pending status. The setting (whether or not the check pending status can be released) depends on the execution unit of pdconstck and the check pending status of the table, constraints, and RDAREAs. The following provides the details for each execution unit.

(a) When the inner replica facility is not used

Forced release of check pending status by table

When pdconstck is executed by table, it unconditionally places the target table, constraints, and RDAREAs in non-check pending status.

Forced release of check pending status by constraint

When pdconstck is executed by constraint, it places the constraint specified in the -c option in non-check pending status. Depending on the check pending status of other constraints, the check pending status of the table or RDAREAs may not change. Table 13-24 shows the changes in the check pending status.

Table 13-24 Changes in the check pending status by constraint (forced release of check pending status)

Condition | Check pending status (table and RDAREA)
A constraint that is not specified in the -c option is defined | There is a constraint in check pending status | No change
All constraints are in non-check pending status | Non-check pending status
Only the constraint specified in the -c option is defined for the table | Non-check pending status

(b) When the inner replica facility is used

Forced release of check pending status by all generations

When pdconstck is executed by all generations, it unconditionally places the target table, constraints, and RDAREAs in non-check pending status.

Forced release of check pending status by generation or the current RDAREA's generation

When pdconstck is executed by generation or by the current RDAREA's generation, it places the generation of the RDAREA specified in the -q option in non-check pending status. Depending on the check pending status of other generations of the RDAREAs, pdconstck places the table and constraints in non-check pending status. Table 13-25 shows the changes in check pending status for the table and constraints.

Table 13-25 Changes in check pending status by generation or by the current RDAREA's generation (forced release of check pending status)

Condition | Change of check pending status
Check pending status of RDAREA whose generation is not specified in the -q option | Table check pending status | Constraint check pending status
There is a generation in check pending status | No change | No change
All generations are in non-check pending status | Non-check pending status | Non-check pending status

Forced release of check pending status by constraint

When pdconstck is executed by constraint (by all generations), the processing is the same as when the inner replica facility is not used.

13.3 Examples

This section presents four examples of pdconstck.

Organization of this section

(1) Integrity checking by table

(2) Integrity checking by constraint

(3) Forced setting of check pending status by table

(4) Forced release of check pending status by constraint

(1) Integrity checking by table

This example performs integrity checking on all constraints (CST1 and CST2) that have been defined for table T2. The example assumes that table T2 is in check pending status.

Table definitions

T1:  CREATE TABLE T1(C1 INT PRIMARY KEY)
T3:  CREATE TABLE T3(C2 INT PRIMARY KEY)
T2:  CREATE TABLE T2(C1 INT, C2 INT,
                   CONSTRAINT CST1 FOREIGN KEY (C1) REFERENCES T1,
                   CONSTRAINT CST2 FOREIGN KEY (C2) REFERENCES T3)

Overview

Command

 pdconstck -k check -t T2

Explanation

-k check: Executes the integrity check facility.

-t T2: Specifies the name of the table that is to be the target of integrity checking.

(2) Integrity checking by constraint

This example performs integrity checking on constraint CST2 defined for table T2. The table definitions are the same as in (1), and the example assumes that table T2 is in check pending status.

Overview

Command

 pdconstck -k check -c CST2

Explanation

-k check: Executes the integrity check facility.

-c CST2: Specifies the name of the constraint that is to be the target of integrity checking.

(3) Forced setting of check pending status by table

This example performs integrity checking on all constraints (CST1 and CST2) that have been defined for table T2. The example assumes that table T2 is in non-check pending status.

Table definitions

 T1:  CREATE TABLE T1(C1 INT PRIMARY KEY)
 T2:  CREATE TABLE T2(C1 INT, C2 INT,
                        CONSTRAINT CST1 FOREIGN KEY (C1) REFERENCES T1,
                        CONSTRAINT CST2 CHECK (c2 > 10))

Overview

Command

 pdconstck -k set -t T2

Explanation

-k set: Executes forced setting of check pending status.

-t T2: Specifies the name of the table that is to be forcibly placed in check pending status.

(4) Forced release of check pending status by constraint

This example forcibly releases constraint CST2 for table T2 from check pending status. The table definitions are the same as in (3), and the example assumes that constraint CST2 is in check pending status.

Overview

Command

 pdconstck -k release -c CST2

Explanation

-k release: Executes forced release of check pending status.

-c CST2: Specifies the name of the constraint that is to be forcibly released from check pending status.

13.4 Command format

Organization of this section

13.4.1 Format

13.4.2 Options

13.4.1 Format

This section explains the format of the pdconstck command. In the following table, each number corresponds to the number assigned to each option.

No.
Format

1

pdconstck -k {check|set|release}

2

         {-t [authorization-identifier.]table-identifier

3

           |-c [authorization-identifier.]constraint-name}

4

         [-u authorization-identifier]

5

         [-o process-results-file-name]

6

         [-q {generation-number|all}]

7

         [-w maximum-number-of-violation-key-values-that-can-be-output]

8

         [-x integrity-checking-monitoring-interval]

13.4.2 Options

Organization of this subsection

(1) -k {check|set|release}

(2) -t [authorization-identifier.]table-identifier

(3) -c [authorization-identifier.]constraint-name

(4) -u authorization-identifier

(5) -o process-results-file-name

(6) -q {generation-number|all}

(7) -w maximum-number-of-violation-key-values-that-can-be-output

(8) -x integrity-checking-monitoring-interval

(1) -k {check|set|release}

Specifies the function that pdconstck is to perform:

check

Executes the integrity check facility.

set

Executes the facility for changing check pending status forcibly (forced setting of check pending status).

release

Executes the facility for changing check pending status forcibly (forced release of check pending status).

(2) -t [authorization-identifier.]table-identifier

<identifier>

Specifies the table identifier of the referencing table or check constraint table that is to be processed.

If the authorization identifier is omitted, the authorization identifier of the user who connected to HiRDB is assumed. For details about the authorization identifier of the user who connected to HiRDB, see 13.1(2) Authorization identifier during execution of pdconstck.

Criteria

Specify this option when you execute the integrity check facility or the facility for changing check pending status forcibly by table.

Rules

You can specify only a table for which referential constraints (foreign keys) or check constraints have been defined.

A view table cannot be specified.

If an authorization identifier or table identifier is enclosed in double quotation marks ("), the system treats it as being case sensitive; otherwise, the system treats it as all uppercase letters. If you are using sh (Bourne shell), csh (C shell), or ksh (Korn shell), you must enclose the entire identifier in single quotation marks (').

(3) -c [authorization-identifier.]constraint-name

<identifier>

If the authorization identifier is omitted, the authorization identifier of the user who connected to HiRDB is assumed. For details about the authorization identifier of the user who connected to HiRDB, see 13.1(2) Authorization identifier during execution of pdconstck.

Criteria

Specify this option when you execute the integrity check facility or the facility for changing the check pending status forcibly by constraint.

Rules

If an authorization identifier or constraint name is enclosed in double quotation marks ("), the system treats it as being case sensitive; otherwise, the system treats it as all uppercase letters. If you are using sh (Bourne shell), csh (C shell), or ksh (Korn shell), you must enclose the entire identifier or name in single quotation marks (').

(4) -u authorization-identifier

<identifier>

Specifies the authorization identifier used to connect to HiRDB.

When this option is specified, the system displays a message requesting entry of a password. If no password is required, enter the null in response to the message. For details about the default authorization identifier and password that are assumed when this option is omitted, see 13.1(2) Authorization identifier during execution of pdconstck.

Criteria

Specify this option to connect to HiRDB using a different authorization identifier from the one specified in the PDUSER environment variable.

Rules

If an authorization identifier is enclosed in double quotation marks ("), the system treats it as being case sensitive; otherwise, the system treats it as all uppercase letters. If you are using sh (Bourne shell), csh (C shell), or ksh (Korn shell), you must enclose the entire identifier in single quotation marks (').

Notes

You must specify PDUSER if you are executing the utility in the background with & attached by the shell, or in a remote shell environment in which a password cannot be entered. You must specify PDUSER when you are executing this utility in an environment in which a password cannot be entered.

(5) -o process-results-file-name

<path name>

Specifies the name of the process results file to which the processing results are to be output.

Criteria

Specify this option to create the process results file in the directory of your choice.

Rules

The specified path must be to the host where pdconstck is executed.

Write privileges must have already been granted by the executor of pdconstck for the file specified by the path name (high-order directory).

Default value

When this option is omitted, the process results file is created as follows:

Directory in which the process results file is created
/tmp directory

Name of the process results file
CONSTCK-REPORT-table-name-xxxxxxxxx
table-name
Table identifier specified in the -t option or the table identifier for which the constraint specified in the -c option was defined (1 to 30 characters)
xxxxxxxxx
Unique characters acquired by an OS function (tmpnam) (9 characters)

(6) -q {generation-number|all}

<unsigned integer> ((1-10))

When the inner replica facility is used, specifies the generation that is to be processed:

0: The original RDAREAs are to be processed.

1 to 10: The indicated generation of the replica RDAREAs is to be processed.

all: The original RDAREA and all generations of replica RDAREAs are to be processed.

Criteria

Specify this option when you use the inner replica facility and wish to execute the integrity check facility or the facility for changing check pending status forcibly by generation.

Rules

You can specify this option only when you use the inner replica facility.

When the -c option is specified, a generation number cannot be specified (only all can be specified).

You can specify only the generation number of replicas of table storage RDAREAs that store the table specified in the -t option, or of replicas of the table for which the constraint specified in the -c option has been defined.

The following shows the default value that is assumed when the inner replica facility is used and this option is omitted:

-t option | -c option | Default value
Specified | Omitted | Current RDAREA generation
Omitted | Specified | all

(7) -w maximum-number-of-violation-key-values-that-can-be-output

<unsigned integer> ((1-30000)) <<60>>

The integrity check facility enables you to output to the process results file the key values that violate constraints. This option specifies the maximum number of such violation key values that can be output per constraint (by generation when the inner replica facility is used).

Criteria

Specify this option when you want to reduce file size by limiting output of key values resulting in a constraint violation.

Rules

Duplicated key violation values are not output. However, in the case of a check constraint, if the data types of columns related to a check constraint include a BLOB or BINARY column, duplicates are not eliminated.

Once the number of violation key values reaches the specified value (or the default value), no more violation key values are output to the process results file. When this happens, the utility cancels integrity checking on the corresponding constraint (corresponding generation) and performs integrity checking on the next constraint (generation).

(8) -x integrity-checking-monitoring-interval

<unsigned integer> ((0-65535)) <<0>>

Specifies the integrity checking monitoring interval in seconds for a single constraint (single generation). When the time spent on integrity checking on a single constraint (single generation) exceeds this operand's value, pdconstck terminates with return code 8.

Criteria

You should specify this option in the event of a failure such as the one listed below, and it is advisable to monitor execution time in order to check whether or not pdconstck has stopped responding:

Communication failure (communication between pdconstck and HiRDB server or communication between HiRDB servers)

Non-responsive process due to a failure (such as a disk failure)

Rules

The pdconstck processing depends on the combination of the -x option and the pd_lck_wait_timeout operand in the system definition. The following table describes the possible combinations and the pdconstck processing.

pd_lck_wait_timeout operand value | -x option value | pdconstck processing
0 | 0 | Waits until it receives a response from the HiRDB server.
Other | When the -x option value is exceeded, pdconstck terminates with return code 8.
Other | 0 | When the pd_lck_wait_timeout operand value is exceeded, pdconstck terminates with return code 8.
Less than the pd_lck_wait_timeout operand value | When the -x option value is exceeded, pdconstck terminates with return code 8.
Same as the pd_lck_wait_timeout operand value | When the pd_lck_wait_timeout operand value is exceeded, pdconstck terminates with return code 8.
Greater than the pd_lck_wait_timeout operand value

13.5 pdconstck processing results

This section describes the processing results of pdconstck.

Organization of this section

(1) pdconstck processing results

(2) Processing results of integrity checking

(3) Information about check pending status

(1) pdconstck processing results

The pdconstck processing results include the processing results of integrity checking and information about the check pending status. The following is an example of the pdconstck processing results:

           [1]                                  [2]       [3]
pdconstck VV-RR *** DB VALIDATION CHECK *** yyyy-mm-dd hh:mm:ss
processing-results-of-integrity-checking [4]
information-about-check-pending-status [5]
pdconstck TERMINATED, RETURN CODE=0[6]

Explanation

HiRDB version number

pdconstck execution start date

pdconstck execution start time

Processing results of integrity checking

Information about check pending status

pdconstck's return code

(2) Processing results of integrity checking

The execution results of the integrity check facility are output by pdconstck as the integrity checking processing results. This information is output when -k check is specified.

The following shows an output example of the processing results of integrity checking:

** DB VALIDATION CHECK INFORMATION **
processing-results-of-integrity-checking-on-referential-constraints [1]
processing-results-of-integrity-checking-on-check-constraints [2]

Explanation

Processing results of integrity checking on referential constraints

Processing results of integrity checking on check constraints
These are the processing results of executing integrity checking on check constraints. This information is output when the -t option is specified and check constraints have been defined for the table, or when the name of a check constraint is specified in the -c option.

(a) Processing results of integrity checking on referential constraints

The processing results of integrity checking on referential constraints are output in alphanumeric order of the constraint names when the -t option is specified and referential constraints have been defined for the table, or when the name of a referential constraint is specified in the -c option.

The following shows an output example of the processing results of integrity checking on a referential constraint:

     ** REFERENTIAL CONSTRAINT INFORMATION **
     CONSTRAINT    = SCHEMA1.CONST1 [1]      
     REFERENCED  TABLE = SCHEMA1.P1 [2]      
     REFERENCING TABLE = SCHEMA1.F1 [3]      
     [5]              [6]                    
[4] - NO.  FOREIGN KEY COLUMN NAME            
  | ---- ------------------------------    
  |  1   COL1                              
   - 2   COL2                              

     execution-results  [7]                          

Explanation

Name of a constraint (authorization-identifier.constraint-name)

Name of the referenced table (authorization-identifier.table-identifier)

Name of the referencing table (authorization-identifier.table-identifier)

Column information for foreign keys

Definition order

Column names (in the order that the foreign key component columns are defined)

Execution results
These are the results of integrity checking on the constraint. This information is not output for a constraint whose integrity was not checked.
When the inner replica facility is not used, only one set of the information items is output; when the inner replica facility is used, as many sets of the information items are output as there are generations on which integrity checking was executed, in ascending order of the original RDAREA generations (from 1 to 10). The following shows an output example of the results of integrity checking on referential constraints, both when there are no violation key values and when there are violation key values.

Execution results when there are no violation key values

GENERATION    = 0 [1]
NO ERROR FOREIGN KEY [2]

Explanation

Number of the generation on which integrity checking was performed
When the inner replica facility is not used, this information is not output. When pdconstck was executed by current RDAREA, CUR is output.

Indicator that there were no violations foreign key values.

Execution results when there are violation key values

     GENERATION    = 0 [1]
     [3]          [4]  
[2] - NO.   ERROR FOREIGN KEY
   |----- -----------------
   |   1   1234567890
   |       Taylor
   |   2   777
    -      Young
     PROCESSING DISCONTINUED [5]
     EXIST ERROR FOREIGN KEY [6]

Explanation

Number of the generation on which integrity was checked
When the inner replica facility is not used, this information is not output. When pdconstck was executed by current RDAREA, CUR is output.

Information about the violation key values (in the order of the primary key values referenced by the foreign key).

Serial numbers of the violation keys (in ascending order starting with 1)
The violation key values are output in the order of the column names of the foreign key. If there are multiple columns composing the foreign key, only the first key value is output.

Violation key values
A violation key value is displayed in character format.
In the case of a character data type, only the first 70 bytes are output as a violation key value. A national character that ends in byte 71 is not output.

Indicator that integrity checking was cancelled.

Indicator that violation foreign key values were found.

(b) Processing results of integrity checking on check constraints

The processing results of integrity checking on check constraints is output when the -t option is specified and check constraints have been defined for the table, or when the name of a check constraint is specified in the -c option.

The following shows an output example of the processing results of integrity checking on a check constraint:

     ** CHECK CONSTRAINT INFORMATION **    
     CONSTRAINT = SCHEMA1.CONST2 [1]      
     TABLE      = SCHEMA1.TABLE1 [2]      
     [4]            [5]                    
[3] - NO.    CHECK KEY COLUMN NAME          
  | ---- ------------------------------  
  |  1   COL1                            
   - 2   COL2                            

     execution-results [6]                          

Explanation

Name of a constraint (authorization-identifier.constraint-name)

Name of the table (authorization-identifier.table-identifier)

Column information in the search conditions (in the order stored in the SQL_CHECK_COLUMNS data dictionary table)

Serial numbers assigned to the column information

Column names

Execution results
These are the results of integrity checking on the constraint. This information is not output for constraints whose integrity was not checked.
When the inner replica facility is not used, only one set of information items is output; when the inner replica facility is used, as many sets of information items are output as there are generations on which integrity checking was executed, in ascending order of the original RDAREA generations (from 1 to 10).
The following shows an output example of the results of integrity checking on check constraints, both when there are no violation key values and when there are violation key values.

Execution results when there are no violation key values

GENERATION    = 0 [1]
NO ERROR CHECK KEY [2]

Explanation

Number of the generation on which integrity was checked
When the inner replica facility is not used, this information is not output. When pdconstck was executed by current RDAREA, CUR is output.

Indicator that there were no violation foreign key values.

Execution results when there are violation key values

     GENERATION    = 0 [1]
     [3]          [4]  
[2] - NO.   ERROR CHECK KEY
   |----- -----------------
   |   1   1234567890
   |       Taylor
   |   2   777
    -      Young
     PROCESSING DISCONTINUED [5]
     EXIST ERROR CHECK KEY [6]

Explanation

Number of the generation on which integrity was checked
When the inner replica facility is not used, this information is not output. When pdconstck was executed by current RDAREA, CUR is output.

Information about the violation key values (in the order of integrity checking on check constraints)

Serial numbers of the violation keys (in ascending order starting with 1)

Violation key values
If a key value is the null value, *NULL* is output.
If the data type of the column that constitutes the check constraint is BLOB or BINARY, only the first 35 bytes of the violation key value are displayed (in hexadecimal). If the data type of the column that constitutes the check constraint is neither BLOB nor BINARY, the violation key value is displayed in the data format.
In the case of a character data type, only the first 70 bytes are output as a violation key value. A national character that ends in byte 71 is not output.

Indicator that integrity checking was cancelled.

Indicator that violation foreign key values were found.

(3) Information about check pending status

Regardless of the -k option's value, the check pending statuses of the table and check constraints are output. An output example of check pending status information is shown below. Note that the check pending status of each RDAREA is not output. For the check pending status of each RDAREA, check pddbst's status analysis by RDAREA (logical analysis) or status analysis by table.

** CHECK PENDING STATUS INFORMATION **
                                               [2]            [3]      
TABLE                                   CONSTRAINT TYPE PENDING STATUS
--------------------------------------- --------------- ---------------
SCHEMA1.T5 [1]                                                          
                                        REFERENCE        PENDING
                                        CHECK           RELEASE
                                               [2]            [3]      
CONSTRAINT                              CONSTRAINT TYPE PENDING STATUS
--------------------------------------- --------------- ---------------
SCHEMA1.CONST1 [4]                      REFERENCE        PENDING
SCHEMA2.CONST2 [4]                      CHECK           RELEASE

Explanation

Table name

Type of constraint:
REFERENCE: Referential constraint (if no referential constraints have been defined, this information is not output)
CHECK: Check constraint (if no check constraints have been defined, this information is not output)

Check pending status:
PENDING: Check pending status
RELEASE: Non-check pending status

Constraint name:
Outputs the names of the referential constraints and then the check constraints that have been defined for this table, in ascending alphanumeric order of the constraint names.

13.6 Notes

Table 13-26 lists and describes the return codes of pdconstck and explains the actions to be taken.

Table 13-26 Return codes of pdconstck and actions to be taken

Return code | Description | Action
0 | Terminated normally. | None
4 | Terminated normally, but there was a constraint that lacked integrity as a result of integrity checking (this includes cases such as when integrity checking on constraints was cancelled because the number of violation key values exceeded the specified maximum). | Correct the integrity of the constraints resulting in check pending status and then re-execute.
8 | Terminated abnormally. | If necessary, eliminate the cause of the error and then re-execute.

Note

If an error occurs during pdconstck's termination processing after return code 0 or 4 has been output with the KFPL50001-I message, the return code remains 0 or 4, not 8.

When pdconstck is executed while the security audit facility is being used, the audit trails that are acquired depend on the return code:

When the return code is 0 or 4:

Audit trails are acquired if SUCCESSFUL or ANY is specified for WHENEVER in CREATE AUDIT.

When the return code is 8:

Audit trails are acquired if UNSUCCESSFUL or ANY is specified for WHENEVER in CREATE AUDIT.

If you selected utf-8 as the character encoding in the pdsetup command, a BOM is not added to the file that is output by pdconstck.

14. Statistics Analysis Utility (pdstedit)

This chapter explains the statistics analysis utility (pdstedit) that edits statistical information, such as information about HiRDB system activities.

This chapter contains the following sections:

Organization of this chapter

14.1 Overview

14.2 Command format

14.3 Details about statistical information

14.4 Output of statistical information to a DAT-format file

14.5 Notes

14.6 Examples

14.1 Overview

Executor: HiRDB administrator

The statistics analysis utility reads information input from statistics unload files and system log files and edits statistical information.

The statistics analysis utility enables needed statistical information to be edited and output by specifying editing beginning and ending points. The user can obtain the activity status of the HiRDB system by analyzing this statistical information. The utility also outputs the statistical information editing results to the standard output, and it outputs the unedited statistical information to a DAT-format file. The user can create desired statistical reports from the DAT-format file.

Figure 14-1 provides an overview of the statistics analysis utility (pdstedit).

Figure 14-1 Overview of the statistics analysis utility (pdstedit)

Organization of this section

(1) Base files for statistical information

(2) Types of statistical information

(3) Execution conditions of the statistics analysis utility

(1) Base files for statistical information

The statistics analysis utility uses the following three files as its input files:

Unload statistics log file
This is an unloaded statistics log file. The OS command cp or the HiRDB-provided shell script (pdstjacm) is used to create an unload statistics log file.

Unload log file
This is a system log file unloaded by the pdlogunld command.

System log file group
This is the logical unit of the system log files. The input is the file groups containing the physical files that can be referenced from the host that starts the statistics analysis utility.

(2) Types of statistical information

Table 14-1 describes the types of statistical information that the statistics analysis utility can edit. You collect statistical information (except CONNECT and DISCONNECT information) by specifying the pdstbegin operand in the system definition or by executing the pdstbegin command. To collect statistical CONNECT and DISCONNECT information, you specify the pdhibegin -k cnc operand in the system definition.

Table 14-1 Overview of statistical information output by statistics analysis utility

Type of statistical information | Overview
System activity statistical information | Edits and outputs activity information for processes, RPC, and logs in HiRDB systems by HiRDB system or by server.
UAP statistical information¹ | Edits by editing interval information on UAPs, such as the number of selection rows and the number of times each SQL statement is executed, and outputs the information by UAP or service.
SQL statistical information¹ | Edits and outputs by UAP or service information about SQL statements issued, such as the number of selection rows, the number of times a work table was created, and the number of back-end servers that issued an SQL split command.
Global buffer pool statistical information² | Edits by editing interval information about global buffer accesses, such as the buffer hits rate and the number of real I/O operations, and outputs the information by server or global buffer.
Statistical information on HiRDB files for database manipulation² | Edits by editing interval information on HiRDB file accesses, such as the number of synchronous I/O operations and the number of I/O errors, and outputs the information by server, HiRDB file, or RDAREA.
Deferred write processing statistical information | Edits by editing interval information on deferred write processing, such as the number of deferred write operations, the cause of each operation, and the concurrency level of I/O operations, and outputs the information by server.
Index statistical information³ | Edits by editing interval information on indexes, such as index key lock information and index split information, for the statistics log and the system log, and outputs the information by server or index. This information cannot be output to a DAT-format file.
SQL static optimization information | Outputs SQL static optimization information. This information can be output to a DAT-format file only.
SQL dynamic optimization information | Outputs SQL dynamic optimization information. This information can be output to a DAT-format file only.
SQL object execution information | Outputs SQL object execution information. This information can be output to a DAT-format file only
SQL statement statistical information | Outputs issued data manipulation SQL, definition SQL, and LOCK statements and SQL information. This information can be output to a DAT-format file only.
CONNECT/DISCONNECT statistical information⁴ | Outputs CONNECT and DISCONNECT information. This information can be output to a DAT-format file only.
SQL object transfer statistical information | Outputs SQL object transfer information. This information can be output to a DAT-format file only.
Foreign server operation statistical information | Outputs foreign server activity information. This information can be output to a DAT-format file only.
Foreign server utilization statistical information | Outputs foreign server utilization status. This information can be output to a DAT-format file only.

1 UAP and SQL statistical information may not agree, due to differences in the timing of entry of the pdstbegin and pdstend commands. Also, the number of SQL statements actually issued by the UAP and the number displayed may not agree.

2 When a synchronization point is not generated within the time specified by the -t option or when only one synchronization point is generated, information for that interval of time is not output. A longer time interval should be specified in the -t option in this case.

3 Index split information, which is one of the index statistical information items, is collected from the unload log files or system log files. To edit index split information, the file groups of the unload log files or the system log files must be used as the input. Other information is obtained from unload statistics log files.

4 CONNECT and DISCONNECT statistical information is collected from unload log files or system log file groups. Therefore, use unload log files or system log file groups as the input to the statistics analysis utility. If the pdhibegin -k cnc operand is specified in the system definition, this statistical information is output to the single-server or to a server with a front-end server.

(3) Execution conditions of the statistics analysis utility

You can execute the statistics analysis utility whether or not HiRDB is active.

You can execute the statistics analysis utility on any server machine.

14.2 Command format

Organization of this section

14.2.1 Format

14.2.2 Options

14.2.3 Notes on option specifications

14.2.1 Format

This section describes the format of the pdstedit command. In the following table, each number corresponds to the number assigned to each option.

No.
Format

1

pdstedit [-k edit-item[,edit-item]...]

2

       [-m interval]

3

       [-t [start-time][,end-time]]

4

       [-u UAP-name[,UAP-name]...]

5

       [-x host-name[,host-name]...]

6

       [-s server-name[,server-name]...]

7

       [-f foreign-server-name[,foreign-server-name]...]

8

       [-i { input-statistics-unload-file-name
             |HiRDB-file-system-area-name
             |input-statistics-unload-file-storage-directory-name}]

9

       [-o DAT-format-file-output-destination-directory- name]

10

       [-w work-file-directory-name]

11

       [-d control-statement-file-name]

12

       [-b]

13

       [-e extended-format-specification-value[,extended-format-specification-value]]

14.2.2 Options

Organization of this subsection

(1) -k edit-item

(2) -m interval

(3) -t [start-time][,end-time]

(4) -u UAP-name[,UAP-name]...

(5) -x host-name[,host-name]...

(6) -s server-name[,server-name]...

(7) -f foreign-server-name[,foreign-server-name]...

(8) -i {input-statistics-unload-file-name|HiRDB-file-system-area-name|input-statistics-unload-file-storage-directory-name}

(9) -o DAT-format-file-output-destination-directory-name

(10) -w work-file-directory-name

(11) -d control-statement-file-name

(12) -b

(13) -e extended-format-specification-value[,extended-format-specification-value]

(1) -k edit-item

<<sys>>

Specifies the information that is to be edited.

If you specify sop, dop, pcd, obj, sqh, cnc, fsv, or hba, make sure that the -o option is also specified (otherwise, an error results).

When sop, dop, pcd, obj, sqh, cnc, fsv, or hba is specified, the utility outputs statistical information to a DAT-format file, but it does not edit the statistical information. If you specify all and omit the -o option, the utility continues processing without detecting an error.

sys: System activity statistical information

svr: System activity statistical information by server

uap: UAP statistical information

sql: SQL statistical information

buf: Global buffer pool statistical information

fil: Statistical information on HiRDB files for database manipulation

dfw: Deferred write processing statistical information

idx: Index statistical information

sop: SQL static optimization information

dop: SQL dynamic optimization information

pcd: SQL object execution information

obj: SQL object transfer statistical information

sqh: SQL statement statistical information

cnc: CONNECT/DISCONNECT statistical information

fsv: Foreign server operation statistical information

hba: Foreign server utilization statistical information

all: All the above (if sop, dop, pcd, obj, sqh, cnc, fsv, or hba is specified, the statistical information is output to a DAT-format file only)

(2) -m interval

<unsigned integer> ((1-1440)) <<60>>

Specifies in minutes the interval at which totaled values are to be output for the selected types of statistical information. Totaled values for each selected type of statistical information are output at this interval.

(3) -t [start-time][,end-time]

Specifies a log record output start time and end time as the period for which statistical information is to be output. The permitted value range for both the start time and the end time is from 00:00:00 on January 1, 1970, to the current time on the current date.

When this option is omitted, all statistical information in the input statistics unload files and system log files is edited.

When the start time is omitted, editing is from the beginning of the input statistics unload files or system log files to the specified end time. When the end time is omitted, editing is from the specified start time to the end of the statistics input unload files or system log files.

When the option flag is specified, a start time or an end time (or both) must be specified. A time is specified in the format hhmmss[MMDD[YYYY]]:

hh: Hour ((00-23))

mm: Minute ((00-59))

ss: Second ((00-59))

MM: Month ((01-12)) (if omitted, the current month is assumed)

DD: Date ((01-31))

If omitted, the current date is assumed. If an invalid date specified (such as specifying 31 for the month that has only 30 days), the utility carries over the extra days to the next month.

For example, the utility interprets a specification of 00000006312000 as 00:00:00 on July 1, 2000.

YYYY: Year ((1970-9999)) (if omitted, the current year is assumed)

(4) -u UAP-name[,UAP-name]...

<character string> ((1-30))

Specifies the names of UAPs that are to be subject to information editing (ID name of a UAP as specified in PDCLTAPNAME in the client environment definition) when the editing is to be of UAP or SQL statistical information, foreign server operation statistical information, or foreign server utilization statistical information.

A maximum of 16 UAP names can be specified. When this option is omitted, the utility edits UAP or SQL statistical information according to the range specified with the -t option.

(5) -x host-name[,host-name]...

<identifier> ((1-32))

Specifies the names of the hosts that are to be subject to information editing. A maximum of 32 host names can be specified. When this option is omitted, all hosts become subject to information editing.

(6) -s server-name[,server-name]...

<identifier> ((1-8))

Specifies the names of the servers that are to be subject to information editing. A maximum of 32 server names can be specified. When this option is omitted, all servers become subject to information editing.

(7) -f foreign-server-name[,foreign-server-name]...

<identifier> ((1-30))

Specifies the names of foreign servers in order to edit statistical information about their operation (foreign server operation statistical information) or utilization (foreign server utilization statistical information).

You can specify a maximum of 32 foreign server names. When this option is omitted, all foreign servers are subject to editing of statistical information.

(8) -i {input-statistics-unload-file-name|HiRDB-file-system-area-name|input-statistics-unload-file-storage-directory-name}

Specifies the input statistics unload files that are to be used as the input information for statistical analysis.

The host executing pdstedit must be able to reference the specified input statistics unload files. An input statistics unload file means an unload statistics log file or an unload log file.

When this option is omitted, the utility assumes the standard input.

input-statistics-unload-file-name <path name>

Specifies the name of an input statistics unload file.

HiRDB-file-system-area-name<path name> ((up to 165 characters))

Specifies the name of a HiRDB file system area when the desired input statistics unload files are located in a HiRDB file system area.

The utility analyzes all input statistics unload files contained in the specified HiRDB file system area.

input-statistics-unload-file-storage-directory-name<path name>

Specifies the name of a directory containing input statistics unload files.

When a directory name is specified, the files under its subdirectories are subject to editing (if there is a HiRDB file system area, the files contained in the HiRDB file system area are subject to editing).

(a) Notes

Specification of relative path
If you specify a relative path (beginning with a character other than the forward slash (/)) in the -i option, the utility links the executor's PDDIR environment variable to the specified relative path to locate the files or directory subject to analysis. If no such file or directory is found, the utility uses the file under the current directory or the current directory itself.

Output mode for unload statistics log files
You cannot use the statistics analysis utility on a 32-bit-mode HiRDB to edit an unload statistics log file output by a 64-bit-mode HiRDB.

File type
Analysis processing may be placed on hold or skipped depending on the type of file or directory specified in the -i option. The following table describes whether or not analysis processing occurs depending on the file type:

Entity specified by -i option | File type | Analysis processing
File | Regular file | Processing continues.
RAW file | Processing continues.
Pipe file (FIFO)* | Analysis processing is placed on hold until the specified file is opened in write mode by another process.
Other | Analysis processing on the specified file is skipped.
Directory | File under the directory | Regular file | Processing continues.
RAW file | Processing continues.
Pipe file (FIFO) | Warning message is output.
Other | Analysis processing on the specified file is skipped.

* You can specify a pipe file (FIFO) when there is only one statistics log file.

(b) Notes on input of unload log files

When you use the pdlogunld command to unload a system log file, specify the -n option (to prevent the system log status from being changed). If the system log status changes, the system log file may not be unloaded for the following reasons:

If the automatic log unloading facility is used for a system log file, the system log file is treated as having been already unloaded, and it is not unloaded automatically.

If a system log file is placed in unload completed status, HiRDB assumes that the system log file can be overwritten, so the file may be overwritten before it is unloaded.

(c) Notes on input of unload log files in HiRDB file system areas in character special files

When transferring unload log files to a host where pdstedit is not executed

It is difficult to collect unload log files in HiRDB file system areas in character special files at a single location because they cannot be transferred to another host by a method such as rcp. In such a case, use the following method to transfer unload log files to another host:

Use the pdfbkup command to create a backup of the HiRDB files in a HiRDB file system area that is subject to analysis.

Use a command such as rcp to transfer the backup file to the other host where pdstedit is to be executed.

Use the pdfmkfs command to create a HiRDB file system area in a regular file for use as input for statistics analysis. To analyze other files at the same time, create a HiRDB file system area in the same directory as for those files.

Use the pdfrstr command to restore the contents of the backup file transferred in step 2 into the HiRDB file system area created in step 3.

When executing pdstedit, specify in the -i option the name of the HiRDB file system area restored in step 4 or the name of the directory containing the HiRDB file system area.

When reading unload log files by the host where pdstedit is executed

When multiple files are to be analyzed by pdstedit, all the files subject to analysis are placed in a single directory and that directory is specified. However, if an unload log file is located in a HiRDB file system area in a character special file, it is difficult to input it together with other files because it cannot be copied by a command such as cp.

In such a case, by symbolically linking the directory containing the files to be analyzed to the HiRDB file system area in the character special file that contains the unload log files to be analyzed, you can analyze all the files without having to copy the latter.

(9) -o DAT-format-file-output-destination-directory-name

<pathname> ((1-128))

When a DAT-format file is to be created by collecting statistical information from an input statistics unload file, specifies the name of the directory under which the DAT-format file is to be created.

(10) -w work-file-directory-name

<pathname> ((1-128))

Specifies the name of the directory under which work files are to be created for the statistics analysis utility. When this option is omitted, /tmp or /usr/tmp is assumed. An error results if work files cannot be created in /tmp or /usr/tmp for some reason.

The statistics analysis utility calls a sort program internally. In this case as well, the sort program creates temporary work files in /tmp or /usr/tmp. You can use the TMPDIR environment variable to change the directory where the temporary work files are created.

If the statistics analysis utility is cancelled during execution, such as by forced or abnormal termination of the process, the temporary work files may remain in the directory. If such temporary work files are not needed, the user should delete them. The following files are created in the directory for temporary work files:

-k option value | Names of files that are created
sys | PID.syi, PID.syo
uap | PID.uai, PID.uao
sql | PID.sqi, PID.sqo
buf | PID.bui, PID.buo
fil | PID.fii, PID.fio
dfw | PID.dfi, PID.dfo
idx | PID.ixi, PID.ixo, PID.isi, PID.iso
sop | PID.soi, PID.soo
dop | PID.doi, PID.doo
pcd | PID.pci, PID.pco
obj | PID.obi, PID.obo
sqh | PID.qhi, PID.qho
cnc | PID.cni, PID.cno
fsv | PID.fsi, PID.fso
hba | PID.hbi, PID.hbo

Legend:

PID: Process ID

Note

If -k all is specified, all the files listed above are created.

(11) -d control-statement-file-name

<pathname>

Specifies the name of the control statements file in which are specified the names of the file groups that store the system log information that is to be input to the statistics analysis utility.

When the -i option is not specified, the status changes to the standard input standby status even if the -d option is specified.

Following is the format of the control statements file (file_group statements); a maximum of 32 control statements can be specified in this file:

file_group server-name:file-group-name[,file-group-name]...

server-name<identifier> ((1-8))

Specifies the name of the server corresponding to the file groups. When the -s option is specified and the server name specified here is different from the server name specified in the -s option, the server cannot be analyzed and is ignored. An error will result if the same server name is specified more than once in the control statements file.

file-group-name<identifier> ((1-8))

Specifies a file group of physical files that can be referenced from the host that starts the statistics analysis utility.

A maximum of 200 file group names can be specified.

An error results if a file group at another host is specified.

If any file in a file group on a shared disk is specified, however, that file is subject to analysis.

Rules

Specify one control statement per line.

Do not specify spaces or tabs between specification values.

Any text enclosed between /* and */ is treated as a comment.

If the current file group or any inconsistent file group is specified, the utility outputs a warning message and edits statistical information up to immediately before the error was detected (in the case of a duplicate specification, two warning messages may be output).
The possible causes of warning errors are as follows:

End-of-file was detected.

File contents are invalid.

If the specified file group has been initialized but not used, the utility outputs a warning message without editing the statistical information (in the case of a duplicate specification, two warning messages may be output).

If a specified file is not a system log file, the utility outputs a warning message without editing the corresponding file group.

If the -i and -d options are both specified, the file group in the control statement file specified in the -d option has already been unloaded, and that unload log file is specified in the -i option, the utility edits the information in the specified file group twice.

(12) -b

Specifies that a title bar is to be output to the DAT-format file. Specification of this option is ignored if the -o option is not specified.

(13) -e extended-format-specification-value[,extended-format-specification-value]

Specifies that the output format is to be changed when a DAT-format file is output. When this option is specified, the -o option must also be specified.

You can specify sec or er1 as an extended format specification value.

sec:

Specifies that the statistics log acquisition time is to be displayed down to the level of the second for the following statistical information:

Global buffer pool statistical information

Statistical information on HiRDB files for database manipulation

Statistical information on deferred write processing

When this option is omitted, the statistics log acquisition time is output in the format MM/DD/hh:mm. When this option is specified, the statistics log acquisition time is output in the format MM/DD/hh:mm:ss.

er1:

Specifies that only significant digits are to be output for overflow data¹ or uneditable data.² When er1 is specified, one asterisk (*) is stored as the value in the case of overflow data or uneditable data.

1 This indicates the error data in microseconds of an overflow exceeding 4,200 seconds.

2 If the HiRDB version from which the input statistics log information was obtained is older than the HiRDB version used to execute pdstedit, the statistics log information may not contain some of the target output items. Such an item that is not included in the statistics log information is referred to as uneditable data.

14.2.3 Notes on option specifications

A specific type of statistical information can be extracted by combining the -k option with other options. Table 14-2 shows the relationships between the -k option and the other options.

Table 14-2 Relationships between the -k option and other options

-k option (value) | Other options
-t start time and/or end time | -u UAP name(s) | -x host name(s) | -s server name(s) | -f foreign-server-name
sys (system activity statistical information) | Y |  | Y |  |
svr (system activity statistical information by server) | Y |  | Y | Y |
uap (UAP statistical information) | Y | Y | Y |  |
sql (SQL statistical information) | Y | Y | Y |  |
buf (global buffer pool statistical information) | Y |  | Y | Y |
fil (statistical information on HiRDB files for database manipulation) | Y |  | Y | Y |
dfw (deferred write processing statistical information) | Y |  | Y | Y |
idx (index statistical information) | Y |  |  | Y |
sop (SQL static optimization information) | Y | Y | Y |  |
dop (SQL dynamic optimization information) | Y | Y | Y |  |
pcd (SQL object execution information) | Y | Y | Y |  |
obj (SQL object transfer statistical information) | Y | Y | Y |  |
sqh (SQL statement statistical information) | Y | Y | Y | Y |
cnc (CONNECT/DISCONNECT statistical information) | Y | Y | Y | Y |
fsv (foreign server operation statistical information) | Y | Y | Y | Y | Y
hba (foreign server utilization statistical information) | Y | Y | Y | Y | Y
all (all the above) | Y | Y | Y | Y |

Y: Can be specified (when specified, the corresponding information can be extracted).

: Ignored if specified (the corresponding information cannot be extracted).

When -k idx is specified, the -o option is ignored, if specified.

If the -d option is specified when -k idx or -k all is specified, the target information can be extracted.

If sop, dop, or pcd is specified in the -k option, the -o option must also be specified.

The following table shows the files that can be input and the statistical information that can be analyzed when the -i or -d option is specified:

Option
File that can be input
Statistical information that can be analyzed

-i
Unload log file
Information about splitting index statistical information
Statistical information about CONNECT/DISCONNECT

Unload statistics log file
All statistical information other than the above

-d
System log file
Information about splitting index statistical information
Statistical information about CONNECT/DISCONNECT

When -k uap is specified, the statistical information acquisition units depend on the UAP execution environment. The following table shows the relationship between client environment definition (PDSTJTRNOUT) during UAP execution and statistical information acquisition units:

Contents of PDSTJTRNOUT | Type of UAP
OLTP environment | Other environment
YES | By transaction | By transaction
NO | By UAP execution | By UAP execution
Omitted | By transaction | By UAP execution

14.3 Details about statistical information

Organization of this section

14.3.1 Output formats of statistical information

14.3.2 System activity statistical information

14.3.3 UAP statistical information

14.3.4 SQL statistical information

14.3.5 Global buffer pool statistical information

14.3.6 Statistical information about HiRDB files for database manipulation

14.3.7 Deferred write processing statistical information

14.3.8 Index statistical information

14.3.1 Output formats of statistical information

Organization of this subsection

(1) Summary log record information for each edit item

(2) Summary information on input log files

(3) Output information when there is no edit data

(4) Output formats of statistical information

(5) Notes about the output statistical information

(1) Summary log record information for each edit item

Following each set of statistical information, summary log record information is output for each edit item. However, a summary log is not output for the following statistical information: SQL static optimization, SQL dynamic optimization, SQL object execution, SQL statement history, and CONNECT/DISCONNECT.

          :
Statistical information
          :
FILE KIND LOG KIND FIRST               LAST
XXX       XXX      XXXX/XX/XX XX:XX:XX XXXX/XX/XX XX:XX:XX
:         :                 :                   :
      NUM
XXXXXXXXXX
    :

Explanation

FILE KIND

Indicates the type of log file subject to analysis.

STJ is displayed for unload statistics log files and FJ is displayed for system log files (unload system log or system log file group).

LOG KIND

Indicates the type of log record subject to analysis:

sys: System activity statistical information

uap: UAP statistical information

sql: SQL statistical information

buf: Global buffer pool statistical information

fil: Statistical information on HiRDB files for database manipulation

dfw: Deferred write processing statistical information

idx: Index statistical information

FIRST

Indicates the earliest log acquisition time for log records subject to analysis.

If the log file subject to analysis contains no log records subject to analysis, ****/**/** **:**:** is displayed.

LAST

Indicates the most recent log acquisition time for log records subject to analysis.

If the log file subject to analysis contains no log records subject to analysis, ****/**/** **:**:** is displayed.

NUM

Indicates the number of log records subject to analysis.

(2) Summary information on input log files

Following all statistical information, summary information on all input log files is displayed for each type of log records.

If a system log file group is input (with the -d option specified), summary information on input log files is not displayed. If unload log files are input, summary information on input log files is displayed only when edit items are specified for index statistical information. If any other edit items are specified, 0 is displayed as the number of records.

                  :
Summary log record information for each edit item
                  :
NO FILE KIND:LOG FILE NAME
LOG KIND  FIRST               LAST                       NUM
XX XXX      :XX...X
XXX       XXXX/XX/XX XX:XX:XX XXXX/XX/XX XX:XX:XX XXXXXXXXXX
 :                  :                    :              :

Explanation

NO

Indicates the serial number of the log file.

FILE KIND

Indicates the type of log file subject to analysis.

STJ: Unload statistics log files obtained by a HiRDB in 32-bit mode

STJ64: Unload statistics log files obtained by a HiRDB in 64-bit mode

FJ: Unload log file (regular file)

FJIOS: Unload log file (HiRDB file)

LOG FILE NAME

Indicates the name of the input unload statistics log file or unload log file (applicable to index statistical information).

The absolute pathname with a maximum length of 256 bytes is displayed as the name. If the name exceeds 256 bytes, the last 256 bytes are displayed.

LOG KIND

Indicates the type of log record subject to analysis:

sys: System activity statistical information

uap: UAP statistical information

sql: SQL statistical information

buf: Global buffer pool statistical information

fil: Statistical information on HiRDB files for database manipulation

dfw: Deferred write processing statistical information

idx: Index statistical information

sop: SQL static optimization information

dop: SQL dynamic optimization information

pcd: SQL object execution information

obj: SQL object transfer statistical information

sqh: SQL statement statistical information

cnc: CONNECT/DISCONNECT statistical information

fsv: Foreign server operation statistical information

hba: Foreign server utilization statistical information

FIRST

Indicates the earliest log acquisition time for the log file.

If the log file subject to analysis contains no log records subject to analysis, ****/**/** **:**:** is displayed.

LAST

Indicates the most recent log acquisition time for the log file.

If the log file subject to analysis contains no log records subject to analysis, ****/**/** **:**:** is displayed.

NUM

Indicates the number of records by log record type.

(3) Output information when there is no edit data

Displayed information
Description
Action

"***** NO DATA NOOPT *****"
Input statistics unload file subject to analysis contains no applicable edit item records.
Specified options may be invalid, or output items may be invalid when log records were acquired. Take one of the following actions:

Check the -x, -s, -t, -u, and -f options and correct as necessary, then re-execute.

Check the summary information on input statistics unload files to see if log records to be edited have been output and if the output time of the input statistics unload file is correct. Also, check that the correct input statistics unload files were input or that log records subject to analysis have been output.

"***** NO DATA HOST *****"
No log record was output from the host specified with the -x option.

"***** NO DATA SERVER *****"
No log record was output from the server specified with the -s option.

"***** NO DATA TIME *****"
No log record was output within the edit time specified with the -t option.

"***** NO DATA UAP *****"
No log record was output from the UAP specified with the -u option.

"***** NO DATA FOREIGN SERVER *****"
There is no log record for the foreign server specified with the -f option.

"***** NO DATA 1 REC *****"
Differential information cannot be edited because the input statistics unload file subject to analysis contained no log records for acquiring differential information. The system determines that there is no log record for acquiring differential information if there is more than one log record for summary log information or for summary information in the statistics input unload file, but they were output at a single synchronization point (the earliest log acquisition time (FIRST) and the most recent log acquisition time (LAST) for the summary information are in the same period). This applies only to global buffer pool statistical information and statistical information on HiRDB files for database manipulation.
Set the unload file so that there are at least two records.

"***** NO DATA *****"
There was no log record subject to analysis within the specified edit period.
If NO DATA is displayed often for the specified edit period, increase the length of the edit period.

There was no applicable log record for the specified edit item.
Check the summary information on input statistics unload files to see if there are editable log records.

Note

If there are no records subject to analysis for an edit item of SQL static optimization information, SQL dynamic optimization information, or SQL object execution information, an information message to that effect is displayed.

(4) Output formats of statistical information

If there are numeric values in the output information of the statistical information, they are displayed as follows:

Value range
Display

0-999

0-999

1,000-9,994

1.00k-9.99k*

9,995-99,949

10.0k-99.9k*

99,950-999,499

100k-999k*

999,500-9,994,999

1.00M-9.99M*

9,995,000-99,949,999

10.0M-99.9M*

99,950,000-999,499,999

100M-999M*

999,500,000-9,994,999,999

1.00G-9.99G*

9,995,000,000-99,949,999,999

10.0G-99.9G*

99,950,000,000-999,499,999,999

100G-999G*

999,500,000,000-4,398,046,511,103

1.00T-4.40T*

k: Kilo

M: Mega

G: Giga

T: Tera

* The last digit displayed is rounded off on the basis of the next digit.

(5) Notes about the output statistical information

To output statistical information, use the following procedure:

Numbers are right-justified; character strings are left-justified.

The output range (output dates and times) is displayed when a range was specified for editing. If no time range was specified, * is displayed.

When an edit start time was specified, the beginning editing time is for the same time zone as the edit start time. If no edit start time was specified, output begins with the applicable file record in the earliest time zone.

When an edit end time was specified, the ending editing time is from the applicable file record in the earliest time zone to the time zone that is the same as the edit end time.

If overflow occurs during summing or a cumulative value is not to be output for an item, ***, ****, or blanks is displayed.

* indicates data whose average value resulted in an overflow. In such a case, the maximum and minimum values are accurate.

If there is no data in an edit time zone, ***** NO DATA aa...a ***** is displayed for that time zone.

If the unit is bytes, 1.00K = 2¹⁰ bytes, 1.00M = 2²⁰ bytes, and 1.00G = 2³⁰ bytes.

14.3.2 System activity statistical information

This section shows statistical information about the system activity.

pdstedit VV-RR(Object Option) ***** SYSTEM INFORMATION *****
INPUT          :/tmp/stjdata [1]
OUTPUT RANGE   :**/**/** **:**:** - **/**/** **:**:** [2]
-----------------------------------------------------------------------------
HOST = test [3]
-----------------------------------------------------------------------------
EDIT TIME 2000/12/11 14:00:00 - 2000/12/11 14:20:00 [4]
SERVER : ******** [5]                        [6]   [7]   [8]   [9]
                                            FREQ  MAX   MIN   AVG
                                            ----- ----- ----- -----
<SCHEDULE>[10]     QUEUE LENGTH[11]             66     1     1     1
                  MESSAGE LENGTH[12]           66 1.55k   548   973
<PROCESS>[13]      # OF USER SERVER ABORT[14]    0
                  # OF SYSTEM SERVER ABORT[15]  0
                  # OF PROCESS[16]                   13    10    12
                  # OF PROCESS ON SERVICE[17]         3     0     0
                  # OF REQ PROCESS OVER MAX[18] 0
<TRANSACTION>[19]  # OF COMMIT[20]             105
                  # OF ROLLBACK[21]             3
<NAME>[22]         # OF CACHE HIT[23]            0
                  # OF LOCAL HIT[24]          364
                  # OF LOOK-UP[25]            364
<RPC>[26]          # OF TIME OUT[27]             0
                  # OF ERROR[28]                0
                  RESPONSE ON OWN UNIT[29]     81  308k     1 10.2k
                  RESPONSE TO OTHER UNIT[30]    0     0     0     0
                  EXEC TIME ON OWN UNIT[31]   759  311k     0 2.19k
                  EXEC TIME FROM OTHER UNIT[32] 0     0     0     0
                  # OF SEND TO OWN PRCS[33]     0
                  # OF SEND TO OTHER PRCS[34]  63
                  # OF SEND TO OTHER UNIT[35]   0
                  # OF RECV FROM OWN PRCS[36]   0
                  # OF RECV FROM OTHER PRCS[37] 0
                  # OF RECV FROM OTHER UNIT[38] 0
                  # OF REGISTERED PORTS[39]     0     0     0     0
                  # OF ASSIGNED PORTS[40]       0     0     0     0
<LOCK>[41]         WAIT TIME[42]                 0     0     0     0
                  QUEUE LENGTH[43]              0     0     0     0
                  # OF DEADLOCK[44]             0
                  % OF USE LOCK TABLE[45]       1     0     0     0
<SHARED MEMORY>[46]STATIC GET SIZE[47]           0     0     0     0
                  STATIC POOL SIZE[48]          0     0     0     0
                  DYNAMIC GET SIZE[49]        216 1.20M 1.19M 1.19M
                  DYNAMIC POOL SIZE[50]       216  657k  652k  655k
                  SIZE EXCEPT GLOBAL BUFFER[51]               23.3M
                  STATIC SIZE[52]                             1.58M
                  DYNAMIC SIZE[53]                            1.19M
                  SIZE FOR GLOBAL BUFFER[54]                   344k
<SYNC POINT>[55]   SYNC POINT GET INTERVAL[56]   2  109k 44.4k 76.8k
                  SYNC POINT GET TIME[57]       2 1.01k 1.01k 1.01k
<LOG>[58]          # OF BUFFER FULL[59]         35
                  # OF WAIT THREAD[60]          0
                  OUTPUT BLOCK LENGTH[61]     418 32.0k   332 8.26k
                  NOT BUS LENGTH[62]          418 32.0k   332 8.26k
                  # OF BUFFER FOR WAIT I/O[63]  0     0     0     0
                  # OF WRITE TO FILE[64]      427
                  # OF WRITE ERROR[65]          0
                  LOG FILE SWAP TIME[66]        3   131    60    90
                  LOG INPUT DATA LENGTH[67]    96 32.0k 32.0k 32.0k
                  # OF READ FROM FILE[68]      99
                  # OF READ ERROR[69]           0
<DICTIONARY>[70]   # OF TBL-DEF GET REQ[71]     29
                  # OF TBL-CACHE HIT[72]       28
                  # OF CACHED TBL-DEF[73]       1     7     7     7
                  USED TBL-DEF SIZE[74]         1 9.23k 9.23k 9.23k
                  TBL-CACHE SIZE[75]            1 60.2k 60.2k 60.2k
                  # OF ACCESS PRIV CHECK[76]    0
                  # OF CACHE HIT (AP CHECK)[77] 0
                  # OF CON/DBA DEF GET REQ[78] 39
                  # OF CON/DBA CACHE HIT[79]   39
                  # OF CON/DBA CACHED USER[80]  0     0     0     0
                  DICT SERV TRANS DATA SIZE[81] 0     0     0     0
                  # OF TRANS[82]                0
                  # OF VIEW DEF GET REQ[83]     0
                  # OF VIEW CACHE HIT[84]       0
                  # OF VIEW CACHED DEF[85]      0
                  USED VIEW SIZE[86]            0     0     0     0
                  VIEW CACHE SIZE[87]           0     0     0     0
                  CACHE-MISS VIEW SIZE[88]      0     0     0     0
                  # OF TYPE-DEF GET REQ[89]     0
                  # OF TYPE-DEF CACHE HIT[90]   0
                  # OF CACHED TYPE-DEF[91]      0     0     0     0
                  TYPE-DEF CACHE SIZE[92]       0     0     0     0
                  TYPE-DEF CACHE TOTAL SIZE[93] 0     0     0     0
                  TYPE-DEF CACHE ALLOC SIZE[94] 0     0     0     0
                  # OF RTN-DEF GET REQ[95]      0
                  # OF RTN-DEF CACHE HIT[96]    0
                  # OF CACHED RTN-DEF[97]       0     0     0     0
                  RTN-DEF CACHE SIZE[98]        0     0     0     0
                  RTN-DEF CACHE TOTAL SIZE[99]  0     0     0     0
                  RTN-DEF CACHE ALLOC SIZE[100] 0     0     0     0
                  # OF PLG-RTN GET REQ[101]     0
                  # OF PLG-RTN CACHE HIT[102]   0
                  # OF REGISTRY GET REQ[103]    0
                  # OF REGISTRY CACHE HIT[104]  0
                  # OF CACHED REGISTRY-DEF[105] 0     0     0     0
                  REGISTRY CACHE SIZE[106]      0     0     0     0
                  REGISTRY CACHE TOTAL SIZE[107]0     0     0     0
                  DIRECTORY USER CHECK TIME[108]2 33.0k 20.2k 26.6k
                  GROUP CHECK TIME[109]         2   217   179   198
<FES-BES-DIC(SDS)  # OF SQLOBJ INFO GET[111]    90
INFORMATION>      # OF CACHE HIT (SQLOBJ)[112] 63
[110]             # OF CACHED SQLOBJ[113]      27    32     6    19
                  CACHED SQLOBJ TOTAL SIZE[114]27 86.0k 17.0k 52.0k
                  # OF SWAP OUT SQLOBJ[115]     0
                  REQUEST SQLOBJ SIZE[116]     27 3.65k 1.74k 2.67k
                  # OF STRT INFO GET[117]       0
                  # OF CACHED HIT (STRT)[118]   0
                  # OF CACHED STRT[119]         0     0     0     0
                  CACHED STRT TOTAL SIZE[120]   0     0     0     0
                  # OF SWAP OUT STRT[121]       0
                  REQUEST STRT SIZE[122]        0     0     0     0
                  # OF STRT RECOMPILE[123]      0
-----------------------------------------------------------------------------
FILE KIND   LOG KIND   FIRST                 LAST                         NUM
STJ         sys        2000/12/11 14:08:29   2000/12/11 14:08:29            1
-----------------------------------------------------------------------------

NO FILE KIND:LOG FILE NAME
 LOG KIND             FIRST                 LAST                         NUM
1 STJ      :/tmp/stjdata/pdstj01
 sys                  ****/**/** **:**:**   ****/**/** **:**:**            0
 uap                  2000/12/11 15:33:53   2000/12/11 15:36:53          104
 sql                  2000/12/11 15:33:53   2000/12/11 15:36:53          536
 sop                  2000/12/11 15:33:53   2000/12/11 15:34:05           12
 dop                  2000/12/11 15:33:53   2000/12/11 15:36:53          144
 pcd                  ****/**/** **:**:**   ****/**/** **:**:**            0
 obj                  ****/**/** **:**:**   ****/**/** **:**:**            0
 sqh                  ****/**/** **:**:**   ****/**/** **:**:**            0
 buf                  2000/12/11 15:33:41   2000/12/11 15:36:54           18
 fil                  2000/12/11 15:33:41   2000/12/11 15:36:54          150
 dfw                  2000/12/11 15:33:41   2000/12/11 15:36:54            7
 idx                  2000/12/11 15:33:41   2000/12/11 15:36:54            6
2 STJ      :/tmp/stjdata/pdstj02
 sys                  2000/12/11 14:08:29   2000/12/11 14:08:29            2
 uap                  2000/12/11 14:06:30   2000/12/11 14:09:07           52
 sql                  2000/12/11 14:06:30   2000/12/11 14:09:07          496
 sop                  2000/12/11 14:06:30   2000/12/11 14:07:14           27
 dop                  2000/12/11 14:06:30   2000/12/11 14:09:06          120
 pcd                  ****/**/** **:**:**   ****/**/** **:**:**            0
 obj                  ****/**/** **:**:**   ****/**/** **:**:**            0
 sqh                  ****/**/** **:**:**   ****/**/** **:**:**            0
 buf                  2000/12/11 14:06:30   2000/12/11 14:09:08           12
 fil                  2000/12/11 14:06:30   2000/12/11 14:09:08          100
 dfw                  2000/12/11 14:06:30   2000/12/11 14:09:08         1077
 idx                  2000/12/11 14:06:30   2000/12/11 14:09:08            4
3 STJ      :/tmp/stjdata/pdstj03
 sys                  ****/**/** **:**:**   ****/**/** **:**:**            0
 uap                  2000/12/11 15:33:53   2000/12/11 15:36:53          104
 sql                  2000/12/11 15:33:53   2000/12/11 15:36:53          536
 sop                  2000/12/11 15:33:53   2000/12/11 15:34:05           12
 dop                  2000/12/11 15:33:53   2000/12/11 15:36:53          144
 pcd                  ****/**/** **:**:**   ****/**/** **:**:**            0
 obj                  ****/**/** **:**:**   ****/**/** **:**:**            0
 sqh                  ****/**/** **:**:**   ****/**/** **:**:**            0
 buf                  2000/12/11 15:33:41   2000/12/11 15:36:54           18
 fil                  2000/12/11 15:33:41   2000/12/11 15:36:54          150
 dfw                  2000/12/11 15:33:41   2000/12/11 15:36:54            7
 idx                  2000/12/11 15:33:41   2000/12/11 15:36:54            6
4 STJ      :/tmp/stjdata/pdstj04
 sys                  ****/**/** **:**:**   ****/**/** **:**:**            0
 uap                  2000/12/11 15:58:46   2000/12/11 15:59:18           52
 sql                  2000/12/11 15:58:46   2000/12/11 15:59:18          268
 sop                  2000/12/11 15:58:45   2000/12/11 15:58:55           17
 dop                  2000/12/11 15:58:45   2000/12/11 15:59:17           72
 pcd                  ****/**/** **:**:**   ****/**/** **:**:**            0
 obj                  ****/**/** **:**:**   ****/**/** **:**:**            0
 sqh                  ****/**/** **:**:**   ****/**/** **:**:**            0
 buf                  2000/12/11 15:58:39   2000/12/11 15:59:18            9
 fil                  2000/12/11 15:58:39   2000/12/11 15:59:18           75
 dfw                  2000/12/11 15:58:39   2000/12/11 15:59:18            3
 idx                  2000/12/11 15:59:10   2000/12/11 15:59:18            2

Explanation

Name of input statistics unload file or name of the directory containing the input statistics unload file (maximum of 58 bytes)

Output range (output start date/time to output end date/time)

Name of host requesting output of system activity statistical information

Edit period (collection start time to collection end time)

Server name. If sys was specified in the -k option, ******** is displayed

Number of occurrences of each item

Maximum values

Minimum values

Average values

Schedule information

Number of requests in the schedule queue
This information includes the number of requests to the server registered in the schedule queue and the maximum, minimum, and average numbers of those requests in the schedule queue at any one time.

Length of schedule message (bytes)
This is the number of messages containing the server processing requests and the maximum, minimum, and average message lengths.

Process information

Number of times the server terminated abnormally
This is the number of times the single server, front-end server, dictionary server, and back-end server processes terminated abnormally.

Number of times the HiRDB internal server terminated abnormally
This is the number of times the HiRDB's internal server processes terminated abnormally.

Number of internal server processes that were used by servers and HiRDB
This is the number of internal server processes used by a single server, front-end server, dictionary server, back-end server, and HiRDB.

Number of server processes in service
This is the number of server processes currently providing services.

Number of service requests exceeding the maximum number of startup processes
This is the number of service requests that exceeds the maximum number of processes that can be started. For the single server or front-end server, the maximum number of startup processes is the value of the pd_max_users operand; for the back-end server, it is the value of the pd_max_bes_process operand; for the dictionary server, it is the value of the pd_max_dic_process operand. The number of service requests may be greater than the actual number of excess requests because it includes the retried requests.

Transaction information

Commits count
This is the number of transactions that committed among all the transactions processed at the single server, front-end server, dictionary server, and back-end server.

Rollbacks count
This is the number of transactions that rolled back among all the transactions processed at the single server, front-end server, dictionary server, and back-end server.

Name server information

Information used by the system (not by users)

Information used by the system (not by users)

Information used by the system (not by users)

RPC information

Information used by the system (not by users)

Information used by the system (not by users)

Service response time for local unit's servers (in 100 microseconds)
This information includes the number of service responses for the local unit's servers and the maximum, minimum, and average response time.

Service response time for remote unit's servers (in 100 microseconds)
This information includes the number of service responses for the remote unit's servers and the maximum, minimum, and average response time.

Execution time per service from local unit's servers (in 100 microseconds)
This information includes the number of executions per service from the local unit's servers and the maximum, minimum, and average execution time.

Execution time per service from remote unit's servers (in 100 microseconds)
This information includes the number of executions per service from the remote unit's servers and the maximum, minimum, and average execution time.

Number of SENDs to local process
This is the number of times SEND (message send) was executed on the local process.

Number of SENDs to other processes on local unit
This is the number of times SEND (message send) was executed on other processes on the local unit.

Number of SENDs to remote unit
This is the number of times SEND (message send) was executed on the remote unit.

Number of RECEIVEs from local unit
This is the number of times RECEIVE (message receive) was executed from the local unit.

Number of RECEIVEs from other processes on local unit
This is the number of times RECEIVE (message receive) was executed from other processes on the local unit.

Number of RECEIVEs from remote unit
This is the number of times RECEIVE (message receive) was executed from the remote unit.

Number of HiRDB-reserved ports used
This is the number of port numbers actually used among all the port numbers reserved by HiRDB, and the maximum, minimum, and average values of port numbers.

Number of additional ports automatically allocated by the OS when the system ran out of ports reserved by HiRDB
This is the number of ports automatically allocated by OS when all the port numbers reserved by HiRDB were in use, and the maximum, minimum, and average values of port numbers.

Lock information

Lock release wait time (milliseconds)
This information includes the number of lock requests in the server that resulted in the lock release wait status because the requested resource was already locked by another user, and the maximum, minimum, and average wait time.

Number of users placed in lock release wait status
This information includes the number of users in the server that resulted in the lock release wait status because the requested resource was already locked by another user, and the maximum, minimum, and average numbers of the users placed in lock release wait status.

Deadlocks count
This is the number of times a lock request resulted in deadlock in the server.

Utilization factor of locked resources management table (%)
This information includes the number of events that increased the utilization factor of the locked resources management table by 5% in the server, and the maximum, minimum, and average utilization factors.

Shared memory information

Information used by the system (not by users)

Information used by the system (not by users)

Information used by the system (not by users)

Information used by the system (not by users)

Size of shared memory allocated for the server and HiRDB internal server (bytes)
This is the size of shared memory allocated on the unit for the server and HiRDB internal server.

Size of shared static memory (bytes)
Of the memory allocated on the unit for the server or HiRDB internal server, this is the size allocated as the shared static memory.

Size of shared dynamic memory (bytes)
Of the memory allocated on the unit for the server or HiRDB internal server, this is the size allocated as the shared dynamic memory.

Allocation size of shared memory for global buffer pool (bytes)
This is the size of the global buffer allocated in the server (if the global buffer uses multiple shared memory segments, this is the total size).

Synchronization point information

Synchronization point dump interval (milliseconds)
This information includes the number of times a synchronization point dump is collected and the maximum, minimum, and average intervals between two synchronization point dump collections.

Synchronization point dump time (milliseconds)
This information includes the number of synchronization point dumps and the maximum, minimum, and average time required for collecting a synchronization point dump. If this value is large, it may have taken a long time to validate the synchronization point dump because a transaction requiring a long processing time was executed concurrently.

Log information

Buffer-fulls count
This is the number of times the log output buffer became full at the HiRDB system or server.

Waits count due to a shortage of current buffer
This is the number of times threads were placed in wait status during output operation on the log input/output buffer at the HiRDB system or server because the log input/output buffer was being used for output operation on the system log file.

Output block length (bytes)
This information includes the number of times data was output from the log input/output buffer to the system log file at the HiRDB system or server and the maximum, minimum, and average block lengths.
For bus output, this is the total length. If a file output request is issued for a log buffer while file output is underway on another log buffer, HiRDB keeps storing the remaining system log in the log buffer requested for file output until the current log buffer being output is released. When the current log buffer is released, HiRDB then outputs both at the same time. This is called bus output.

Data length excluding the bus output (bytes)
This information includes the number of times data was output from the log input/output buffer to system log file, excluding the bus output, at the HiRDB system or server, and the maximum, minimum, and average log block lengths.

Number of buffer sectors placed in output wait status
This information includes the number of log output buffer sectors waiting for completion of output to the system log file when output to the system log file was completed at the HiRDB system or server, and the maximum number of such buffer sectors 100, the minimum number of such buffer sectors 100, and the average number of such buffer sectors 100.

Number of times data was written into file
This is the number of times data was written into system log file at the HiRDB system or server.
This value includes the number of write operations executed to change the status of system log file. If dual system log files are used, the value also includes the number of write operations for each file version. Additionally, this value includes the number of system log file output operations that occur when the file status changes due to file swapping.

Number of times write error occurred
This is the number of times a system log file write error occurred at the HiRDB system or server.

Log file swapping time (milliseconds)
This information includes the number of times swapping occurred on the system log files at the HiRDB system or server, and the maximum, minimum, and average time elapsed before system log files were swapped.

Length of log input data (bytes)
This information includes the number of logged entries made from the system log file during rollback at the HiRDB system or server, and the maximum, minimum, and average lengths of logged data.

File reads count
This is the number of times logged data was read from the system log file during rollback at the HiRDB system or server.

Number of read errors
This is the number of times a system log file read error occurred at the HiRDB system or server.

Dictionary information

Number of table definition information acquisition requests
This is the number of times table manipulation was executed in the single server or front-end server.

Table definition information buffer hits count
This is the number of times requested table definition information was found in the table definition information buffer in the single server or front-end server.
If the table definition information buffer hits count is less than the number of table definition information acquisition requests, the size of the table definition information buffer should be reevaluated.

Number of table definition information items in the table definition information buffer
This is the number of table definition information items buffered in the table definition information buffer in the single server or front-end server, and the maximum, minimum, and average numbers of table definition information items.

Length of table definition information placed in the table definition information buffer (bytes)
This information includes the number of table definition information items placed in the table definition information buffer in the single server or front-end server, and the maximum, minimum, and average sizes of the table definition information buffer used per table definition information item.

Size of table definition information buffer used (bytes)
This information includes the number of table definition information items placed in the table definition information buffer in the single server or front-end server, and the maximum, minimum, and average values of the total length of the table definition information.
If the maximum value is extremely small compared to the size of the table definition information buffer, the table definition information buffer may be too large. In this case, you should reevaluate the size of this buffer.

Table access privilege information acquisitions count
This is the number of times table access privilege was acquired to manipulate a table at the single server or front-end server.

Table access privilege information buffer hits count
This is the number of times the requested table access privilege was found in the table access privilege information buffer at the single server or front-end server.
If this value is extremely small compared to the acquisitions count, privileges may be granted to more than 100 users per table. In this case, you should evaluate whether PUBLIC privileges can be granted for the corresponding table.

Number of user privilege information acquisition requests
This is the number of times a CONNECT request was issued from a UAP to a single server or front-end server.

User privilege information buffer hits count
This is the number of times the requested user privilege information was found in the user privilege information buffer for the CONNECT requests issued from a UAP to a single server or front-end server.
If this value is less than the number of user privilege information acquisition requests, you should reevaluate the size of the user privilege information buffer.

Number of user privilege information buffer users
This information includes the number of times the requested user privilege information was placed in the user privilege information buffer for the CONNECT requests issued from a UAP to a single server or front-end server, and the maximum, minimum, and average numbers of such users.
If the maximum value times 34 (bytes) is extremely small compared to the size of the user privilege information buffer, you should reevaluate the size of the user privilege information buffer.

Length of data handled during communication with dictionary server (bytes)
This information includes the number of table definition information acquisition requests when the requested table definition information was not found in the table definition information buffer at the front-end server, and the maximum, minimum, and average lengths of data handled during communication with the dictionary server.

Dictionary server communications count
This is the number of times communication was established with the dictionary server to acquire table definition information because the requested table definition information was not found in the table definition information buffer at the front-end server.

Number of view analysis information acquisition requests
This is the number of times view analysis information was acquired to manipulate a view at the single server or front-end server.

View analysis information buffer hits count
This is the number of times the requested view analysis information was found in the view analysis information buffer at the single server or front-end server.
If the view analysis information buffer hits count is less than the number of view analysis information acquisition requests, you should reevaluate the size of the view analysis information buffer.

Number of analysis information items in view analysis information buffer
This is the number of view analysis information items placed in the view analysis information buffer.

Size of view analysis information buffer used per view definition information item (bytes)
This information includes the number of view analysis information items placed in the view analysis information buffer, and the maximum, minimum, and average sizes of the view analysis information buffer used per view analysis information item.

Size of view analysis information buffer used (bytes)
This information includes the number of view analysis information items in the view analysis information buffer, and the maximum, minimum, and average sizes.
If the maximum value is extremely small compared to the size of the view analysis information buffer, the view analysis information buffer may be too large. In this case, you should evaluate whether the size of the view analysis information buffer is reasonable.

Size of view analysis information resulting in buffer mist (bytes)
This information includes the number of times the requested view analysis information was retrieved from the dictionary because it was not found in the view analysis information buffer at the single server or front-end server, and the maximum, minimum, and average sizes of such view analysis information.
If the total value is close to the size of the view analysis information buffer, you should increase the size of the view analysis information buffer.

Number of type definition information acquisition requests
This is the number of times type definition was referenced at the single server or front-end server.

User-defined type information buffer hits count
This is the number of times the requested type definition information was found in the user-defined type information buffer at the single server or front-end server.

Number of type definition information items in the user-defined type information buffer
This is the number of table definition information items buffered in the user-defined type information buffer in the single server or front-end server, and the maximum, minimum, and average numbers of type definition information items.

Size of user-defined type information buffer used per type definition information item (bytes)
This information includes the number of type definition information items placed in the user-defined type information buffer at the single server or front-end server, and the maximum, minimum, and average sizes of the user-defined type information buffer used per type definition information item.

Total size of user-defined type information buffer used (bytes)
This information includes the number of type definition information items acquired at the single server or front-end server, and the maximum, minimum, and average sizes of the user-defined type information buffer.
If the maximum value is less than the size of the allocated user-defined type information buffer, the buffer size may be too large. You should reevaluate the size of the user-defined type information buffer.

Size of allocated user-defined type information buffer (bytes)
This information includes the number of buffer sectors allocated for user-defined type information at the single server or front-end server, and the maximum, minimum, and average sizes of the user-defined type information buffer. In this case, the maximum, minimum, and average values are the same.

Number of routine definition information acquisition requests
This is the number of times routine definition was referenced at the single server or front-end server.

Routine definition information buffer hits count
This is the number of times the requested routine definition information was found in the routine definition information buffer at the single server or front-end server.
If the routine definition information buffer hits count is less than the number of routine definition information acquisition requests, you should reevaluate the size of the routine definition information buffer.

Number of routine definition information items in the routine definition information buffer
This is the number of routine definition information items buffered in the routine definition information buffer in the single server or front-end server, and the maximum, minimum, and average numbers of routine definition information items.

Size of routine definition information buffer used per routine definition information item that was placed in the routine definition information buffer (bytes)
This information includes the number of routine definition information items placed in the routine definition information buffer at the single server or front-end server, and the maximum, minimum, and average sizes of the routine definition information buffer per routine definition information item.

Total size of routine definition information buffer (bytes)
This information includes the number of items placed in the routine definition information buffer at the single server or front-end server, and the maximum, minimum, and average sizes of the routine definition information buffer used.

Size of allocated routine definition information buffer (bytes)
This information includes the number of buffer sectors allocated for routine definition information at the single server and front-end server, and the maximum, minimum, and average sizes of the routine definition information buffer. In this case, the maximum, minimum, and average values are the same.

Number of routine definition acquisition requests for plug-in function
This is the number of times a plug-in function's routine was referenced at the single server or front-end server.

Plug-in function's routine definition information buffer hits count
This is the number of times a requested plug-in function's routine information was found in the routine definition information buffer at the single server or front-end server.
If the plug-in function's routine definition information buffer hits count is less than the number of routine definition acquisition requests for the plug-in function, you should reevaluate the size of the routine definition information buffer.

Number of registry information acquisition requests
This is the number of times registry information was referenced at the single server or front-end server.

Registry information buffer hits count
This is the number of times the requested registry information was found in the registry information buffer at the single server or front-end server.
If the registry information buffer hits count is less than the number of registry information acquisition requests, you should reevaluate the size of the registry information buffer.

Number of registry information items in the registry information buffer
This is the number of registry information items buffered in the registry information buffer in the single server or front-end server, and the maximum, minimum, and average numbers of registry information items.

Size of registry information buffer per registry information item (bytes)
This information includes the number of registry information items placed in the registry information buffer at the single server or front-end server, and the maximum, minimum, and average sizes of the registry information buffer per registry information item.

Total size of registry information buffer used (bytes)
This information includes the number of registry information items placed in the registry information buffer at the single server or front-end server, and the maximum, minimum, and average sizes of the registry information buffer used.

User authentication time for directory registration (microseconds)
This information includes the number of user authentication requests issued to determine whether the user is registered in the Directory Server, and the maximum, minimum, and average execution time.

Group checking time (microseconds)
This information includes the number of times checking was requested to determine whether the user belongs to a Directory Server role, and to determine the maximum, minimum, and average execution time.

SQL object information for single server, front-end server, back-end server, or dictionary server

Number of SQL object acquisition requests
This is the number of times an SQL object was acquired at the single server, front-end server, back-end server, or dictionary server.

SQL object buffer hits count
This is the number of times a requested SQL object was found in the SQL object buffer at the single server, front-end server, back-end server, or dictionary server.
If the SQL object buffer hits count is less than the number of SQL object acquisition requests, you should reevaluate the size of the SQL object buffer.

Number of SQL objects in the SQL object buffer
This information includes the number of SQL objects in the SQL object buffer at the single server, front-end server, back-end server, and dictionary server, the information update count for the number of SQL objects, and the maximum, minimum, and average values. The information update count is the number of times one of the maximum, minimum, or average number of SQL objects was updated.

Total length of SQL objects in the SQL object buffer (bytes)
This information includes the information update count for the total size of SQL objects in the SQL object buffer at the single server, front-end server, back-end server, and dictionary server, and the maximum, minimum, and average values. The information update count is the number of times one of the maximum, minimum, or average value of this total size of SQL objects was updated.

Note

HiRDB manages the SQL object buffer in increments of 1 kilobyte. Therefore, each SQL object uses an SQL object buffer whose size is at least the size of the SQL object rounded up to a full kilobyte. The sum of these SQL object sizes is not the total size of the space used by the SQL objects. There may not be free space in the SQL object buffer even when the sum of the SQL object sizes is less than the value specified as the size of the SQL object buffer.

Number of SQL objects taken out of the SQL object buffer
This is the number of SQL objects that were invalidated in the SQL object buffer to make space for new SQL objects at the single server, front-end server, back-end server, or dictionary server.

Length of SQL object (bytes)
This information includes the number of SQL objects placed in the SQL object buffer at the single server, front-end server, back-end server, or dictionary server, and the maximum, minimum, and average lengths of the SQL object.

Number of stored procedure object acquisition requests
This is the number of requests issued to place stored procedure objects in the SQL object buffer at the single server or front-end server.
For the back-end server and dictionary server, this value is included in the number of SQL object acquisition requests.

SQL object buffer hits count for stored procedure objects
This is the number of times a requested stored procedure object was found in the SQL object buffer at the single server or front-end server.
If the SQL object buffer hits count for stored procedure objects is less than the number of stored procedure object acquisition requests at the single server or front-end server, you should reevaluate the size of the SQL object buffer.
For the back-end server and dictionary server, this value is included in the SQL object buffer hits count.

Number of stored procedure objects placed in the SQL object buffer
This is the number of stored procedure objects buffered in the SQL object buffer in the single server or front-end server, and the maximum, minimum, and average numbers of objects.
For the back-end server and dictionary server, this value is included in the number of SQL objects in the SQL object buffer.

Total length of stored procedure objects in the SQL object buffer
This information includes the number of times a stored procedure object was acquired from the SQL object buffer at the single server or front-end server, and the maximum, minimum, and average lengths of such objects.
For the back-end server and dictionary server, this value is included in the total length of SQL objects in the SQL object buffer.

Number of stored procedure objects taken out of the SQL object buffer
This is the number of stored procedure objects invalidated in the SQL object buffer to create space for new stored procedure objects at the single server or front-end server.
For the back-end server and dictionary server, this value is included in the number of SQL objects taken out of the SQL object buffer.

Length of stored procedure objects (bytes)
This information includes the number of stored procedure objects placed in the SQL object buffer at the single server or front-end server, and the maximum, minimum, and average lengths of such objects.
For the back-end server and dictionary server, this value is included in the length of SQL objects.

Number of times stored procedure objects were recompiled
This is the number of times stored procedure objects were recompiled due to changes made to indexes at the single server or front-end server.
This information is not applicable to the back-end server or dictionary server.

14.3.3 UAP statistical information

The following shows the statistical information about UAPs.

pdstedit VV-RR(Object Option) ***** UAP INFORMATION *****
INPUT          :/tmp/stjdata [1]
OUTPUT RANGE   :**/**/** **:**:** - **/**/** **:**:** [2]
-----------------------------------------------------------------------------
HOST = test [3]
-----------------------------------------------------------------------------
EDIT TIME 2003/04/03 22:00:00 - 2003/04/03 23:00:00 [4]
UAP NAME [5]
 SERVICE NAME [6]               [7]   [8]   [9]   [10]  [11]  [12]  [13]
                                EXEC  NORM  ERROR TTIME TAVG  CACHE LOCK
------------------------------   ----- ----- ----- ----- ----- ----- -----
                                [14]  [15]  [16]  [17]  [18]  [19]
                                LMAX  LAVG  CTIME CTAVG SVEXT SVEXA
                                ----- ----- ----- ----- -----
                                [20]  [21]  [22]  [23]  [24]  [25]  [26]
  *SQL OBJECT*                  REQ   RAVG  HITS  HAVG  CRT   CAVG  SMAX
                                ----- ----- ----- ----- ----- ----- -----
        [27]  [28]  [29]  [30]  [31]  [32]  [33]  [34]  [35]  [36]  [37]
  *LN1* COMT  ROLB  FROW  DROW  IROW  UROW  SET   OPEN  FETC  CLOS  DESC
        ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
        [38]  [39]  [40]  [41]  [42]  [43]  [44]  [45]  [46]  [47]  [48]
  *LN2* SEL   INS   UPD   DEL   LOCK  CRTT  DRPT  ALTT  CRTI  DRPI  CMTT
        ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
        [49]  [50]  [51]  [52]  [53]  [54]  [55]  [56]  [57]  [58]  [59]
  *LN3* CMTC  CRTS  DRPS  GRTR  GRTS  GRTA  GRTC  GRTD  RVKR  RVKS  RVKA
        ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
        [60]  [61]  [62]  [63]  [64]  [65]  [66]  [67]  [68]  [69]  [70]
  *LN4* RVKC  RVKD  CRTV  DRPV  PRGT  CRTP  DRPP  ALTP  CALL  DESI  MISC
        ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
                                [71]  [72]  [73]  [74]
  *STORED ROUTINE OBJECT*       REQ   RAVG  HITS  HAVG
                                ----- ----- ----- -----
                                [75]  [76]  [77]  [78]  [79]
  *DB ACCESS*                   MAXIO MINIO MWFN  MWFEC MWFVL
                                ----- ----- ----- ----- -----
                                [80]  [81]  [82]  [83]
                                MWHTS MBSL1 MBSL2 MBSL3
                                ----- ----- ----- -----
        [84]  [85]  [86]  [87]  [88]  [89]  [90]  [91]  [92]  [93]  [94]
  *LN1* IOTIM DIDRC DIDUC DIDHC DIDHR DIDRD DIDWT LBRFC LBUPC LBRHC LBUHC
        ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
        [95]  [96]  [97]  [98]  [99]  [100] [101] [102] [103] [104] [105]
  *LN2* LRFHR LUPHR LBRDC LBWTC BFSHC BRDWC BWTWC BLKWC WFRDC WFWTC WBFOC
        ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----
        [106] [107] [108] [109] [110] [111] [112] [113]  [114] [115] [116]
  *LN3* SCHSK SCHCH LDIRC LDIUC LDIHC LDIRD LDIWT LBFSHC ARREQ ARWC  ARWT
        ----- ----- ----- ----- ----- ----- ----- -----  ----- ----- -----
        [117] [118] [119]
  *LN4* ARSTA HJMAX HJAVG
        -----
uap01
 service01
                                   28    28     0 6.29k   225 3.93k     0
                                    0     0 1.06k    38 5.85k   209
  *SQL OBJECT*                    136     5    37     1    99     4 4.13k
  *LN1*   123     0   503     0     0     0   136   136   526   119     0 [118]
     **     4     0    18     0     0     0     5     5    19     4     0 [119]
  *LN2*     0     0     0     0     0     0     0     0     0     0     0
     **     0     0     0     0     0     0     0     0     0     0     0
  *LN3*     0     0     0     0     0     0     0     0     0     0     0
     **     0     0     0     0     0     0     0     0     0     0     0
  *LN4*     0     0     0     0     0     0     0     0     0     0     0
     **     0     0     0     0     0     0     0     0     0     0     0
  *STORED ROUTINE OBJECT*           0     0     0     0
  *DB ACCESS*                       0     0     0     0     0
                                    0     0     0     0
  *LN1*    12 1.37k     0 1.21k    89   156     0     0     0     0     0
     **     0    49     0    43           6     0     0     0     0     0
  *LN2*     0     0     0     0   141     0     0     0     0     0     0
     **                 0     0     5     0     0     0     0     0     0
  *LN3*     0     0     0     0     0     0     0     0      0     0     0
     **                 0     0     0     0     0     0      0     0     0
  *LN4*     0     0     0
     **     0     0     0
uap02
 service02
                                    5     5     0 5.28k 1.06k 6.77k     0
                                    0     0   820   164 5.03k 1.01k
  *SQL OBJECT*                    106    21    29     6    77    15 4.13k
  *LN1*   110     0   490     0     0     0   106   106   496   106     0
     **    22     0    98     0     0     0    21    21    99    21     0
  *LN2*     0     0     0     0     0     0     0     0     0     0     0
     **     0     0     0     0     0     0     0     0     0     0     0
  *LN3*     0     0     0     0     0     0     0     0     0     0     0
     **     0     0     0     0     0     0     0     0     0     0     0
  *LN4*     0     0     0     0     0     0     0     0     0     0     0
     **     0     0     0     0     0     0     0     0     0     0     0
  *STORED ROUTINE OBJECT*           0     0     0     0
  *DB ACCESS*                       0     0     0     0     0
                                    0     0     0     0
  *LN1*    14 1.30k     0 1.12k    87   175     0     0     0     0     0
     **     3   259     0   224          35     0     0     0     0     0
  *LN2*     0     0     0     0   137     0     0     0     0     0     0
     **                 0     0    27     0     0     0     0     0     0
  *LN3*     0     0     0     0     0     0     0     0      0     0     0
     **                 0     0     0     0     0     0      0     0     0
  *LN4*     0     0     0
     **     0     0     0
*TOTAL* [120]                       33    33     0 11.6k   351 4.36k     0
                                    0     0 1.88k    57 10.9k   330
  *SQL OBJECT*                    242     7    66     2   176     5 4.13k
  *LN1*   233     0   993     0     0     0   242   242 1.02k   225     0
     **     7     0    30     0     0     0     7     7    31     7     0
  *LN2*     0     0     0     0     0     0     0     0     0     0     0
     **     0     0     0     0     0     0     0     0     0     0     0
  *LN3*     0     0     0     0     0     0     0     0     0     0     0
     **     0     0     0     0     0     0     0     0     0     0     0
  *LN4*     0     0     0     0     0     0     0     0     0     0     0
     **     0     0     0     0     0     0     0     0     0     0     0
  *STORED ROUTINE OBJECT*           0     0     0     0
  *DB ACCESS*                       0     0     0     0     0
                                    0     0     0     0
  *LN1*    26 2.67k     0 2.34k    88   331     0     0     0     0     0
     **     1    81     0    71          10     0     0     0     0     0
  *LN2*     0     0     0     0   278     0     0     0     0     0     0
     **                 0     0     8     0     0     0     0     0     0
  *LN3*     0     0     0     0     0     0     0     0      0     0     0
     **                 0     0     0     0     0     0      0     0     0
  *LN4*     0     0     0
     **     0     0     0
-----------------------------------------------------------------------------
FILE KIND   LOG KIND   FIRST                 LAST                         NUM
STJ         uap        2003/04/03 22:45:56   2003/04/03 22:56:24           33
-----------------------------------------------------------------------------

NO FILE KIND:LOG FILE NAME
 LOG KIND             FIRST                 LAST                         NUM
1 STJ      :/tmp/stjdata/pdstj1
 sys                  2003/04/03 22:46:30   2003/04/03 22:46:30            2
 uap                  2003/04/03 22:45:56   2003/04/03 22:47:53           32
 sql                  2003/04/03 22:45:56   2003/04/03 22:47:53          898
 sop                  2003/04/03 22:45:56   2003/04/03 22:47:53          105
 dop                  2003/04/03 22:45:56   2003/04/03 22:47:52          113
 pcd                  2003/04/03 22:45:56   2003/04/03 22:47:53          759
 obj                  ****/**/** **:**:**   ****/**/** **:**:**            0
 sqh                  2003/04/03 22:45:56   2003/04/03 22:47:53          145
 buf                  2003/04/03 22:46:32   2003/04/03 22:46:32            3
 fil                  2003/04/03 22:46:32   2003/04/03 22:46:32           28
 dfw                  2003/04/03 22:45:58   2003/04/03 22:47:31           53
 idx                  2003/04/03 22:46:32   2003/04/03 22:46:32            1
 fsv                  ****/**/** **:**:**   ****/**/** **:**:**            0
 hba                  ****/**/** **:**:**   ****/**/** **:**:**            0
2 STJ      :/tmp/stjdata/pdstj2
 sys                  2003/04/03 22:48:31   2003/04/03 22:56:35           10
 uap                  2003/04/03 22:47:54   2003/04/03 22:56:24           67
 sql                  2003/04/03 22:47:53   2003/04/03 22:56:24          623
 sop                  2003/04/03 22:47:53   2003/04/03 22:54:12           74
 dop                  2003/04/03 22:47:53   2003/04/03 22:56:23          102
 pcd                  2003/04/03 22:47:53   2003/04/03 22:56:24          516
 obj                  ****/**/** **:**:**   ****/**/** **:**:**            0
 sqh                  2003/04/03 22:47:53   2003/04/03 22:56:24          144
 buf                  2003/04/03 22:56:45   2003/04/03 22:56:45            3
 fil                  2003/04/03 22:56:45   2003/04/03 22:56:45           28
 dfw                  2003/04/03 22:48:04   2003/04/03 22:56:45           18
 idx                  2003/04/03 22:56:45   2003/04/03 22:56:45            1
 fsv                  ****/**/** **:**:**   ****/**/** **:**:**            0
 hba                  ****/**/** **:**:**   ****/**/** **:**:**            0

Explanation

Name of input statistics unload file or name of the directory containing the input statistics unload file (maximum of 58 bytes)

Output range (output start date/time to output end date/time)

Name of host requesting output of UAP or service statistical information

Edit period (collection start time to collection end time)

UAP name
This is the name of the UAP for which statistical information was edited.

Service name
This is the name of the service for which statistical information was edited. This name depends on the type of UAP that accessed HiRDB.¹

UAP or transaction executions count
This is the number of times the same UAP or transaction was executed according to the statistics log information.
When UAP statistical information is obtained for UAP execution unit, the utility counts the number of times the UAP issued DISCONNECT as the executions count.

UAP or transaction normal terminations count
This is the number of times the same UAP or transaction terminated normally according to the statistics log information.

UAP or transaction abnormal terminations count
Number of times the last transaction executed by the UAP or transaction terminated in rolled-back status according to the statistics log information.

UAP or transaction execution time (milliseconds)
This is the total execution time for the same UAP or transaction according to the statistics log information.
If UAP statistical information is collected in units of UAP executions, the utility treats the time elapsed before the UAP issued DISCONNECT since it issued CONNECT as the execution time.

Average UAP or transaction execution time (milliseconds)
This is the average execution time for the same UAP or transaction according to the statistics log information.
If UAP statistical information is collected in units of UAP executions, the utility treats the time elapsed before the UAP issued DISCONNECT since it issued CONNECT as the execution time.

Size of table definition information buffer (bytes)
This is the average size of the table definition information buffer used for the table definition information that was acquired by the same UAP or transaction according to the statistics log information.

Total lock release wait time for the UAP or transaction (milliseconds)²
This is the total lock release wait time for the UAP or transaction.

Maximum lock release wait time for the UAP or transaction (milliseconds)²
This is the maximum lock release wait time for the UAP or transaction.

Average lock release wait time for one UAP or transaction (milliseconds)²
This is the average lock release wait time for one UAP or transaction.

Total CPU time for all servers within the transaction (milliseconds)

Average CPU time per UAP or transaction (CTIME EXEC) (milliseconds)

Total single server or front-end server processing time for the UAP or transaction (milliseconds)

Average single server or front-end server processing time per UAP or transaction (SVEXT EXEC) (milliseconds)

Number of SQL object acquisition requests
This is the number of SQL object acquisition requests for the SQL statements issued by the same UAP or transaction within the specified time period.

Number of SQL object acquisition requests by UAP or transaction
This is the average number of SQL object acquisition requests per UAP or transaction execution for the SQL statements that were issued by the same UAP or transaction within the specified time period.

SQL object buffer hits count
This is the number of times a requested SQL object was found in the SQL object buffer for the SQL statements that were issued by the same UAP or transaction within the specified time period.

SQL object buffer hits count per UAP or transaction
This is the average number of times per UAP or transaction execution a requested SQL object was found in the SQL object buffer for the SQL statements that were issued by the same UAP or transaction within the specified time period.

SQL object creations count
This is the number of times an SQL object was created for the SQL statements issued by the same UAP or transaction within the specified time period.

SQL object creations count per UAP or transaction
This is the average number of times per UAP or service execution that an SQL object was created for the SQL statements issued by the same UAP or transaction within the specified time period.
If this value is large, the size of the SQL object buffer should be increased.

Maximum size of SQL objects created (bytes)
This is the maximum size of the SQL objects created for the SQL statements that were issued by the same UAP or transaction within the specified time period.

COMMIT statement executions count
This is the number of times the COMMIT statement issued by the same UAP or transaction was executed within the specified time period.

ROLLBACK statement executions count
This is the number of times the ROLLBACK statement issued by the same UAP or transaction was executed within the specified time period.

Actually retrieved rows count
This is the number of retrieved rows returned to the UAP or transaction by the FETCH and SELECT statements that were issued by the same UAP or transaction within the specified time period.

Actually deleted rows count
This is the number of rows deleted by the DELETE statement that was issued by the same UAP or transaction within the specified time period.

Actually inserted rows count
This is the number of rows inserted by the INSERT statement that was issued by the same UAP or transaction within the specified time period.

Actually updated rows count
This is the number of rows updated by the UPDATE statement that was issued by the same UAP or transaction within the specified time period.

SETUP statement executions count
This is the number of times preprocessing was executed by the same UAP or transaction within the specified time period.

OPEN statement executions count
This is the number of times the OPEN statement was executed by the same UAP or transaction within the specified time period.

FETCH statement executions count
This is the number of times the FETCH statement was executed by the same UAP or transaction within the specified time period.

CLOSE statement executions count
This is the number of times the CLOSE statement was executed by the same UAP or transaction within the specified time period.

DESCRIBE statement executions count
This is the number of times the DESCRIBE statement was executed by the same UAP or transaction within the specified time period.

SELECT statement executions count
This is the number of times the SELECT statement was executed by the same UAP or transaction within the specified time period.

INSERT statement executions count
This is the number of times the INSERT statement was executed by the same UAP or transaction within the specified time period.

UPDATE statement executions count
This is the number of times the UPDATE statement was executed by the same UAP or transaction within the specified time period.

DELETE statement executions count
This is the number of times the DELETE statement was executed by the same UAP or transaction within the specified time period.

LOCK statement executions count
This is the number of times the LOCK statement was executed by the same UAP or transaction within the specified time period.

CREATE TABLE executions count
This is the number of times CREATE TABLE was executed by the same UAP or transaction within the specified time period.

DROP TABLE executions count
This is the number of times DROP TABLE was executed by the same UAP or transaction within the specified time period.

ALTER TABLE executions count
This is the number of times ALTER TABLE was executed by the same UAP or transaction within the specified time period.

CREATE INDEX executions count
This is the number of times CREATE INDEX was executed by the same UAP or transaction within the specified time period.

Number of times DROP INDEX issued by the UAP or transaction was executed
This is the number of times DROP INDEX was executed by the same UAP or transaction within the specified time period.

COMMENT (TABLE) executions count
This is the number of times COMMENT (TABLE) was executed by the same UAP or transaction within the specified time period.

COMMENT (COLUMN) executions count
This is the number of times COMMENT (COLUMN) was executed by the same UAP or transaction within the specified time period.

CREATE SCHEMA executions count
This is the number of times CREATE SCHEMA was executed by the same UAP or transaction within the specified time period.

DROP SCHEMA executions count
This is the number of times DROP SCHEMA was executed by the same UAP or transaction within the specified time period.

GRANT RDAREA executions count
This is the number of times GRANT RDAREA was executed by the same UAP or transaction within the specified time period.

GRANT SCHEMA executions count
This is the number of times GRANT SCHEMA was executed by the same UAP or transaction within the specified time period.

GRANT access privilege executions count
This is the number of times GRANT access privilege was executed by the same UAP or transaction within the specified time period.

GRANT CONNECT executions count
This is the number of times GRANT CONNECT was executed by the same UAP or transaction within the specified time period.

GRANT DBA executions count
This is the number of times GRANT DBA was executed by the same UAP or transaction within the specified time period.

REVOKE RDAREA executions count
This is the number of times REVOKE RDAREA was executed by the same UAP or transaction within the specified time period.

REVOKE SCHEMA executions count
This is the number of times REVOKE SCHEMA was executed by the same UAP or transaction within the specified time period.

REVOKE access privilege executions count
This is the number of times REVOKE access privilege was executed by the same UAP or transaction within the specified time period.

REVOKE CONNECT executions count
This is the number of times REVOKE CONNECT was executed by the same UAP or transaction within the specified time period.

REVOKE DBA executions count
This is the number of times REVOKE DBA was executed by the same UAP or transaction within the specified time period.

CREATE VIEW executions count
This is the number of times CREATE VIEW was executed by the same UAP or transaction within the specified time period.

DROP VIEW executions count
This is the number of times DROP VIEW was executed by the same UAP or transaction within the specified time period.

PURGE TABLE statement executions count
This is the number of times the PURGE TABLE statement was executed by the same UAP or transaction within the specified time period.

CREATE PROCEDURE executions count
This is the number of times CREATE PROCEDURE was executed by the same UAP or transaction within the specified time period.

DROP PROCEDURE executions count
This is the number of times DROP PROCEDURE was executed by the same UAP or transaction within the specified time period.

ALTER PROCEDURE executions count
This is the number of times ALTER PROCEDURE was executed by the same UAP or transaction within the specified time period.

CALL statement executions count
This is the number of times the CALL statement was executed by the same UAP or transaction within the specified time period.

DESCRIBE statement (INPUT) executions count
This is the number of times the DESCRIBE statement (INPUT) was executed by the same UAP or transaction within the specified time period.

Other executions count
This is the other executions count for the same UAP or transaction within the specified time period.

Number of stored procedure object acquisition requests
This is the number of stored procedure object acquisition requests for the SQL statements issued by the same UAP or transaction within the specified time period.

Number of stored procedure object acquisition requests per UAP or transaction
This is the average number of stored procedure object acquisition requests per UAP or transaction execution made for the SQL statements that were issued by the same UAP or transaction within the specified time period.

SQL object buffer hits count
This is the number of times a requested stored procedure object was found in the SQL object buffer for the SQL statements that were issued by the same UAP or transaction within the specified time period.

SQL object buffer hits count per UAP or transaction
This is the average number of times per UAP or transaction execution that a requested stored procedure object was found in the SQL object buffer for the SQL statements that were issued by the same UAP or transaction within the specified time period.

Maximum database input/output time (milliseconds)

Minimum database input/output time per operation (milliseconds)

Maximum number of work table files used by UAP

Maximum number of work table files added for use by UAP

Maximum size of work table file used by UAP (MB)

Estimated hash size required to expand all hash data at one time during hash join or subquery hash execution (KB)

Maximum packet size after level 1 packet division during hash join, subquery hash execution (KB)

Maximum packet size after level 2 packet division during hash join, subquery hash execution (KB)

Maximum packet size after level 3 packet division during hash join, subquery hash execution (KB)

Total input/output time for the database (milliseconds)

Number of times a data page, index page, or directory page was referenced³

Number of times a data page, index page, or directory page was updated³

Buffer hits count for data pages, index pages, or directory pages³

Buffer hit rate for data pages, index pages, or directory pages (DIDHC DIDRC) (%)

Actual number of READ operations on a data page, index page, or directory page

Actual number of WRITE operations on a data page, index page, or directory page³

Number of times a LOB column data page was referenced³

Number of times a LOB column data page was updated³

Buffer hits count for referencing LOB column data pages³

Buffer hits count for updating LOB column data pages

Buffer hit rate for referencing LOB column data pages (LBRHC LBRFC) (%)

Buffer hit rate for updating LOB column data pages (LBUHC LBUPC) (%)

Actual number of READ operations on LOB column data pages

Actual number of WRITE operations on LOB column data pages³

Global buffer flushes count³

READ waits count on global buffer³

WRITE waits count on global buffer³

Lock waits count on global buffer³

Number of times work table data was read from work table file to global buffer³

Number of times work table data was written from global buffer to work table file³

Number of times the contents of work table buffer were forcibly output to work table file due to shortage of work table buffer space³

With a table for which SEGMENT REUSE was specified, the number of times the mode changed from new page allocate to free page reuse and then changed back to new page allocate again because there was no reusable space³

With a table for which SEGMENT REUSE was specified, the number of times the mode changed from new page allocate to free page reuse³

Number of times data pages and index pages were referenced from the applicable UAP using the local buffer³

Number of times data pages and index pages were updated from the applicable UAP using the local buffer³

Local buffer hit count for data pages and index pages
If a random access UAP's buffer hit count (LDIHC/LDIRC 100) is low, you need to tune the applicable local buffer.³

Number of real READs on data pages and index pages from the applicable UAP using the local buffer³
If the prefetch facility is used, this value includes the number of pre-READs achieved by prefetching. If the buffer hit rate (LDIHC/LDIRC 100) is low, this value is greater than the number of real READs.

Number of real WRITEs on data pages and index pages from the applicable UAP using the local buffer

Local buffer flush count (number of times the buffer contents were discarded to read new pages)³

Number of batch pre-read requests issued to asynchronous READ processes when the asynchronous READ facility is used³

Number of times synchronization waits occurred during batch pre-read operation executed by asynchronous READ processes when the asynchronous READ facility is used³

Synchronous wait time during batch pre-read operation executed by asynchronous READ processes when the asynchronous READ facility is used (milliseconds)³

Synchronous READ time during the first top-page batch read operation when the asynchronous READ facility is used (milliseconds)³

Maximum comparison count when a hash row partitioning table was searched during hash join, subquery hash execution

Average comparison count when a hash row partitioning table was searched during hash join, subquery hash execution³

Total value of each item per UAP or transaction execution

Average value of each item per UAP or transaction execution

Grand total for each item

¹ The following table shows the service name that is displayed for each type of UAP:

UAP type | Displayed service name
Open/TP1 UAP | Service requested from Open/TP1 SUP (service using program) to SPP (service provider program) | Name of the corresponding service
Service requested from TP1/Message Control to MHP (message handling program)
Other | 31 consecutive asterisks (*)
Other types of UAP

² For a HiRDB/Parallel Server, this is the total lock release wait time in the transaction (including parallel processing).

³ If the information is output for each transaction, this is the cumulative CONNECT value.

14.3.4 SQL statistical information

The following shows the statistical information about SQL:

pdstedit VV-RR          ***** SQL INFORMATION *****
INPUT          :/tmp/pdstj1 [1]
OUTPUT RANGE   :**/**/** **:**:** - **/**/** **:**:** [2]
-----------------------------------------------------------------------------
HOST = test [3]
-----------------------------------------------------------------------------
FES = fes01 [4]
-----------------------------------------------------------------------------
EDIT TIME 2001/09/30 00:00:00 - 2001/09/31 00:00:00 [5]
UAP NAME [6]
 SERVICE NAME [7]                 [8]   [9]   [10]  [11]
                                  PDATA PDAVG BES#  B#AVG
------------------------------     ----- ----- ----- -----
        [12] [13]     [14]  [15]  [16]  [17]  [18]  [19]  [20]  [21]
        KIND SERV     EXEC  TTIME FTCR  INSR  UPDR  DELR  CRTL  DRPL
        ---- -------- ----- ----- ----- ----- ----- ----- ----- -----

uap01
 service01
                                   745k   270     0     0
  *CNT* SQL           2.82k  272M     0   532     0     0     0     0 [22]
     **                     96.5k     0     0     0     0     0     0 [23]
  *CNT* FSQL              0     0     0     0     0     0 [22]
     **                         0     0     0     0     0 [23]
uap02
 service02
                                   467k    60     0     0
  *CNT* SQL           7.90k 79.0M 7.55k     0     0     0     0     0
     **                     10.0k     1     0     0     0     0     0
  *CNT* FSQL            750 5.60M 7.55k
     **                     12.0k     2
uap03
 service03
                                  11.2M   461     0     0
  *CNT* SQL           25.5k  310M 5.39k     0     0     0     0     0
     **                     12.2k     0     0     0     0     0     0
  *CNT* FSQL          2.32k 27.9M 5.39k
     **                     12.0k     2
uap04
 service04
                                  7.50M   534     0     0
  *CNT* SQL           14.7k  192M 5.99k   716   728   716     0     0
     **                     13.1k     0     0     0     0     0     0
  *CNT* FSQL            445 5.82M 1.99k
     **                     13.0k     4
*TOTAL*[24]                        19.9M   410     0     0
  *CNT* SQL           51.0k  854M 18.9k 1.25k   728   716     0     0
     **                     16.8k     0     0     0     0     0     0
  *CNT* FSQL          3.52k 39.3M 14.9k
     **                     11.2k     4
-----------------------------------------------------------------------------
FILE KIND   LOG KIND   FIRST                 LAST                         NUM
STJ         sql        2001/09/30 10:36:37   2001/09/30 12:34:03        50971
-----------------------------------------------------------------------------

Explanation

Name of input statistics unload file or name of the directory containing the input statistics unload file (maximum of 58 bytes)

Output range (output start date/time to output end date/time)

Name of host requesting output of SQL statistical information

Name of front-end server that executed SQL

Edit period (collection start time to collection end time)

UAP name
This is the name of the UAP for which statistical information was edited.

Service name
This is the name of the service for which statistical information was edited. This name depends on the type of UAP that accessed HiRDB.*

Total size of SQL objects created (bytes)
This is the total size of SQL objects created by the SQL statements that were issued within the UAP or service.

Average size of SQL objects created (bytes)
This is the average size of SQL objects created for the SQL statements that were issued within the UAP or service.
This value is obtained by the formula size of SQL objects created SQL executions count.

Number of back-end servers used
This is the number of back-end servers used for the SQL statements that were issued within the UAP or service.

Average number of back-end servers used
This is the average number of back-end servers used for the SQL statements that were issued within the UAP or service.

Type of output information
In the case of SQL, this is information about SQL. In the case of FSQL, this information is about the foreign server.

Information used by the system (not by users)

SQL executions count
If the type of output information is SQL, this is the number of times SQL statements issued within the UAP or service were executed. If the type of output information is FSQL, this is the number of times processing requests were issued to the foreign servers.

SQL execution time (microseconds)
If the type of output information is SQL, this is the total processing time for SQL statements issued within the UAP or service. If the type of output information is FSQL, this is the total processing time for the foreign servers. Note that this is the database access adaptor's processing time, not the foreign server's processing time.

Number of rows retrieved
If the type of output information is SQL, this is the number of rows retrieved by the FETCH and SELECT statements issued within the UAP or service.

Number of rows inserted
This is the number of rows inserted by the INSERT statement issued within the UAP or service.

Number of rows updated
This is the number of rows updated by the UPDATE statement issued within the UAP or service.

Number of rows deleted
This is the number of rows deleted by the DELETE statement issued within the UAP or service.

Number of times work tables were created
This is the number of times work tables were created internally by the SQL statements issued within the UAP or service.

Number of times work tables were deleted
This is the number of times work tables created internally by the SQL statements issued within the UAP or service were deleted. If an error has occurred, the correct number of times work tables were deleted may not be displayed.

Total of each item
If the type of output information is FSQL and the HiRDB External Data Access facility is not used, 0 or **** is displayed.

If the type of output information is SQL, this is the average value (total of each item/number of executions). If the type of output information is FSQL, this is the average value (total of each item/number of processing requests to the foreign server). If the HiRDB External Data Access facility is not used, 0 or **** is displayed.

Grand totals for each item

* The following table shows the service name that is displayed for each type of UAP:

UAP type | Displayed service name
Open/TP1 UAP | Service requested from Open/TP1 SUP (service using program) to SPP (service provider program) | Name of the corresponding service
Service requested from TP1/Message Control to MHP (message handling program)
Other | 31 consecutive asterisks (*)
Other types of UAP

14.3.5 Global buffer pool statistical information

The following shows the statistical information about the global buffer pool:

pdstedit VV-RR(Object Option) ***** GLOBAL BUFFER INFORMATION *****
INPUT          :/tmp/stjdata [1]
OUTPUT RANGE   :**/**/** **:**:** - **/**/** **:**:** [2]
-----------------------------------------------------------------------------
HOST = test [3]
-----------------------------------------------------------------------------
EDIT TIME 2003/04/03 22:00:00 - 2003/04/03 23:00:00 [4]
              [5]   [6]   [7]   [8]  [9]    [10]  [11]  [12] [13]  [14]
        *LN1* SYNCW MAXB  UPGET UPHIT(HIT)  UPFLS RFGET RFHIT(HIT) RFFLS
              ----- ----- ----- ----- ---   ----- ----- ----- ---  -----
              [15]  [16]  [17]  [18]  [19]  [20]  [21]  [22] [23]  [24]
        *LN2* READ  WRITE WAITR WAITW WAITL BFINS PRRED PRHIT(HIT) PRINS
              ----- ----- ----- ----- ----- ----- ----- ----- ---  -----
              [25]  [26]  [27]  [28]  [29]  [30]  [31]  [32]       [33]
        *LN3* GBHIT CURRF CURUP TRGUP SYNCC PRRDR LRDRC LWTRC      LBBKR
              ----- ----- ----- ----- ----- ----- ----- -----      -----
              [34]  [35]  [36]  [37]  [38]     [39]  [40]     [41]  [42]
        *LN4* LBBKW CINSM CFMAX CFAVG SLEPC    SLEPR SLEPA    SPINR SPINA
              ----- ----- ----- ----- -------- ----- -------- ----- -----
              [43]  [44]  [45]  [46]
        *LN5* SYNCL SYNCB ALTRW ALTUW
              ----- ----- ----- -----
SERVER :  sds [47]
 *BUFFER NAME:bp01 [48]            BUFFER:   10 [49]
        *LN1*     0     2   160   114( 52)     14    60    60( 27)     8
        *LN2*     6    72     0     2     0     0     0     0(  0)     0
        *LN3*    79     0     0     0     1     0     0     0          0
        *LN4*     0     0     0  ****  0.0e+00   0.0  *******   0.1 2.05k
        *LN5*     0     0     0     0
 *BUFFER NAME:bp02                 BUFFER:   10
        *LN1*     0     3 1.51k   933(  4)    278 20.8k 19.7k( 88)   657
        *LN2* 1.30k   607     0    36     0     0     0     0(  0)     0
        *LN3*    93     0     0     0     1     0     0     0          0
        *LN4*     0     0     0  ****  0.0e+00   0.0  *******   0.1 2.05k
        *LN5*     0     0     0     0
 *BUFFER NAME:bp03                 BUFFER:   10
        *LN1*     0     4 1.22k   647( 15)     50 3.15k 1.50k( 34) 1.73k
        *LN2* 2.22k   561     0    69     1     0     0     0(  0)     0
        *LN3*    49     0     0     0     1     0     0     0          0
        *LN4*     0     0     0  ****  0.0e+00   0.0  *******   0.4 2.05k
        *LN5*     0     0     0     0
 *TOTAL* [50]
        *LN1*     0     4 2.89k 1.69k(  6)    342 24.0k 21.3k( 79) 2.39k
        *LN2* 3.52k 1.24k     0   107     1     0     0     0(  0)     0
        *LN3*    85     0     0     0     3     0     0     0          0
        *LN4*     0     0     0  ****  0.0e+00   0.0  *******   0.2 2.05k
        *LN5*     0           0     0
-----------------------------------------------------------------------------
FILE KIND   LOG KIND   FIRST                 LAST                         NUM
STJ         buf        2003/04/03 22:46:32   2003/04/03 22:56:45            6
-----------------------------------------------------------------------------

NO FILE KIND:LOG FILE NAME
 LOG KIND             FIRST                 LAST                         NUM
1 STJ      :/tmp/stjdata/pdstj01
 sys                  2003/04/03 22:46:30   2003/04/03 22:46:30            2
 uap                  2003/04/03 22:45:56   2003/04/03 22:47:53           32
 sql                  2003/04/03 22:45:56   2003/04/03 22:47:53          898
 sop                  2003/04/03 22:45:56   2003/04/03 22:47:53          105
 dop                  2003/04/03 22:45:56   2003/04/03 22:47:52          113
 pcd                  2003/04/03 22:45:56   2003/04/03 22:47:53          759
 obj                  ****/**/** **:**:**   ****/**/** **:**:**            0
 sqh                  2003/04/03 22:45:56   2003/04/03 22:47:53          145
 buf                  2003/04/03 22:46:32   2003/04/03 22:46:32            3
 fil                  2003/04/03 22:46:32   2003/04/03 22:46:32           28
 dfw                  2003/04/03 22:45:58   2003/04/03 22:47:31           53
 idx                  2003/04/03 22:46:32   2003/04/03 22:46:32            1
 fsv                  ****/**/** **:**:**   ****/**/** **:**:**            0
 hba                  ****/**/** **:**:**   ****/**/** **:**:**            0
2 STJ      :/tmp/stjdata/pdstj02
 sys                  2003/04/03 22:48:31   2003/04/03 22:56:35           10
 uap                  2003/04/03 22:47:54   2003/04/03 22:56:24           67
 sql                  2003/04/03 22:47:53   2003/04/03 22:56:24          623
 sop                  2003/04/03 22:47:53   2003/04/03 22:54:12           74
 dop                  2003/04/03 22:47:53   2003/04/03 22:56:23          102
 pcd                  2003/04/03 22:47:53   2003/04/03 22:56:24          516
 obj                  ****/**/** **:**:**   ****/**/** **:**:**            0
 sqh                  2003/04/03 22:47:53   2003/04/03 22:56:24          144
 buf                  2003/04/03 22:56:45   2003/04/03 22:56:45            3
 fil                  2003/04/03 22:56:45   2003/04/03 22:56:45           28
 dfw                  2003/04/03 22:48:04   2003/04/03 22:56:45           18
 idx                  2003/04/03 22:56:45   2003/04/03 22:56:45            1
 fsv                  ****/**/** **:**:**   ****/**/** **:**:**            0
 hba                  ****/**/** **:**:**   ****/**/** **:**:**            0

Explanation

Name of input statistics unload file or name of the directory containing the input statistics unload file (maximum of 58 bytes)

Output range (output start date/time to output end date/time)

Name of host requesting output of global buffer pool statistical information

Edit period (collection start time to collection end time)

Number of pages output during synchronization point dump
This is the maximum number of pages output from the global buffer pool to the HiRDB file during a synchronization point dump.
If this value is large, many pages may be updated in the corresponding global buffer pool, and the updated page output rate may be low during a deferred write trigger, resulting in many pages kept in the global buffer pool. Evaluate whether the updated page output rate can be reduced during a deferred write trigger.

Maximum number of concurrently requested buffer sectors
This is the number of global buffer pool acquisition requests issued concurrently from multiple transactions.
If this value is almost the same as the number of global buffer sectors and the buffer shortages count is not 0, the buffer may be insufficient.

Update GETs count
This is the number of times buffer acquisition was requested to the global buffer pool for updating purposes.

Update buffer hits count
This is the number of times a page requested for the global buffer pool for updating purposes was found as the updated buffer.

Update buffer hit rate (%)
This is the ratio of update buffer hits count to the total of update GETs count and reference GETs count. It is the probability of finding a requested page (for updating or referencing purposes) as updated buffer in the global buffer pool without executing a physical input/output operation.
This value is obtained from the following formula:

Update buffer hit rate = (update buffer hits count (reference GETs count + update GETs count)) 100

If this value is small, the deferred write processing may not be effective. In this case, you need to increase the number of global buffer pool sectors or reduce the updated page output rate during a deferred write trigger.

Update buffer flushes count
This is the number of times the buffer was invalidated after writing its contents to a HiRDB file to create an empty buffer for reading new pages, because the referenced buffer had been updated.
If this value is large, the deferred write processing may not be effective.

Reference GETs count
This is the number of times buffer acquisition was requested for the global buffer pool for referencing purposes.

Reference buffer hits count
This is the number of times a page requested for the global buffer pool for referencing purposes was found as the referenced (not updated) buffer.

Reference buffer hit rate (%)
This is the ratio of reference buffer hits count to the total of reference GETs count and update GETs count. It is the probability of finding a requested page (for referencing or updating purposes) as referenced buffer in the global buffer pool without executing a physical input/output operation.
This value is obtained from the following formula:

Reference buffer hit rate = (reference buffer hits count (reference GETs count + update GETs count)) 100

The reference buffer hit rate should be about 80%. If it is less than 80%, you need to increase the number of buffer sectors.

Reference buffer flushes count
This is the number of times the buffer was invalidated to create an empty buffer for reading new pages, because the referenced buffer had not been used since that time.

Actual READs count
This is the number of times pages were read from HiRDB file.

Actual WRITEs count
This is the number of times pages were written to a HiRDB file.

Input waits count
This is the number of times wait status occurred because a requested page was being read from a HiRDB file by another user.

Output waits count
This is the number of times wait status occurred because a requested page was being written to a HiRDB file by another user.

Buffer lock release waits count
This is the number of times wait status occurred because a requested page was being used by another user.

Buffer shortages count
This is the number of times there was no available buffer because all buffers (defined buffer sectors) were being used for referencing or update processing.
This value must be 0.

Number of prefetched input pages
This is the number of pages read in memory as being subject to prefetch processing.

Prefetch hits count
This is the hits count on the pages that were read in memory as being subject to prefetch processing.

Prefetch hit rate (%)
This is the ratio of the prefetch hits count to the number of prefetched input pages.

Prefetch resource shortages count
This is the number of times a shortage occurred on the resources required for prefetch processing.

Global buffer hit rate (%)

Number of current reference buffers

Number of current update buffers

Number of update buffers that triggers output operation when deferred write trigger is on

Number of synchronization point dumps that occurred

Number of prefetch READ requests

Number of LOB global buffer READ requests

Number of LOB global buffer WRITE requests

Number of LOB global buffer pages input in batch mode

Number of LOB global buffer pages output in batch mode

Information used by the system (not for the user)

Information used by the system (not for the user)

Information used by the system (not for the user)

Information used by the system (not for the user)

Percentage of buffer contention-lock release waits resulting from buffer lock processing (%)

Information used by the system (not for the user)

Information used by the system (not for the user)

Information used by the system (not for the user)

Buffer pool lock exclusive time during synchronization point processing (microseconds)

Number of buffers processed within buffer pool lock exclusive time during synchronization point processing

Take-over count of database write processing by reference request hit during synchronization point processing

Take-over count of database write processing by update request hit during synchronization point processing

Server name
This is the server requesting output of global buffer pool statistical information.

Global buffer pool name
This is the name of the global buffer pool for which statistical information was edited.

Number of buffer sectors in the global buffer pool
This is the number of buffer sectors in the corresponding global buffer pool.

Totals for each item

14.3.6 Statistical information about HiRDB files for database manipulation

The following shows the statistical information about HiRDB files for database manipulation:

pdstedit VV-RR          ***** HiRDB FILE INFORMATION *****
INPUT          :/tmp/pdstj1 [1]
OUTPUT RANGE   :**/**/** **:**:** - **/**/** **:**:** [2]
-----------------------------------------------------------------------------
HOST = test [3]
-----------------------------------------------------------------------------
EDIT TIME 1996/10/30 00:00:00 - 1996/10/31 00:00:00 [4]
              [5]    [6]    [7]    [8]    [9]    [10]   [11]   [12]
        *LN1* SYNC-R SYNC-W AIO-R  AIO-W  LISTIO OPEN   CLOSE  IOERR
              -----  -----  -----  -----  -----  -----  -----  -----
SERVER : sds [13]
*FILE NAME : /DB6G/si1/kado/single/pddir/iospt0/h001
  *RDAREA NAME :RDMASTER [15]
        *LN1*    67    142      0     85     85      8      7      0
*FILE NAME : /DB6G/si1/kado/single/pddir/iospt0/h002
  *RDAREA NAME :RDDIR01                      
        *LN1*    67    116      0     81     81      8      7      0
*FILE NAME : /DB6G/si1/kado/single/pddir/iospt0/h003
  *RDAREA NAME :RDDIC01                      
        *LN1*   824  2.15k      0  2.00k  2.00k     19     19      0
*FILE NAME : /DB6G/si1/kado/single/pddir/iospt1/u001
  *RDAREA NAME :RU01                          
        *LN1*   256    483      0    401    401     23     22      0
*FILE NAME : /DB6G/si1/kado/single/pddir/iospt2/u002
  *RDAREA NAME :RU02                          
        *LN1*   261    501      0    416    416     26     25      0
*FILE NAME : /DB6G/si1/kado/single/pddir/iospt3/u003
  *RDAREA NAME :RU03                          
        *LN1*   254    467      0    384    384     23     22      0
*FILE NAME : /DB6G/si1/kado/single/pddir/iospt4/u001
  *RDAREA NAME :RULOB01                      
        *LN1*    16     43      0     33     33      4      4      0
*FILE NAME : /DB6G/si1/kado/single/pddir/iospt4/u002
  *RDAREA NAME :RULOB02                      
        *LN1*    16     43      0     33     33      4      4      0
*FILE NAME : /DB6G/si1/kado/single/pddir/iospt4/u011
  *RDAREA NAME :RUBLOB01                      
        *LN1*    30     59      0      0      0      7      7      0
*FILE NAME : /DB6G/si1/kado/single/pddir/iospt4/u012
  *RDAREA NAME :RUBLOB02                      
        *LN1*     0      0      0      0      0      0      0      0
*TOTAL* [16]
        *LN1* 1.79k  4.00k      0  3.43k  3.43k    122    117      0    
-----------------------------------------------------------------------------
FILE KIND   LOG KIND   FIRST                 LAST                         NUM
STJ         fil        1996/10/30 10:38:19   1996/10/30 12:31:45          440
-----------------------------------------------------------------------------

Explanation

Name of input statistics unload file or name of the directory containing the input statistics unload file (maximum of 58 bytes)

Output range (output start date/time to output end date/time)

Name of host requesting output of statistical information about HiRDB files for database manipulation

Edit period (collection start time to collection end time)

Synchronous READs count
This is the number of times pages were read from the HiRDB file in the synchronous mode.

Synchronous WRITEs count
This is the number of times pages were written to the HiRDB file in the synchronous mode.

Information used by the system (not by users).

Asynchronous WRITEs count
This is the number of times pages were written to the HiRDB file in the asynchronous mode.
This value is the sum of the following values:

Number of times pages were written to the HiRDB file during deferred write trigger processing

Number of times pages were written to the HiRDB file during synchronization point dump

Information used by the system (not by users).

Open operations count
This is the number of times HiRDB file open processing was executed.

Close operations count
This is the number of times HiRDB file close processing was executed.

Input/output errors count
This is the number of times an error occurred during HiRDB file input/output operations.

Server name
This is the name of server requesting output of statistical information about HiRDB files for database manipulation.

Name of HiRDB file
This is the name of the HiRDB for which statistical information was edited.

Name of RDAREA
This is the name of RDAREA using the corresponding HiRDB file.

Totals for each item

14.3.7 Deferred write processing statistical information

The following shows the statistical information about deferred write processing:

pdstedit VV-RR(Object Option) ***** DEFERRED WRITE INFORMATION *****
INPUT          :/tmp/pdstj1 [1]
OUTPUT RANGE   :**/**/** **:**:** - **/**/** **:**:** [2]
-----------------------------------------------------------------------------
HOST = test [3]
-----------------------------------------------------------------------------
EDIT TIME 2004/03/11 10:00:00 - 2004/03/11 12:00:00 [4]
[5]       [6]         [7]   [8]   [9]   [10]  [11]        [12]  [13]
SERVER    EXEC        TRG   PRSYC SYNC  DBSYC RDSYC       END   CANCL
          -----       ----- ----- ----- ----- -----       ----- -----
                      [14]  [15]  [16]        [17]  [18]
                      PMAX  PMIN  PAVG        TOTAL AVG
                      ----- ----- -----       ----- -----
sds         103          15    44    44     0     0          32    12
                          1     1     1       3.56k    35
-----------------------------------------------------------------------------
FILE KIND   LOG KIND   FIRST                 LAST                         NUM
STJ         dfw        2004/03/11 10:15:08   2004/03/11 12:33:31          103
-----------------------------------------------------------------------------

Explanation

Name of input statistics unload file or name of the directory containing the input statistics unload file (maximum of 58 bytes)

Output range (output start date/time to output end date/time)

Name of host requesting output of deferred write processing statistical information

Edit period (collection start time to collection end time)

Name of server requesting output of deferred write processing statistical information

Number of deferred write requests
This is the number of times deferred write processing (delayed write processing) was executed within the specified time period.

Trigger count
This is the number of times within the specified time period that deferred write processing was requested when the percentage of updated pages in the global buffer (ratio of updated buffer sectors to the total number of buffer sectors) reached a specified value.

Pre-synchronization count
This is the number of times within the specified time period deferred write processing was requested because a specified value was reached before the synchronization point dump interval (the number of times data that was output to the system log file reached a specified value before the next synchronization point dump).

Synchronization points count
This is the number of database synchronization points that occurred (the number of times a synchronization point was set for database integrity assurance) within the specified time period.

Database synchronization points count
This is the number of processes for applying update buffers to the database at a synchronization point where synchronization point processing cannot be validated.

RDAREA synchronization points count
This is the number of processes for outputting to disk all update pages for RDAREAs.

Pre-synchronization completion status (outputs count)
This is the number of times within the specified time period all the update buffer was output to the HiRDB file before the next synchronization point dump when deferred write processing was requested because a specified value was reached before the synchronization point dump interval (the number of times data that was output to the system log file reached a specified value before the next synchronization point dump).

Pre-synchronization completion status (cancellations count)
When deferred write processing was requested because a specified value was reached before the synchronization point dump interval (the number of times data that was output to the system log file reached a specified value before the next synchronization point dump), this is the number of times within the specified time period that deferred write processing was cancelled because the utility was unable to write all the update buffer to the HiRDB file before the next synchronization point dump.

Concurrency level for each disk volume (maximum value)
This is the maximum concurrency level of input/output processing executed for each disk for deferred write processing within the specified time period.
The utility executes input/output processing concurrently if all the following conditions are satisfied:

The HiRDB file is a character special file.

Multiple disks are used.

If there are only one maximum value and one minimum value, input/output operations may be concentrated on a specific disk (HiRDB file). You should use multiple disks to create RDAREAs subject to update processing.

Concurrency level for each disk volume (minimum value)
This is the minimum concurrency level of input/output processing executed for each disk for deferred write processing within the specified time period.
If there are only one maximum value and one minimum value, input/output operations may be concentrated on a specific disk (HiRDB file). You should use multiple disks to store one or more RDAREAs subject to update processing.

Concurrency level for each disk volume (average value)
This is the average concurrency level of input/output processing executed for each disk for deferred write processing within the specified time period.

Number of output pages (total)
This is the total number of pages output to the HiRDB file during deferred write processing (delayed write processing) within the specified time period.

Number of output pages (average)
This is the average number of pages output to the HiRDB file during deferred write processing (delayed write processing) within the specified time period.

14.3.8 Index statistical information

The following shows the statistical information about the index:

pdstedit VV-RR          ***** INDEX INFORMATION *****
INPUT          :/tmp/pdstj1 [1]
OUTPUT RANGE   :**/**/** **:**:** - **/**/** **:**:** [2]
CONTROL FILE     :CONTROL1 [18]
                                     [19]
FILE GROUP     :SERV1  : FILE1 FILE2 FILE3 FILE4 FILE5
                        FILE6 FILE7 FILE8 FILE9 FILE10
-----------------------------------------------------------------------------
EDIT TIME 1996/10/30 00:00:00 - 1996/10/31 00:00:00 [3]
            [4]   [5]   [6]   [7]   [8]   [9]   [10]  [11]
   *LN1*    C_SLK W_SLK XLOCK DEADL UNQCK UNQER REPOS REPG
            ----- ----- ----- ----- ----- ----- ----- -----
            [12]  [13] [14]
   *LN2*    SP_NM LVL ( NUM )
            ----- ---  -----
SERVER : sds [15]
*INDEX_ID :     196611 [16]
 *RDID    :          3 [17]
   *LN1*    4.32k     0     0     0     0     0     0     0
   *LN2*        0
*INDEX_ID :     196612
 *RDID    :          3
   *LN1*    5.31k     0     0     0     0     0     0     0
   *LN2*        0
*INDEX_ID :     196613
 *RDID    :          3
   *LN1*    4.64k     0 1.35k     0   684     0     0     0
   *LN2*        0
*INDEX_ID :     196614
 *RDID    :          3
   *LN1*       12     0 2.03k     0   684     0     0     0
   *LN2*        0
*INDEX_ID :     196615
 *RDID    :          3
   *LN1*    4.86k     0 1.94k     0     0     0     0     0
   *LN2*        0
-----------------------------------------------------------------------------
FILE KIND   LOG KIND   FIRST                 LAST                         NUM
STJ         idx        1996/10/30 10:38:19   1996/10/30 12:31:45           44
FJ          idx        ****/**/** **:**:**   ****/**/** **:**:**            0
-----------------------------------------------------------------------------

NO FILE KIND:LOG FILE NAME
 LOG KIND             FIRST                 LAST                         NUM
1 STJ      :/tmp/pdstj1
 sys                  1996/10/30 10:37:33   1996/10/30 12:33:07          112
 uap                  1996/10/30 10:36:38   1996/10/30 12:34:04         1854
 sql                  1996/10/30 10:36:37   1996/10/30 12:34:03        50971
 sop                  ****/**/** **:**:**   ****/**/** **:**:**            0
 dop                  ****/**/** **:**:**   ****/**/** **:**:**            0
 pcd                  ****/**/** **:**:**   ****/**/** **:**:**            0
 buf                  1996/10/30 10:38:19   1996/10/30 12:31:45           44
 fil                  1996/10/30 10:38:19   1996/10/30 12:31:45          440
 dfw                  1996/10/30 10:38:12   1996/10/30 12:33:31          103
 idx                  1996/10/30 10:38:19   1996/10/30 12:31:45           44

Explanation

Name of input statistics unload file or name of the directory containing the input statistics unload file (maximum of 58 bytes)

Output range (output start date/time to output end date/time)

Edit period (collection start time to collection end time)

Key value reference locks count in CHECK mode
This is the number of times reference lock (PR) was acquired for a key value in the CHECK mode (if another user has a lock, this mode does not wait until the lock is released).

Key value reference locks count in WAIT mode
This is the number of times reference lock (PR) was acquired for a key value in the WAIT mode (if another user has a lock, this mode waits until the lock is released).

Key value update locks count
This is the number of times an update lock (EX) was acquired for a key value.

Key value update deadlocks count
This is the number of times deadlock resulted from acquisition of an update lock (EX) for a key value.

Unique checks count
This is the number of times unique value checking was performed by the INSERT or UPDATE statement. This information is obtained only for a unique index.

Unique errors count
This is the number of times unique value checking performed by the INSERT or UPDATE statement resulted in an error because a key with the same value was found. This information is obtained only for a unique index.
If this value is large, you need to reevaluate whether the unique index is required.

Repositioning count (current position)
This is the number of times repositioning (correction) was performed because the position of the referenced key value was changed by an addition or deletion made to another key value in the same page by another user.

Repositioning count (current page)
This is the number of times repositioning (correction) was performed, because the page containing the searched key value changed due to a page split caused by another user.

Splits count (index split processing)²
This is the number of times split (index split processing)¹ occurred.
If this value is large, you need to increase the percentage of PCTFREE for the index. If you are adding a large amount of data, you should use the database load utility (pdload).

Number of levels affected by split²

Splits count for each level affected by split processing
This is the sum of the splits counts of the upper-level pages for each level affected by split processing.
If the splits count is large at a higher level, the key value may be too large for the size of the index page or the percentage of PCTFREE may be too large for the index.

Server name
This is the name of the server requesting output of index statistical information.

Index ID
This is the number of the index for which statistical information was edited.
You can obtain the index name by searching the data dictionary table (SQL_INDEXES table) on the basis of the index number displayed.

RDAREA ID
This is the number of the RDAREA storing the index for which statistical information was edited.
You can obtain the RDAREA name by searching the data dictionary table (SQL_RDAREAS table) on the basis of the RDAREA number displayed.

Name of the control statement file (up to 58 bytes)
This is the name of the control statement file specified by the -d option.

Server name and file group name
These are the server name in the control statement file specified by the -d option (name of server to be analyzed³) and the corresponding file group names.

Notes

13 and 14 are displayed as many times as there are split levels.

12 through 14 are displayed only for an unload log file or if a system log file was read with the -d option specified.

The following explains the levels affected by split processing:

Explanation

The first split occurs on a leaf page. As a result of this split, a new page is created. If this split processing is completed after the new page is registered in the upper level page (intermediate page), this split affects level 2 (LVL), so the number of levels affected by the split is set to 2 (NUM).

If the split affects the page above index level 2, another new page is registered in the upper level page. If there is no space in this page, another split occurs on the upper level page. In this case, the number of levels affected by the split (LVL) becomes 3, and the count (NUM) is set to 3.

¹ A split is processing that divides the contents of a page and then adds the latter half of the contents to an unused page; this occurs when there is not enough space to add a key value in a used page in the index storage RDAREA.

² This information is displayed only when system log is read.

³ The following servers are subject to analysis:

The server with a name specified both in the -s option and in the control statement file

All servers specified in the control statement file that are not specified in the -s option

14.4 Output of statistical information to a DAT-format file

Statistical information output to a DAT-format file can be used as the input file to other table operation software.

Organization of this section

14.4.1 Data storage format of a DAT-format file

14.4.2 DAT-format file unit

14.4.3 Record formats of DAT-format files

14.4.1 Data storage format of a DAT-format file

Statistical information output to a DAT-format file is edited and stored as shown in Table 14-3.

Table 14-3 Data editing format for DAT-format file

Data format | Storage method
Missing value | Represented as two consecutive double quotation marks ("").
Character data | Enclosed in double quotation marks (").
Numeric data | Stored as is.
Overflow data | 4 consecutive asterisks (*)*.
Uneditable data | 10 consecutive asterisks (*)*

* When er1 is specified in the -e option, one asterisk (*) is stored.

14.4.2 DAT-format file unit

When statistical information is output to a DAT-format file, one file is created for each type of statistical information. The file is created under a user-specified directory. Table 14-4 lists the names of DAT-format files.

Table 14-4 Names of DAT-format files

Edited information | Output unit | File name
System activity statistical information | Activity information in the log for one system | sys_DAT
UAP statistical information | Execution of one UAP or one service | uap_DAT
SQL statistical information | Execution of one SQL | sql_DAT
Global buffer pool statistical information | Each synchronization point | buf_DAT
Statistical information about HiRDB files for database manipulation | Each synchronization point | fil_DAT
Deferred write processing statistical information | Each activation of deferred write daemon | dfw_DAT
Static optimization information | Preprocessing of one SQL | sop_DAT
Dynamic optimization information | Each server within an SQL | dop_DAT
SQL object execution information | Each parallel SQL | pcd_DAT
SQL object transfer statistical information | Each parallel SQL | obj_DAT
SQL statement statistical information | Execution of one SQL | sqh_DAT
CONNECT/DISCONNECT statistical information | Each CONNECT/DISCONNECT | cnc_DAT
Foreign server operation statistical information | Each transaction | fsv_DAT
Foreign server utilization statistical information | Each thread execution | hba_DAT

Notes

Each file has a predefined name. If the same file name is found in the user-specified directory, the existing file may be overwritten. To avoid this, the existing file should be renamed or a different directory should be specified.

A DAT-format file cannot store more than 2 gigabytes of data. When you are using a large number of system log files, make sure that the size of the output data does not exceed 2 gigabytes by specifying appropriate options to narrow the data to be output.

The system activity statistical information consists of too many columns to be imported to Excel as is. Use the cut command to delete unneeded columns before importing the data.
The following is an example:
cut -d "," -f1-256 /tmp/sys_DAT > /tmp/sys_DAT.out

14.4.3 Record formats of DAT-format files

Tables 14-5 through 14-22 show the record formats of the DAT-format files.

The following notes apply to these tables:

The title bars shown in the tables are displayed when the -b option is specified. For system activity statistical information, three title bar lines are displayed at the beginning of the file; in the case of all other statistical information types, one title bar line is displayed at the beginning of the file.

The length of the title bar for each field is not included in the maximum length displayed in the tables. You should take this into account when you process data in DAT-format files that includes the title bars.

In the Remarks column, means that there are no remarks.

If a data item's attribute is character string, the maximum length of the data does not include the double quotation marks ("") that enclose the character string data. If the utility detects uneditable data for an item whose attribute is numeric, it displays 10 asterisks (**********), which may exceed the maximum length (of 3, 5, or 6 bytes).

Table 14-5 Record format of a DAT-format file (system activity statistical information (1))

No.
Field name (title bar)
Attribute
Maximum length
Remarks

1
Host name (HOST)
Character
32

2
Server name (SERVER)
8
******** for overall statistical information

3
Edit time (START)
11
Format MM/DD/hh:mm

4
Schedule information (SCHEDULE)
Length of schedule queue (QUEUE LEN(SCH))
Number of occurrences (FREQ)
Numeric
10

5
Maximum value (MAX)

6
Minimum value (MIN)

7
Average value (AVG)

8
Scheduled message length (MESSAGE LEN)
Number of occurrences (FREQ)

9
Maximum value (MAX)
In bytes

10
Minimum value (MIN)

11
Average value (AVG)

12
Process information (PROCESS)
Server abnormal terminations count (SERVER ABORT)
Number of occurrences (FREQ)
Numeric
10
Processing information continues with Nos. 174-177.

13
Server abnormal terminations count for HiRDB internal server (SYSTEM SERVER ABORT)
Number of occurrences (FREQ)

14
Number of processes (PROCESS COUNT)
Maximum value (MAX)

15
Minimum value (MIN)

16
Average value (AVG)

17
Transaction information (TRANSACTION)
Commits count (COMMIT)
Number of occurrences (FREQ)
Numeric
10

18
Rollbacks count (ROLLBACK)
Number of occurrences (FREQ)

19
Name server information (NAME)
System-specific information (CACHE HIT)
Number of occurrences (FREQ)
Numeric
10

20
System-specific information (LOCAL HIT)
Number of occurrences (FREQ)

21
System-specific information (LOOK UP)
Number of occurrences (FREQ)

22
RPC information (RPC)
System-specific information (RESPONSE TIME)
Number of occurrences (FREQ)
Numeric
10
RPC information for users is listed in Nos. 178-199 and 252-259.

23
Maximum value (MAX)

24
Minimum value (MIN)

25
Average value (AVG)

26
System-specific information (USER SERVICE TIME)
Number of occurrences (FREQ)

27
Maximum value (MAX)

28
Minimum value (MIN)

29
Average value (AVG)

30
System-specific information (TIME OUT)
Number of occurrences (FREQ)

31
System-specific information (ERROR)
Number of occurrences (FREQ)

32
System-specific information (SEND)
Number of occurrences (FREQ)

33
System-specific information (RECEIVE)
Number of occurrences (FREQ)

34
Lock information (LOCK)
Lock release wait time (WAIT TIME)
Number of occurrences (FREQ)
Numeric
10

35
Maximum value (MAX)
In milliseconds

36
Minimum value (MIN)

37
Average value (AVG)

38
Lock queue length (number of users)
(QUEUE LEN)
Number of occurrences (FREQ)

39
Maximum value (MAX)

40
Minimum value (MIN)

41
Average value (AVG)

42
Deadlocks count (DEADLOCK)
Number of occurrences (FREQ)

43
Utilization factor of locked resources management table (USE LOCK TABLE)
Number of occurrences (FREQ)

44
Maximum value (MAX)
3
Percentage

45
Minimum value (MIN)

46
Average value (AVG)

47
Shared memory information (SHARED MEMORY)
System-specific information (STATIC GET SIZE)
Number of occurrences (FREQ)
Numeric
10

48
Maximum value (MAX)
In bytes

49
Minimum value (MIN)

50
Average value (AVG)

51
System-specific information (STATIC POOL SIZE)
Number of occurrences (FREQ)

52
Maximum value (MAX)
In bytes

53
Minimum value (MIN)

54
Average value (AVG)

55
System-specific information (DYNAMIC GET SIZE)
Number of occurrences (FREQ)

56
Maximum value (MAX)
In bytes

57
Minimum value (MIN)

58
Average value (AVG)

59
System-specific information (DYNAMIC POOL SIZE)
Number of occurrences (FREQ)

60
Maximum value (MAX)
In bytes

61
Minimum value (MIN)

62
Average value (AVG)

63
Size of shared memory allocated for server or for HiRDB internal server (SEGMENT SIZE)
Average value (AVG)
In KB

64
Shared static memory allocation size (STATIC SIZE)
Average value (AVG)

65
Shared dynamic memory allocation size (DYNAMIC SIZE)
Average value (AVG)

66
Shared memory allocation size for global buffer (SIZE FOR BUFFER)
Average value (AVG)

67
Synchronization point information (SYNC POINT)
Synchronization point dump collection time (GET INTERVAL TIME)
Number of occurrences (FREQ)
Numeric
10

68
Maximum value (MAX)
In milliseconds

69
Minimum value (MIN)

70
Average value (AVG)

71
Synchronization point dump interval (GET TIME)
Number of occurrences (FREQ)

72
Maximum value (MAX)
In milliseconds

73
Minimum value (MIN)

74
Average value (AVG)

75
Log information (LOG)
Buffer-fulls count (BUFFER FULL)
Number of occurrences (FREQ)
Numeric
10

76
Waits count due to no current buffer (WAIT THREAD)
Number of occurrences (FREQ)

77
Output block length (OUTPUT BLOCK LEN)
Number of occurrences (FREQ)

78
Maximum value (MAX)
In bytes

79
Minimum value (MIN)

80
Average value (AVG)

81
Non-bus data length (NOT BUS LEN)
Number of occurrences (FREQ)

82
Maximum value (MAX)
In bytes

83
Minimum value (MIN)

84
Average value (AVG)

85
Number of buffer sectors waiting for I/O (WAIT BUFFER FOR IO)
Number of occurrences (FREQ)

86
Maximum value (MAX)

87
Minimum value (MIN)

88
Average value (AVG)

89
Number of file write operations (WRITE TO FILE)
Number of occurrences (FREQ)

90
Write errors count (WRITE ERROR)
Number of occurrences (FREQ)

91
Log file swapping time (LOG FILE SWAP TIME)
Number of occurrences (FREQ)

92
Maximum value (MAX)
In milliseconds

93
Minimum value (MIN)

94
Average value (AVG)

95
Log input data length (LOG INPUT DATA)
Number of occurrences (FREQ)

96
Maximum value (MAX)
In bytes

97
Minimum value (MIN)

98
Average value (AVG)

99
Number of file read operations (READ FROM FILE)
Number of occurrences (FREQ)

100
Read errors count (READ ERROR)
Number of occurrences (FREQ)

Table 14-6 Record format of a DAT-format file (system activity statistical information (2))

No. | Field name (title bar) | Attribute | Maximum length | Remarks
101 | Dictionary information (DICTIONARY) | Number of table definition information acquisition requests (TBL-DEF GET REQ) | Number of occurrences (FREQ) | Numeric | 10 | Dictionary information is continued to Nos. 200-251 and 260-267.
102 | Table definition information buffer hits count (TABLE CACHE HIT) | Number of occurrences (FREQ) |
103 | Number of definition information items in table definition information buffer (CASHED TBL-DEF) | Number of occurrences (FREQ) |
104 | Maximum value (MAX)
105 | Minimum value (MIN)
106 | Average value (AVG)
107 | Size of table definition information buffer used per table definition information item (USE TBL-DEF SIZE) | Number of occurrences (FREQ) |
108 | Maximum value (MAX) | In bytes
109 | Minimum value (MIN)
110 | Average value (AVG)
111 | Size of area used by table definition information buffer (CACHED TBL-DEF SIZE) | Number of occurrences (FREQ) |
112 | Maximum value (MAX) | In bytes
113 | Minimum value (MIN)
114 | Average value (AVG)
115 | Table access privilege information acquisitions count (ACCESS PRIV CHECK) | Number of occurrences (FREQ) |
116 | Table access privilege information buffer hits count (CACHE HIT(ACCESS)) | Number of occurrences (FREQ) |
117 | User privilege information acquisition requests (CON/DBA DEF GET REQ) | Number of occurrences (FREQ) |
118 | User privilege information buffer hits count (CON/DBA CACHE HIT) | Number of occurrences (FREQ) |
119 | Number of users using the user privilege information buffer (CON/DBA CACHED USER) | Number of occurrences (FREQ) |
120 | Maximum value (MAX) |
121 | Minimum value (MIN) |
122 | Average value (AVG) |
123 | Length of communication with dictionary server (DIC TRANS DATA LEN) | Number of occurrences (FREQ) |
124 | Maximum value (MAX) | In bytes
125 | Minimum value (MIN)
126 | Average value (AVG)
127 | Dictionary server communications count (TRANS) | Number of occurrences (FREQ) |
128 | Number of view analysis information acquisition requests (VIEW DEF GET REQ) | Number of occurrences (FREQ)
129 | View analysis information buffer hits count (VIEW DEF CACHE HIT) | Number of occurrences (FREQ)
130 | Number of view analysis information items in view analysis information buffer (VIEW CACHED DEF) | Number of occurrences (FREQ) |
131 | Size of view analysis information buffer used per view analysis information item (USED VIEW SIZE) | Number of occurrences (FREQ)
132 | Maximum value (MAX) | In bytes
133 | Minimum value (MIN)
134 | Average value (AVG)
135 | Length of view analysis information buffer used (VIEW CACHE SIZE) | Number of occurrences (FREQ) |
136 | Maximum value (MAX) | In bytes
137 | Minimum value (MIN)
138 | Average value (AVG)
139 | Length of view analysis information resulting in buffer miss (CACHE MISS VIEW SIZE) | Number of occurrences (FREQ) |
140 | Maximum value (MAX) | In bytes
141 | Minimum value (MIN)
142 | Average value (AVG)
143 | SQL object information for single server, front-end server, back-end server, or dictionary server (FES-BES-DIC(SDS) INFORMATION) | Number of SQL object acquisition requests (SQLOBJ GET REQ) | Number of occurrences (FREQ) |
144 | SQL object buffer hits count (SQLOBJ CACHE HIT) | Number of occurrences (FREQ)
145 | Number of SQL objects in SQL object buffer (CACHED SQLOBJ) | Number of occurrences (FREQ)
146 | Maximum value (MAX)
147 | Minimum value (MIN)
148 | Average value (AVG)
149 | Total length of SQL objects in SQL object buffer (CACHED SQLOBJ SIZE) | Number of occurrences (FREQ) |
150 | Maximum value (MAX) | In KB
151 | Minimum value (MIN)
152 | Average value (AVG)
153 | Number of SQL objects swapped out of SQL object buffer (SWAP OUT SQLOBJ) | Number of occurrences (FREQ) |
154 | SQL object length (SQLOBJ LEN) | Number of occurrences (FREQ) |
155 | Maximum value (MAX) | In bytes
156 | Minimum value (MIN)
157 | Average value (AVG)
158 | Number of acquisition requests for stored procedure objects (STROBJ GET REQ) | Number of occurrences (FREQ) |
159 | SQL object buffer hits count for stored procedure objects (STROBJ CACHE HIT) | Number of occurrences (FREQ)
160 | Number of stored procedure objects in SQL object buffer (CACHED STROBJ) | Number of occurrences (FREQ) |
161 | Maximum value (MAX)
162 | Minimum value (MIN)
163 | Average value (AVG)
164 | Total length of stored procedure objects in SQL object buffer (CACHED STROBJ SIZE) | Number of occurrences (FREQ) |
165 | Maximum value (MAX) | In KB
166 | Minimum value (MIN)
167 | Average value (AVG)
168 | Number of stored procedure objects swapped out of SQL object buffer (SWAP OUT STROBJ) | Number of occurrences (FREQ) |
169 | Stored procedure object length (STROBJ LEN) | Number of occurrences (FREQ)
170 | Maximum value (MAX) | In bytes
171 | Minimum value (MIN)
172 | Average value (AVG)
173 | Number of times stored procedure objects were recompiled (STROBJ RECOMPILE) | Number of occurrences (FREQ) |
174 | Process information (PROCESS) | Number of server processes under service execution (SERVICE COUNT) | Maximum value (MAX) | Numeric | 10 |
175 | Minimum value (MIN)
176 | Average value (AVG)
177 | Number of service requests exceeding maximum number of startup processes (REQUEST OVER) | Number of requests (FREQ)
178 | RPC information (RPC) | Service response time for local unit's servers (RESPONSE ON OWN UNIT) | Number of occurrences (FREQ) | Numeric | 10 |
179 | Maximum value (MAX) | In 100 microseconds
180 | Minimum value (MIN)
181 | Average value (AVG)
182 | Service response time for remote unit's servers (RESPONSE TO OTHER UNIT) | Number of occurrences (FREQ) |
183 | Maximum value (MAX) | In 100 microseconds
184 | Minimum value (MIN)
185 | Average value (AVG)
186 | Execution time per service from local unit's servers (EXEC TIME ON OWN UNIT) | Number of occurrences (FREQ) |
187 | Maximum value (MAX) | In 100 microseconds
188 | Minimum value (MIN)
189 | Average value (AVG)
190 | Execution time per service from remote unit's servers (EXEC TIME FROM OTHER UNIT) | Number of occurrences (FREQ) |
191 | Maximum value (MAX) | In 100 microseconds
192 | Minimum value (MIN)
193 | Average value (AVG)
194 | Number of SENDs to local process (SEND TO OWN PRCS) | Number of occurrences (FREQ) |
195 | Number of SENDs to other processes on local unit (SEND TO OTHER PRCS) | Number of occurrences (FREQ)
196 | Number of SENDs to remote unit (SEND TO OTHER UNIT) | Number of occurrences (FREQ)
197 | Number of RECEIVEs from local process (RECEIVE FROM OWN PRCS) | Number of occurrences (FREQ)
198 | Number of RECEIVEs from other processes on local unit (RECEIVE FROM OTHER PRCS) | Number of occurrences (FREQ)
199 | Number of RECEIVEs from remote unit (RECEIVE FROM OTHER UNIT) | Number of occurrences (FREQ)

Table 14-7 Record format of a DAT-format file (system activity statistical information (3))

No. | Field name (title bar) | Attribute | Maximum length | Remarks
200 | Dictionary information (DICTIONARY) | Number of type definition information acquisition requests (TYPE-DEF GET REQ) | Number of occurrences (FREQ) | Numeric | 10 |
201 | User-defined type information buffer hits count (TYPE-DEF CACHE HIT) | Number of occurrences (FREQ)
202 | Number of type definition information items in user-defined type information buffer (CACHED TYPE-DEF) | Number of occurrences (FREQ)
203 | Maximum value (MAX)
204 | Minimum value (MIN)
205 | Average value (AVG)
206 | Size of area used by user-defined type information buffer per type definition information item (TYPE-DEF CACHE SIZE) | Number of occurrences (FREQ)
207 | Maximum value (MAX) | In bytes
208 | Minimum value (MIN)
209 | Average value (AVG)
210 | Total size of area used by user-defined type information buffer (TYPE-DEF CACHE TOTAL SIZE) | Number of occurrences (FREQ) |
211 | Maximum value (MAX) | In bytes
212 | Minimum value (MIN)
213 | Average value (AVG)
214 | Size of user-defined type information buffer allocated (TYPE-DEF CACHE ALLOC SIZE) | Number of occurrences (FREQ) |
215 | Maximum value (MAX) | In bytes
216 | Minimum value (MIN)
217 | Average value (AVG)
218 | Number of routine definition information acquisition requests (RTN-DEF GET REQ) | Number of occurrences (FREQ) |
219 | Routine definition information buffer hits count (RTN-DEF CACHE HIT) | Number of occurrences (FREQ) |
220 | Number of routine definition information items in routine definition information buffer (CACHED RTN-DEF) | Number of occurrences (FREQ)
221 | Maximum value (MAX)
222 | Minimum value (MIN)
223 | Average value (AVG)
224 | Size of area used by routine definition information buffer per routine definition information item (RTN-DEF CACHE SIZE) | Number of occurrences (FREQ) |
225 | Maximum value (MAX) | In bytes
226 | Minimum value (MIN)
227 | Average value (AVG)
228 | Total size of area used by routine definition information buffer (RTN-DEF CACHE TOTAL SIZE) | Number of occurrences (FREQ) |
229 | Maximum value (MAX) | In bytes
230 | Minimum value (MIN)
231 | Average value (AVG)
232 | Size of routine definition information buffer allocated (RTN-DEF CACHE ALLOC SIZE) | Number of occurrences (FREQ) |
233 | Maximum value (MAX) | In bytes
234 | Minimum value (MIN)
235 | Average value (AVG)
236 | Number of routine definition acquisition requests for plug-in-provided functions (PLG-RTN GET REQ) | Number of occurrences (FREQ) |
237 | Routine definition information buffer hits count for plug-in provided functions (PLG-RTN CACHE HIT) | Number of occurrences (FREQ)
238 | Number of registry information acquisition requests (REGISTRY GET REQ) | Number of occurrences (FREQ) |
239 | Registry information buffer hits count (REGISTRY CACHE HIT) | Number of occurrences (FREQ)
240 | Number of registry information items in registry information buffer (CACHED REGISTRY-DEF) | Number of occurrences (FREQ)
241 | Maximum value (MAX)
242 | Minimum value (MIN)
243 | Average value (AVG)
244 | Size of registry information buffer per registry information item (REGISTRY CACHE SIZE) | Number of occurrences (FREQ)
245 | Maximum value (MAX) | In bytes
246 | Minimum value (MIN)
247 | Average value (AVG)
248 | Total size of area used by registry information buffer (REGISTRY CACHE TOTAL SIZE) | Number of occurrences (FREQ) |
249 | Maximum value (MAX) | In bytes
250 | Minimum value (MIN)
251 | Average value (AVG)
252 | RPC information (RPC) | Number of HiRDB-reserved ports used (REGISTERED PORTS) | Number of occurrences (FREQ) | Numeric | 10 |
253 | Maximum value (MAX)
254 | Minimum value (MIN)
255 | Average value (AVG)
256 | Number of ports automatically assigned by OS when HiRDB-reserved ports ran out (ASSIGNED PORTS) | Number of occurrences (FREQ)
257 | Maximum value (MAX)
258 | Minimum value (MIN)
259 | Average value (AVG)
260 | Dictionary information (DICTIONARY) | Directory-registered user authentication time (DIRECTORY USER CHECK TIME) | Number of occurrences (FREQ) | Numeric | 10 |
261 | Maximum value (MAX) | In microseconds
262 | Minimum value (MIN)
263 | Average value (AVG)
264 | Group checking time (GROUP CHECK TIME) | Number of occurrences (FREQ) |
265 | Maximum value (MAX) | In microseconds
266 | Minimum value (MIN)
267 | Average value (AVG)

Table 14-8 Record format of a DAT-format file: UAP statistical information

No.
Field name (title bar)
Attribute
Maximum length
Remarks

1
Host name (HOST)
Character
32

2
UAP name (UAP NAME)

3
UAP or transaction execution start time (START)
Character
14
Format: MM/DD/hh:mm:ss

4
No. 3 in microseconds (START (MICRO))
Numeric
6
Value in seconds is not included.

5
UAP or transaction execution termination time (END)
Character
14
Format: MM/DD/hh:mm:ss

6
No. 5 in microseconds (END (MICRO))
Numeric
6
Value in seconds is not included.

7
Termination status (STATUS)
Character
1
N: Normal termination
E: Termination after rollback

8
UAP or transaction execution time (UAP EXEC TIME(S))
Numeric

10

In seconds (value less than a second is rounded)

9
Size of table definition information buffer used (CACHE SIZE)
In bytes

10
Number of SQL object acquisition requests (REQ (SQL))

11
SQL object buffer hits count (HITS (SQL))

12
SQL object creations count (CREATE)

13
Maximum size of SQL object created (SQL MAX)
In bytes

14
COMMIT statement executions count (COMMIT)

15
ROLLBACK statement executions count (ROLLBACK)

16
Number of rows actually retrieved by FETCH or SELECT statement (FETCH ROW)

17
Number of rows actually deleted by DELETE statement (DELETE ROW)

18
Number of rows actually inserted by INSERT statement (INSERT ROW)

19
Number of rows actually updated by UPDATE statement (UPDATE ROW)

20
SQL statement preprocessings count (SET)

21
OPEN statement executions count (OPEN)

22
FETCH statement executions count (FETCH)

23
CLOSE statement executions count (CLOSE)

24
DESCRIBE statement executions count (DESCRIBE)

25
SELECT statement executions count (SELECT)

26
INSERT statement executions count (INSERT)

27
UPDATE statement executions count (UPDATE)

28
DELETE statement executions count (DELETE)

29
LOCK statement executions count (LOCK)

30
CREATE TABLE executions count (CREATE TABLE)

31
ALTER TABLE executions count (ALTER TABLE)

32
DROP TABLE executions count (DROP TABLE)

33
CREATE INDEX executions count (CREATE INDEX)

34
DROP INDEX executions count (DROP INDEX)

35
COMMENT TABLE executions count (COMMENT TABLE)

36
COMMENT COLUMN executions count (COMMENT COLUMN)

37
CREATE SCHEMA executions count (CREATE SCHEMA)

38
DROP SCHEMA executions count (DROP SCHEMA)

39
GRANT RDAREA executions count (GRANT RDAREA)

40
GRANT SCHEMA executions count (GRANT SCHEMA)

41
GRANT access-privilege executions count (GRANT ACCESS)

42
GRANT CONNECT executions count (GRANT CONNECT)

43
GRANT DBA executions count (GRANT DBA)

44
REVOKE RDAREA executions count (REVOKE RDAREA)

45
REVOKE SCHEMA executions count (REVOKE SCHEMA)

46
REVOKE access-privilege executions count (REVOKE ACCESS)

47
REVOKE CONNECT executions count (REVOKE CONNECT)

48
REVOKE DBA executions count (REVOKE DBA)

49
CREATE VIEW executions count (CREATE VIEW)

50
DROP VIEW executions count (DROP VIEW)

51
System-specific information (UNUSED)

52
System-specific information (UNUSED)

53
PURGE TABLE statement executions count (PURGE TABLE)

54
Other executions count (MISC)

55
Number of acquisition requests for stored procedure objects (SQLOBJ GET REQ)

56
SQL object buffer hits count for stored procedure objects (SQLOBJ CACHE HIT)

57
CREATE PROCEDURE executions count (CREATE PROCEDURE)

58
DROP PROCEDURE executions count (DROP PROCEDURE)

59
CALL statement executions count (CALL)

60
DESCRIBE statement (INPUT) executions count (DESCRIBE INPUT)

61
ALTER PROCEDURE executions count (ALTER PROCEDURE)

62
UAP or transaction execution time (UAP EXEC TIME (MS))
In milliseconds (includes a value in seconds; a value less than a millisecond is rounded)

63
Service name (SERVICE NAME)
Character
31

64
Lock release wait time (LOCK TIME)¹
Numeric
10
In seconds

65
No. 64 in microseconds (LOCK TIME (MICRO))¹
6
Value in seconds is not included.

66
Output timing for the corresponding row (OUTPUT TIMING)
Character
1
C: In UAP executions
T: In transactions

67
Front-end server name (FES NAME)
8

68
Connect number (CONNECT NO)
Numeric
10
Sequence number assigned to each connection within one front-end server

69
Font-end server process ID (FES PROCESS ID)

70
CPU time (CPU TIME)⁴
In milliseconds

71
Single server or front-end server processing time (SERV EXEC TIME)²
In seconds

72
No. 71 in microseconds (SERV EXEC TIME (MICRO))
6
Value in seconds is not included.

73
Total input/output time (IO TIME)⁵
10
In seconds

74
No. 73 in microseconds (IO TIME (MICRO))⁵
6
Value in seconds is not included.

75
Maximum input/output time (MAX IO TIME)³
10
In seconds

76
No. 75 in microseconds (MAX IO TIME (MICRO))
6
Value in seconds is not included.

77
Minimum input/output time (MIN IO TIME)³
10
In seconds

78
No. 77 in microseconds (MIN IO TIME (MICRO))
6
Value in seconds is not included.

79
Reference operations count on data page, index page, or directory page (DID RF CNT)⁵
10

80
Update operations count on data page, index page, or directory page (DID UPD CNT)⁵

81
Buffer hits count for data page, index page, or directory page (DID HIT CNT)⁵

82
Buffer hit ratio for data page, index page, or directory page (DID BUF HIT RATIO)
3
Percentage

83
Real READs count for data page, index page, or directory page (DID READ CNT)⁵
10

84
Real WRITEs count for data page, index page, or directory page (DID WRITE CNT)⁵

85
Reference operations count on LOB column data page (LOB RF CNT)⁵

86
Update operations count on LOB column data page (LOB UPD CNT)⁵

87
Reference buffer hits count for LOB column data page (LOB RF HIT CNT)⁵

88
Update buffer hits count for LOB column data page (LOB UPD HIT CNT)⁵

89
Reference buffer hits count for LOB column data page (LOB RF BUF HIT RATIO)
3
Percentage

90
Update buffer hits count for LOB column data page (LOB UPD BUF HIT RATIO)

91
Real READs count for LOB column database (LOB READ CNT)⁵
10

92
Real WRITEs count for LOB column database (LOB WRITE CNT)⁵

93
Global buffer flashes count (BUF FLASH CNT)⁵

94
READ waits count for global buffer (BUF READ WAIT CNT)⁵

95
WRITE waits count for global buffer (BUF WRITE WAIT CNT)⁵

96
Global buffer lock release waits count (BUF LOCK WAIT CNT)⁵

97
Maximum number of work table files (MAX WKFILE NUM)

98
Maximum number of work table file extensions (MAX WKFILE EXP CNT)

99
Maximum size of work table file (MAX WKFILE VOLUME)
In MB

100
Work table file READs count (WKFILE READ CNT)⁵

101
Work table file WRITEs count (WKFILE WRITE CNT)⁵

102
Number of forced outputs on work table buffer (WKFILE BUF FORCED OUT CNT)⁵

103
Maximum hash table size in batch processing mode (MAX WHOLE HASH TABLE SIZE)
In KB

104
Maximum level-1 bucket size (MAX BUCKET SIZE LEVEL 1)

105
Maximum level-2 bucket size (MAX BUCKET SIZE LEVEL 2)

106
Maximum level-3 bucket size (MAX BUCKET SIZE LEVEL 3)

107
Number of times page search for reutilization of free space failed (REUSE FAILURE CNT)⁵

108
Number of times the mode changed from new page allocate to free page reuse on a table with SEGMENT REUSE specified (REUSE CHANGE CNT)⁵

109
Number of times data pages and index pages were referenced using the local buffer (LOCAL BUF RF CNT)⁵

110
Number of times data pages and index pages were updated using the local buffer (LOCAL BUF UPD CNT)⁵

111
Local buffer hit count for data pages and index pages (LOCAL BUF HIT CNT)⁵

112
Number of real READs on data pages and index pages using the local buffer (LOCAL BUF READ CNT)⁵

113
Number of real WRITEs on data pages and index pages using the local buffer (LOCAL BUF WRITE CNT)⁵

114
Local buffer flush count (LOCAL BUF FLUSH CNT)⁵

115
Number of asynchronous READ requests (AR REQ CNT)⁵

116
Number of times synchronization waits occurred during asynchronous READ (AR SYNC WAIT CNT)⁵

117
Total synchronization wait time during asynchronous READ (AR SYNC WAIT TIME TOTAL)⁵
In seconds

118
No. 177 in microseconds (AR SYNC WAIT TIME TOTAL (MICRO))⁵
6
Value in seconds is not included.

119
Average synchronization wait time during asynchronous READ (AR SYNC WAIT TIME AVERAGE)
10
In seconds

120
No. 119 in microseconds (AR SYNC WAIT TIME AVERAGE (MICRO))
6
Value in seconds is not included.

121
Total synchronous input/output time during asynchronous READ (AR SYNC IO TIME TOTAL)⁵
10
In seconds

122
No. 121 in microseconds (AR SYNC IO TIME TOTAL (MICRO))⁵
6
Value in seconds is not included.

123
Average synchronous input/output time during asynchronous READ (AR SYNC IO TIME AVERAGE)
10
In seconds

124
No. 123 in microseconds (AR SYNC IO TIME AVERAGE (MICRO))
6
Value in seconds is not included.

125
Maximum comparison count when a hash row partitioning table was searched during hash join, subquery hash execution (MAX HASH COMP COUNT)³
10

126
Total comparison count when a hash row partitioning table was searched during hash join, subquery hash execution (HASH COMP COUNT)⁵
10

127
Total hash row partitioning table search count during hash join, subquery hash execution (HASH HIT COUNT)⁵
10

Note

For a HiRDB/Parallel Server, Nos. 73, 74, 79-102, 126, and 127 indicate the total value for all back-end servers.

¹ For a HiRDB/Parallel Server, this is the total lock release wait time (including parallel processing) resulting in the transaction.

² If the pdstbegin command is executed while being connected, or transaction processing is underway, statistical information is collected for the next connection or transaction, not the current connection or transaction.

³ For a HiRDB/Parallel Server, the value is for all back-end servers.

⁴ This is the total CPU time for all servers in the transaction.

⁵ If the information is output for each transaction, this is the cumulative CONNECT value.

Table 14-9 Record format of a DAT-format file (SQL statistical information)

No.
Field name (title bar)
Attribute
Maximum length
Remarks

1
Host name (HOST)
Character
32

2
UAP name (UAP NAME)

3
SQL execution start time (START)
14
Format:
MM/DD/hh:mm:ss

4
No. 3 in microseconds (START (MICRO))
Numeric
6
Value in seconds is not included.

5
SQL execution termination time (END)
Character
14
Format:
MM/DD/hh:mm:ss

6
No. 5 in microseconds (END (MICRO))
Numeric
6
Value in seconds is not included.

7
Length of created SQL object (PDATA)
10
In bytes

8
Number of back-end servers that sent SQL object (BES COUNT)

9
SQL execution time (SQL EXEC TIME (MICRO))
In microseconds (includes the value in seconds)

10
Number of rows retrieved (FETCH ROW)

11
Number of rows inserted (INSERT ROW)

12
Number of rows updated (UPDATE ROW)

13
Number of rows deleted (DELETE ROW)

14
Number of rows created in work table (CREATE LIST)

15
Number of rows deleted from work table (DROP LIST)

16
SQL execution time (SQL EXEC TIME (SEC))
In seconds (value is rounded off)

17
Service name (SERVICE NAME)
Character
31

18
Front-end server name (FES NAME)
8

19
Connection number (CONNECT NO)
Numeric
10
Serial number assigned to each connection in one front-end server.

20
SQL counter (SQL COUNTER)

21
Front-end server process ID (FES PROCESS ID)

22
Operation code (OPERATION CODE)¹
Character
4

23
Section number (SECTION NO)
Numeric
5

24
SQL type code (SQL TYPE CODE)²
Character
4

25
SQL code (SQLCODE)
Numeric
10

26
Server name (SERVER NAME)
Character
8

27
Number of times processing requests were issued to the foreign server (FOREIGN REQUEST COUNT)
Numeric
10

28
Foreign server processing time (FOREIGN EXEC TIME)
In seconds

29
No. 28 in microseconds (FOREIGN EXEC TIME(MICRO))
In microseconds (includes the value in seconds)

30
Number of rows retrieved on the foreign server (FOREIGN FETCH ROW)

31
Total comparison count when a hash row partitioning table was searched during hash join, subquery hash execution (HASH COMP COUNT)
Numeric
10

32
Total hash row partitioning table search count during hash join, subquery hash execution (HASH HIT COUNT)
Numeric
10

33
Number of rows inserted in the foreign server (FOREIGN INSERT ROW)
Numeric
10

34
Number of rows updated on the foreign server (FOREIGN UPDATE ROW)
Numeric
10

35
Number of rows deleted on the foreign server (FOREIGN DELETE ROW)
Numeric
10

Note

Nos. 27-30 and 33-35 are output when the HiRDB External Data Access facility is used. If this facility is not used, 0 or **** is output.

¹ See Table 14-10 for the operation codes.

² See Table 14-11 for the SQL type codes.

Table 14-10 Operation codes

Operation code | Corresponding SQL statements
AUI2 | DELETE statement (static SQL), INSERT statement (static SQL), UPDATE statement (static SQL), LOCK statement (static SQL), PURGE TABLE statement (static SQL), single-row SELECT statement (static SQL), FREE LOCATOR statement (static SQL)
AUI3 | Assignment statement (static SQL)
AUX | EXECUTE statement
AUXI | EXECUTE IMMEDIATE statement and all definition SQL statements
AUXO | EXECUTE statement (INTO specified)
CALL | CALL statement
CLOS | CLOSE statement
CMIT | COMMIT statement
CNCT | CONNECT statement
CPRP | Commit Prepare*
DESC | DESCRIBE statement (OUTPUT specified)
DEST | DESCRIBE TYPE statement
DISC | DISCONNECT statement, COMMIT statement (RELEASE specified)
DISR | ROLLBACK statement (RELEASE specified)
DIST | Disconnect + Tran Check*
DSCM | Used by system
DSPR | Used by system
DSRL | Used by system
FETC | FETCH statement
GETD | GET DIAGNOSTICS
HVAR | DESCRIBE statement (INPUT specified)
JARI | INSTALL JAR
JARR | REPLACE JAR
JARU | REMOVE JAR
OPEN | OPEN statement (dynamic SQL)
OPN2 | OPEN statement (static SQL)
OPNR | OPEN statement (dynamic SQL (multiple cursors))
RENV | Used by system
RNCN | CONNECT statement (TO specified)
RNDS | DISCONNECT statement (TO specified)
RNSC | SET CONNECTION statement
ROLL | ROLLBACK statement
RSDC | DESCRIBE statement (OUTPUT, RESULT SET specified)
RSFT | FETCH statement (RESULT SET specified)
RSCL | CLOSE statement (RESULT SET specified)
SAUH | SET SESSION AUTHORIZATION statement
SET | PREPARE statement
SINF | Used by system
SOPT | Used by system
SVLS | Used by system
THRE | Used by system
THSU | Used by system
TRCK | Used by system
TRC2 | Used by system
TRST | Used by system
TSCM | Used by system
TSRL | Transfer Rollback*
TSPR | Transfer Prepare*
ALCR | ALLOCATE CURSOR statement
DSET | DEALLOCATE PREPARE statement

* Output only when the XA interface is used.

Table 14-11 SQL type codes

No. | SQL statement | SQL type code (hexadecimal)
1 | CREATE TABLE | 1038
2 | DROP TABLE | 103C
3 | ALTER TABLE | 1040
4 | CREATE INDEX | 1044
5 | DROP INDEX | 1048
6 | COMMENT ON TABLE | 104C
7 | COMMENT ON COLUMN | 1050
8 | CREATE SCHEMA | 1054
9 | DROP SCHEMA | 1058
10 | GRANT RDAREA | 105C
11 | GRANT SCHEMA | 1060
12 | GRANT ACCESS | 1064
13 | REVOKE RDAREA | 1068
14 | REVOKE SCHEMA | 106C
15 | REVOKE ACCESS | 1070
16 | CREATE VIEW | 1074
17 | DROP VIEW | 1078
18 | GRANT CONNECT | 1098
19 | GRANT DBA | 109C
20 | REVOKE CONNECT | 10A0
21 | REVOKE DBA | 10A4
22 | CREATE ALIAS | 10A8
23 | DROP ALIAS | 10AC
24 | CREATE PROCEDURE | 10B0
25 | DROP PROCEDURE | 10B4
26 | ALTER PROCEDURE | 10B8
27 | CREATE TYPE | 10C0
28 | DROP DATA TYPE | 10C4
29 | CREATE FUNCTION | 10C8
30 | DROP FUNCTION | 10CC
31 | ALTER ROUTINE | 10E8
32 | LOCK statement | 2134
33 | SELECT statement | 4000, 4900, 4100, 4A04, 4204
34 | INSERT statement | 4108
35 | UPDATE statement | 4114
36 | DELETE statement | 411C
37 | ASSIGN LIST statement | 4224, 4324
38 | DROP LIST statement | 422C
39 | PURGE TABLE statement | 4184
40 | CALL PROCEDURE | 40BC
41 | GET DIAGNOSTICS | 40C0
42 | Assignment statement | 40C4
43 | FREE LOCATOR statement | 40C8

Table 14-12 Record format of a DAT-format file (global buffer pool statistical information)

No.
Field name (title bar)
Attribute
Maximum length
Remarks

1
Host name (HOST)
Character
32

2
Server name (SERVER)
8

3
Global buffer name (BUFFER NAME)
16

4
Statistics log acquisition time (LOG GET TIME)
14
Format:
MM/DD/hh:mm when -e sec is omitted; MM/DD/hh:mm:ss when -e sec is specified

5
Number of buffer sectors in global buffer pool (BUFFER COUNT)
Numeric
10

6
Number of synchronization point dump pages (SYNC POINT)

7
Maximum number of concurrently requested buffer sectors (BUFFER MAX)

8
Update GETs count (UPDATE GET)

9
Update buffer hits count (UPDATE HIT)

10
Update buffer hit rate (UPDATE HIT RATIO)
3
Percentage

11
Update buffer flushes count (UPDATE FLUSH)
10

12
Reference GETs count (REF GET)

13
Reference buffer hits count (REF HIT)

14
Reference buffer hit rate (REF HIT RATIO)
3
Percentage

15
Reference buffer flushes count (REF FLUSH)
10

16
Real READs count (READ)

17
Input waits count (WAIT READ)

18
Real WRITEs count (WRITE)

19
Output waits count (WAIT WRITE)

20
Buffer lock release waits count (WAIT EXCLUSIVE)

21
Buffer shortages count (BUFFER INSUFFICIENCY)

22
Prefetch input pages count (PRRED)

23
Prefetch hit pages count (PRHIT)

24
Prefetch hit ratio (PRHIT RATIO)
3
Percentage

25
Prefetch execution resources shortage count (PR INSUFFICIENCY)
10

26
Global buffer hit ratio (BUFHIT RATIO)
3
Percentage

27
Current reference buffers count (CUR REF BUFNUM)
10

28
Current update buffers count (CUR UPDATE BUFNUM)

29
Deferred write trigger update buffers count (TRG UPDATE BUFNUM)

30
Synchronization points count (SYNC COUNT)

31
Number of prefetch READ requests (PR READ REQ CNT)

32
Number of READ requests for LOB global buffer (LOB READ REQ CNT)

33
Number of WRITE requests for LOB global buffer (LOB WRITE REQ CNT)

34
Batch input pages count for LOB global buffer (LOB BLK READ PGNUM)

35
Batch output pages count for LOB global buffer (LOB BLK WRITE PGNUM)

36
System-specific information (CACHE BUFFER INSUFFICIENCY)

37
System-specific information (CACHE BUFFER FLUSH MAX)

38
System-specific information (CACHE BUFFER FLUSH AVERAGE)

39
System-specific information (LOCK WAIT CNT)
Exponent representation

40
Percentage of lock contention-release wait (LOCK WAIT RATIO)
5
% (up to 1 decimal place)

41
System-specific information (SLEEP EXEC AVERAGE)
10
Exponent representation

42
Percentage rate of spin loop (SPIN EXEC RATIO)
5
% (up to 1 decimal place)

43
Average spin loop count (SPIN EXEC AVERAGE)
10
Exponent representation

44
Buffer pool lock exclusive time during synchronization point processing
10

45
No. 44 in microseconds
6
Value in seconds is not included

46
Number of buffers processed within buffer pool lock exclusive time during synchronization point processing
10

47
Take-over count of database write processing by reference request hit during synchronization point processing

48
Take-over count of database write processing by update request hit during synchronization point processing

Table 14-13 Record format of a DAT-format file (statistical information on HiRDB files for database manipulation)

No.
Field name (title bar)
Attribute
Maximum length
Remarks

1
Host name (HOST)
Character
32

2
Server name (SERVER)
8

3
HiRDB file name (FILE NAME)
167

4
RDAREA name (RDAREA NAME)
30

5
Statistics log acquisition time (LOG GET TIME)
14
Format:
MM/DD/hh:mm when -e sec is omitted; MM/DD/hh:mm:ss when -e sec is specified

6
Synchronous READs count (SYNC READ)
Numeric
10

7
Synchronous WRITEs count (SYNC WRITE)

8
System-specific information (AIO READ)

9
Asynchronous WRITEs count (AIO WRITE)

10
System-specific information (LIST IO)

11
Opens count (OPEN)

12
Closes count (CLOSE)

13
I/O errors count (IO ERROR)

Table 14-14 Record format of a DAT-format file (deferred write processing statistical information)

No.
Field name (title bar)
Attribute
Maximum length
Remarks

1
Host name (HOST)
Character
32

2
Server name (SERVER)
8

3
Log acquisition time (LOG GET TIME)
11
Format:
MM/DD/hh:mm:ss

4
Cause (CAUSE)
1
Trigger: T
Pre-sync: P
Synchronization point: S
Database synchronization point: D
RDAREA synchronization point: R

5
Pre-sync completion status (STATUS)*
Pre-sync completed: P
Complete and terminated: E

6
I/O parallel level (PARALLEL)
Numeric
10

7
Total number of pages output (OUT PAGE)
Total number of pages output by deferred write processing for each cause

8
WRITE count (DWEXEC)

9
Minimum unit value of WRITE (DWMIN)
In seconds (rounded off)

10
No. 9 in microseconds (DWMINM)
6
Value in seconds is not included.

11
Maximum unit value of WRITE (DWMAX)
10
In seconds (rounded off)

12
No. 11 in microseconds (DWMAXM)
6
Value in seconds is not included.

13
Average unit value of WRITE (DWAVG)
10
In seconds (rounded off)

14
No. 13 in microseconds (DWAVGM)
6
Value in seconds is not included.

15
Total WRITE time (DWSUM)
10
In seconds (rounded off)

16
No. 15 in microseconds (DWSUMM)
6
Value in seconds is not included.

17
Parallel WRITE time (DWPARA)
10
In seconds (rounded off)

18
No. 17 in microseconds (DWPARAM)
6
Value in seconds is not included.

19
Execution time (DWTOTAL)
10
In seconds (rounded off)

20
No. 17 in microseconds (DWTOTALM)
6
Value in seconds is not included.

21
System-specific information (DWLSNGET)
10
In seconds (rounded off)

22
System-specific information (DWLSNGETM)
6
Value in seconds is not included.

23
System-specific information (DWSYNCLIST)
10
In seconds (rounded off)

24
System-specific information (DWSYNCLISTM)
6
Value in seconds is not included.

25
System-specific information (DWSEMOP)
10
In seconds (rounded off)

26
System-specific information (DWSEMOPM)
6
Value in seconds is not included.

Note

If the WRITE count is fewer than the total number of pages output (OUT PAGE), information is output in the batch mode. When information is output in the batch mode, the unit value of WRITE in Nos. 9 through 14 may be greater than when information is not output in the batch mode.

* This information is displayed when the cause is set to P (pre-sync); otherwise, the null value is displayed.

Table 14-15 Record format of a DAT-format file (SQL static optimization information)

No.
Field name (title bar)
Attribute
Maximum length
Remarks

1
Host name (HOST)
Character
32

2
UAP name (UAP NAME)

3
Service name (SERVICE NAME)
31

4
Front-end server name (FES NAME)
8

5
Connection number (CONNECT NO)
Numeric
10
Serial number assigned to each connection in one front-end server

6
SQL counter (SQL COUNTER)

7
Front-end server process ID (FES PROCESS ID)

8
Operation code (OPERATION CODE)
Character
4
For the operation codes, see Table 14-10.

9
Section number (SECTION NO)
Numeric
5

10
SQL type code (SQL TYPE CODE)
Character
4
For SQL type codes, see Table 14-11.

11
Server name (SERVER NAME)
8

12
Syntax analysis start time (PARSE START(S))
14
Format:
MM/DD/hh:mm:ss

13
No. 12 in microseconds (PARSE START (MICRO))
Numeric
6
Value in seconds is not included.

14
Syntax analysis termination time (PARSE END(S))
Character
14
Format:
MM/DD/hh:mm:ss

15
No. 14 in microseconds (PARSE END (MICRO))
Numeric
6
Value in seconds is not included.

16
Syntax analysis execution time (PARSE EXEC TIME(SEC))
10
In seconds (value is rounded off)

17
No. 16 in microseconds (PARSE EXEC TIME(MICRO))
Value in seconds is included.

18
Semantic analysis start time (SEMAN START(S))
Character
14
Format:
MM/DD/hh:mm:ss

19
No. 18 in microseconds (SEMAN START(MICRO))
Numeric
6
Value in seconds is not included.

20
Semantic analysis termination time (SEMAN END(S))
Character
14
Format:
MM/DD/hh:mm:ss

21
No. 20 in microseconds (SEMAN END(MICRO))
Numeric
6
Value in seconds is not included.

22
Semantic analysis execution time (SEMAN EXEC TIME(SEC))
10
In seconds (Value is rounded off.)

23
No. 22 in microseconds (SEMAN EXEC TIME(MICRO))
Value in seconds is included.

24
Optimization start time (OPT START(S))
Character
14
Format:
MM/DD/hh:mm:ss

25
No. 24 in microseconds (OPT START(MICRO))
Numeric
6
Value in seconds is not included.

26
Optimization termination time (OPT END(S))
Character
14
Format:
MM/DD/hh:mm:ss

27
No. 26 in microseconds (OPT END(MICRO))
Numeric
6
Value in seconds is not included.

28
Optimization execution time (OPT EXEC TIME(SEC))
10
In seconds (value is rounded off)

29
No. 28 in microseconds (OPT EXEC TIME(MICRO))
Value in seconds is included.

30
SQL object generation start time (SQLOBJ GEN START(S))
Character
14
Format:
MM/DD/hh:mm:ss

31
No. 30 in microseconds (SQLOBJ GEN START(MICRO))
Numeric
6
Value in seconds is not included.

32
SQL object generation termination time (SQLOBJ GEN END(S))
Character
14
Format:
MM/DD/hh:mm:ss

33
No. 32 in microseconds (SQLOBJ GEN END(MICRO))
Numeric
6
Value in seconds is not included.

34
SQL object generation execution time (SQLOBJ GEN EXEC TIME(SEC))
10
In seconds (value is rounded off)

35
No. 34 in microseconds (SQLOBJ GEN EXEC TIME(MICRO))
Value in seconds is included.

36
SQL object registration start time (SQLOBJ ENT START(S))
Character
14
Format:
MM/DD/hh:mm:ss

37
No. 36 in microseconds (SQLOBJ ENT START(MICRO))
Numeric
6
Value in seconds is not included.

38
SQL object registration termination time (SQLOBJ ENT END(S))
Character
14
Format:
MM/DD/hh:mm:ss

39
No. 38 in microseconds (SQLOBJ ENT END(MICRO))
Numeric
6
Value in seconds is not included.

40
SQL object registration execution time (SQLOBJ ENT EXEC TIME(SEC))
10
In seconds (value is rounded off)

41
No. 40 in microseconds (SQLOBJ ENT EXEC TIME(MICRO))
Value in seconds is included.

Table 14-16 Record format of a DAT-format file (SQL dynamic optimization information)

No.
Field name (title bar)
Attribute
Maximum length
Remarks

1
Host name (HOST)
Character
32

2
UAP name (UAP NAME)

3
Service name (SERVICE NAME)
31

4
Front-end server name (FES NAME)
8

5
Connection number (CONNECT NO)
Numeric
10
Serial number assigned to each connection in one front-end server

6
SQL counter (SQL COUNTER)

7
Front-end server process ID (FES PROCESS ID)

8
Operation code (OPERATION CODE)
Character
4
For operation codes, see Table 14-10.

9
Section number (SECTION NO)
Numeric
5

10
SQL type code (SQL TYPE CODE)
Character
4
For SQL type codes, see Table 14-11.

11
Server name (SERVER NAME)
8

12
Dynamic optimization start time (DYNAMIC START)
14
Format:
MM/DD/hh:mm:ss

13
No. 12 in microseconds (START(MICRO))
Numeric
6
Value in seconds is not included.

14
Dynamic optimization termination time (DYNAMIC END)
Character
14
Format:
MM/DD/hh:mm:ss

15
No. 14 in microseconds (END(MICRO))
Numeric
6
Value in seconds is not included.

16
Dynamic optimization execution time (DYNAMIC EXEC TIME(SEC))
10
In seconds

17
No. 16 in microseconds (DYNAMIC EXEC TIME(MICRO))
Value in seconds is included.

18
System-specific information (SUB SECTION COUNT)
5

19
System-specific information (SUB SECTION NO)

20
SQL object type (SQLOBJ KIND)
Character
1
F: Front end
H: Foreign table access
J: Sort/join
T: Base table scan

21
Requested servers count (REQ SERVER)
Numeric
10

22
Allocated servers count (ALC SERVER)

23
Allocated server name (ALC SERVER NAME)
Character
8

24
RDAREA ID (RDAREA ID)
Numeric
10

Table 14-17 Record format of a DAT-format file (SQL object execution information)

No.
Field name (title bar)
Attribute
Maximum length
Remarks

1
Host name (HOST)
Character
32

2
UAP name (UAP NAME)

3
Service name (SERVICE NAME)
31

4
Front-end server name (FES NAME)
8

5
Connection number (CONNECT NO)
Numeric
10
Serial number assigned to each connection in one front-end server.

6
SQL counter (SQL COUNTER)

7
Front-end server process ID (FES PROCESS ID)

8
Server name (SERVER NAME)
Character
8

9
Thread number (THREAD NO)
Numeric
5

10
Operation code (OPERATION CODE)
Character
4
For operation codes, see Table 14-10.

11
Section number (SECTION NO)
Numeric
5

12
System-specific information (SUB SECTION NO)

13
SQL code (SQLCODE)
10

14
SQL object execution start time (SQLOBJ START)
Character
14
Format:
MM/DD/hh:mm:ss

15
No. 14 in microseconds (START(MICRO))
Numeric
6
Value in seconds is not included.

16
SQL object execution termination time (SQLOBJ END)
Character
14
Format:
MM/DD/hh:mm:ss

17
No. 16 in microseconds (END(MICRO))
Numeric
6
Value in seconds is not included.

18
SQL object execution time (SQLOBJ EXEC TIME(SEC))
10
In seconds (value is rounded off)

19
No. 18 in microseconds (SQLOBJ EXEC TIME(MICRO))
Value in seconds is included.

20
Number of rows retrieved for SQL object (FETCH ROW)

21
Number of rows inserted for SQL object (INSERT ROW)

22
Number of rows updated for SQL object (UPDATE ROW)

23
Number of rows deleted for SQL object (DELETE ROW)

24
Number of work table rows created (CREATE LIST)

25
Number of work table rows deleted (DROP LIST)

26
Send operations count (SEND)

27
Length of send data (SEND DATA SIZE)

28
Receive operations count (RECEIVE)

29
Length of receive data (RECEIVE DATA SIZE)

30
Number of times work tables were created (CREATE TMP LIST)

31
Number of times work tables were deleted (DROP TMP LIST)

32
HiRDB file output operations count (IOS OUTPUT)

33
Buffer input operations count (BUFFER INPUT)

34
SELECT APSL number (SEL APSL NO)

35
SQL object type (SQLOBJ KIND)
Character
1
F: Front end
J: Sort/join
T: Base table scan

36
Number of times processing requests were issued to foreign server (FOREIGN REQUEST COUNT)
Numeric
10

37
Foreign server processing time (FOREIGN EXEC TIME)
In seconds

38
No. 37 in microseconds (FOREIGN EXEC TIME(MICRO))
In microseconds (includes the value in seconds)

39
Number of rows retrieved on the foreign server (FOREIGN FETCH ROW)

40
Number of rows inserted in the foreign server (FOREIGN INSERT ROW)

41
Number of rows updated on the foreign server (FOREIGN UPDATE ROW)

42
Number of rows deleted on the foreign server (FOREIGN DELETE ROW)

Note

Nos. 36-42 are output when the HiRDB External Data Access facility is used. If this facility is not used, 0 or **** is output.

Table 14-18 Record format of a DAT-format file (SQL object transfer statistical information)

No.
Field name (title bar)
Attribute
Maximum length
Remarks

1
Host name (HOST)
Character
32

2
UAP name (UAP NAME)

3
Front-end server name (FES NAME)
8

4
Connection number (CONNECT NO)
Numeric
10

5
Front-end server process ID (FES PROCESS ID)

6
Server name (SERVER)
Character
8

7
System-specific information (SERVICE KIND)
1

8
Operation code (OPERATION CODE)
4
For operation codes, see Table 14-10.

9
Section number (SECTION NO)
Numeric
5

10
System-specific information (SUB SECTION NO)

11
SQL type code (SQL TYPE CODE)
Character
4
For SQL type codes, see Table 14-11.

12
SQL code (SQLCODE)
Numeric
10

13
Service start time (SERVICE START)
Character
14
Format:
MM/DD/hh:mm:ss

14
No. 13 in microseconds (SERVICE START(MICRO))
Numeric
6
Value in seconds is not included.

15
Service termination time (SERVICE END)
Character
14
Format:
MM/DD/hh:mm:ss

16
No. 15 in microseconds (SERVICE END(MICRO))
Numeric
6
Value in seconds is not included.

17
Service execution time (SERVICE EXEC TIME(SEC))
10
In seconds (value is rounded off)

18
No. 17 in microseconds (SERVICE EXEC TIME(MICRO))
Value in seconds is included.

19
SQL object transfer start time (TRANSFER START)
Character
14
Format:
MM/DD/hh:mm:ss

20
No. 19 in microseconds (TRANSFER START(MICRO))
Numeric
6
Value in seconds is not included.

21
SQL object transfer end time (TRANSFER END)
Character
14
Format:
MM/DD/hh:mm:ss

22
No. 21 in microseconds (TRANSFER END(MICRO))
Numeric
6
Value in seconds is not included.

23
SQL object transfer time (TRANSFER TIME(SEC))
10
In seconds (value is rounded off)

24
No. 23 in microseconds (TRANSFER TIME(MICRO))
Value in seconds is included.

25
SQL object transfer size (TRANSFER SIZE)
10
In bytes

Notes

If SERVICE KIND is N, P, or R, the utility sets a null value (0 or " ") in items 8 to 11.

The utility sets a null value (0 or " ") in items 19 to 25 in the following cases:

The SQL object was found in the SQL object buffer.

An error occurred before the SQL object is transferred (the SQL code is a non-zero value).

Table 14-19 Record format of a DAT-format file (SQL statement statistical information)

No. | Field name (title bar) | Attribute | Maximum length | Remarks
1 | Host name (HOST) | Character | 32 |
2 | UAP name (UAP NAME)
3 | Module name (MODULE NAME)
4 | Service name (SERVICE NAME) | 31
5 | Front-end server name (FES NAME) | 8
6 | Connection number (CONNECT NO) | Numeric | 10 | Serial number assigned to each connection in one front-end server
7 | SQL counter (SQL COUNTER) |
8 | Front-end server process ID (FES PROCESS ID)
9 | Operation code (OPERATION CODE) | Character | 4 | For operation codes, see Table 14-10.
10 | Section number (SECTION NO) | Numeric | 5 |
11 | SQL length (SQL LENGTH) | 10
12 | SQL statement (SQL STRING) | Character | 2M | An SQL statement is output a maximum of 30 KB from the beginning.

Note

SQL statement history statistics are output only when the operation code is one of the following: AUXI, OPN2, CALL, AUX2, or SET.

Table 14-20 Record format of a DAT-format file (CONNECT/DISCONNECT statistical information)

No.
Field name (title bar)
Attribute
Maximum length
Remarks

1
Host name (HOST)
Character
32

2
UAP name (UAP NAME)

3
Connect/disconnect time (CONNECT/DISCONNECT TIME)
14
Format: MM/DD/hh:mm:ss

4
No. 3 in microseconds (CONNECT/DISCONNECT TIME(MICRO))
Numeric
6
Value in seconds is not included.

5
Front-end server process ID (FES PROCESS ID)
10

6
SQL code (SQLCODE)

7
Connect/disconnect status (CONNECT/DISCONNECT STATUS)
Character
1
C: CONNECT
D: DISCONNECT

8
Client group ID (CLT GROUP)
1: WS client
2: PC client
3: Mainframe-based client
8: X/Open XA interface
9: Distributed client
0: Utility
#: Other
blank: None (space: 020)

9
Privilege information (PRIVILEGE)
C: CONNECT privilege
D: DBA privilege
blank: None (space: 020)

10
Connect/disconnect type (CONNECT/DISCONNECT KIND)
N: Normal (CONNECT/DISCONNECT)
S: set session authorization
I: Internal disconnect
T: Transaction resolution (OLTP only)

11
Authorization identifier (USER NAME)
30

12
Password (PASSWORD)
Upon KFPA11560-E error (invalid password)

13
CLT IP address (CLT IP ADDRESS)
15
Format: XXX.XXX.XXX.XXX

Table 14-21 Foreign server operation statistical information

No.
Field name (title bar)
Attribute
Maximum length
Remarks

1
Host name (HOST)
Character
32

2
Server name (SERVER NAME)
8

3
Foreign server ID (FOREIGN SERVER ID)
Numeric
10

4
Foreign server name (FOREIGN SERVER)
Character
30

5
DBMS type of the foreign server (DBMS KIND)
1
P: HiRDB
R: XDM/RD
O: Oracle
I: DB2

6
Number of times connection was established (CONNECT COUNT)
Numeric
10

7
Number of connection errors (CONNECT ERROR COUNT)

8
Number of connection errors due to number of licenses exceeded (LICENSE OVER COUNT)

9
Commits count (COMMIT COUNT)

10
Rollbacks count (ROLLBACK COUNT)

11
Number of rows retrieved (FETCH ROW)

12
Information used by the system (DBA CONNECT COUNT)

13
Information used by the system (DBA DISCONNECT COUNT)

14
Information used by the system (DBA PREPARE COUNT)

15
Information used by the system (DBA OPEN COUNT)

16
Information used by the system (DBA FETCH COUNT)

17
Information used by the system (DBA CLOSE COUNT)

18
Information used by the system (DBA EXECUTEIMD COUNT)

19
Information used by the system (DBA EXECUTE COUNT)

20
Information used by the system (DBA LOCKTABLE COUNT)

21
Foreign server processing time (FOREIGN EXEC TIME)
In seconds

22
No. 21 in microseconds (FOREIGN EXEC TIME(MICRO))
In microseconds (includes the value in seconds)

23
Foreign server processing request count (FOREIGN EXEC COUNT)

24
Number of rows inserted in the foreign server (FOREIGN INSERT ROW)

25
Number of rows updated on the foreign server (FOREIGN UPDATE ROW)

26
Number of rows deleted on the foreign server (FOREIGN DELETE ROW)

Table 14-22 Foreign server utilization statistical information

No. | Field name (title bar) | Attribute | Maximum length | Remarks
1 | Host name (HOST) | Character | 32 |
2 | UAP name (UAP NAME) | 30
3 | Service name (SERVICE NAME) | 31
4 | Front-end server name (FES NAME) | 8
5 | Connection number (CONNECT NO) | Numeric | 10 |
6 | SQL counter (SQL COUNTER)
7 | Front-end server's process ID (FES PROCESS ID)
8 | Back-end server name (BES NAME) | Character | 8 |
9 | Back-end server's process ID (BES PROCESS ID) | Numeric | 10 |
10 | Thread number (THREAD ID)
11 | Section number (SECTION NO) | 5
12 | Information used by the system (SUB SECTION NO)
13 | Foreign server ID (FOREIGN SERVER ID) | 10
14 | Foreign server name (FOREIGN SERVER) | Character | 30 |
15 | SQL type code (SQL TYPE CODE)¹ | 4
16 | Array FETCH count on the foreign server (ARRAY FETCH ROW) | Numeric | 10 |
17 | FETCH count on the foreign server (ARRAY FETCH COUNT)
18 | Number of rows retrieved on the foreign server (FETCH ROW)
19 | SQL execution start time at the foreign server (EXEC START) | Character | 14 | Format: MM/DD/hh:mm:ss
20 | No. 19 in microseconds (START(MICRO)) | Numeric | 6 | Value in seconds is not included.
21 | SQL execution end time at the foreign server (EXEC END) | Character | 14 | Format: MM/DD/hh:mm:ss
22 | No. 21 in microseconds (END(MICRO)) | Numeric | 6 | Value in seconds is not included.
23 | SQL execution time at the foreign server (EXEC TIME(SEC)) | 10 | In seconds
24 | No. 23 in microseconds (EXEC TIME(MICRO)) | In microseconds (includes the value in seconds)
25 | Foreign server processing request count (EXEC COUNT) |
26 | Number of rows inserted in the foreign server (FOREIGN INSERT ROW) |
27 | Number of rows updated on the foreign server (FOREIGN UPDATE ROW) |
28 | Number of rows deleted on the foreign server (FOREIGN DELETE ROW) |

¹ For details about SQL TYPE CODE, see Table 14-11.

14.5 Notes

For the pdstedit command, return code 0 indicates normal termination, and return code 1 indicates abnormal termination.

If you selected utf-8 as the character encoding in the pdsetup command, you may be able to use a file with a BOM as the input file for pdstedit. Table 14-23 shows whether or not files with a BOM can be used with pdstedit. Note that even when a file with a BOM is used as the input file for pdstedit, theBOM is skipped.

Table 14-23 Whether or not files with a BOM can be used in pdstedit (applicable to UTF-8)

Option | Input file | Use of file with a BOM
-l | Input statistics unload file | N
-d | Control information file | Y

Legend:

Y: Can be used

N: Cannot be used

14.6 Examples

This section presents examples of using the statistics analysis utility.

Example 1

This example reads information in input statistics unload files and edits all statistical information. It outputs the information to a DAT-format file.

Overview

Command execution

pdstedit -k all   ......................1
         -i /usr/unfile   ..............2
         -o /usr/datfile   .............3

Explanation

Specifies that all statistical information is to be edited.

Name of the directory containing the input statistics unload files: /usr/unfile

Name of the DAT-format file storage directory for storing the statistical information: /usr/datfile

Example 2

This example inputs the files listed below that can be referenced from the host executing pdstedit and then edits the statistical information. It also outputs the information to a DAT-format file.

Multiple unload statistics log files and unload log files placed under a single directory

System log files that have not been unloaded

Overview

Command execution

pdstedit -k all   ..........................1
         -i /usr/unfile   ..................2
         -d /usr/ctl_file   ................3
         -o /usr/datfile   .................4

Explanation

Specifies that all statistical information is to be edited.

Name of the directory containing the input statistics unload files: /usr/unfile

Name of the control statement file: /usr/ctl_file

Name of the DAT-format file storage directory for storing the statistical information: /usr/datfile

Contents of the control statement file (/usr/ctl_file)

file_group bes1:logfg01,logfg02
file_group bes2:logfg01,logfg02

Explanation

bes1 and bes2:

Names of the servers corresponding to the specified file groups

logfg01 and logfg02:

Names of the file groups that contain the system log files to be analyzed

15. Database Condition Analysis Utility (pddbst)

This chapter explains the database condition analysis utility (pddbst), which analyzes the condition of the database, accumulates condition analysis results, and predicts when reorganization should be performed.

Organization of this chapter

15.1 Overview

15.2 Command format

15.3 Output format of the database condition analysis facility

15.4 Execution results of the facility for predicting reorganization time

15.5 Standard value definition file (facility for predicting reorganization time)

15.6 Executing the condition analysis result accumulation facility in prediction level 2

15.7 Rules and notes

15.8 Examples

15.1 Overview

Executor: User with DBA privilege

pddbst provides the following three facilities:

Database condition analysis facility

Condition analysis result accumulation facility

Facility for predicting reorganization time

Organization of this section

15.1.1 Database condition analysis facility

15.1.2 Condition analysis result accumulation facility

15.1.3 Facility for predicting reorganization time

15.1.1 Database condition analysis facility

The database condition analysis facility references the HiRDB directory, analyzes the storage status of the data dictionary tables or the tables and indexes in user RDAREAs, then displays the analysis results.

You can execute the database condition analysis facility in the following units:

Condition analysis by RDAREA

Condition analysis by table or index

Storage condition analysis on cluster keys and clustering data pages by RDAREA

Organization of this subsection

(1) Condition analysis by RDAREA

(2) Condition analysis by table or index

(3) Storage condition analysis on cluster keys and clustering data pages by RDAREA

(1) Condition analysis by RDAREA

Condition analysis by RDAREA can be a logical analysis or a physical analysis.

Figures 15-1 (logical analysis) and 15-2 (physical analysis) show condition analysis by RDAREA.

Figure 15-1 Condition analysis by RDAREA: logical analysis

Figure 15-2 Condition analysis by RDAREA: physical analysis

(2) Condition analysis by table or index

Figure 15-3 shows condition analysis by table, and Figure 15-4 shows condition analysis by index.

Figure 15-3 Condition analysis by table

Figure 15-4 Condition analysis by index

(3) Storage condition analysis on cluster keys and clustering data pages by RDAREA

Cluster keys are analyzed and the incorrect-storage rate is displayed (the incorrect-storage rate indicates the degree of disorganization of tables or indexes).

The analysis results are displayed in the order of cluster keys and clustering data pages for each storage RDAREA.

(a) Analysis by cluster key order

Cluster keys are retrieved in the order of the key values, and the analysis results are displayed as follows:

Number of times the storage position changed (when storage positions span pages or segments)

Number of times the storage order was incorrect (i.e., pages (segments) were stored in reverse order) against the number of times the storage position was changed; displayed in percentage (%) per page or per segment. The rate of incorrect storage order increases due to occurrences of page partitioning

Figure 15-5 shows the ratio of the number of storage position changes to the number of times the storage order was incorrect.

Figure 15-5 Ratio of number of storage position changes to number of times storage order was incorrect (%)

: Storage position change.

The storage position change from Key 4 to Key 5 is in reverse order, creating an incorrect storage order. The incorrect storage order rate for this figure is:

Number of times storage order is incorrect/number of storage position changes = 1/2 = 50%

(b) Analysis by clustering data page order

Clustering data pages are data pages in tables assigned to cluster keys. The storage position changes and the number of times the storage order was incorrect for row data when data in cluster key order was retrieved based on the storage position information for row data in the cluster key are displayed in the format "page unit/segment unit" (%).

When the storage condition becomes disorderly due to addition or updating of rows, either the incorrect storage order rate or the number of storage position changes, or both, will increase.

15.1.2 Condition analysis result accumulation facility

The condition analysis result accumulation facility accumulates database condition analysis results that are required for using the facility for predicting reorganization time.

The condition analysis result accumulation facility executes a logical analysis of the database condition by RDAREA, edits the analysis results, and then stores the results in the database state analyzed table. It is recommended that you execute the condition analysis result accumulation facility on a daily basis.

Figure 15-6 provides an overview of the condition analysis result accumulation facility.

Figure 15-6 Overview of condition analysis result accumulation facility

There are two prediction levels in the condition analysis result accumulation facility, prediction level 1 and prediction level 2. These levels correspond to prediction levels 1 and 2 for the facility for predicting reorganization time. Execution time is longer in prediction level 2 than in prediction level 1 because the former involves more detailed prediction. To execute the condition analysis result accumulation facility in prediction level 2, see 15.6 Executing the condition analysis result accumulation facility in prediction level 2.

Prerequisites for using the condition analysis result accumulation facility:

To use the condition analysis result accumulation facility, you must make the following preparations:

Set pd_rorg_predict=Y in the system definition.

Use pdmod to create a data dictionary RDAREA for storing a database state analyzed table and a database management table.

15.1.3 Facility for predicting reorganization time

Organization of this subsection

(1) About the facility for predicting reorganization time

(2) Prerequisites for using the facility for predicting reorganization time

(3) Predicting the reorganization time

(4) Prediction of reorganization time when the database was not restored to its most recent status after a failure

(1) About the facility for predicting reorganization time

The facility for predicting reorganization time analyzes information accumulated by the condition analysis result accumulation facility (in a database state analyzed table) and information in database management tables, predicts when RDAREA maintenance will be needed (scheduled database maintenance date), and recommends a maintenance date and method.

For details about the facility for predicting reorganization time, see the HiRDB Version 8 System Operation Guide.

Figure 15-7 provides an overview of the facility for predicting reorganization time.

Figure 15-7 Overview of the facility for predicting reorganization time

Note

If the RDAREA contains only one resource (for example, an RDAREA contains only a single table), the utility uses the database state analyzed table and database management table to make its prediction. If an RDAREA contains multiple resources, the utility uses only the database state analyzed table to make its prediction.

The facility for predicting reorganization time consists of the following two levels:

Prediction level 1
Predicts a shortage of RDAREA capacity.

Prediction level 2
Predicts deterioration of table and index storage efficiency as well as a shortage of RDAREA capacity.

(2) Prerequisites for using the facility for predicting reorganization time

To use the facility for predicting reorganization time, you must complete the following preparations:

Set pd_rorg_predict=Y in the system definition.

Use pdmod to create a data dictionary RDAREA for storing a database state analyzed table and a database management table.

Accumulate at least four sets of analysis information with the condition analysis result accumulation facility.

(3) Predicting the reorganization time

The following describes how to predict the reorganization time.

(a) In prediction level 1

In prediction level 1, the facility predicts the date on which the percentage of used segments in an RDAREA is likely to exceed a standard value (this date is called the scheduled database maintenance date). The facility determines that maintenance will be required for an RDAREA when the standard value is predicted to be reached within a specified period (the monitoring interval¹). When maintenance is determined to be required, the facility also recommends a maintenance method. The facility selects for the maintenance method either reorganization based on the specified maintenance extension period¹ or RDAREA expansion, whichever is best suited to the RDAREA.

You can change the standard values by specifying the standard value definition file.²

1 You specify a monitoring interval and maintenance extension period with the -R option.

2 You use the -c option to specify the standard value definition file.

Figure 15-8 shows the relationships among the percentage of used segments in an RDAREA, the scheduled database maintenance day, the monitoring interval, and the maintenance extension period.

Figure 15-8 Relationships among the percentage of used segments in an RDAREA, the scheduled database maintenance date, the monitoring interval, and the maintenance extension period

Legend:

: Execution of the condition analysis result accumulation facility

: Number of used segments (%), as determined by execution of the condition analysis result accumulation facility

t1: Execution of the facility for predicting reorganization time

t2: Date the prediction line for the number of used segments (%) is forecast to reach the standard value

t3: Date the prediction line for the number of used segments (%) is forecast to reach the standard value after maintenance has been performed

(b) In prediction level 2

In prediction level 2, the facility predicts any deterioration of table and index storage efficiency as well as any shortage of RDAREA capacity.

(4) Prediction of reorganization time when the database was not restored to its most recent status after a failure

If the database was not restored to its most recent status after a failure (such as when the database was restored to the point at which a backup was made or when only a specified range was restored), executing the facility for predicting reorganization time cannot result in a valid prediction. To use the facility for predicting reorganization time under such circumstances, you must reset the accumulated condition analysis results.

Suppose that a failure occurred subsequent to execution of the condition analysis result accumulation facility, and the database was restored to the point at which a backup was made (which was earlier than when the condition analysis result accumulation facility was executed). If the facility for predicting reorganization time is executed in this status, a valid prediction cannot be obtained because the contents of the database are older than the accumulated condition analysis results. In such a case, you need to reset the accumulated condition analysis results once you have restored the database to the point at which the backup was make. This will make the accumulated condition analysis results match the database contents, thereby enabling a valid prediction.

You specify the -I option to reset the condition analysis result accumulation facility.

15.2 Command format

Organization of this section

15.2.1 Format

15.2.2 Options

15.2.3 predict statement

15.2.4 workdir statement

15.2.1 Format

Organization of this subsection

(1) For the database condition analysis facility

(2) For the condition analysis result accumulation facility

(3) For the facility for predicting reorganization time

(1) For the database condition analysis facility

Condition analysis by RDAREA

 pddbst -r RDAREA-name[,RDAREA-name]...
       [-k {logi [-d]|phys [-f] [-a [-h]]}] [-u user-ID [-p password]]
       [-q generation-number] [-b]
       [-X response-monitoring-time-for-server-to-server-communication]
       [-v control-statements-file-name]

Condition analysis by table

 pddbst -t [authorization-identifier.]table-identifier
       [-s] [-u user-ID [-p password]] [-d]
       [-q generation-number] [-b]
       [-X response-monitoring-time-for-server-to-server-communication]
       [-v control-statements-file-name]

Condition analysis by index

 pddbst -i [authorization-identifier.]index-identifier
       [-u user-ID [-p password]] [-d]
       [-q generation-number] [-b]
       [-X response-monitoring-time-for-server-to-server-communication]
       [-v control-statements-file-name]

Storage condition analysis on cluster keys and clustering data pages

 pddbst -t [authorization-identifier.]table-identifier
       [-u user-ID [-p password]] -k clus
       [-q generation-number] [-b]
       [-X response-monitoring-time-for-server-to-server-communication]
       [-v control-statements-file-name]

(2) For the condition analysis result accumulation facility

 pddbst -r {RDAREA-name|ALL} [-k logi] -e prediction-level
       [-w pause-time,segments-count] [-n analysis-segments-count] [-I]
       [-u authorization-identifier [-p password]]
       [-X response-monitoring-time-for-server-to-server-communication]
       [-v control-statements-file-name]

(3) For the facility for predicting reorganization time

 pddbst [-r ALL] -k pred -e prediction-level
       [-m] [-R monitoring-interval[,maintenance-extension-period]]
       [-c standard-value-definition-file-name] [-u authorization-identifier [-p password]]
       [-X response-monitoring-time-for-server-to-server-communication]
       [-v control-statements-file-name]

15.2.2 Options

Organization of this subsection

(1) -r {RDAREA-name[,RDAREA-name]...|ALL}...

(2) -k {logi|phys|clus|pred}

(3) -d

(4) -f

(5) -a

(6) -h

(7) -u authorization-identifier

(8) -p password

(9) -t [authorization-identifier.]table-identifier

(10) -s

(11) -i [authorization-identifier.]index-identifier

(12) -q generation-number

(13) -b

(14) -e prediction-level

(15) -w pause-time,segments-count

(16) -n analysis-segments-count

(17) -I

(18) -m

(19) -R monitoring-interval[,maintenance-extension-period]

(20) -c standard-value-definition-file-name

(21) -X response-monitoring-time-for-server-to-server-communication

(22) -v control-statement-file-name

(1) -r {RDAREA-name[,RDAREA-name]...|ALL}...

<identifier> ((1-30))

Specifies the names of the RDAREAs to be analyzed. ALL can be specified only for the condition analysis result accumulation facility and the facility for predicting reorganization time.

You can specify the following RDAREA types:

Data dictionary RDAREA

Data dictionary LOB RDAREA

User RDAREA

User LOB RDAREA

Registry RDAREA

Registry LOB RDAREA

Rules

The same RDAREA name cannot be specified more than once.

If an RDAREA name is enclosed in double quotation marks ("), the command treats it as being case sensitive. If it is not enclosed in double quotation marks ("), the command treats it as in all uppercase letters.

If an RDAREA name contains a space, enclose the RDAREA name in double quotation marks ("). If you are using sh (Bourne shell), csh (C shell), and ksh (Korn shell), you need to enclose the entire RDAREA name in single quotation marks (').

You can specify a maximum of 16 RDAREA names. In the case of a logical analysis (logi specified in the -k option), specify only one RDAREA name (if multiple RDAREA names are specified, the utility uses only the first name specified).

If you are also specifying the -q option, specify the original RDAREA name.

The condition analysis result accumulation facility and the facility for predicting reorganization time use a single transaction to analyze all tables stored in an RDAREA. Therefore, the value of the pd_max_access_tables operand in the system definition must at least equal the number of tables in the RDAREA that contains the greatest number of tables among all target RDAREAs.

(2) -k {logi|phys|clus|pred}

Specifies the type of analysis that is to be executed (by the database condition analysis facility, condition analysis result accumulation facility, or facility for predicting reorganization time).

logi:

Specifies that RDAREA condition analysis (logical analysis) or the condition analysis result accumulation facility is to be executed.

phys:

Specifies that RDAREA condition analysis (physical analysis) is to be executed.

clus:

Specifies that storage condition analysis is to be executed on cluster keys and clustering data pages.

pred:

Specifies that the facility for predicting reorganization time is to be executed.

Combination of -k option and other options:

The values of the -r, -t, and -i options depend on the value of the -k option:

-k option value | Whether or not operation can be specified | Remarks
-r | -t | -i
logi | M | N | N | Condition analysis by RDAREA (logical analysis)
phys | M | N | N | Condition analysis by RDAREA (physical analysis)
clus | N | M | N | Storage condition analysis on cluster keys and clustering data pages
Omitted | N | M | N | Condition analysis by table
N | N | M | Condition analysis by index
M | N | N | Condition analysis by RDAREA (logical analysis)
pred | O | N | N | Facility for predicting reorganization time

Legend:

M: Specification is mandatory

O: Specification is optional

N: Specification is not permitted

(3) -d

Specifies that detailed page information is to be displayed. This option is applicable to logical analysis (-k logi) and condition analysis by table and by index. Whether or not pdrorg and pdreclaim need to be executed depends on this detailed page information.

(4) -f

Specifies that HiRDB file information is to be displayed. This option is applicable to physical analysis (-k phys) only.

(5) -a

Specifies that the analysis results are to be displayed in DAT format.

When this option is specified, the utility assumes that the -f option is specified.

(6) -h

When the -a option is specified, specifies that a header is to be displayed.

(7) -u authorization-identifier

Specifies the authorization identifier of the user executing pddbst.

Rules

If this option is omitted, the authorization identifier and password defined in PDUSER in the client environment definition are assumed. If the PDUSER value is not set, the user name corresponding to the OS user ID of the user executing the utility is assumed.

If a user ID is enclosed in double quotation marks ("), the command treats it as being case sensitive. If it is not enclosed in double quotation marks ("), the command treats it as in all uppercase letters. If you are using sh (Bourne shell), csh (C shell), or ksh (Korn shell), you must enclose the entire user ID in single quotation marks (').

(8) -p password

Specifies the password for the authorization identifier specified in the -u option.

Rules

If this option is not specified and PDUSER is also not set in the client environment definition, the value entered on the utility execution screen is assumed.

If a password is enclosed in double quotation marks ("), the command treats it as being case sensitive. If it is not enclosed in double quotation marks ("), the command treats it as in all uppercase letters. If you are using sh (Bourne shell), csh (C shell), or ksh (Korn shell), you must enclose the entire password in single quotation marks (').

(9) -t [authorization-identifier.]table-identifier

Specifies the name of the table to be analyzed.

Rules

This cannot be a view table or foreign table.

If the authorization identifier is omitted, the authorization identifier specified in the -u option is assumed.

If an authorization identifier or table identifier is enclosed in double quotation marks ("), the command treats it as being case sensitive. If it is not enclosed in double quotation marks ("), the command treats it as in all uppercase letters.

If a table identifier contains a space, enclose it in double quotation marks ("). If you are using sh (Bourne shell), csh (C shell), or ksh (Korn shell), you must enclose the entire identifier in single quotation marks (').

(10) -s

Specifies that the display in the case of table condition analysis is to include the total number of lines stored in the table or the number of lines stored for each RDAREA.

(11) -i [authorization-identifier.]index-identifier

Specifies the name of the index to be analyzed.

Rules

This cannot be an external index.

If the authorization identifier is omitted, the authorization identifier specified in the -u option is assumed.

If an authorization identifier or index identifier is enclosed in double quotation marks ("), the command treats it as being case sensitive. If it is not enclosed in double quotation marks ("), the command treats it as in all uppercase letters.

If an index identifier contains a space, enclose it in double quotation marks ("). If you are using sh (Bourne shell), csh (C shell), and ksh (Korn shell), you need to enclose the entire identifier in single quotation marks (').

(12) -q generation-number

<unsigned integer> ((0-10))

Specifies that information about the inner replica facility is to be displayed.

Rules

An error results if this option is specified when HiRDB Staticizer Option has not been installed.

When this option is omitted, the utility assumes that the following RDAREA is to be analyzed:
For condition analysis by RDAREA: RDAREA specified in the -r option
For condition analysis by table or index or storage condition analysis on cluster key and clustering data page: Current RDAREA

This option cannot be specified when you execute the condition analysis result accumulation facility or the facility for predicting reorganization time. When the inner replica facility is used, the utility assumes -q 0.

(13) -b

Specifies that the online performance of applications is to be protected from any adverse effects of executing pddbst. When this option is specified together with the -s option, the analysis time may increase. The -b option is ignored when searching data dictionary tables for a table and indexes that are to be the targets of database condition analysis, and when searching the operation management table by the facility for predicting reorganization time.

Criteria

pddbst first reads a resource page to be analyzed into the global buffer. If a space shortage occurs in the global buffer at that time, online performance may be affected adversely because a page that had already been read by an application may be swept out of the global buffer. To avoid such adverse effects on performance, specify the -b option.

When the -b option is specified, a page read by pddbst is always treated as the oldest page, so that it will be the first page swept out of the global buffer in the event of a space shortage. When the -b option is not specified, the LRU management method is used.

Advantages

Even if a space shortage occurs in the global buffer, there will be no adverse effects on the online performance of applications. However, during execution of pddbst, re-reading of directory pages may occur in order to acquire the requisite number of rows.

(14) -e prediction-level

Specifies the prediction level to be used when the condition analysis result accumulation facility or the facility for predicting reorganization time is applied.

1

Specifies that the condition analysis result accumulation facility or the facility for predicting reorganization time is to be executed in prediction level 1.

2

Specifies that the condition analysis result accumulation facility or the facility for predicting reorganization time is to be executed in prediction level 2.

Rules

Set the same prediction level for both the condition analysis result accumulation facility and the facility for predicting reorganization time.

When the -e option is specified, the utility assumes that the -b option is also specified.

(15) -w pause-time,segments-count

Specifies that the condition analysis result accumulation facility in prediction level 2 is to be executed with the interval analysis method. For details about interval analysis, see 15.6.1 Interval analysis. This method pauses processing for the specified amount of time after the specified number of segments have been analyzed.

pause-time<unsigned integer> ((10-60000))

Specifies the pause time, in units of 10 milliseconds. If the specified value is not an even 10 milliseconds, the value is rounded up (for example, 15 is rounded up to 20).

segments-count<unsigned integer> ((1-2147483647))

Specifies the number of segments to be analyzed between pauses.

Rules

The -w option is applicable to prediction level 2 (-e 2). Specifying this option in the case of another prediction level results in a control statement error.

In the case of a HiRDB/Parallel Server, the specified value applies to all servers.

If the global buffer contains no page to be analyzed, as many input/output operations as (specified number of segments segment size) occur until the pause time is reached.

(16) -n analysis-segments-count

<unsigned integer> ((2-10))

Specifies that the condition analysis result accumulation facility in prediction level 2 is to be executed with the merge analysis method. For details about merge analysis, see 15.6.2 Merge analysis.

This method divides a single execution of the condition analysis result accumulation facility into the specified number of analysis segments. Data equivalent to 1/n, where n is the specified number of analysis segments, is the target of each analysis. This means that it takes n executions to analyze all of the target data.

Rules

The -n option is applicable to prediction level 2 (-e 2). Specifying this option in the case of another prediction level results in a control statement error.

When you specify the -n option, you must execute pddbst the specified number of times. If you change the -n option value before the current series of analyses has been completed, the utility ignores the analysis information that has been accumulated so far and starts the analyses over from the beginning.

If maintenance is performed on the target table or index before the entire series of analyses has been completed, the utility starts the analyses over from the beginning.

(17) -I

Specifies that the accumulated condition analysis results are to be reset. For details about resetting the accumulated condition analysis results, see 15.1.3(4) Prediction of reorganization time when the database was not restored to its most recent status after a failure.

Rules

When the -I option is specified, ALL cannot be specified in the -r option.

Specify the -I option only the first time you execute the condition analysis result accumulation facility after data recovery. If the -I option is specified subsequently, all the accumulated condition analysis results will be reset.

(18) -m

Specifies that information about both the scheduled database maintenance date and the maintenance method is to be displayed by the facility for predicting reorganization time. When this option is omitted, the utility displays information about the scheduled database maintenance date only.

(19) -R monitoring-interval[,maintenance-extension-period]

When the facility for predicting reorganization time is executed, specifies the target period and the maintenance extension period.

monitoring-interval<unsigned integer> ((1-400)) <<14>>

Specifies the target monitoring interval in days.

For example, to monitor an RDAREA for the next two weeks for scheduling a database maintenance date, specify 14.

maintenance-extension-period<unsigned integer> ((0-400)) <<monitoring period/2>>

Specifies the minimum number of days that must elapse between scheduled database maintenance dates.

For example, once database maintenance has been executed, if you wish to require at least one week to elapse before the next database maintenance, specify 7.

(20) -c standard-value-definition-file-name

<path name> ((up to 1023 bytes))

When the facility for predicting reorganization time is executed, the utility makes its predictions based on standard values predefined for various items. To change any of the standard values, this option specifies the absolute or relative path name of the standard value definition file.

You specify in the standard value definition file the new standard values for the items. For details about the standard value definition file, see 15.5 Standard value definition file (facility for predicting reorganization time).

(21) -X response-monitoring-time-for-server-to-server-communication

<unsigned integer> ((1-65535)) ((300))

If an error, such as a communication error, occurs at the server where the command was executed, the command may stop responding and the application may stop. To help you detect errors, pddbst enables you to monitor a response time during communication for dictionary manipulation that is performed by the command.

You set in the -X option a response monitoring time during dictionary manipulation (in seconds). If the execution time during dictionary manipulation exceeds the value set in the -X option, pddbst treats it as a dictionary access error and cancels processing with return code 8.

Criteria

If you want to detect an error in less time than 300 seconds in the event of a no-response from the server due to a communication error or unit down, specify a value less than 300 in the -X option.

If the system switchover facility is used, the command may keep waiting for a response even though system switchover has been completed. In such a case, you can terminate the command immediately by reducing the monitoring time.

The specified monitoring time may result in a timeout if a response from the dictionary is delayed and the utility's preprocessing is not completed within 300 seconds, which is the default value of the -X option. This can happen when many applications and utilities are executing concurrently. In such an environment, specify a value greater than 300 in the -X option.

(22) -v control-statement-file-name

<path name> ((up to 1023 bytes))

Specifies the absolute or relative path name of the file that contains the pddbst control statements.

This file must be located on the host where pddbst is executed. You can specify the following control statements:

predict statement

workdir statement

15.2.3 predict statement

The predict statement is used to output the execution results of the facility for predicting reorganization time to a file in CSV format.

Rules

You can specify the predict statement only when you execute the facility for predicting reorganization time.

Only one predict statement can be specified in the control statement file.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

 predict file=CSV-output-file-name

(2) Explanation

(a) CSV-output-file-name

<path name> ((up to 1023 bytes))

Specifies the absolute path name of the regular file to which the results of the facility for predicting reorganization time are to be output.

For details about the format of the output file, see 15.4.2 Output format in CSV format.

Rules

For a HiRDB/Parallel Server, create the file on the host where the system manager is located.

The HiRDB administrator must have access privileges to the specified file.

If the file name contains a space, enclose the entire file name in double quotation marks (").

If the specified file is not found, the utility creates the file; if the file already exists, the utility overwrites it.

15.2.4 workdir statement

The workdir statement specifies the directory to which work files used during execution of pddbst are to be output. pddbst uses work files for executing database condition analysis and for sorting data.

Rules

Only one workdir statement can be specified in the control statement file.

When the workdir statement is omitted, the utility creates work files in the /tmp directory on the host that contains the single server or where the system manager is located. These files are deleted when pddbst is terminated; however, they may remain in the system if pddbst terminates abnormally.

Organization of this subsection

(1) Format

(2) Explanation

(1) Format

 workdir dir=directory-name-for-work-files

(2) Explanation

(a) directory-name-for-work-files

<path name> ((up to 1000 bytes))

Specifies the absolute path name of the directory to which work files are to be output.

Rules

For a HiRDB/Parallel Server, specify a directory on the host where the system manager is located.

The HiRDB administrator must have access privileges to the specified directory.

If the directory name contains a space, enclose the entire directory name in double quotation marks (").

If the specified directory does not contain a needed file, the utility creates the file; if the directory already contains a needed file, the utility overwrites the existing file.

15.3 Output format of the database condition analysis facility

Organization of this section

15.3.1 Condition analysis by RDAREA (logical analysis)

15.3.2 Condition analysis by RDAREA (physical analysis)

15.3.3 Condition analysis by table or index

15.3.4 Cluster key and clustering data page storage condition analysis

15.3.1 Condition analysis by RDAREA (logical analysis)

This utility analyzes the storage condition of all segments and pages for the tables and indexes that are stored in an RDAREA. Note, however, that for tables and indexes that have been partitioned and stored among several RDAREAs, this utility analyzes only those segments stored in the specified RDAREAs.

Organization of this subsection

(1) Purpose

(2) Analysis results

(3) Analyzing the analysis results

(1) Purpose

You can detect a disordered table or index and obtain the capacity status of a single RDAREA.

(2) Analysis results

The following shows the results of condition analysis by RDAREA (logical analysis):

(a) For an RDAREA other than a LOB RDAREA

pddbst VV-RR(Object Option) ** RD Area Logical Analysis **  2003/03/31 18:33:38 [1]
RD Area Name   : user_rdarea_1 [2]
 Server        : bes1 [3]
 Total Segment :        150[4] Segment Size :          5 Pages [6]
 Unused Segment:         24[5] Page Size    :       4096 Bytes [7]
 Original RD Area Name : user_rdarea_1 [21]
 Generation Number :  0[22]  Replica RD Area Count :  0 [23]
 [24]     [25]               [26]               [27]
 History1 Hold Status :      Hold Code :     0  Hold Time :
 History2 Hold Status :      Hold Code :     0  Hold Time :
Table Name : TBL01 [8]
Auth Id    : user1 [9]
Status     :   [20]
Reference Pending Status : P [33]
Check     Pending Status : P [34]
 Search Mode : INS [28] Segment Reuse :          - segments [29]
 Reuse Search Failure :          0/         0 [30]
         Used(Full)       Used(      Full)        Sum
         [10]  [11]        [12]       [13]        [14]
 Segment 100%(  0%)        104(         0)        104
         [15]  [16]        [17]       [18]        [19]
 Page    100%(  0%)        518(         0)        520
--------------------------------------------------------------------------------
 Collect Prearranged Page :         55 [31]
 Used Page Ratio       Page(Ratio) [32]
            0% :         57(  11%)
        1- 10% :         19(   4%)
       11- 20% :         28(   6%)
       21- 30% :         70(  14%)
       31- 40% :         95(  19%)
       41- 50% :         71(  14%)
       51- 60% :         69(  14%)
       61- 70% :         58(  12%)
       71- 80% :         37(   8%)
       81- 90% :         14(   3%)
       91-100% :          2(   1%)
 Total                  520

Table Name : TBL02
Auth Id    : user1
Status     :
 Search Mode : INS   Segment Reuse :          - segments
 Reuse Search Failure :          0/         0
         Used(Full)       Used(      Full)        Sum
 Segment 100%(  0%)         21(         0)         21
 Page     98%(  0%)        103(         0)        105
 Collect Prearranged Page :          9
 Used Page Ratio       Page(Ratio)
            0% :         11(  11%)
        1- 10% :          1(   1%)
       11- 20% :          6(   6%)
       21- 30% :          6(   6%)
       31- 40% :         12(  12%)
       41- 50% :         13(  13%)
       51- 60% :          5(   5%)
       61- 70% :          7(   7%)
       71- 80% :         27(  26%)
       81- 90% :         12(  12%)
       91-100% :          5(   5%)
 Total                  105

Index Name : IDX_TBL01_C1
Auth Id    : user1
Status     :
         Used(Full)       Used(      Full)        Sum
 Segment 100%(  0%)          1(         0)          1
 Page    100%(  0%)          5(         0)          5
 Collect Prearranged Page :          0
 Collect On Page :          0
 Used Page Ratio       Page(Ratio)
            0% :          0(   0%)
        1- 10% :          1(  20%)
       11- 20% :          0(   0%)
       21- 30% :          3(  60%)
       31- 40% :          0(   0%)
       41- 50% :          1(  20%)
       51- 60% :          0(   0%)
       61- 70% :          0(   0%)
       71- 80% :          0(   0%)
       81- 90% :          0(   0%)
       91-100% :          0(   0%)
 Total                    5

Explanation:

Date and time of completion of acquisition of the information required for this condition analysis, in the format YYYY/MM/DD hh:mm:ss:
YYYY: Year. MM: Month. DD: Date. hh: Hour. mm: Minute. ss: Second.

Name of RDAREA subject to analysis.

Name of server managing the RDAREA.

Total number of segments in the RDAREA (number of used segments + number of unused segments).

Total number of unused segments in the RDAREA.

Segment size (number of pages per segment).

Page size (in bytes).

Name of a table or index contained in the RDAREA.

Authorization identifier of the table or index. For a data dictionary RDAREA, (Data dictionary )is displayed.

Percentage ratio of used segments:
number of used segments/value of 14 100 (%)

Percentage ratio of full segments:
number of full segments/value of 14 100 (%)

Number of used segments.

Number of full segments.

Total number of segments allocated to the table or index (number of used segments).

Percentage ratio of used pages:
number of used pages/value of 19 100 (%)

Percentage ratio of full pages:
number of full pages/value of 19 100 (%)

Number of used pages.

Number of full pages.

Total number of pages in the segments allocated to the table or index (number of used pages + number of unused pages).

For a table, reload-not-completed data status or being reorganized. If the table is not in either of the following statuses, this field is blank.

DATA_UNFINISH:

The table is in reload-not-completed data status, which means that table reorganization was executed, but reload processing has not been completed for some reason such as an error. To release the table from reload-not-completed data status, you must re-execute table reorganization or reload data into the table.

ON_RORG:

The table is currently being reorganized.

For an index, this is the status of an unfinished index. If the index has been completed, this field is blank.

UNFINISH_0

See Figures 15-9 and 15-10.

UNFINISH_1

See Figures 15-11 and 15-12.

UNFINISH_2

When a UAP using the plug-in index delayed batch creation function is being executed or after the UAP finished executing, a batch index creation process using the database reorganization utility is not being executed. For details about the plug-in index delayed batch creation function, see the HiRDB Version 8 System Operation Guide.

Name of the original RDAREA.

Generation number of the corresponding RDAREA.

Number of replica RDAREAs.

Shutdown history of the corresponding RDAREA.
History1: Shutdown information immediately before the shutdown was released (if the RDAREA is currently shut down, this field displays the current shutdown information)
History2: Shutdown information immediately preceding History1

Shutdown type of the corresponding RDAREA. If there is no history, this field is blank.
CMD: Command shutdown by HiRDB error detection
FLT: Error shutdown

Code indicating the cause of the shutdown of the corresponding RDAREA. If there is no history, this field displays 0.
0: Shutdown release
10: Input/output error
20: Page corruption
40: Open or allocation error
70: Rollback error
80: Shutdown due to an error during DROP TABLE or DROP INDEX
90: No-log shutdown (pdload, pdrorg, and pdrbal commands)
92: No-log shutdown (UAP)
93: Shutdown of LOB RDAREA
96: Invalid time stamp
97: Invalid object ID
98: List RDAREA error
100: Log application-disabled status due to execution of a utility (pdload, pdrorg, or pdrbal) in a mode other than the log acquisition mode
102: Log application-disabled status due to execution of a UAP in a mode other than the log acquisition mode
104: Log application-disabled status due to updating of a table for which PARTIAL or NO is specified for the BLOB column recovery restriction
110: Log application-disabled status due to pdmod
120: Log application-disabled status due to error shutdown

Shutdown time of the corresponding RDAREA. If there is no history, this field is blank.

Page search mode:
INS: New page allocate mode
REU: Free page reuse mode

Number of segments specified for SEGMENT REUSE during execution of CREATE TABLE or ALTER TABLE. If a number of segments for SEGMENT REUSE is not specified, this field displays 0. If NO is specified for SEGMENT REUSE or SEGMENT REUSE is omitted, the field displays -.

Number of times the mode changed from new page allocate to free page reuse and then changed back to new page allocate because there was no reusable free space (n/m).
n: Idle count
m: Number of times mode changed from new page allocate to free page reuse
n and m are reset to 0 at the following times:

When the RDAREA is closed

When HiRDB is restarted

When the PURGE TABLE statement is executed

Number of pages that can be released by pdreclaim (number of used free pages whose usage ratio is 0%).

Number of used pages for each 10% range. The parentheses enclose the percentage ratio to all used pages. Because the fraction part of each ratio is rounded up, the total may exceed 100. Note the following:

For a page that stores 201 or more duplicate keys, the percentage ratio of PCTFREE specified during table definition is ignored. Therefore, data is not rearranged according to the PCTFREE value even during reorganization.

For an index to which the index key value with no lock is applied, the deletion key value is treated as free space. If all used pages are deletion key values, the usage ratio is 0%.

A full page may not always fall in the usage ratio range of 91-100%.

A free space created by update processing that shortens an existing row is not treated as free space.

If the ratio of used pages is less than (100 - free space ratio specified with PCTFREE), the storage efficiency may have decreased. You should consider executing pdrorg. For an area storing branch rows (variable-length character string data with a length of 256 bytes or greater, data for repetition columns, and data for columns of an abstract data type), executing pdrorg has no effect on the storage efficiency.

Check pending status for referential constraint in the table information in the RDAREA. If no referential constraint has been defined for the table, this item is blank.
P: Check pending status
blank: Not check pending status

Check pending status for check constraint in the table information in the RDAREA. If no check constraint has been defined for the table, this item is blank.
P: Check pending status
blank: Not check pending status

Note 1

Nos. 21-23 are displayed when HiRDB Staticizer Option is used. If a generation is specified for analysis and the specified replica RDAREA generation does not exist, the utility issues a warning message, in which case no results are displayed.

Note 2

Nos. 31-32 are displayed when the -d option is specified.

Figure 15-9 Types of unfinished index by table (1/2)

Figure 15-10 Types of unfinished index by table (2/2)

Figure 15-11 Types of unfinished index by RDAREA (1/2)

Figure 15-12 Types of unfinished index by RDAREA (2/2)

(b) For LOB RDAREA

pddbst VV-RR(Object Option) ** RD Area Logical Analysis **  2003/04/03 12:36:43 [1]
RD Area Name   : user_rdlob_2 [2]
 Server        : bes1 [3]
 Total Segment :      11000 [4] Segment Size :          1 Pages [6]
 Unused Segment:       9178(      9178) [5]
 Page Size    :       8192 Bytes [7]
 Original RD Area Name : user_rdlob_2 [16]
 Generation Number :  0[17]  Replica RD Area Count :  0 [18]
 [19]     [20]               [21]               [22]
 History1 Hold Status :      Hold Code :     0  Hold Time :                    
 History2 Hold Status :      Hold Code :     0  Hold Time :                    
--------------------------------------------------------------------------------
Table Name : TBL03 [8]
Auth Id    : user1 [9]
Status     :   [23]
         Used       Used        Sum
 Segment 100% [10]  1822 [11]  1822 [12]
 Segment Over  : N [13] Last Segment :       1822/     11000 [14]
 Lobmap  Over  : N [15]

Explanation

Date and time of completion of acquisition of the information required for condition analysis, in the format YYYY/MM/DD hh:mm:ss:
YYYY: Year. MM: Month. DD: Date. hh: Hour. mm: Minute. ss: Second.

Name of RDAREA subject to analysis.

Name of server managing the RDAREA.

Total number of segments in the RDAREA (number of used segments + number of unused segments).

Total number of unused segments in the RDAREA. The parentheses enclose the total number of unused segments in HiRDB files that are not in the frozen update status in the corresponding RDAREA.

Segment size (number of pages per segment).

Page size (bytes).

Name of a table or index contained in the RDAREA.

Authorization identifier of the table. For a data dictionary LOB RDAREA, (Data dictionary) is displayed.

Percentage ratio of used segments:
value of 11/value of 12 100 (%)

Number of used segments.

Total number of segments allocated to the table (number of used segments).

Whether or not the order is lost in a LOB RDAREA.
Y: Order is lost.
N: Order is not lost.

Position information indicating that the segment being used is the last segment; this is indicated in a last position/total number of segments format; always indicates the last segment when {13} is Y.

Whether or not the LOB management entries are all used:
Y: All are used.
N: There are unused entries.

Name of the original RDAREA.

Generation number of the corresponding RDAREA.

Number of replica RDAREAs.

Shutdown history of the corresponding RDAREA.
History1: Shutdown information immediately before the shutdown was released (if the RDAREA is currently shut down, this field displays the current shutdown information)
History2: Shutdown information immediately preceding History1

Shutdown type of the corresponding RDAREA. If there is no history, this field is blank.
CMD: Command shutdown by HiRDB error detection
FLT: Error shutdown

Code indicating the cause of the shutdown of the corresponding RDAREA. For details about the shutdown cause code, see 15.3.1(2)(a) For an RDAREA other than a LOB RDAREA.

Shutdown time of the corresponding RDAREA. If there is no history, this field is blank.

For a table, reload-not-completed data status or being reorganized. If the table is not in either of the following statuses, this field is blank.

DATA_UNFINISH:

The table is in reload-not-completed data status, which means that table reorganization was executed, but reload processing has not been completed for some reason such as an error. To release the table from reload-not-completed data status, you must re-execute the table reorganization or reload data into the table.

ON_RORG:

The table is currently being reorganized.

For an index, this is the status of an unfinished index. If the index has been completed, this field is blank.

UNFINISH_0:

See Figures 15-9 and 15-10.

UNFINISH_1:

See Figures 15-11 and 15-12.

UNFINISH_2:

Delayed plug-in index updating is underway. This is the status when a UAP using the plug-in index delayed batch creation function is being executed, or after the UAP finished executing, a batch index creation process using the database reorganization utility is not being executed. For details about the plug-in index delayed batch creation function, see the HiRDB Version 8 System Operation Guide.

Note

Nos. 16-18 are displayed when HiRDB Staticizer Option is used. If a generation is specified for analysis and the specified replica RDAREA generation does not exist, the utility issues a warning message, in which case no results are displayed.

(3) Analyzing the analysis results

The results of condition analysis by RDAREA (logical analysis) can be analyzed as shown in Table 15-1.

Table 15-1 Analyzing the analysis results by RDAREA (logical analysis)

Status in the RDAREA
Description

Percentage of total unused pages in the table is less than the percentage of free pages per segment that was specified in the CREATE TABLE definition SQL statement.
Table data may be in one of the following statuses:

There are only a few unused pages because data was added repeatedly.

Used free pages are scattered because data addition, deletion, and updating occurred repeatedly.

If necessary, you can correct the table arrangement by expanding the RDAREA that stores the table and then reorganizing the table.1, 2

The total number of used index storage pages displayed in the analysis results is greater than the number of index storage pages obtained from the number of table storage rows.
The index may be in the following status:

Because many rows in a specific range were deleted, a large amount of the index was also deleted, resulting in many used free pages.

In this case, you can correct the index arrangement by reorganizing the index. You can adjust the number of used pages to a reasonable value by releasing free index pages. For details about determining the number of index storage pages, see the HiRDB Version 8 Installation and Design Guide.

Table with clustering
Used free pages
Many
Percentage of free pages per segment specified in CREATE TABLE is too large. If necessary, reorganize the table because used free pages have been created due to data addition, deletion, and updating.¹

Few
If you are adding data, the table should be reorganized.¹

Table without clustering
Used free pages
Many
Percentage of free pages per segment specified in CREATE TABLE is too large. If necessary, reorganize the table because used free pages have been created due to data addition, deletion, and updating.¹

Few
If there are only a few unused segments in the RDAREA, expand the RDAREA as required.²

End-of-segment is Y
LOB column search performance may become poor. Reorganize the LOB RDAREA.¹

End-of-Lobmap is Y
LOB column search performance may become poor. Reorganize the LOB column structure base table.¹

Note

If an RDAREA storing the LOB attribute of a plug-in-provided abstract data type or an RDAREA storing a plug-in index is analyzed, the percentage of used segments in the RDAREA depends on the method used by the plug-in to allocate segments. For example, if a plug-in completes allocation of segments during index definition, most of the segments may become used segments immediately upon definition (before data is stored).

1 For details about table and index reorganization, see Chapter 8. Database Reorganization Utility (pdrorg). For details about releasing free index pages, see Chapter 11. Free Page Release Utility (pdreclaim).

2 For details about RDAREA expansion, see Chapter 7. Database Structure Modification Utility (pdmod).

15.3.2 Condition analysis by RDAREA (physical analysis)

The utility analyzes the storage condition of all segments and all pages in an RDAREA without taking into account tables or indexes.

Organization of this subsection

(1) Purpose

(2) Analysis results

(3) Analyzing the analysis results

(1) Purpose

The utility displays the storage condition of all segments and all pages in an RDAREA. From the displayed analysis results, you can determine the RDAREA's utilization efficiency and capacity status.

(2) Analysis results

The following shows the results of condition analysis by RDAREA (physical analysis):

In text format (-a option is omitted)

pddbst VV-RR(Object Option) ** RD Area Physical Analysis ** 2002/03/29 16:40:10 [1]
 Max Sum Segment :        150 [2]
 Max Sum Page    :        750 [3]
 RD Area Count   :          1/         1 [4]
--------------------------------------------------------------------------------
RD Area Name   : USER_RDAREA_1 [5]
 Server        : BES01 [6]
 Original RD Area Name : USER_RDAREA_1 [30]
 Generation Number :  0[31] Replica RD Area Count :  0[32]
   [33]                [34]                [35]            [36]
 History1 Hold Status :      Hold Code :     0  Hold Time :
 History2 Hold Status :      Hold Code :     0  Hold Time :
 Unused Segment:         98 [7]
 Segment Size  :          5 Pages[8] Page Size    :       4096 Bytes[9]
         Used(Full)       Used(      Full)        Sum
          [10] [11]        [12]       [13]       [14]
 Segment  35%(  0%)         52(         0)        150
          [15] [16]        [17]       [18]       [19]
 Page     35%(  0%)        256(         0)        750
 Auto Extend Use    : USE[20]   Auto Extend Segment :     4 [21]
 Auto Extend Status : NOSUP[22] Error Code          :     0 [23]
  HiRDB File Name : /tmp/pddir/ios_area01/u_rd20_1 [24]
   File Size      :        5 segments[25] Extent Count :   1/ 24 [26]
  HiRDB File Name : /tmp/pddir/ios_area01/u_rd20_2
   File Size      :        6 segments     Extent Count :   1/ 24
  HiRDB File Name : /tmp/pddir/ios_area01/u_rd20_3
   File Size      :       18 segments     Extent Count :   1/ 24

RD Area Name   : USER_RDLOB_1
 Server        : BES01
 Original RD Area Name : USER_RDLOB_1
 Generation Number :  0   Replica RD Area Count :  0
 History1 Hold Status :      Hold Code :     0  Hold Time :                    
 History2 Hold Status :      Hold Code :     0  Hold Time :                    
 Unused Segment:        770(       770)
 Segment Size  :          1 Pages   Page Size    :       8192 Bytes
         Used       Used        Sum
 Segment  93%      10230      11000
               [27]                         [28]
 Segment Over  : N  Last Segment :      10230/     11000
               [29]
 Lobmap  Over  : N
 Freeze Specified : Y [37]
 Auto Extend Use    : USE     Auto Extend Segment :    10
 Auto Extend Status : NOSUP   Error Code          :     0
  HiRDB File Name : /tmp/pddir/ios_area01/u101
   File Size      :       4000 segments   Extent Count :   1/ 24
   Segment        :       4000/      4000
   Freeze Status  : U[38] ****/**/**    **:**:** [39]
  HiRDB File Name : /tmp/pddir/ios_area01/u201
   File Size      :       5000 segments   Extent Count :   1/ 24
   Segment        :       5000/      5000
   Freeze Status  : F    2002/03/29    16:38:19
  HiRDB File Name : /tmp/pddir/ios_area01/u301
   File Size      :       2000 segments   Extent Count :   1/ 24
   Segment        :       1230/      2000
   Freeze Status  : U    ****/**/**    **:**:**

Explanation

RDAREA information is displayed in ascending order of the RDAREA names. HiRDB file information is displayed in the order of the physical file IDs.

Date and time of completion of acquisition of the information required for this condition analysis, in the format YYYY/MM/DD hh:mm:ss:
YYYY: Year. MM: Month. DD: Date. hh: Hour. mm: Minute. ss: Second.

Maximum total number of segments in the analyzed RDAREAs.

Maximum total number of pages in the analyzed RDAREAs.

Number of specified RDAREAs and number of RDAREAs analyzed successfully.

Name of an analyzed RDAREA.

Name of the server managing the RDAREA.

Total number of unused segments in the RDAREA. The parentheses enclose the total number of unused segments in the HiRDB files that are not in the frozen update status in the corresponding RDAREA.

Segment size (number of pages per segment).

Page size (in bytes).

Percentage ratio of used segments:
number of used segments/value of 14 100 (%)

Percentage ratio of full segments:
number of full segments/value of 14 100 (%)

Number of used segments.

Number of full segments.

Total number of segments in the RDAREA (number of used segments + number of unused segments).

Percentage ratio of used pages:
number of used pages/value of 19 100 (%)

Percentage ratio of full pages:
number of full pages/value of 19 100 (%)

Number of used pages.

Number of full pages.

Total number of pages in the segments in the RDAREA (number of used pages + number of unused pages).

Utilization status of the automatic extension facility:
USE: Automatic extension facility is used.
NOUSE: Automatic extension facility is not used.
The HiRDB file indicated as the last HiRDB File Name is subject to automatic extension.

Number of extension segments.

Suppression status of the automatic extension facility:
SUP: Suppressed.
NOSUP: Not suppressed

Error code in the event of an automatic extension error.

-1556:

Take one of the following actions:

Use the pdfbkup, pdfmkfs, and pdfrstr commands to integrate the extents of the HiRDB file system area that contains the corresponding HiRDB file system.

Use pdmod to expand the RDAREA.

Other:

See the list of HiRDB file system error codes in the manual HiRDB Version 8 Messages.

HiRDB file name in the corresponding RDAREA.

Total number of segments for the HiRDB file.

Number of HiRDB file segments stored/maximum number of segments.

Whether or not the order is lost in a LOB RDAREA:
Y: Order is lost.
N: Order is not lost.

Position information indicating that the segment being used is the last segment; this is indicated in a last position/total number of segments format; always indicates the last segment when {27} is Y.

Whether or not the LOB management entries are all used:
Y: All are used.
N: There are unused entries.

Name of the original RDAREA.

Generation number of the corresponding RDAREA.

Number of replica RDAREAs.

Shutdown history of the corresponding RDAREA.
History1: Shutdown information immediately before the shutdown was released (if the RDAREA is currently shut down, this field displays the current shutdown information)
History2: Shutdown information immediately preceding History1

Shutdown type of the corresponding RDAREA. If there is no history, this field is blank.
CMD: Command shutdown by HiRDB error detection
FLT: Error shutdown

Code indicating the cause of the shutdown of the corresponding RDAREA. For details about the shutdown cause code, see 15.3.1(2)(a) For an RDAREA other than a LOB RDAREA.

Shutdown time of the corresponding RDAREA. If there is no history, this field is blank.

Whether or not the RDAREA is in frozen update status:
Y: Placed in frozen update status by the pddbfrz command.
N: Not placed in frozen update status by the pddbfrz command.

Whether or not the HiRDB files constituting the RDAREA are in frozen update status:

U:

Not in frozen update status. During backup, such HiRDB files need to be backed up.

F:

In the frozen update status. If a backup was made subsequent to the displayed date and time, there is no need to back up these HiRDB files again.

Date and time the frozen update status was changed.

When ****/**/** **:**:** is displayed:

This information is displayed if the RDAREA has never been placed in frozen update status since it was created or re-initialized.

Other that the above:

The displayed information indicates the date and time the RDAREA was placed in frozen update status or released from frozen update status.

Note 1

Nos. 10-11 and 15-19 are not displayed for a LOB RDAREA.

Note 2

Nos. 27-29 and 37 are displayed for a LOB RDAREA.

Note 3

Nos. 30-32 are displayed when HiRDB Staticizer Option is used. If a generation is specified for analysis and the specified replica RDAREA generation does not exist, the utility issues a warning message, in which case no results are displayed.

In DAT format (when the -a option is specified)
Table 15-2 describes the results of condition analysis by RDAREA (physical analysis).
Rules for output in DAT format are as follows:

The items described in Table 15-2 are separated by the comma (,).

Information about one RDAREA is displayed per line. If a single RDAREA consists of multiple HiRDB files, the information for the RDAREA consists of as many lines as there are component HiRDB files.

RDAREA information is displayed in ascending order of the RDAREA names. HiRDB file information is displayed in the order of the physical file IDs.

Table 15-2 Results of condition analysis by RDAREA (physical analysis) in DAT format

Title bar¹
Description
Output format
Max. length
(bytes)²

VERSION
HiRDB version
Character string (vv-rr)
5

INF_GET_TIME
Date (year, month, date) and time that information acquisition was completed
Character string (yyyy/mm/dd hh:mm:ss)
19

RDAREA_NAME
Name of the RDAREA
Character string
30

SERVER
Name of the server containing the RDAREA
Character string
8

MAX_SUM_SEGMENT
Maximum total number of segments in the RDAREA
Numeric value
10

MAX_SUM_PAGE
Maximum total number of pages in the RDAREA
Numeric value
10

SPECIFIED_RDAREA_COUNT
Number of RDAREAs to be analyzed
Numeric value
10

ANALYZED_RDAREA_COUNT
Number of RDAREAs analyzed normally
Numeric value
10

SEGMENT_SIZE
Number of pages per segment
Numeric value
10

PAGE_SIZE
Page size
Numeric value
10

HOLD_STATUS(HISTORY1)⁵
RDAREA shutdown type (type of the last shutdown that was released; or if RDAREA is currently shut down, the current shutdown type):
CMD: Command shutdown by HiRDB error detection
FLT: Error shutdown
Character string
3

HOLD_CODE(HISTORY1)
RDAREA shutdown cause code (cause code of the last shutdown that was released, or if RDAREA is currently shut down, the current shutdown cause code)
(For details about the shutdown cause code, see the description for the text format.)
Numeric value
5

HOLD_TIME(HISTORY1)⁵
RDAREA shutdown time (time of the last shutdown that was released; or if RDAREA is currently shut down, the current shutdown time)
Character string (yyyy/mm/dd hh:mm:ss)
19

HOLD_STATUS(HISTORY2)⁵
RDAREA shutdown type (shutdown type immediately preceding History1):
CMD: Command shutdown
FLT: Error shutdown
Character string
3

HOLD_CODE(HISTORY2)
RDAREA shutdown cause code (shutdown cause code immediately preceding History1)
(For details about the shutdown cause code, see the description for the text format.)
Numeric value
5

HOLD_TIME(HISTORY2)⁵
RDAREA shutdown time (shutdown time immediately preceding History1)
Character string (yyyy/mm/dd hh:mm:ss)
19

FREEZE_SPECIFIED³
Whether or not frozen update was specified for the RDAREA:
Y: Frozen update was specified with the pddbfrz command
N: Frozen update was not specified with the pddbfrz command
Character string
1

UNUSED_SEGMENT
Total number of unallocated segments in the RDAREA
Numeric value
10

UNUSED_SEGMENT_NOT_FREEZE³
Total number of unallocated segments in HiRDB files that are not in frozen update status in the RDAREA
Numeric value
10

USED_SEGMENT
Number of used segments
Numeric value
10

USED_SEGMENT_RATIO
Percentage of used segments
(number of used segments/total number of segments in RDAREA) 100
Numeric value
3

FULL_SEGMENT
Number of full segments
Numeric value
10

FULL_SEGMENT_RATIO
Percentage of full segments
(number of full segments/total number or segments in RDAREA) 100
Numeric value
3

SUM_SEGMENT
Total number of segments in the RDAREA
Numeric value
10

SEGMENT_OVER³
Whether or not all segments are in use or have been used:
Y: Used
N: Not used
Character string
1

LAST_SEGMENT_IN_USE³
Last segment in use (if end-of-segment is Y, the last segment)
Numeric value
10

TOTAL_SEGMENT_ NUMBER³
Total number of segments
Numeric value
10

LOBMAP_OVER³
Whether or not all LOB management entries have been used:
Y: Used
N: Not used
Character string
1

USED_LOB_ MANAGEMENT_ENTRY_NUMBER
Information used by the system
Numeric value
10

TOTAL_LOB_ MANAGEMENT_ENTRY_NUMBER
Information used by the system
Numeric value
10

USED_PAGE
Number of used pages
Numeric value
10

USED_PAGE_RATIO
Percentage of used pages
(number of used pages/total number of pages in all segments in RDAREA) 100
Numeric value
3

FULL_PAGE
Number of full pages
Numeric value
10

FULL_PAGE_RATIO
Percentage of full pages
(number of full pages/total number of pages in all segments in RDAREA) 100
Numeric value
3

SUM_PAGE
Total number of pages in all segments in the RDAREA
Numeric value
10

AUTO_EXTEND_USE
Usage status of automatic extension facility:
USE: Used
NOUSE: Not used
The last HiRDB file displayed in the HiRDB file information uses the automatic extension facility.
Character string
5

AUTO_EXTEND_SEGMENT
Number of extended segments
Numeric value
5

AUTO_EXTEND_STATUS
Automatic extension facility suppression status:
SUP: Suppressed
NOSUP: Not suppressed
Character string
5

ERROR_CODE
Error code for an automatic extension error
Numeric value
5

HiRDB_FILE_NAME
HiRDB file name in the RDAREA (absolute path name)
Character string
167

FILE_SIZE
HiRDB file size (total number of segments)
Numeric value
10

EXTENT_COUNT
HiRDB file partition storage count
Numeric value
3

MAX_EXTENT_COUNT
Maximum HiRDB file partition storage count value
Numeric value
3

USED_SEGMENT_IN_FILE³
Number of used segments in HiRDB file
Numeric value
10

TOTAL_SEGMENT_IN_FILE³
Total number of segments in HiRDB file
Numeric value
10

FREEZE_STATUS³
Frozen update status of HiRDB file:
U: Not in frozen update status (when a backup is made, this HiRDB file must be backed up)
F: In frozen update status (if the HiRDB file was backed up after the displayed date and time, there is no need to back it up again)
Character string
1

FREEZE_TIME³
Frozen update status change date and time:
****/**/** **:**:**: The file has not been placed in frozen update status since the RDAREA was created or reinitialized
Other: Date and time that frozen update status was set or released
Character string (yyyy/mm/dd hh:mm:ss)
19

ORIGINAL_RDAREA_NAME⁴
Original RDAREA name
Character string
30

GENERATION_NUMBER⁴
Generation number of the RDAREA
Numeric value
2

REPLICA_RDAREA_COUNT⁴
Number of replica RDAREAs
Numeric value
2

1 The title bar is displayed when the -h option is specified.

2 When the output format is character string, this information is enclosed in double quotation marks (""), in which case the maximum length does not include the double quotation marks. When the output format is not character string, the information is not enclosed in double quotation marks.

3 This information is displayed only for a LOB RDAREA. For any other type of RDAREA, no data is output (example: ...,,...).

4 This information is displayed only when HiRDB Staticizer Option is used. When HiRDB Staticizer Option is not used, no data is displayed (example: ...,,...).

5 If the RDAREA has never been shut down, no data is output (example: ...,,...).

(3) Analyzing the analysis results

The results of condition analysis by RDAREA (physical analysis) can be analyzed as shown in Table 15-3.

Table 15-3 Analyzing the analysis results by RDAREA (physical analysis)

Status in the RDAREA | Description
Entire RDAREA | Unused segments | Many | There is sufficient capacity.
Few | Used free pages | Many | The RDAREA is not being used efficiently. Execute condition analysis by RDAREA (logical analysis), check for a table or index that has many used segments and unused pages; if necessary, reorganize such a table or index or release free pages.¹
Few | There is not enough capacity. Extend the RDAREA.²

1 For details about table and index reorganization, see Chapter 8. Database Reorganization Utility (pdrorg). For details about releasing free table and index pages, see Chapter 11. Free Page Release Utility (pdreclaim).

2 For details about RDAREA expansion, see Chapter 7. Database Structure Modification Utility (pdmod).

A user LOB RDAREA can be analyzed as follows:

Information about segments in the RDAREA

Percentage of used segments | End-of-segment | Description
Large (there are only a few unused segments) | Y | There is not enough capacity and database access performance has been affected adversely. Expand the user LOB RDAREA and reorganize the table or index.1, 2
N | There is not enough capacity. The user LOB RDAREA must be extended.¹
Small (there are many unused segments) | Y | Database access performance has been affected adversely. Reorganize the table or index.²
N | No action is necessary.

Note

If an RDAREA storing the LOB attribute of a plug-in-provided abstract data type or an RDAREA storing a plug-in index is analyzed, the percentage of used segments in the RDAREA depends on the method used by the plug-in to allocate segments. For example, if a plug-in completes allocation of segments during index definition, most of the segments may become used segments immediately upon definition (before data is stored).

1 For details about RDAREA expansion, see Chapter 7. Database Structure Modification Utility (pdmod).

2 For details about table and index reorganization, see Chapter 8. Database Reorganization Utility (pdrorg).

End-of-Lobmap
If this is Y, LOB column search performance may become poor; you should reorganize the LOB column structure base table.

15.3.3 Condition analysis by table or index

The utility analyzes the segment status of a table or index storage page and the status of all storage pages by RDAREA.

Organization of this subsection

(1) Purpose

(2) Analysis results

(3) Analyzing the analysis results

(1) Purpose

You can determine the degree of disorganization of tables or indexes. For a table or index that has been partitioned and stored in multiple RDAREAs, you can determine whether or not partitions are distributed uniformly among the RDAREAs.

(2) Analysis results

The following shows the results of condition analysis by table or index:

(a) Condition analysis by table

When no LOB RDAREA is included

pddbst VV-RR(Object Option) ** Table Analysis **            2003/03/31 18:53:24 [1]
Table Name     : TBL01 [2]
Auth Id        : user1 [3]
Hash           :   [4]
 Total Segment :        104 [5] Max Sum Segment :        104 [7]
 Total Page    :        520 [6] Max Sum Page    :        520 [8]
 Total Row     :                   500 [9]
 RD Area Count :          1/         1 [10]

--------------------------------------------------------------------------------
RD Area Name   : user_rdarea_1 [11]
 Server        : bes1 [12]
 Reference Pending Status : P [41]
 Check     Pending Status : P [42]
 Original RD Area Name : user_rdarea_1 [28]
 Generation Number :  0[29] Replica RD Area Count :  0[30]
 Status        :   [38]
 [31]     [32]               [33]               [34]
 History1 Hold Status :      Hold Code :     0  Hold Time :                    
 History2 Hold Status :      Hold Code :     0  Hold Time :                    
 Job Name      :   [25]  Line Count :   [26]         Index Method :   [27]
 Unused Segment:         24 [13]
 Search Mode : INS [35] Segment Reuse :          - segments [36]
 Reuse Search Failure :          0/         0 [37]
         Used(Full)       Used(      Full)        Sum
         [14]  [15]        [16]       [17]       [18]
 Segment 100%(  0%)        104(         0)        104
         [19]  [20]        [21]       [22]       [23]
 Page    100%(  0%)        518(         0)        520
 Row Count     :                    500 [24]
 Collect Prearranged Page :         55 [39]
 Used Page Ratio       Page(Ratio) [40]
            0% :         57(  11%)
        1- 10% :         19(   4%)
       11- 20% :         28(   6%)
       21- 30% :         70(  14%)
       31- 40% :         95(  19%)
       41- 50% :         71(  14%)
       51- 60% :         69(  14%)
       61- 70% :         58(  12%)
       71- 80% :         37(   8%)
       81- 90% :         14(   3%)
       91-100% :          2(   1%)
 Total                  520

Explanation

Date and time of completion of acquisition of the information required for this condition analysis, in the format YYYY/MM/DD hh:mm:ss:
YYYY: Year. MM: Month. DD: Date. hh: Hour. mm: Minute. ss: Second.

Name of the table subject to analysis.

Authorization identifier of the table subject to analysis.

Name of the hash function used if the table is partitioned with flexible hash or FIX hash. Hash is displayed for flexible hash partitioning; Fix Hash is displayed for FIX hash partitioning. This field is blank if the table uses neither flexible nor FIX hash partitioning.

Total number of segments allocated to the table (number of used segments + number of unused segments).

Total number of pages in the segments allocated to the table (used segments + unused segments).

Maximum total number of segments allocated to the table per RDAREA.

Maximum total number of pages in the segments allocated to the table per RDAREA.

Total number of rows stored in the table (total number of rows stored in each RDAREA); displayed only when the -s option is specified.

Number of RDAREAs analyzed successfully and number of RDAREAs containing the table storage pages.

Name of RDAREA subject to analysis.

Indicates the name of the server managing the RDAREA.

Total number of unused segments in the RDAREA. The parentheses enclose the total number of unused segments in HiRDB files that are not in the frozen update status in the corresponding RDAREA.

Percentage ratio of used segments:
number of used segments/value of 18 100 (%)

Percentage ratio of full segments:
number of full segments/value of 18 100 (%)

Number of used segments.

Number of full segments.

Total number of segments allocated to the corresponding table in the RDAREA (number of used segments).

Percentage ratio of used pages:
number of used pages/value of 23 100 (%)

Percentage ratio of full pages:
number of full pages/value of 23 100 (%)

Number of used pages.

Number of full pages.

Total number of pages in the segments allocated to the corresponding table in the RDAREA (number of used pages + number of unused pages).

Number of rows stored in the RDAREA; displayed only when the -s option is specified. Because NOWAIT retrieval is performed to count the number of stored rows, errors may occur.

Job name specified during data loading, reorganization, or reloading with the synchronization point specification. Parentheses enclose the type of utility that uses this job:
L: pdload
R: pdrorg
blank: Not set

Number of rows stored in the database during data loading, reorganization, or reloading with the synchronization point specification.

Index creation method used during data loading, reorganization, or reloading with the synchronization point specification (value of the -i option).

Name of the original RDAREA.

Generation number of the corresponding RDAREA.

Number of replica RDAREAs.

Shutdown history of the corresponding RDAREA.
History1: Shutdown information immediately before the shutdown was released (if the RDAREA is currently shut down, this field displays the current shutdown information)
History2: Shutdown information immediately preceding History1

Shutdown type of the corresponding RDAREA. If there is no history, this field is blank.
CMD: Command shutdown by HiRDB error detection
FLT: Error shutdown

Code indicating the cause of the shutdown of the corresponding RDAREA. For details about the shutdown cause code, see 15.3.1(2)(a) For an RDAREA other than a LOB RDAREA.

Shutdown time of the corresponding RDAREA. If there is no history, this field is blank.

Page search mode:
INS: New page allocate mode
REU: Free page reuse mode

Number of segments specified for SEGMENT REUSE during execution of CREATE TABLE or ALTER TABLE. If a number of segments for SEGMENT REUSE is not specified, this field displays 0. If NO is specified for SEGMENT REUSE or SEGMENT REUSE is omitted, the field displays -.

Number of times the mode changed from new page allocate to free page reuse and then changed back to new page allocate because there was no reusable free space (n/m).
n: Idle count
m: Number of times mode changed from new page allocate to free page reuse
n and m are reset to 0 at the following times:

When the RDAREA is closed

When HiRDB is restarted

When the PURGE TABLE statement is executed

Whether the table is in reload-not-completed data status or is being reorganized. If the table is not in either of the following statuses, this field is blank.

DATA_UNFINISH:

The table is in reload-not-completed data status, which means that table reorganization was executed, but reload processing has not been completed for some reason such as an error. To release the table from reload-not-completed data status, you must re-execute the table reorganization or reload data into the table.

ON_RORG:

The table is currently being reorganized.

Number of pages that can be released by pdreclaim (number of used free pages whose usage ratio is 0%).

Number of used pages for each 10% range. The parentheses enclose the percentage ratio to all used pages. Because the fraction part for each ratio is rounded up, the total may exceed 100. Note the following:

A full page may not always fall in the usage ratio range of 91-100%.

A free space created by update processing that shortens an existing row is not treated as free space.

If the ratio of used pages is less than (100 - free space ratio specified with PCTFREE), the storage efficiency may have decreased. You should consider executing pdrorg. For an area storing branch rows (variable-length character string data with a length of 256 bytes or greater, data for repetition columns, and data for columns of abstract data type), executing pdrorg has no effect on the storage efficiency.

Check pending status for referential constraint in the table information in the RDAREA. If no referential constraint has been defined for the table, this item is blank.
P: Check pending status
blank: Not check pending status

Check pending status for check constraint in the table information in the RDAREA. If no check constraint has been defined for the table, this item is blank.
P: Check pending status
blank: Not check pending status

Note 1

Nos. 28-30 are displayed when HiRDB Staticizer Option is used. If a generation is specified for analysis and the specified replica RDAREA generation does not exist, the utility issues a warning message, in which case no results are displayed.

Note 2

Nos. 39-40 are displayed when the -d option is specified.

When a LOB RDAREA is included

pddbst VV-RR(Object Option) ** Table Analysis **            2003/04/03 12:37:22 [1]
Table Name     : TBL03 [2]
Auth Id        : user1 [3]
Hash           :   [4]
 Total Segment :       1826 [5] Max Sum Segment :       1822 [7]
 Total Page    :       1842 [6] Max Sum Page    :       1822 [8]
 Total Row     :                   500 [9]
 RD Area Count :          2/         2 [10]
--------------------------------------------------------------------------------
RD Area Name   : user_rdarea_3 [11]
 Server        : bes1 [12]
 Status        :   [42]
 Original RD Area Name : user_rdarea_3 [32]
 Generation Number :  0[33] Replica RD Area Count :  0[34]
 [35]     [36]               [37]               [38]
 History1 Hold Status :      Hold Code :     0  Hold Time :                    
 History2 Hold Status :      Hold Code :     0  Hold Time :                    
 Job Name      :   [29]  Line Count :   [30]         Index Method :   [31]
 Unused Segment:        145 [13]
 Search Mode : INS [39] Segment Reuse :          - segments [40]
 Reuse Search Failure :          0/         0 [41]
         Used(Full)       Used(      Full)        Sum
         [14]  [15]        [16]       [17]        [18]
 Segment 100%(  0%)          4(         0)          4
         [19]  [20]        [21]       [22]        [23]
 Page     85%(  0%)         17(         0)         20
 Row Count     :                    500 [24]

RD Area Name   : user_rdlob_2
 Server        : bes1
 Status        :
 Column Name   : C2 [25]
 Original RD Area Name : user_rdlob_2
 Generation Number :  0     Replica RD Area Count :  0
 History1 Hold Status :      Hold Code :     0  Hold Time :                    
 History2 Hold Status :      Hold Code :     0  Hold Time :                    
 Unused Segment:       9178(      9178)
         Used       Used        Sum
 Segment 100%       1822       1822
 Segment Over  : N  [26] Last Segment :       1822/     11000 [27]
 Lobmap  Over  : N [28]

Explanation

Date and time of completion of acquisition of the information required for this condition analysis, in the format YYYY/MM/DD hh:mm:ss:
YYYY: Year. MM: Month. DD: Date. hh: Hour. mm: Minute. ss: Second.

Name of the table subject to analysis.

Authorization identifier of the table subject to analysis.

Name of the hash function used if the table is partitioned with flexible hash or FIX hash. Hash is displayed for flexible hash partitioning; Fix Hash is displayed for FIX hash partitioning. This field is blank if the table uses neither flexible nor FIX hash partitioning.

Total number of segments allocated to the table (number of used segments + number of unused segments).

Total number of pages in the segments allocated to the table (used segments + unused segments).

Maximum total number of segments allocated to the table per RDAREA.

Maximum total number of pages in the segments allocated to the table per RDAREA.

Total number of rows stored in the table (total number of rows stored in each RDAREA). This information is displayed only when the -s option is specified.

Number of RDAREAs analyzed successfully and number of RDAREAs containing the table storage pages.

Name of RDAREA subject to analysis. If it is a user LOB RDAREA, this field displays the name of the user RDAREA for the LOB column structure base table, followed by the name of the user LOB RDAREA for the LOB data.

Indicates the name of the server managing the RDAREA.

Total number of unused segments in the RDAREA. The parentheses enclose the total number of unused segments in HiRDB files that are not in frozen update status in the corresponding RDAREA.

Percentage ratio of used segments:
number of used segments/value of 18 100 (%)

Percentage ratio of full segments:
number of full segments/value of 18 100 (%)

Number of used segments.

Number of full segments.

Total number of segments allocated to the corresponding table in the RDAREA (number of used segments).

Percentage ratio of used pages:
number of used pages/value of 23 100 (%)

Percentage ratio of full pages:
number of full pages/value of 23 100 (%)

Number of used pages.

Number of full pages.

Total number of pages in the segments allocated to the corresponding table in the RDAREA (number of used pages + number of unused pages).

Number of rows stored in the RDAREA. This information is displayed only when the -s option is specified. There may be an error in the storage rows count because a NOWAIT search is conducted.

Name of LOB column.

Whether or not order has been lost in the LOB RDAREA:
Y: Order has been lost.
N: Order has not been lost.

Position information indicating that the segment being used is the last segment. This information is displayed in the format last-position/total-number-of-segments. When No. 26 is Y, this field always indicates the last segment.

Whether or not the LOB management entries are all used:
Y: All are used.
N: There are unused entries.

Job name specified during data loading, reorganization, or reloading with the synchronization point specification. Parentheses enclose the type of utility that uses this job:
L: pdload
R: pdrorg
blank: Not set

Number of rows stored in the database during data loading, reorganization, or reloading with the synchronization point specification.

Index creation method used during data loading, reorganization, or reloading with the synchronization point specification (value of the -i option).

Name of the original RDAREA.

Generation number of the corresponding RDAREA.

Number of replica RDAREAs.

Shutdown history of the corresponding RDAREA.
History1: Shutdown information immediately before the shutdown was released (if the RDAREA is currently shut down, this field displays the current shutdown information)
History2: Shutdown information immediately preceding History1

Shutdown type of the corresponding RDAREA. If there is no history, this field is blank.
CMD: Command shutdown by HiRDB error detection
FLT: Error shutdown

Code indicating the cause of the shutdown of the corresponding RDAREA. For details about the shutdown cause code, see 15.3.1(2)(a) For an RDAREA other than a LOB RDAREA.

Shutdown time of the corresponding RDAREA. If there is no history, this field is blank.

Page search mode:
INS: New page allocate mode
REU: Free page reuse mode

Number of segments specified for SEGMENT REUSE during execution of CREATE TABLE or ALTER TABLE. If a number of segments for SEGMENT REUSE is not specified, this field displays 0. If NO is specified for SEGMENT REUSE or SEGMENT REUSE is omitted, the field displays -.

Number of times the mode changed from new page allocate to free page reuse and then changed back to new page allocate because there was no reusable free space (n/m).
n: Idle count
m: Number of times mode changed from new page allocate to free page reuse
n and m are reset to 0 at the following times:

When the RDAREA is closed

When HiRDB is restarted

When the PURGE TABLE statement is executed

Whether the table is in reload-not-completed data status or is being reorganized. If the table is not in either of the following statuses, this field is blank.

DATA_UNFINISH:

The table is in reload-not-completed data status, which means that table reorganization was executed, but reload processing has not been completed for some reason such as an error. To release the table from reload-not-completed data status, you must re-execute table reorganization or reload data into the table.

ON_RORG:

The table is currently being reorganized.

Note

Nos. 32-34 are displayed when HiRDB Staticizer Option is used. If a generation is specified for analysis and there is no specified generation of replica RDAREA area, the utility issues a warning message, in which case no results are displayed.

(b) Condition analysis by index

B-tree index

pddbst VV-RR(Object Option) ** Index Analysis **            2003/03/31 18:56:00 [1]
Index Name     : IDX_TBL01_C1 [2]
Auth Id        : user1 [3]
 Total Segment :          1 [4] Max Sum Segment :          1 [6]
 Total Page    :          5 [5] Max Sum Page    :          5 [7]
 RD Area Count :          1/         1 [8]
--------------------------------------------------------------------------------
RD Area Name   : user_rdarea_1 [9]
 Server        : bes1 [10]
 Status        :   [22]
 Original RD Area Name : user_rdarea_1 [23]
 Generation Number :  0[24] Replica RD Area Count :  0[25]
 [26]     [27]               [28]               [29]
 History1 Hold Status :      Hold Code :     0  Hold Time :                    
 History2 Hold Status :      Hold Code :     0  Hold Time :                    
 Unused Segment:         24 [11]
         Used(Full)       Used(      Full)        Sum
         [12]  [13]        [14]       [15]        [16]
 Segment 100%(  0%)          1(         0)          1
         [17]  [18]        [19]       [20]        [21]
 Page    100%(  0%)          5(         0)          5
 Collect Prearranged Page :          0 [30]
 Collect On Page :          0 [31]
 Used Page Ratio       Page(Ratio) [32]
            0% :          0(   0%)
        1- 10% :          1(  20%)
       11- 20% :          0(   0%)
       21- 30% :          3(  60%)
       31- 40% :          0(   0%)
       41- 50% :          1(  20%)
       51- 60% :          0(   0%)
       61- 70% :          0(   0%)
       71- 80% :          0(   0%)
       81- 90% :          0(   0%)
       91-100% :          0(   0%)
 Total                    5

Explanation

Date and time of completion of acquisition of the information required for this condition analysis, in the format YYYY/MM/DD hh:mm:ss:
YYYY: Year. MM: Month. DD: Date. hh: Hour. mm: Minute. ss: Second.

Name of the index subject to analysis.

Authorization identifier of the index subject to analysis.

Total number of segments allocated to the index (number of used segments + number of unused segments).

Total number of pages in the segments allocated to the index (used segments + unused segments).

Maximum total number of segments allocated to the index per RDAREA.

Maximum total number of pages in the segments allocated to the index per RDAREA.

Number of RDAREAs analyzed successfully and number of RDAREAs containing the index storage pages.

Name of an RDAREA subject to analysis.

Name of the server managing the RDAREA.

Total number of unused segments in the RDAREA.

Percentage ratio of used segments:
number of used segments/value of 16 100 (%)

Percentage ratio of full segments:
number of full segments/value of 16 100 (%)

Number of used segments.

Number of full segments.

Total number of segments allocated to the corresponding index in the RDAREA (number of used segments).

Percentage ratio of used pages:
number of used pages/value of 21 100 (%)

Percentage ratio of full pages:
number of full pages/value of 21 100 (%)

Number of used pages.

Number of full pages.

Total number of pages in the segments that are allocated to the corresponding index in the RDAREA (number of used pages + number of unused pages).

Status of unfinished index during index creation (if the index has been completed, this field is blank):

UNFINISH_0

See Figures 15-9 and 15-10.

UNFINISH_1

See Figures 15-11 and 15-12.

Name of the original RDAREA.

Generation number of the corresponding RDAREA.

Number of replica RDAREAs.

Shutdown history of the corresponding RDAREA.
History1: Shutdown information immediately before the shutdown was released (if the RDAREA is currently shut down, this field displays the current shutdown information)
History2: Shutdown information immediately preceding History1

Shutdown type of the corresponding RDAREA. If there is no history, this field is blank.
CMD: Command shutdown by HiRDB error detection
FLT: Error shutdown

Code indicating the cause of the shutdown of the corresponding RDAREA. For details about the shutdown cause code, see 15.3.1(2)(a) For an RDAREA other than a LOB RDAREA.

Shutdown time of the corresponding RDAREA. If there is no history, this field is blank.

Number of pages that can be released by pdreclaim (number of used free pages whose usage ratio is 0%).

Number of pages that are under release processing because pdreclaim is currently executing or has terminated due to an error. If pdreclaim has terminated with an error, re-execute it (the value of this field becomes 0). The displayed page count is included in the percentage ratio of used pages (0%).

Number of used pages for each 10% range. The parentheses enclose the percentage ratio to all used pages. Because the fraction part for each ratio is rounded up, the sum of all values may exceed 100. Note the following:

For a page that stores 201 or more duplicate keys, the percentage ratio of PCTFREE specified during table definition is ignored. Therefore, data is not rearranged according to the PCTFREE value even during reorganization.

For an index to which the index key value with no lock is applied, the deletion key value is treated as free space. If all used pages are deletion key values, the usage ratio is 0%.

A full page may not always fall in the usage ratio range of 91-100%.

A free space created by update processing that shortens an existing row is not treated as free space.

If the ratio of used pages is less than (100 - free space ratio specified with PCTFREE), the storage efficiency may have decreased. You should consider executing pdrorg. For an area that stores branch rows (variable-length character string data with a length of 256 bytes or greater, data for repetition columns, and data for columns of abstract data type), executing pdrorg has no effect on the storage efficiency.

Note 1

Nos. 23-25 are displayed when HiRDB Staticizer Option is used. If a generation is specified for analysis and the specified replica RDAREA generation does not exist, the utility issues a warning message, in which case no results are displayed.

Note 2

Nos. 30-32 are displayed when the -d option is specified.

Plug-in index

pddbst VV-RR(Object Option) ** Index Analysis **            2002/03/29 18:05:06 [1]
Index Name     : IDX05 [2]
Auth Id        : MANUAL [3]
 Total Segment :       9501[4] Max Sum Segment :       9501 [6]
 Total Page    :       9501[5] Max Sum Page    :       9501 [7]
 RD Area Count :          1/         1 [8]
--------------------------------------------------------------------------------
RD Area Name   : USER_RDLOB_10 [9]
 Server        : BES02 [10]
 Status        :     [15]
 Original RD Area Name : USER_RDLOB_10 [19]
 Generation Number :  0[20] Replica RD Area Count :  0 [21]
   [22]                [23]                [24]            [25]
 History1 Hold Status :      Hold Code :     0  Hold Time :                    
 History2 Hold Status :      Hold Code :     0  Hold Time :                    
 Unused Segment:        499(       499) [11]
         [12]       [13]       [14]
         Used       Used        Sum
 Segment 100%       9501       9501
                [16]                        [17]
 Segment Over  : N  Last Segment :       9501/     10000
                [18]
 Lobmap  Over  : N

Explanation

Date and time of completion of acquisition of the information required for this condition in the format YYYY/MM/DD hh:mm:ss.
YYYY: Year. MM: Month. DD: Day. hh: Hour. mm: Minute. ss: Second

Name of the index subject to analysis.

Authorization identifier for the index subject to analysis.

Total number of segments allocated to the index (number of used segments + number of unused segments).

Total number of pages in the segments allocated to the index (used segments + unused segments).

Maximum total number of segments allocated to the index per RDAREA.

Maximum total number of pages allocated to the index per RDAREA.

Number of RDAREAs analyzed successfully, and number of RDAREAs containing the index storage pages.

Name of the RDAREA subject to analysis.

Name of the server managing the RDAREA.

Total number of unused segments in the RDAREA. The parentheses enclose the total number of unused segments in HiRDB files that are not in frozen update status in the corresponding RDAREA.

Percentage ratio of used segments:
number of used segments/value of 16 100 (%)

Number of used segments.

Total number of segments allocated to the corresponding indexes in the RDAREA (number of used segments).

Status of an unfinished index during index creation (if the index has been completed, this field is blank).

UNFINISH_0

See Figures 15-9 and 15-10.

UNFINISH_1

See Figures 15-11 and 15-12.

UNFINISH_2

The plug-in index is being updated on a delayed basis. When a UAP using the plug-in index delayed batch creation function is being executed, or after the UAP finished executing, a batch index creation process using the database reorganization utility will not be executed. For details about the plug-in index delayed batch creation function, see the HiRDB Version 8 System Operation Guide.

Whether or not order is lost in the LOB RDAREA.
Y: Order is lost.
N: Order is not lost.

Position information that indicates the last segment that is used in a last position/total number of segments format. If Segment Over is Y, this field always indicates the last segment.

Whether or not the LOB management entries are all used:
Y: All are used.
N: There are unused entries.

Name of the original RDAREA.

Generation number of the corresponding RDAREA.

Number of replica RDAREAs.

Shutdown history of the corresponding RDAREA.
History1: Shutdown information immediately before the shutdown was released (if the RDAREA is currently shut down, this field displays the current shutdown information)
History2: Shutdown information immediately preceding History1

Shutdown type of the corresponding RDAREA. If there is no history, this field is blank.
CMD: Command shutdown by HiRDB error detection
FLT: Error shutdown

Code indicating the cause of the shutdown of the corresponding RDAREA. For details about the shutdown cause code, see 15.3.1(2)(a) For an RDAREA other than a LOB RDAREA.

Shutdown time of the corresponding RDAREA. If there is no history, this field is blank.

Note

Nos. 19-21 are displayed when HiRDB Staticizer Option is used. If a generation is specified for analysis and the specified replica RDAREA generation does not exist, the utility issues a warning message, in which case no results are displayed.

(3) Analyzing the analysis results

You can analyze the results of condition analysis by table or index in the same manner as for condition analysis by RDAREA (logical analysis).

If the storage rows are not distributed uniformly among RDAREAs, you are not making the best use of the HiRDB/Parallel Server's performance. In such a case, take appropriate measures, such as checking and revising key range partitioning or applying flexible hash partitioning or FIX hash partitioning (or changing the hash functions). The result should be to partition the storage uniformly among the RDAREAs.

If you have analyzed the status of an RDAREA the stores the LOB attribute of a plug-in-provided abstract data type or an RDAREA that stores a plug-in index, the percentage of used segments in the RDAREA depends on the method used by the plug-in to allocate segments.

15.3.4 Cluster key and clustering data page storage condition analysis

Organization of this subsection

(1) Purpose

(2) Analysis results

(3) Analyzing the analysis results

(1) Purpose

This analysis enables you to determine the degree of disorganization in the storage conditions for cluster keys and clustering data pages, so that you can decide whether or not the database needs to be reorganized.

(2) Analysis results

The following shows the results of cluster key and clustering data page storage condition analysis:

pddbst VV-RR(Object Option) ** Index Status Analysis **     2001/08/22 16:44:01 [1]
Index Name : (CLUSTER0000131198​) [2]
Auth Id    : MANUAL [3]
Table Name : TBL06 [4]

***** Cluster Key Analysis *****
 RD Area Count :          1/         1 [5]
--------------------------------------------------------------------------------
RD Area Name : USER_RDAREA_4                    Server : BES01 [6]
 Original RD Area Name : USER_RDAREA_4 [24]
 Generation Number :  0[25] Replica RD Area Count :  0[26]
 Segment Size:          5 Pages   Page Size :       4096 [7]
 Index Level :          1 [8]
                      Total            Repetitional
 Key Count              100 [9]                   0 [10]
 Row Count              100 [11]                  0 [12]
              Total   Disordered
 Segment          0 [13]       0(  0.0%) [14]
 Page             0 [15]       0(  0.0%) [16]

***** Clustering Table Analysis *****
 RD Area Count :          1/         1 [17]
--------------------------------------------------------------------------------
RD Area Name : USER_RDAREA_4                    Server : BES01 [18]
 Original RD Area Name : USER_RDAREA_4
 Generation Number :  0   Replica RD Area Count :  0
 Segment Size:          5 Pages   Page Size :       4096 [19]
              Total   Disordered
 Segment          0 [20]       0(  0.0%) [21]
 Page             0 [22]       0(  0.0%) [23]

Explanation

Date and time of completion of acquisition of the information required for this condition analysis, in the format YYYY/MM/DD hh:mm:ss.
YYYY: Year. MM: Month. DD: Date. hh: Hour. mm: Minute. ss: Second.

Index name of the cluster key subject to analysis.

Authorization identifier of the index owner of the cluster key subject to analysis.

Name of the table that defined the cluster key subject to analysis.

Number of RDAREAs that store the index in 2 above, and the number of those RDAREAs whose information could be analyzed normally:
Number of RDAREAs whose information could be analyzed normally / number of RDAREAs that store the index

Name of an RDAREA that stores the analyzed index, and the name of the server managing that RDAREA.

Segment size (number of pages per segment) and page length (in bytes) of the RDAREA in 6.

Number of index levels of the index key of the RDAREA in 6.

Number of stored keys in the index of the RDAREA in 6 (displayed as an integer of up to 15 digits; a value in excess of 15 digits is displayed exponentially).

Number of keys stored in a duplicate key structure¹ in the index of the RDAREA in 6 (same display format as in 9).
¹ Refers to the structure in which management information for the relevant keys in the index page is stored in multiple pages when the number of duplicate key values exceeds 200.

Number of rows stored in the index of the RDAREA in 6 (same display format as in 9).

Number of rows corresponding to 10 (same display format as in 9).

Number of times the storage position of segments in the index of the RDAREA in 6 changed.

In relation to 13, number of times the storage order was incorrect (reverse direction). Parentheses indicate the ratio of segments in incorrect storage order (14/13 100%).

Number of times the storage position of pages in the index of the RDAREA in 6 changed.

In relation to 15, number of times the storage order was incorrect (reverse direction). Parentheses indicate the ratio of segments in incorrect storage order (16/15 100%).

Number of RDAREAs stored in the table in 3, and the number of those RDAREAs whose information could be analyzed normally:
Number of RDAREAs that could be analyzed normally / number of RDAREAs that store the table

Name of an RDAREA that stores the analyzed table, and the name of the server that manages that RDAREA.

Segment size (number of pages per segment) and page length (in bytes) of the RDAREA in 18.

Number of times the storage position of segments in the index of the RDAREA in 18 changed.

In relation to 20, number of times the storage order was incorrect (reverse direction). Parentheses indicate the ratio of segments in incorrect storage order (21/20 100%).

Number of times the storage position of table pages stored in the RDAREA in 18 changed.

In relation to 22, number of times the storage order was incorrect (reverse direction). Parentheses indicate the ratio of segments in incorrect storage order (23/22 100%).

Name of the original RDAREA.

Generation number of the corresponding RDAREA.

Number of replica RDAREAs.

Note 1

If the cluster key is partitioned and stored in multiple RDAREAs, Nos. 6-17 are displayed for each such RDAREA. The information is displayed in ascending order of the RDAREA names.

Note 2

If the table is partitioned and stored in multiple RDAREAs, Nos. 18-23 are displayed for each such RDAREA. The information is displayed in ascending order of the RDAREA names.

Note 3

Nos. 24-26 are displayed when HiRDB Staticizer Option is used. If a generation is specified for analysis and the specified replica RDAREA generation does not exist, the utility displays * as the RDAREA name and displays only the original RDAREA name, generation number, and server name.

If there is no replica RDAREA for either a table storage RDAREA or a corresponding cluster key index RDAREA, the utility displays only the RDAREA name, original RDAREA name, generation number, and server name for the existing replica RDAREA. For the nonexistent replica RDAREA, the utility displays * as the RDAREA name and displays only the original RDAREA name, generation number, and server name, and omits all subsequent information. If the specified generation of a replica RDAREA for a cluster key index storage RDAREA does not exist, the utility issues a warning message without displaying analysis results.

(3) Analyzing the analysis results

Table 15-4 describes the results of cluster key and clustering data page condition analysis and explains the actions to be taken.

Note that row deletion has no effect on the degree of irregularity in the clustering data conditions in the analysis results. If deletion is the principal table operation performed, you must take the following steps to determine whether or not the database needs to be reorganized:

Determine the number of used free pages (by table condition analysis)

Determine the free area in terms of the numbers of storage rows and used pages

For 2, the following shows the size of the invalid free area:

(Current number of used pages in table¹ - number of table storage pages²) page size (bytes)

¹ Obtain the value from the results of condition analysis by table.

² To obtain the value, see the HiRDB Version 8 Installation and Design Guide.

Table 15-4 Results of cluster key and clustering data page condition analysis and actions to be taken

Target
Analysis result
Description and action

Cluster keys
There are too many rows for the number of storage keys in the index.
The key duplication ratio is high, affecting the performance of search operations that use the index.
Check and, if necessary, revise the column structure in the index definition.

There are keys that are stored in a duplicate key structure.¹
Some keys have (or had) a high degree of duplication, affecting the performance of search operations that use the index.
Check and, if necessary, revise the column structure in the index definition (if this condition existed in the past, you can eliminate the duplicate key structure by using pdrorg to reorganize the index).²

Degree of irregularity is high in the storage order.
There is irregularity in the storage order, which is affecting search performance.
Use pdrorg to reorganize the index. If there is irregularity also in the storage order of data pages, reorganizing the table will automatically reorganize the index.

Clustering data pages
Degree of irregularity is high in the storage order.
There is irregularity in the storage order of data pages, which is affecting the performance of access operations in the order of cluster key values.
Use pdrorg to reorganize the table.

The following condition is true:
Storage location changes count > storage location changes count or number of used segments in the results of condition analysis by table > number of pages - 1

1 This is a structure for storing on multiple pages the management information for the applicable key on the index page when there are 201 or more duplicate key values. Once a duplicate key structure is employed, the information management pages will not be deleted even if the duplicates count drops below 201.

2 Re-define the table with the cluster, excluding columns with a high degree of data duplication in index component columns.

15.4 Execution results of the facility for predicting reorganization time

Organization of this section

15.4.1 Output format of the execution results

15.4.2 Output format in CSV format

15.4.1 Output format of the execution results

The execution results of the facility for predicting reorganization time depend on the values of the -e and -m options. Table 15-5 shows the relationship between the options and the output information.

Table 15-5 Relationship between the options and the output information (facility for predicting reorganization time)

-e option specification | -m option | Information about scheduled database maintenance date | Information about maintenance method | Information for each analysis item
1 (prediction level 1) | Specified | Y | Y |
Omitted | Y |  |
2 (prediction level 2) | N/A | Y | Y | Y

Legend:

Y: The corresponding information is output.

: The corresponding information is not output.

N/A: Cannot be specified.

Organization of this subsection

(1) Scheduled database maintenance date

(2) Maintenance method

(3) Information by analysis item

(1) Scheduled database maintenance date

This example displays RDAREAs whose segment usage rate is predicted to exceed the standard value within the monitoring period. The RDAREAs are displayed in chronological order of the scheduled database maintenance dates.

pddbst vv-rr       ***** Rdarea resource forecast *****     yyyy/mm/dd hh:mm:ss
No         Date        RdareaName                       ResKind
---------- ----------- -------------------------------- ----------
        1 2005/05/31  "RDUSER01"                       Segment
        2 2005/06/01  "RDUSER12"                       Segment
        3 2005/06/03  "rd0002"                         Segment
        4 2005/06/04  "lobrdarea701"                   Segment
        5 2005/06/11  "RDUSER02"                       Segment
---------- ----------- -------------------------------- ----------

Note

For a HiRDB/Parallel Server, a scheduled database maintenance date is based on the dictionary server's date and time settings.

Explanation

No:

Analysis result number (maximum of 10 digits)

Date:

Date predicted by the facility on which the segment usage rate will exceed the standard value (scheduled database maintenance date) (in the format YYYY/MM/DD)

RdareaName:

Name of the RDAREA whose maintenance is predicted to be necessary (maximum of 32 characters)

ResKind:

Item that is predicted to exceed its standard value (maximum of 10 characters):

Segment: Segment usage rate

(2) Maintenance method

This example displays RDAREAs whose segment usage rate is predicted to exceed the standard value within the monitoring period. The RDAREAs are displayed in chronological order of the scheduled database maintenance dates, together with the recommended maintenance method. In prediction level 2, of the tables and indexes for which maintenance is determined to be necessary from the information by analysis item, the example displays those that affect maintenance of RDAREAs.

pddbst vv-rr       ***** Maintenance Information *****       yyyy/mm/dd hh:mm:ss
No          : 1
Rdarea Name : "RDUSER01"
Method      :
Segment     : 42560
--------------------------------------------------------------------------------------
Reclaim      Reorganize   Type Name                                   Date
------------- ------------ ---- -------------------------------------- ----------
     28089 *       9363    T   "k1234567​"."table01"                   2005/05/31
         0        12342 *  T   "k1234567​"."table02"                   2005/05/31
       851         7235 *  I   "k1234567​"."index01"                   2005/05/31
         3          -10    T   "k1234567​"."table10"                   2005/05/31
===================================================================================
No          : 2
Rdarea Name : "RDUSER12"
Method      :
Segment     : 32985
--------------------------------------------------------------------------------------
Reclaim      Reorganize   Type Name                                   Date
------------- ------------ ---- -------------------------------------- ----------
      3628        23749 *  T   "k1234567​"."table01"                   2005/06/01
      1319         5937 *  T   "k1234567​"."table03"                   2005/06/01
      1649 *       3628    I   "k1234567​"."index01"                   2005/06/01
      2638 *        989    T   "k1234567​"."table11"                   2005/06/01
===================================================================================
No          : 3
Rdarea Name : "rd0002"
Method      : Expand
Segment     : 1523
--------------------------------------------------------------------------------------
Reclaim      Reorganize   Type Name                                   Date
------------- ------------ ---- -------------------------------------- ----------
       228         1035    T   "k1234567​"."table01"                   2005/06/03
         0          121    T   "k1234567​"."table03"                   2005/06/03
        30           60    I   "k1234567​"."index07"                   2005/06/03
===================================================================================
No          : 4
Rdarea Name : "lobrdarea701"
Method      :
Segment     : 2498
--------------------------------------------------------------------------------------
Reclaim      Reorganize   Type Name                                   Date
------------- ------------ ---- -------------------------------------- ----------
         0         2764 *  L   "k1234567​"."table701"                  2005/06/04
===================================================================================
No          : 5
Rdarea Name : "RDUSER02"
Method      : Expand
Segment     : 31854
--------------------------------------------------------------------------------------
Reclaim      Reorganize   Type Name                                   Date
------------- ------------ ---- -------------------------------------- ----------
      3503        23934    T   "k1234567​"."table21"                   2005/06/11
      1592         3503    I   "k1234567​"."index22"                   2005/06/11
      2548          955    T   "k1234567​"."table23"                   2005/06/11
===================================================================================

Note

For a HiRDB/Parallel Server, a scheduled database maintenance date is based on the dictionary server's date and time settings.

Explanation

No:

Analysis result number (maximum of 10 digits)

Rdarea Name:

Name of the RDAREA whose maintenance is predicted to be necessary (maximum of 32 characters)

Method:

RDAREA maintenance method (maximum of 20 characters):

Expand:

Expand the RDAREA

Extend:

Maintenance is not necessary (HiRDB will perform automatic extension of the RDAREA)

Reinit:

Re-initialize the RDAREA

blank:

Maintenance is not necessary

Segment:

Number of segments to be released (maximum of 10 digits)

In prediction level 1
This is the minimum number of segments that need to be allocated during maintenance.
If Expand is displayed for Method, expand the RDAREA so that the actual number of segments will be greater than the value displayed here.

In prediction level 2
This is the minimum number of segments that need to be allocated during maintenance. If maintenance of a table or index is predicted to be necessary, the displayed value reflects the result of executing such necessary maintenance. For example, if Expand is displayed for Method, the minimum number of segments that must be allocated is displayed, assuming that the necessary maintenance will be executed prior to RDAREA expansion.

Reclaim:

Number of segments predicted to be released when used free segments are released after used free pages are released (maximum of 13 digits)

If the facility predicts that release of used free segments is necessary as the table or index maintenance method, an asterisk (*) is displayed to the right of this item.

Reorganize:

Number of segments predicted to be released when reorganization is executed (maximum of 13 digits)

If the facility predicts that reorganization is necessary as the table or index maintenance method, an asterisk (*) is displayed to the right of this item.

If the facility predicts that reorganization will result in many data storage pages, a negative value (with a minus sign) is displayed.

Type:

Type of maintenance target (1 character):

T: Table

I: Index

L: LOB RDAREA

Name:

Name of the table or index (including authorization identifier) that is to be maintained (maximum of 52 characters). When Type is L, the facility displays the name of the table for which the LOB column has been defined.

The output format is "authorization-identifier"."table-identifier" or "authorization-identifier"."index-identifier". For a data dictionary table, the authorization identifier is "(Data dictionary)".

Date:

Scheduled database maintenance date (in the format YYYY/MM/DD)

Supplement for prediction level 2
In prediction level 2 (-e 2), the output information may appear as described below. This information is output when maintenance of a table or index is determined to be necessary from the information by analysis item.

An asterisk (*) indicating a need for reorganization is displayed for a resource for which the number of used segments is increased as a result of reorganization.

Maintenance times may differ within the same RDAREA.

Both expansion and reorganization are indicated for an RDAREA.

The following shows an output example, where [1] through [3] correspond to the numbers above:

pddbst VV-RR       ***** Maintenance Information *****       yyyy/mm/dd hh:mm:ss
No          : 1
Rdarea Name : "RDUSER01"
Method      :
Segment     : 42560
--------------------------------------------------------------------------------------
Reclaim      Reorganize   Type Name                                        Date
------------- ------------ ---- ------------------------------------------- ----------
         3           10 *  T   "k1234567​"."table10"                    [2] 2005/05/16
     28089 *       9363    T   "k1234567​"."table01"                        2005/05/31
         0        12342 *  T   "k1234567​"."table02"                        2005/05/31
       851         7535 *  I   "k1234567​"."index01"                        2005/05/31
         3      [1] -10 *  T   "k1234567​"."table11"                        2005/05/31
         3     [1] -300 *  T   "k1234567​"."table12"                        2005/05/31
======================================================================================
No          : 2
Rdarea Name : "rd0002"
Method      : Expand [3]
Segment     : 1523
--------------------------------------------------------------------------------------
Reclaim      Reorganize   Type Name                                        Date
------------- ------------ ---- ------------------------------------------- ----------
       228     [3] 1035 *  T   "k1234567​"."table01"                        2005/06/03
         0      [3] 121 *  T   "k1234567​"."table03"                        2005/06/03
        30       [3] 60 *  I   "k1234567​"."index07"                        2005/06/03
         3     [3] -300 *  T   "k1234567​"."table22"                        2005/06/03
======================================================================================

(3) Information by analysis item

This example displays in chronological order of the scheduled database maintenance dates the RDAREAs, tables, and indexes whose segment usage has exceeded a standard value within the monitoring interval. Also included is the maintenance method, as well as detailed information about the resources that are displayed for the maintenance method.

pddbst VV-RR       ***** Analysis Item Data *****       yyyy/mm/dd hh:mm:ss
No        : 1
Date      : 2005/05/25
Method    : Reclaim
Type      : T
Name      : "k1234567​"."table01" ("RDUSER01")
StateDate : 2005/05/19 00:10:32
------------------------------------------------------------------------------------
Information                               Value      Method               Date
---------------------------------------- ----------- -------------------- ----------
Empty Page Ratio                          40 ( 50) * Reclaim pages        2005/05/25
Unused Page Ratio (30)                    20 ( 30)
Used Segment for Cluster                  40 ( 50)
Unused Page Differ From PCTFREE (10,10)   50 ( 75)
====================================================================================
No        : 2
Date      : 2005/05/31
Method    :
Type      : R
Name      : "RDUSER01"
StateDate : 2005/05/19 00:10:32
------------------------------------------------------------------------------------
Information                               Value      Method               Date
---------------------------------------- ----------- -------------------- ----------
Used Segment Ratio (0,10)                 40 ( 80)                        2005/05/31
====================================================================================
No        : 3
Date      : 2005/06/01
Method    : Reorganize
Type      : T*
Name      : "k1234567​"."table10" ("RDUSER01")
StateDate : 2005/05/19 00:10:32
------------------------------------------------------------------------------------
Information                                Value     Method               Date
---------------------------------------- ----------- -------------------- ----------
Empty Page Ratio                          25 ( 50)   Reclaim pages        2005/08/10
Unused Page Ratio (30)                    25 ( 30) * Reorganize           2005/06/01
Used Segment for Cluster                  40 ( 50)
Unused Page Differ From PCTFREE (10,10)   60 ( 75)
====================================================================================
No        : 4
Date      : 2005/06/03
Method    : Expand
Type      : R
Name      : "rd0002"
StateDate : 2005/05/19 00:10:32
------------------------------------------------------------------------------------
Information                               Value      Method               Date
---------------------------------------- ----------- -------------------- ----------
Used Segment Ratio (0,10)                 78 ( 95)   Expand               2005/06/03
====================================================================================
No        : 5
Date      : 2005/06/04
Method    : Reclaim
Type      : I
Name      : "k1234567​"."index07" ("rd0002")
StateDate : 2005/05/19 00:10:32
------------------------------------------------------------------------------------
Information                                Value     Method               Date
---------------------------------------- ----------- -------------------- ----------
Empty Page Ratio                          38 ( 50)   Reclaim              2005/06/04
Unused Page Ratio (30)                    20 ( 30)
Unused Page Differ From PCTFREE (10,10)   70 ( 75)
====================================================================================
No        : 6
Date      : 2005/06/04
Method    : Reorganize
Type      : L
Name      : "k77a777"."table707" ("lobrdarea701")
StateDate : 2005/05/19 00:10:32
------------------------------------------------------------------------------------
Information                                Value     Method               Date
---------------------------------------- ----------- -------------------- ----------
Used Segment for LOB Columns (0,10)       70 ( 80) * Reorganize           2005/06/04
====================================================================================
No        : 7
Date      : 2005/06/06
Method    : Expand
Type      : R
Name      : "RDUSER12"
StateDate : 2005/05/19 00:10:32
------------------------------------------------------------------------------------
Information                                Value     Method               Date
---------------------------------------- ----------- -------------------- ----------
Used Segment Ratio (0,10)                 70 ( 80) * Expand               2005/07/01
====================================================================================              :

Note

In the case of a HiRDB/Parallel Server, a scheduled database maintenance date is based on the dictionary server's date and time settings.

Explanation

No:

Analysis result number (maximum of 10 digits). This corresponds to the number assigned to the information about each scheduled database maintenance date.

Method:

Maintenance method for the target type (Type) (maximum of 14 characters):

ReclaimS

Use pdreclaim to release used free segments.

ReclaimP

Use pdreclaim to release used free pages.

Reorganize

Use pdrorg to perform reorganization. When reorganization is executed, the area to be used may increase because free area is allocated according to the specified PCTFREE value. If there is a shortage of space, extend the RDAREA beforehand.

Expand

Use pdmod to expand the RDAREA.

Extend

Maintenance is not needed (HiRDB performs automatic extension of the RDAREA). If HiRDB cannot allocate the area required for automatic extension, the user must use pdmod to extend the RDAREA.

Reinit

Re-initialize the RDAREA. If 16 HiRDB files have already been allocated to the RDAREA, the RDAREA can no longer be extended. In such a case, you must take appropriate action, such as re-initializing the RDAREA to increase the size and number of HiRDB files.

blank

No maintenance is needed.

Type:

Target type for which maintenance is determined to be necessary (2 characters):

T: Table

I: Index

L: LOB RDAREA

R: RDAREA

An asterisk (*) indicates that the target type is displayed in the information by analysis type, but not in the information about the maintenance method (example: T*). Therefore, in the case of a target type with an asterisk displayed, you must perform the indicated maintenance. In the case of a target type without an asterisk displayed, perform only the maintenance indicated in the information about the maintenance method.

Name:

Name of the RDAREA, table, or index (including the authorization identifier) that is the target of maintenance (maximum of 78 characters)

For an RDAREA

When RDAREA extension is instructed: "RDAREA-name"

For a LOB RDAREA: "authorization-identifier"."table-identifier"("RDAREA-name")

For a table

For a non-row-partitioned table: "authorization-identifier"."table-identifier"

For a row-partitioned table: "authorization-identifier"."table-identifier"("RDAREA-name")

For an index

For a non-row-partitioned table: "authorization-identifier"."index-identifier"

For a row-partitioned table: "authorization-identifier"."index-identifier"("RDAREA-name")

StateDate:

Date and time the most recent information was acquired in the information used for analysis (in the format YYYY/MM/DD hh:mm:ss)

Information:

Names of analyzed items and the standard values used for the analyses. For details about the item names and standard values, see 15.5 Standard value definition file (facility for predicting reorganization time).

Value:

Analysis values. Each set of analysis values is output in the format analysis-value (standard-value). For details about the standard values, see 15.5 Standard value definition file (facility for predicting reorganization time).

An asterisk (*) is displayed following the set of analysis values for the item with the earliest prediction date among all the analyzed items for which maintenance was determined to be necessary as a result of prediction processing.

Date:

Scheduled database maintenance date (in the format YYYY/MM/DD).

15.4.2 Output format in CSV format

If you execute the facility for predicting reorganization time with the predict statement specified, you can output the prediction results to a file in CSV format.

Organization of this subsection

(1) Rules for output data

(2) Prediction results output items

(3) Output example

(1) Rules for output data

The items are separated by the comma (,).

Each line of data ends with the linefeed character (0x0a).

If there is no information to be output for an item, only the comma is output (or the linefeed character in the case of the last item).

A title line is output as the first line.

(2) Prediction results output items

Table 15-6 describes the execution results items of the facility for predicting reorganization time that are output in the CSV format.

Table 15-6 Execution results items of the facility for predicting reorganization time (output in CSV format)

Title
Output item
Output format
Max. length
(bytes)
Output information

Scheduled database maintenance date
Maintenance method
Information by analysis item

kind
Output type:
p: Information about scheduled database maintenance date
m: Information about maintenance method
d: Information by analysis item
Character string
8
Y
Y
Y

No
Analysis result number
Numeric value
10
Y
Y
Y

Date
Scheduled database maintenance date
YYYY/MM/DD
10
Y
Y
Y

Type
Target type:
T: Table
I: Index
L: LOB RDAREA
R: Data dictionary RDAREA, user RDAREA, or registry RDAREA
Character string
1
Y
Y
Y

*
Asterisk identifies a resource whose maintenance has been determined to be necessary.
These are the resources the user must maintain.
Character
1
Space
Y
Space

AuthID
Authorization identifier
For a data dictionary table, (Data dictionary) is displayed.
Character string
30
N
Y*
Y*

Name
Name of the table or index
Character string
30
N
Y*
Y*

Rdarea
RDAREA name
Character string
30
Y
Y
Y

Method
Maintenance method:
0: Maintenance is not necessary
1: Reclaim S (release used free segments)
2: Reclaim P (release used free pages)
3: Reorganize (reorganize)
4: Expand (expand RDAREA)
5: Extend (extend RDAREA automatically (maintenance not necessary))
6: Reinit (Re-initialize RDAREA)
For details about the maintenance method, see 15.4.1 Output format of the execution results.
Numeric value
5
N
Y
Y

NextExec
Recommended time for the next execution of the condition analysis result accumulation facility
YYYY/MM/DD
10
N
N
N

StateDate
Analysis information acquisition date and time.
This is the date and time the most recent information was acquired among all analysis information that was used for the analysis.
YYYY/MM/DD hh:mm:ss
19
Y
N
Y

InfoNo
Number of the analysis item type:
1: Empty Page Ratio
2: Unused Page Ratio
3: Number of Branch Row
8: Used Segment for LOB Columns
10: Used Segment for Cluster
11: Unused Page Differ From PCTFREE
13: Used Segment Ratio
Numeric value
5
Y
N
Y

Value
Analysis value for the analysis item type
Numeric value
5
Y
N
Y

PredictBase
Standard value used for the analysis item type
Numeric value
5
Y
N
Y

Count
Number of accumulated data items
Numeric value
5
N
N
N

Segment
Number of segments released
Numeric value
10
N
Y
N

Reclaim
Predicted number of released segments in releasing used free segments
Numeric value
10
N
Y*
N

Reorganize
Predicted number of released segments in reorganization
Numeric value
10
N
Y*
N

ItemMethod
Number of the maintenance method for each analysis item
Numeric value
5
N
Y
Y

CheckNo
Number of standard values for checking
Numeric value
5
Y
N
Y

Check1
Standard value for checking by analysis item type used for analysis
Numeric value
5
Y
N
Y

Check2
Standard value for checking by analysis item type used for analysis
Numeric value
5
Y
N
Y

Legend:

Y: Output

N: Not output

blank: 1 space character is output

Note

An item is enclosed in double quotation marks (") if its output format is character string. The maximum length does not include these quotation marks.

* This information is not output when the target type is R.

(3) Output example

The following shows an output example in the CSV format:

(a) When the -e 1 option is specified and the -m option is omitted

Kind,No,Date,Type,*,AuthID,Name,Rdarea,Method,NextExec,StateDate,InfoNo,Value,PredictBase,
Count,Segment,Reclaim,Reorganize,ItemMethod,CheckNo,Check1,Check2
"p",1,2005/01/26,"R"," ",,,"RDUSER12",,,2004/12/27 15:58:08,13,50,80,,,,,,2,0,0
"p",1,2005/01/30,"R"," ",,,"rd0002",,,2004/12/27 15:58:08,13,60,80,,,,,,2,0,0
"p",1,2005/01/11,"R"," ",,,"lobrdarea701",,,2004/12/27 15:58:08,13,70,80,,,,,,2,0,0
"p",1,2005/01/15,"R"," ",,,"RDUSER02",,,2004/12/27 15:58:08,13,65,80,,,,,,2,0,0

(b) When the -e 1 and -m options are both specified

Kind,No,Date,Type,*,AuthID,Name,Rdarea,Method,NextExec,StateDate,InfoNo,Value,PredictBase,
Count,Segment,Reclaim,Reorganize,ItemMethod,CheckNo,Check1,Check2
"p",1,2005/01/26,"R"," ",,,"RDUSER01",,,2004/12/27 15:58:08,13,50,80,,,,,,2,0,0
"m",1,2005/01/26,"R"," ",,,"RDUSER01",0,,,,,,,2,0,0,0,,,
"m",1,2005/01/26,"I"," ","k1234567​","index01","RDUSER01",0,,,,,,,2,0,1,0,,,
"m",1,2005/01/26,"T","*","k1234567​","table01","RDUSER01",3,,,,,,,2,0,4,3,,,
          :
"p",1,2005/01/30,"R"," ",,,"RDUSER02",,,2004/12/27 15:58:08,13,50,80,,,,,,2,0,0
"m",1,2005/01/30,"R"," ",,,"RDUSER02",0,,,,,,,0,0,0,0,,,
"m",1,2005/01/30,"T"," ","k1234567​","table03","RDUSER02",0,,,,,,,0,0,0,0,,,
          :
"p",1,2005/01/21,"R"," ",,,"RDUSER02",,,2004/12/27 15:58:08,13,50,80,,,,,,2,0,0
"m",1,2005/01/21,"R","*",,,"RDUSER02",4,,,,,,,6,0,0,4,,,
"m",1,2005/01/21,"I"," ","k1234567​","index03","RDUSER02",0,,,,,,,6,0,1,0,,,
"m",1,2005/01/21,"T"," ","k1234567​","table03","RDUSER02",0,,,,,,,6,0,4,0,,,
          :

(c) When the -e 2 option is specified

Kind,No,Date,Type,*,AuthID,Name,Rdarea,Method,NextExec,StateDate,InfoNo,Value,PredictBase,CheckNo,Check1,Check2
"p",1,2005/05/31,"R",,,,"RDUSER01",,2005/05/28,2005/04/12 17:30:12:42,13,78,80,2,0,10
"m",1,2005/05/31,"T","*","k1234567​","table01","RDUSER01",1,,,,,,0,,
"m",1,2005/05/31,"T",,"k1234567​","table02","RDUSER01",2,,,,,,0,,
"m",1,2005/05/31,"I","*","k1234567​","index01","RDUSER01",2,,,,,,0,,
"m",1,2005/05/31,"T","*","k1234567​","table10","RDUSER01",2,,,,,,0,,
"d",1,2005/05/31,"T",,"k1234567​","table01","RDUSER01",1,2005/05/28,2005/04/12 17:30:12:42,1,40,50,0,,
"d",1,2005/08/10,"T","*","k1234567​","table10","RDUSER01",1,2005/07/31,2005/04/12 17:30:12:42,1,25,50,0,,
"d",1,2005/06/01,"T","*","k1234567​","table10","RDUSER01",2,2005/05/29,2005/04/12 17:30:12:42,2,25,30,1,50,
"p",2,2005/06/01,"R",,,,"RDUSER12",,2005/05/29,2005/04/12 17:30:12:42,13,78,80,2,0,10
"m",2,2005/06/01,"T","*","k1234567​","table01","RDUSER12",2,,,,,,0,,
"m",2,2005/06/01,"T","*","k1234567​","table03","RDUSER12",2,,,,,,0,,
"m",2,2005/06/01,"I","*","k1234567​","index01","RDUSER12",1,,,,,,0,,
"m",2,2005/06/01,"T","*","k1234567​","table11","RDUSER12",1,,,,,,0,,
"p",3,2005/06/03,"R",,,,"rd0002",,2005/05/30,2005/04/12 17:30:12:42,13,78,80,2,0,10
"m",3,2005/06/03,"R",,,,"rd0002",3,,,,,,0,,
"d",3,2005/06/03,"R",,,,"rd0002",3,2005/05/30,2005/04/12 17:30:12:42,13,78,80,2,0,10
          :

15.5 Standard value definition file (facility for predicting reorganization time)

The facility for predicting reorganization time makes its predictions on the basis of predefined standard values for items. You can change these standard values as appropriate to your environment. You can specify in the standard value definition file the new standard values you wish to use for any items.

Organization of this section

(1) Format

(2) Explanation

(3) Specification rules for the standard value definition file

(4) Names of items whose standard value can be changed

(5) Standard value definition file specification example

(1) Format

<threshold>
item-name=standard-value
    :
[rdarea=RDAREA-name]
item-name=standard-value
    :
[table=authorization-identifier.table-identifier]
item-name=standard-value
    :
[index=authorization-identifier.index-identifier]
item-name=standard-value
    :

(2) Explanation

<threshold>

Specifies that standard values for common items follow. When <threshold> is specified, it must be specified as the first line of the file.

[rdarea=RDAREA-name]

Specifies an RDAREA for which standard values are to be changed.

[table=authorization-identifier.table-identifier]

Specifies the table(s) for which standard values are to be changed.

To include all tables under the specified authorization identifier, specify all for table-identifier. To specify the data dictionary table, omit the authorization identifier.

[index=authorization-identifier.index-identifier]

Specifies the index(es) for which standard values are to be changed.

To include all indexes under the specified authorization identifier, specify all for index-identifier.

item-name=standard-value

Specifies the name of an item whose standard value is to be changed and the new standard value. For details about the item names that can be specified, see (4) Names of items whose standard value can be changed.

Rules

If the same item name is specified more than once, the last specification takes effect.

An item whose value is set to the asterisk (*) will be excluded from the checking performed by the facility for predicting reorganization time. There is no need to reorganize a table on which PURGE TABLE and initial data loading (pdload with existing data deleted) are executed periodically. To remove these resources as targets of the facility for predicting reorganization time, specify an asterisk (*). The facility for predicting reorganization time performs prediction processing assuming that no periodic maintenance such as PURGE TABLE is performed.

(3) Specification rules for the standard value definition file

An item specified before the first [rdarea=RDAREA-name], [table=authorization-identifier.table-identifier], or [index=authorization-identifier.index-identifier] is treated as a common item.

If the same <threshold>, [rdarea=RDAREA-name], [table=authorization-identifier.table-identifier], or [index=authorization-identifier.index-identifier] is specified more than once, the last specification takes effect.

If the same [rdarea=RDAREA-name], [table=authorization-identifier.table-identifier], or [index=authorization-identifier.index-identifier] containing the same item name is specified more than once, the last specification takes effect.

Each of <threshold>, [rdarea=RDAREA-name], [table=authorization-identifier.table-identifier], [index=authorization-identifier.index-identifier], and item-name=standard-value must be specified on a separate line.

There can be no spaces or tab characters within item-name=standard-value or before item-name.

The utility ignores any information enclosed between /* and */. The utility also ignores null lines.

If the standard value definition file contains an error, the utility terminates with an error.

If an RDAREA name, authorization identifier, table identifier, or index identifier contains a lowercase alphabetic letter or space, you must enclose the entire name or identifier in double quotation marks ("). If one of these names or identifiers is not enclosed in double quotation marks ("), any lowercase alphabetic letters it includes are handled as uppercase letters.

Place a specification common to all tables or all indexes (all specified for the table identifier or index identifier) before specifications for specific tables, indexes, or RDAREAs.

(4) Names of items whose standard value can be changed

Table 15-7 describes the items whose standard value can be changed. Table 15-8 provides guidelines for changing standard values.

Table 15-7 Items whose standard value can be changed

No.
Item name
Specifiable values
Standard value
Description
Whether or not changeable

R
T
I

1
EMPTY_PAGE_RATIO
*,
10-100
30
Among the total number of pages allocated, specifies the percentage that can be released by pdreclaim (%).
Y
Y
Y

2
UNDER_PAGE_RATIO
10-100
10,
or 80-
PCTFREE
Specifies the page usage percentage to be used to check No. 3 (%).
Y
Y
Y

3
UNUSED_PAGE_RATIO
*,
10-100
50
Among the total number of pages allocated, specifies the percentage whose page usage is less than the value of No. 2 (%).
Y
Y
Y

4
BRANCH_ROW
*,
10-100
50
Among the total number of rows, specifies the percentage stored on multiple pages (%).
Y
Y
N

5
USED_SEGMENT_LOB
*,
10-100
80
Among the total number of segments, specifies the percentage derived from the last segment number in the LOB RDAREA (%).
Y
N
N

6
USED_SEGMENT_RATIO_CLUS
*,
10-100
50
Among the total number of segments allocated to a clustering data page, specifies the percentage whose usage is 100% (%).
Y
Y
N

7
DIFF_PCTFREE_M
*,
10-100
10
Specifies the value used to determine the minimum page usage (%).
This value is obtained by subtracting the minimum page usage rate from the page usage rate that is obtained based on the percentage of unused area specified in PCTFREE.
If the specified value is greater than (100 - percentage of unused area specified in PCTFREE), the value of (100 - percentage of unused area specified in PCTFREE) is assumed as this value.
If * is specified, only the value specified in No. 8 takes effect.
Y
Y
Y

8
DIFF_PCTFREE_P
*,
10-100
10
Specifies the value used to determine the maximum page usage (%).
This value is obtained by subtracting the page usage that is obtained based on the percentage of unused area specified in PCTFREE from the maximum page usage rate.
If the specified value is greater than the percentage of unused area specified in PCTFREE, the percentage of unused area specified in PCTFREE is assumed as this value.
If * is specified, only the value specified in No. 7 takes effect.
Y
Y
Y

9
DIFF_PCTFREE_RATIO
*,
10-100
*
Among the total number of pages allocated, specifies the percentage whose usage rate is less than the minimum value of No. 7 and greater than the maximum value of No. 8 (%). When this item is omitted, analysis is not performed for this item.
Y
Y
Y

10
USED_SEGMENT
*,
10-100
80
Among the total number of segments, specifies the percentage used throughout the entire RDAREA (%).
Y
N
N

11
EXTEND_COUNT_MIN
0-24
0
Specifies the minimum number of times the RDAREA can be extended automatically. This value must satisfy the condition EXTEND_COUNT_MIN EXTEND_COUNT.
Y
N
N

12
EXTEND_COUNT
0-24
0
Specifies the number of times the RDAREA can be extended automatically. This value must satisfy the condition EXTEND_COUNT_MIN EXTEND_COUNT. pddbst cannot determine whether or not the HiRDB file system area becomes full as a result of automatic extension. Therefore, you must determine the value of EXTEND_COUNT taking into account the number of RDAREAs in the HiRDB file system area and the maximum number of extensions.
Y
N
N

Legend:

R: RDAREA

T: Table

I: Index

Y: Standard value can be changed.

N: Standard value cannot be changed.

Table 15-8 Guidelines for changing the standard value

No.
Item name
Standard value
How to determine whether or not maintenance is needed
Guideline for changing standard value

1
EMPTY_PAGE_RATIO
(p)=30%
If the percentage of used pages with a page usage rate of 0% is (p)% or greater, the utility determines that free pages must be released.
If there is not much space available in the RDAREA and you want to release invalid pages as soon as possible, reduce the value of (p).

2
UNDER_PAGE_RATIO
(a)=X-20%
If the percentage of used pages whose page usage rate of (a)% or greater is equal to or greater than (p)%, the facility determines that reorganization is necessary.

If the storage row is extremely short for the page size and the page usage rate is less than (a)% immediately after the table is reorganized, reduce the value of (a).

If you want to reduce the percentage of pages with invalid area as much as possible, reduce the value of (p).

In the case of a table for which NO SPLIT is not specified and which contains variable-length character strings with a defined length of 256 bytes or greater, if more than 50% of the pages obtained immediately after reorganization have a page usage rate of (a)% or less (there is more branched variable-length character string data than non-branched data), increase the value of (p).

If there is not much space available in the RDAREA and you want to release the pages with invalid area as soon as possible, reduce the value of (p).

3
UNUSED_PAGE_RATIO
(p)=50%

4
BRANCH_ROW
(p)=50%
If the percentage of branched rows among the total number of rows is (p)% or greater, the facility determines that reorganization is necessary.
If there are many UPDATE processes that result in longer data and search performance needs to be maintained, reduce the value of (p).

5
USED_SEGMENT_LOB
(p)=80%
If the last segment number in the LOB RDAREA exceeds (p)% among the total number of segments and reorganization does not improve the condition, the utility determines that extension of the RDAREA is necessary. If reorganization results in a value less than (p), the facility determines that reorganization is necessary.
If the amount of data to be stored may increase suddenly and you want to take action at an early stage, reduce the value of (p).

6
USED_SEGMENT_RATIO_CLUS
(p)=50%
If the number of segments with a page usage per segment of 100% (segments without free pages) is equal to or greater than (p)% of the total number of segments in use, use of free space based on the percentage of unused pages, not the use of free space based on the percentage of unused area, has already begun; therefore, the facility determines that reorganization is necessary.
While data can be stored in the same page, clustering effects are still maintained. If you can determine from the storage status in the same segment that clustering is no longer effective, reduce the value of (p).

7
DIFF_PCTFREE_M
(a)=X-10%
If the percentage of used pages with a page usage outside the range from (a)% to (b)% is equal to or greater than (p)%, the facility determines that reorganization is necessary.
If you want to perform reorganization even when the page usage rate is high (for a table in which UPDATEs resulting in a longer row occur frequently, or for a table with a cluster key defined in which there are frequent occurrences of INSERTs that involves data with an intermediate key), specify (p). In the case of an index with many duplicate key values, PCTFREE is ignored for the pages that store duplicate key values; therefore, if you specify (p), specify a sufficient value.

8
DIFF_PCTFREE_P
(b)=X+10%

9
DIFF_PCTFREE_RATIO
(p)=*

10
USED_SEGMENT
(p)=80%
If the number of used segments in the RDAREA is equal to or greater than (p)%, the facility determines that reorganization is necessary.
If the value remains equal to or greater than (p)% after reorganization, the utility determines that extension is necessary. However, in the case of an RDAREA for which automatic extension has been specified, the utility does not recommend extension because the RDAREA can be extended automatically only up to (a) times.

If you want to be able to detect a space shortage at an early stage when RDAREA extension is recommended, reduce the value of (p) (for example, if a space shortage occurs when there is no spare disk, you must first allocate a disk).

If the amount of data to be stored may increase suddenly and you want to take action at an early stage, reduce the value of (p).

11
EXTEND_COUNT_MIN
(a)=23

12
EXTEND_COUNT

Legend:

X: 100 - value of first argument of PCTFREE

(5) Standard value definition file specification example

The following shows a standard value definition file specification example:

<threshold>  .........................Common specification
USED_SEGMENT=70
USED_SEGMENT_LOB=65
 :
[table=all]  .........................Specification common to all tables
EMPTY_PAGE_RATIO=30
USED_SEGMENT=20
 :
[index=all]  .........................Specification common to all indexes
EMPTY_PAGE_RATIO=20
USED_SEGMENT=20
 :
[table=authorization-identifier.table-name]  ....Specification common to a specified table
EMPTY_PAGE_RATIO=35
USED_SEGMENT=30
 :
[index=authorization-identifier.index-name]  ...Specification common to a specified index
EMPTY_PAGE_RATIO=80
USED_PAGE_RATIO=60
 :
[rdarea=RDAREA-name]  ................Specification for an individual RDAREA
EXTEND_COUNT=10
 :
[table=authorization-identifier.table-name]  ...Specification for an individual table in an RDAREA
EMPTY_PAGE_RATIO=35
USED_SEGMENT=30
 :
[index=authorization-identifier.index-name]  ...Specification for an individual index in an RDAREA
EMPTY_PAGE_RATIO=80
USED_PAGE_RATIO=60
 :

15.6 Executing the condition analysis result accumulation facility in prediction level 2

The condition analysis result accumulation facility in prediction level 1 analyzes only directory pages because it acquires information only by RDAREA. For this reason, its execution time is comparatively brief.

In prediction level 2, the condition analysis result accumulation facility also acquires information by table and index. This requires analysis of data pages and index pages, resulting in a longer execution time than with prediction level 1.

If you execute the condition analysis result accumulation facility in prediction level 2 during online operations, online jobs may be affected. To minimize the effects on online jobs, you can choose one (or both) of the following execution methods:

Interval analysis

Merge analysis

The following subsection provides criteria for using these methods and describes how to execute them.

Organization of this section

15.6.1 Interval analysis

15.6.2 Merge analysis

15.6.3 Selection criteria

15.6.1 Interval analysis

Interval analysis sets pauses during execution of the condition analysis result accumulation facility. After analyzing a specified amount of data, the facility pauses the analysis for a specified amount of time. When the specified amount of time has elapsed, the facility analyzes the next set of the specified amount of data, then pauses again, repeating this cycle until all the data has been analyzed. Because the facility pauses, the adverse effects on online applications are reduced.

To execute interval analysis, you specify in the -w option the amount of data to be analyzed (in segments) between pauses and the pause time (in milliseconds).

Figure 15-13 provides an overview of interval analysis.

Figure 15-13 Overview of interval analysis

15.6.2 Merge analysis

Merge analysis executes the condition analysis result accumulation facility multiple times (over multiple days), accumulating and merging the condition analysis results. For example, it is effective to execute the facility over multiple days during off-peak hours when there are comparatively fewer online jobs.

To execute merge analysis, you specify in the -n option the number of times the facility is to be executed.

Figure 15-14 provides an overview of merge analysis. This figure assumes that a single RDAREA (10 segments) is to be analyzed.

Figure 15-14 Overview of merge analysis

15.6.3 Selection criteria

How the facility should be executed depends on the characteristics of the application. Figure 15-15 shows the execution method and selection criteria.

Figure 15-15 Execution method and selection criteria

Explanation

The following shows an example of command execution when interval analysis and merge analysis are used:

pddbst -r ALL -e 2 -w 100,100 -n 5

Explanation:
To minimize the effects on online jobs, the facility analyzes 100 segments of data and then pauses for 100 milliseconds, then repeats this process. This example executes the facility for 5 days to reduce the execution time per day. This command is executed once a day for 5 days.

The following shows an example of command execution when interval analysis is used:

pddbst -r ALL -e 2 -w 100,100

Explanation:
To minimize the effects on online jobs, the facility analyzes 100 segments of data and then pauses for 100 milliseconds, then repeats this process.

The following shows an example of command execution when merge analysis is used:

pddbst -r ALL -e 2 -n 5

Explanation:
This example reduces the execution time per day by executing pddbst over 5 days. The command in this example is executed once a day for 5 days.

The following shows an example of command execution during normal operation (neither interval analysis nor merge analysis is used):

pddbst -r ALL -e 2

Explanation:
This is the normal execution method where a single execution of pddbst completes the processing.

15.7 Rules and notes

Organization of this section

(1) Rules

(2) Notes

(3) Using files with a BOM

(1) Rules

pddbst can be executed only while HiRDB is HiRDB is running.

Execute pddbst at the server machine that contains the single server or where the system manager is located.

The maximum number of concurrent executions of pddbst depends on the pd_utl_exec_mode operand value.

When pd_utl_exec_mode=0 is specified:

The maximum number of concurrent executions of pddbst is 16.

When pd_utl_exec_mode=1 is specified:

The maximum number of concurrent executions of pddbst is equal to the pd_max_users operand value.

An RDAREA to be analyzed (data dictionary RDAREA, data dictionary LOB RDAREA, registry RDAREA, or registry LOB RDAREA) must be in one of the following statuses:

Open status without shutdown

Command shutdown and open status

Referencing-possible shutdown and open status

For details about user RDAREAs and user LOB RDAREAs, see Appendix C. RDAREA Status During Command Execution.

You must set the LANG environment variable in order to execute pddbst. You must set the PDLANG environment variable in order to use in the pddbst execution environment a character encoding that is not supported by the OS. For details about LANG and PDLANG, see the manual HiRDB Version 8 UAP Development Guide.

(2) Notes

The following are the pddbst utility's return codes:
0: Normal termination
4: Warning termination (invalid specification or skipped analysis processing)
8: Abnormal termination

When pddbst is executed, an RDAREA to be analyzed is locked (shared retrieval mode: SR).

If logical analysis (-k logi specified) or analysis by table (-t specified) is performed on a table whose reorganization by pdrorg terminated abnormally, DATA_UNFINISH is displayed for Status.

When you execute the facility for predicting reorganization time, make sure that the pd_lck_pool_size operand value specified in the single server definition or the dictionary server definition is no less than the default value. Specify at least the value that is obtained from the following formula:

pd_lck_pool_size operand value = y/x (kilobytes)

x: 6 in the 32-bit mode; 4 in the 64-bit mode

y: Number of locked resources used by pddbst

y=MAX(a,b,c)

a: Number of defined RDAREAs 30

b: Number of defined tables + number of defined abstract data types + total number of columns of an abstract data type* + 61

c: Number of defined indexes + 124

* An abstract data type is counted once for each table or column in which it is used.

(3) Using files with a BOM

If you selected utf-8 as the character encoding in the pdsetup command, you may be able to use a file with a BOM as the input file for pddbst. Table 15-9 shows whether or not files with a BOM can be used with pddbst. Note that even when a file with a BOM is used as the input file, the BOM is skipped. No BOM is included in the file that is output by pddbst.

Table 15-9 Whether or not files with a BOM can be used in pddbst (applicable to UTF-8)

Option | Input file | Use of file with a BOM
-c | Standard value definition file | Y
-v | Control statements file | Y

Legend:

Y: Can be used

15.8 Examples

The section shows an example of the use of pddbst.

Organization of this section

(1) Database condition analysis facility

(2) Condition analysis result accumulation facility

(3) Facility for predicting reorganization time

(1) Database condition analysis facility

Example 1

This example performs condition analysis by table. The table to be analyzed is STOCK.

The example assumes that the STOCK table has been defined as shown in the example for pddef.

Command execution

pddbst -t STOCK

(2) Condition analysis result accumulation facility

Example

This example executes the condition analysis result accumulation facility on an RDAREA named RD001 under the following conditions:

Prediction level 2

Merge analysis (3 times)

Command execution

pddbst -r RD001 -e 2 -n 3

Note

This command is executed three times.

(3) Facility for predicting reorganization time

Example

This example executes the facility for predicting reorganization time in prediction level 2 based on the analysis information accumulated in (2).

Command execution

pddbst -k pred -e 2

16. Optimizing Information Collection Utility (pdgetcst)

This chapter explains the optimizing information collection utility (pdgetcst), which collects information for optimizing based on cost and stores the information in the dictionary table.

This chapter contains the following sections:

Organization of this chapter

16.1 Overview

16.2 Command format

16.3 Optimizing information

16.4 Creating the optimization information parameter file

16.5 Rules and notes

16.6 Output format

16.7 Examples

16.1 Overview

Executor: User with the SELECT privilege for the target table

The optimizing information collection utility collects information required in order to optimize the system based on cost and registers the information in a data dictionary table. Registered optimization information can also be deleted from the data dictionary table. The optimizing information collection utility provides the following functions:

Function for collecting optimization information by retrieval

Function for registering optimization information from an optimization information parameter file

Conditions for executing the optimizing information collection utility

You should execute the optimizing information collection utility when all the following conditions are satisfied:

The cost-based optimization mode is 2.¹

No application that involves updating operations is running.²

There are many complex searches, such as join searches.

There exists a test environment with the same data as in the real environment.³

¹

If the cost-based optimization mode is not 2, you can still execute the utility if the optimizing information collection level is lvl2.

²

If an application that involves updating operations is running, but the optimizing information collection level is lvl1 and the number of rows in the table has not changed, you can use the utility.

³

If there is no test environment with the same data as in the real environment, but you register the optimization information using a parameter file that contains optimized information, you can use the utility.

Organization of this section

16.1.1 Collecting optimization information by retrieval

16.1.2 Registering optimization information from an optimization information parameter file

16.1.3 Maximum number of concurrently executable utilities

16.1.1 Collecting optimization information by retrieval

Determination of the optimum access path based on the database's current status is called cost-based optimization.

This enables HiRDB to use the most efficient access path and enables users to create UAPs without having to take SQL optimization into account.

To optimize the system based on cost and to improve the precision of optimization, you must execute the optimizing information collection utility as needed before you compile a UAP or execute dynamic SQL statements.

You should collect optimization information by search after performing the following operations:

After adding, updating, or deleting a large amount of data

After executing the database load utility (pdload) or database reorganization utility (pdrorg)

After adding indexes

After executing the rebalancing utility

Figure 16-1 provides an overview of the optimizing information collection utility (pdgetcst).

Figure 16-1 Overview of the optimizing information collection utility (pdgetcst)

16.1.2 Registering optimization information from an optimization information parameter file

This function enables optimization information set in a parameter file to be registered in a dictionary table without having to collect it from the current database status. Figure 16-2 provides an overview of the function for registering optimization information from an optimization information parameter file of the optimizing information collection utility (pdgetcst).

Figure 16-2 Overview of the optimizing information collection utility (pdgetcst): registering optimization information from the optimization information parameter file

16.1.3 Maximum number of concurrently executable utilities

The maximum number of copies of the optimizing information collection utility (pdgetcst) that can be executed concurrently depends on a value specified in the pd_utl_exec_mode operand of the system common definition:

pd_utl_exec_mode=0

A maximum of 16 copies can be executed concurrently.

pd_utl_exec_mode=1

The maximum number of copies of the utility that can be executed concurrently is equal to one half of the value specified in the pd_max_users operand.

16.2 Command format

Organization of this section

16.2.1 Format

16.2.2 Options

16.2.1 Format

Collection of optimization information by retrieval or deletion of optimization information

pdgetcst [-u authorization-identifier] [-a authorization-identifier]
        [-p password] -t {table-identifier|ALL}
        [-d][-c {lvl1|lvl2}]
        [-l output-result-file]
        [-q generation-number]

Registration of optimization information from optimization information parameter file

pdgetcst [-u authorization-identifier] [-a authorization-identifier]
        [-p password] -t table-identifier
         -s optimization-information-parameter-filename
        [-l output-result-filename]
        [-v space-conversion-level]

Table 16-1 shows whether or not the options are specifiable depending on the specification of the -c, -d, or -s option.

Table 16-1 Whether or not options are specifiable depending on the specification of -c, -d, or -s option

Option | -c option | -d option | -s option
lvl1 | lvl2
-u authorization-identifier | O | O | O | O
-a authorization-identifier | O | O | O | O
-p password | O | O | O | O
-t | table-identifier | R | R | R | R
ALL | N | N
-d | N | N |  | N
-c | lvl1 |  | N | N | N
lvl2 | N |  | N | N
-s optimization-information-parameter-filename | N | N | N |
-l output-result-filename | O | O | O | O
-q generation-number | O | O | O | O
-v space-conversion-level | N | N | N | O

R: Required

O: Optional

N: Cannot be specified

: Not applicable

16.2.2 Options

-u authorization-identifier
Specifies the authorization identifier used for connecting to HiRDB. If omitted, the value set in the PDUSER environment variable is assumed. If the PDUSER value is not set, the user name corresponding to the user ID in the OS that is being used to execute this utility is assumed.
If a user ID is enclosed in double quotation marks, it is handled as case sensitive; otherwise, it is handled as all uppercase letters. If you use the Bourne shell (sh), C shell (csh), or Korn shell (ksh), it is also necessary to enclose the user ID in single quotation marks.

-a authorization-identifier
Specifies the authorization identifier of the owner of the table that is to be subject to collection of optimization information.
If omitted, the authorization identifier assigned by the -u option is assumed.
If an authorization identifier is enclosed in double quotation marks, it is handled as case sensitive; otherwise, it is handled as all uppercase letters. If the Bourne shell (sh), C shell (csh), or Korn shell (ksh) is used, it is also necessary to enclose the authorization identifier in single quotation marks.

-p password
Specifies the password for the user ID specified in the -u option.
If the -u option is specified but the -p option is omitted, the user is requested to enter a password, and the entered value is used; if entry of a password is not required, the NULL SEND button should be pressed.
If the -u and the -p options are both omitted, the value set in the PDUSER environment variable is assumed; if the PDUSER value is not set, the user is requested to enter a password, and the entered value is used; if entry of a password is not required, the NULL SEND button should be pressed.
This utility must not be executed in an environment in which a required password cannot be entered, such as background execution with a shell using &. Password entry is required in the following cases:

-u option specified and -p option omitted

-u and -p options both omitted and no password set in the PDUSER environment variable

If a password is enclosed in double quotation marks, it is handled as case sensitive; otherwise, it is handled as all uppercase letters. If the Bourne shell (sh), C shell (csh), or Korn shell (ksh) is used, it is also necessary to enclose the password in single quotation marks.

-t {table-identifier|ALL}

table-identifier

Specifies the identifier of the table that is to be subject to collection of optimization information.

You cannot specify a data dictionary table, view table, or foreign table. However, when registering optimizing information using a parameter file that contains optimized information, you can specify a foreign table.

If a table identifier is enclosed in double quotation marks ("), the command treats it as being case sensitive. If it is not enclosed in double quotation marks ("), the command treats it as in all uppercase letters. If a table identifier contains a space, enclose the identifier in double quotation marks ("). If you are using sh (Bourne shell), csh (C shell), and ksh (Korn shell), you need to enclose the entire identifier in single quotation marks (').

ALL

Specifies that all tables in the schema are to be subject to processing. Note that foreign tables cannot be subject to processing.

-d
Specifies that existing optimization information for the table specified with the -t option and for indexes defined for that table is to be deleted.

-c {lvl1|lvl2}
Specifies the optimizing information collection level.
For details about the optimizing information collection level, see Section 16.3.2 Optimizing information collection levels.

lvl1

Collects the number of rows in the table and the statistical information cache size.

lvl2

Collects all optimizing information for the table.

-s optimization-information-parameter-filename<pathname>
Specifies the absolute pathname of the optimization information parameter file containing the optimization information. When this option is specified, the utility registers the optimization information from the specified parameter file without collecting it from the current database status. When this option is specified, the -d option cannot be specified.

-l output-result-filename<pathname>
Specifies the absolute pathname of the file to which the result of the optimizing information collection utility is to be output. When this option is omitted, the execution result is not output.
If you specify -t ALL along with this option, and pdgetcst results in an error, you can identify the table resulting in the error.

-q generation-number<unsigned integer> ((0-10))
When an RDAREA with replica RDAREAs is to be subject to collection of optimization information, specifies the generation of the target RDAREA.
When this option is omitted, the command assumes the current RDAREA. The command also assumes the current RDAREA if the specified generation has no replica RDAREA.
An error results if this option is specified when the inner replica facility is not used. Specifying this option also results in an error if there is no replica RDAREA of the index storage RDAREA or LOB column storage RDAREA that corresponds to the table storage RDAREA with the specified generation.

-v space-conversion-level
Specifies whether or not to convert spaces in the maximum and minimum column values.
When this option is omitted, the utility executes space conversion according to the pd_space_level operand specification in the system common definitions.
For the space conversion level, specify 0, 1, or 3:

0

Space conversion is not executed.

1 or 3

Space conversion is executed. 1 and 3 have the same effects.

If the table columns to be registered have the national character string type or mixed character string type, the utility converts spaces in the corresponding optimizing parameter file as follows:

Column of national character string type
The utility converts two consecutive single-byte spaces to one double-byte space, in units of two bytes from the top.

Column of mixed character string type
The utility converts each double-byte space to two single-byte spaces.
When the character codes are utf-8, the system converts one double-byte space (3 bytes) to two single-byte spaces. For MCHAR, the system adds trailing single-byte spaces up to the definition length. For MVARCHAR, the data length remains shortened.

16.3 Optimizing information

Organization of this section

16.3.1 Optimization information to be collected

16.3.2 Optimizing information collection levels

16.3.1 Optimization information to be collected

Table 16-2 lists the optimization information that can be collected by the optimizing information collection utility or that can be registered using the optimization information parameter file.

Table 16-2 Optimization information collected by the optimizing information collection utility or registered using the optimization information parameter file

No.
Information collected
Classification
Description
SQL statement that improves precision of optimization
Processing that has adverse effects on integrity between registered optimization information and database status
Item name*

1
Number of rows
T
Total number of rows in the target table
SQL statement containing join
SQL statement that involves an updating operation and that changes the number of rows in the target table
NROWS

2
Number of data pages
T
Total number of row data storage pages in the target table
SQL statement that contains columns comprising the index in the search condition
SQL statement that involves an updating operation

NPAGES

3
Number of unique index key values
I
Null value (when the optimization information parameter file is used, the specified value is registered)
NENTRY

4
Number of index pages
I
Total number of index storage pages used
NIPAGES

5
Number of index levels
I
Maximum number of index levels in each single server or back-end server
NLEVEL

6
Sequentialness
I
Degree of sequentialness of the row data stored in order of index key values
SEQ_RATIO

7
Number of null values
C
Number of null values in the columns
SQL statement that contains a column comprising a single-column index or the first column comprising a multicolumn index
NNULLS

8
Maximum number of duplicate column values
C
Maximum number of duplicate values for a column
N_MAX_DUP_KEY

9
Minimum number of duplicate column values
C
Minimum number of duplicate values for a column
N_MIN_DUP_KEY

10
Column value distribution information
C
Column value distribution information
MAX_VALUE, MIN_VALUE

11
Number of unique column values
C
Number of unique column values
NUNIQUE

12
Statistical information cache size
T
Work area used by the HiRDB system

T: Table information.

I: Index information.

C: Column information:

When collecting optimization information by retrieval
This is the information on columns comprising an index; it is collected when an index is defined. In the case of a multicolumn index, only the information on the first column is collected.

When registering optimization information from the optimization information parameter file
This is the information on the columns specified in the optimization information parameter file.

*This item name is specified in the optimization information parameter file. For details about the item names that are specified in the optimization information parameter file, see 16.4.1 Information to be specified in the optimization information parameter file.

Table 16-3 shows the information that is collected or registered as key value distribution information for index component columns.

Table 16-3 Information collected or registered as key value distribution information for index component columns

No.
Information collected
Description

1
Number of null values
All rows in the target table

2
Number of table rows
Total number of pages storing the row data of the target table

3
Column data length
Data length of the column

4
Column data type
Data type of the column

5
Number of sections

Number of sections when the value of (number of table rows - number of rows whose key column data is null) is divided by a maximum of 100

If the number of rows is less than 100, the number of rows is set.

Information in Nos. 8-10 is collected as many times as there are sections.

6
Maximum column value
Maximum value of the column

7
Minimum column value
Minimum value of the column

8
Degree of cumulation between sections
Total number of elements from section 1 through the corresponding section

9
Number of unique values in section
Number of unique column values in the corresponding section

10
Maximum value in section
Maximum column value in the corresponding section

16.3.2 Optimizing information collection levels

When collecting optimizing information by retrieval, you can specify the level of information to be collected. This is called optimizing information collection level.

Table 16-4 shows the advantages and disadvantages of each optimizing information collection level.

Table 16-4 Advantages and disadvantages of each optimizing information collection level

Optimizing information collection level
Advantage
Disadvantage

lvl1

Optimization precision is comparatively high because this level lets you incorporate the number of rows in the table in the optimization and the data characteristics in the join order.

The execution time of pdgetcst is comparatively short.

Data updating has effects on the optimization.

If the expected access path is not obtained, you must take into account the cost information on the number of rows in the table, thereby making it difficult to predict the access path.

lvl2
Optimizing precision is high because this level lets you incorporate the number of rows in the table, maximum and minimum values, and distribution information, in the optimization and data characteristics in the selection of join order and indexes.

Data updating has effects on the optimization.

The pdgetcst execution time is long.

If the expected access path is not obtained, you must take into account all the cost information that has been acquired, thereby making it difficult to predict the access path.

If a multi-column index is defined, the optimizing precision is low because the utility obtains information only on the first index component column.

Check the characteristics of the table to be accessed and determine the appropriate optimizing information collection level. In some cases, it may be better to not obtain the optimizing information (to not execute pdgetcst).

If you are not collecting the optimizing information, there is no need to pay attention to the changes made to data by update-SQL. In this case, however, the optimizing precision is not high because the data characteristics are not incorporated in the optimization.

Table 16-5 shows the recommended optimizing information collection level.

Table 16-5 Recommended optimizing information collection level

No.
Characteristics of table to be accessed
Recommended optimizing information collection level

1
Both of the following conditions are satisfied:

No application that involves an updating operation is executed

The SQL statement to be executed contains columns comprising the index in the search condition.

lvl2

2
All of the following conditions are satisfied:

Conditions in No. 1 do not apply.

Cost-based optimization mode is 2.

An application that involves an updating operation and that changes the number of storage rows is not executed.

One of the following conditions is true:
Hash join is performed.
Hash execution of subquery is executed.
Join search involving 3 or more tables is performed.

lvl1

3
Other
Do not collect optimizing information (do not execute pdgetcst).

16.4 Creating the optimization information parameter file

Before optimization information can be registered, the optimization information parameter file containing appropriate information must be created. Figure 16-3 shows the format of the optimization information parameter file.

Figure 16-3 Format of the optimization information parameter file

Organization of this section

16.4.1 Information to be specified in the optimization information parameter file

16.4.2 Specifications in the optimization information parameter file

16.4.3 Specification example of the optimization information parameter file

16.4.4 Specification rules for the optimization information parameter file

16.4.1 Information to be specified in the optimization information parameter file

Table 16-6 lists the items to be specified in the optimization information parameter file, and Table 16-7 provides a description of each item.

Table 16-6 Items specified in the optimization information parameter file

Classification | Item | Description
Table optimization information | NROWS | Number of rows in table
NPAGES | Number of data pages in table
Index optimization information | INDEX | Index name
NIPAGES | Number of index pages
NLEVEL | Number of index levels
SEQ_RATIO | Degree of index sequentiality
NENTRY | Number of index key values
Column optimization information | COLUMN | Column name
NUNIQUE | Number of unique column values
NNULLS | Number of null values in column
N_MAX_DUP_KEY | Maximum number of duplicate column values
N_MIN_DUP_KEY | Minimum number of duplicate column values
MAX_VALUE | Maximum column value
MIN_VALUE | Minimum column value

Table 16-7 Descriptions of items in the optimization information parameter file

Item
Description

NROWS
Specifies the number of rows in the table.
The following SQL statement can be used to obtain the number of rows in a table:
SELECT COUNT(*) FROM table-name

NPAGES
Specifies the number of data pages used in the table.
Execute the database condition analysis utility or see the HiRDB Version 8 Installation and Design Guide.

INDEX
Specifies the name of the index.
The specified index must be defined in the table specified with the -t option.

NIPAGES
Specifies the number of index pages used for the index.
Execute the database condition analysis utility or see the HiRDB Version 8 Installation and Design Guide.

NLEVEL
Specifies the number of levels for the index.
See the HiRDB Version 8 Installation and Design Guide. In the case of a cluster key, this value can be obtained by the database condition analysis utility.

SEQ_RATIO
Specifies the degree of sequentiality of the index.
Permitted value range is 0-100. If data is stored in the order of index key values, specify a value of 100; if data is stored in random order, specify a value of 0. As this value increases, the index is used more frequently.

NENTRY
Specifies the number of key values in the index:

For a unique index, specifies the number of rows in the table

For a non-unique index, specifies the number of key values in the index, excluding duplicate values

The following SQL statements can be used to obtain the number of key values in the table:

Single-column index:

SELECT COUNT(DISTINCT index-column-name¹) FROM table-name

Multicolumn index:

WITH W1(WC1,WC2,...) AS (SELECT DISTINCT index-column-name-1¹,index-column-name-2¹,... FROM table-name) SELECT COUNT(*) FROM W1

COLUMN
Specifies the name of a column.
The specified column must be contained in the table specified with the -t option (However, LOB columns and columns of abstract data type cannot be specified.).

NUNIQUE
Specifies the number of unique values in the column.

The following SQL statement can be used to obtain the number of unique values in a column:

SELECT COUNT(DISTINCT column-name²) FROM table-name

NNULLS
Specifies the number of null values in the column.
The following SQL statement can be used to obtain the number of null values in a column:

When the definition length of the column³ is 32,000 bytes or less

 SELECT COUNT(*) FROM table-name WHERE column-name IS NULL

When the definition length of the column³ is more than 32,000 bytes

 WITH W1(WSUBCLM) AS (SELECT SUBSTR(column-name,1,255⁴)) FROM table-name)
 SELECT COUNT(*) FROM W1 WHERE WSUBCLM IS NULL

N_MAX_DUP_KEY
Specifies the maximum number of duplicate column values in the table.
The following SQL statement can be used to obtain the maximum number of duplicate column values:

When the definition length of the column³ specified for the column name is 255 bytes or less

 WITH W1(WCOUNT) AS (SELECT COUNT(column-name) FROM table-name
   WHERE column-name IS NOT NULL GROUP BY column-name)
   SELECT MAX(WCOUNT) FROM W1

When the definition length of the column³ specified for the column name is in the range 256-32,000 bytes

 SELECT COUNT(SUBSTR(column-name,1,255⁴)) FROM table-name
   WHERE column-name IS NOT NULL GROUP BY SUBSTR(column-name,1,255⁴)
   ORDER BY 1 DESC LIMIT 1

When the definition length of the column³ specified for the column name is more than 32,000 bytes

 WITH W1(WSUBCLM) AS (SELECT SUBSTR(column-name,1,255⁴)) FROM table-name)
   SELECT COUNT(WSUBCLM) FROM W1 WHERE WSUBCLM IS NOT NULL
   GROUP BY WSUBCLM ORDER BY 1 DESC LIMIT 1

N_MIN_DUP_KEY
Specifies the minimum number of duplicate column values in the table.
The following SQL statement can be used to obtain the minimum number of duplicate column values:

When the definition length of the column³ specified for the column name is 255 bytes or less

 WITH W1(WCOUNT) AS (SELECT COUNT(column-name) FROM table-name
   WHERE column-name IS NOT NULL GROUP BY column-name)
   SELECT MIN(WCOUNT) FROM W1

When the definition length of the column³ specified for the column name is in the range 256-32,000 bytes

 SELECT COUNT(SUBSTR(column-name,1,255⁴)) FROM table-name
   WHERE column-name IS NOT NULL GROUP BY SUBSTR(column-name,1,255⁴)
   ORDER BY 1 ASC LIMIT 1

When the definition length of the column³ specified for the column name is more than 32,000 bytes

 WITH W1(WSUBCLM) AS (SELECT SUBSTR(column-name,1,255⁴)) FROM table-name)
   SELECT COUNT(WSUBCLM) FROM W1 WHERE WSUBCLM IS NOT NULL
   GROUP BY WSUBCLM ORDER BY 1 ASC LIMIT 1

MAX_VALUE⁵
Specifies the maximum column value.

The following SQL statement can be used to obtain the maximum column value:

SELECT MAX(column-name⁶) FROM table-name

MIN_VALUE⁵
Specifies the minimum column value.

The following SQL statement can be used to obtain the minimum column value:

SELECT MIN(column-name⁶) FROM table-name

1 If the definition length of the column specified for the index column name is 256 bytes or more, replace index-column-name with SUBSTR (index-column-name,1,255⁴).

2 If the definition length of the column specified for the column name is 256 bytes or more, replace column-name with SUBSTR (column-name,1,255⁴).

3 Definition lengths are in bytes. For the national character string data type, the value is definition length 2.

4 If the data type of the column is character string data or BINARY, the value is 255. If it is national character string or mixed character string, the value is 127.

5 MAX_VALUE is stored in byte 32 of the RANGE_VALUES column in the SQL_COLUMN_STATISTICS data dictionary table. MIN_VALUE is stored in byte 48 of the RANGE_VALUES column in the SQL_COLUMN_STATISTICS data dictionary table.

6 If the definition length of the column is 256 bytes or more, make the following replacement:

If the data type of the column is CHAR or BINARY, replace column-name with SUBSTR(column-name,1,255).

If the data type of the column is NCHAR or MCHAR, replace column-name with SUBSTR(column-name,1,127).

If the data type of the column is VARCHAR, NVARCHAR, or MVARCHAR, replace column-name with the following specification:

 CASE LENGTH(column-name) WHEN  0 THEN ''
    WHEN  1 THEN SUBSTR(column-name,1,1)  WHEN  2 THEN SUBSTR(column-name,1,2)
    WHEN  3 THEN SUBSTR(column-name,1,3)  WHEN  4 THEN SUBSTR(column-name,1,4)
    WHEN  5 THEN SUBSTR(column-name,1,5)  WHEN  6 THEN SUBSTR(column-name,1,6)
    WHEN  7 THEN SUBSTR(column-name,1,7)  WHEN  8 THEN SUBSTR(column-name,1,8)
    WHEN  9 THEN SUBSTR(column-name,1,9)  WHEN 10 THEN SUBSTR(column-name,1,10)
    WHEN 11 THEN SUBSTR(column-name,1,11)  WHEN 12 THEN SUBSTR(column-name,1,12)
    WHEN 13 THEN SUBSTR(column-name,1,13) ELSE SUBSTR(column-name,1,14) END

16.4.2 Specifications in the optimization information parameter file

Table 16-8 describes how to specify the items in the optimization information parameter file, and Table 16-9 describes how to specify MAX_VALUE and MIN_VALUE. Table 16-10 lists the default values for items in the optimization information parameter file.

Table 16-8 Specifications in the optimization information parameter file

Item | Specification | Permitted minimum value | Permitted maximum value | Units
NROWS | Specify a positive integer. An exponential value can also be specified. | 0 | Maximum FLOAT value supported by HiRDB | Rows
NPAGES | 0 | Pages
INDEX | Comply with the rules for index definition.
NIPAGES | Specify a positive integer. An exponential value can also be specified. | 1 | Maximum FLOAT value supported by HiRDB | Pages
NLEVEL | Specify a positive integer. | 1 | Maximum SMALLINT value supported by HiRDB | Columns
SEQ_RATIO | 0 | 100 | %
NENTRY | Specify a positive integer. An exponential value can also be specified. | 0 | Maximum FLOAT value supported by HiRDB | Values
COLUMN | Comply with the rules for table definition.
NUNIQUE | Specify a positive integer. An exponential value can also be specified. | 0 | Maximum FLOAT value supported by HiRDB | Values
NNULLS | 0 | Values
N_MAX_DUP_KEY | 0 | Values
N_MIN_DUP_KEY | 0 | Values
MAX_VALUE |
MIN_VALUE

: Not applicable.

Table 16-9 Specification of MAX_VALUE and MIN_VALUE

Data type of column specified for COLUMN
Specification
Maximum and minimum values

INT
Specify a numeric value.
HiRDB rules for each data type are observed. The permitted maximum number of digits complies with the HiRDB rules for numeric literals.

SMALLINT

[LARGE]DEC[IMAL]

FLOAT or DOUBLE PRECISION
Specify a numeric value. An exponential value can also be specified.

SMALLFLT or REAL

CHAR
Specify a character or a character string. If the character string contains a blank or its length is zero, enclose it in double quotation marks (").
One line of character string data including the item name can be specified in the optimization information parameter file. The utility registers the first 16 bytes as the optimization information (not including double quotation marks) and discards any remaining characters.
If the data type is MCHAR or MVARCHAR and byte 16 or 17 contains a 2-byte code, at least 17 bytes of character string data must be specified.

VARCHAR

NCHAR

NVARCHAR

MCHAR

MVARCHAR

DATE
Specify in the format YYYY-MM-DD.
HiRDB rules for each data type are observed.

TIME
Specify in the format hh:mm:ss.

INTERVAL YEAR TO DAY
Specify in the format ()YYYYMMDD.

INTERVAL HOUR TO SECOND
Specify in the format ()hhmmss.

TIMESTAMP
"YYYY-MM-DDhh:mm:ss[.nnnnnn]"
: Single-byte space
For the fraction part [.nnnnnn], specify 0, 2, 4, or 6 according to the definition.¹ Enclose the specified value in double quotation marks.

BINARY
Specify binary data expressed as hexadecimal characters.² For data with a length of 0, specify X''.
The utility registers the first 12 bytes as the optimization information and discards any remaining characters.

1 The following table describes the storage method when the decimal places are specified for the second part of the TIMESTAMP type:

Defined length | Decimal places in the second part of input data
0 | 2 | 4 | 6 | Other
0 | Stored as is | Truncated at the defined length | Error (KFPL31002-E)
2 | Zeros are padded up to the defined length | Stored as is | Truncated at the defined length
4 | Zeros are padded up to the defined length | Stored as is | Truncated at the defined length
6 | Zeros are padded up to the defined length | Stored as is

2 Hexadecimal representation is x'****' or X'****'. For ****, specify a hexadecimal value in units of two characters (0-9, a-f, and A-F).

Table 16-10 Default values for items in the optimization information parameter file

Item | Value | Name of target dictionary table | Name of target column | Set value | Rows subject to setting in target dictionary table
NROWS* | Specified | Specified | SQL_TABLE_STATISTICS | N_ROW | Value specified for NROWS | Table specified with -t option
Not specified | Null value
Not specified |  | Value existing before update
NPAGES | Specified | Specified | N_PAGE | Value specified for NPAGES
Not specified | Null value
Not specified |  | Value existing before update
NIPAGES | Specified | Specified | SQL_INDEX_STATISTICS | N_IXPG | Value specified for NIPAGES | Index specified with INDEX
Not specified | Null value
Not specified |  | Value existing before update
NLEVEL | Specified | Specified | N_LEVEL | Value specified for NLEVEL
Not specified | Null value
Not specified |  | Value existing before update
SEQ_RATIO | Specified | Specified | SEQ_RATIO | Value specified for SEQ_RATIO
Not specified | Null value
Not specified |  | Value existing before update
NENTRY | Specified | Specified | N_ENTRY | Value specified for N_ENTRY
Not specified | Null value
Not specified |  | Value existing before update
NUNIQUE | Specified | Specified | SQL_COLUMN_STATISTICS | N_UNIQUE | Value specified for NUNIQUE | Column specified with COLUMN
Not specified | Null value
Not specified |  | Value existing before update
NNULLS* | Specified | Specified | N_NULL | Value specified for NNULLS
Not specified | Null value
Not specified |  | Value existing before update
N_MAX_DUP_KEY | Specified | Specified | N_MAX_DUP_KEY | Value specified for N_MAX_DUP_KEY
Not specified | Null value
Not specified |  | Value existing before update
N_MIN_DUP_KEY | Specified | Specified | N_MIN_DUP_KEY | Value specified for N_MIN_DUP_ KEY
Not specified | Null value
Not specified |  | Value existing before update
MAX_VALUE* | Specified | Specified | RANGE_VALUES | Value specified for MAX_VALUE
Not specified | Null value
Not specified |  | Null value
MIN_VALUE* | Specified | Specified | Value specified for MIN_VALUE
Not specified | Null value
Not specified |  | Null value

: Not applicable.

* If either NROWS, NNULLS, MAX_VALUE, or MIN_VALUE is omitted, the null value is set in the RANGE_VALUES column.

16.4.3 Specification example of the optimization information parameter file

Following is a specification example of an optimization information parameter file:

# Table optimization information
NROWS            100      # Total number of rows in table
NPAGES           5        # Number of data pages in table
# Index optimization information
INDEX            IDX_I01  # Index name
NIPAGES          2        # Number of index pages
NLEVEL           2        # Number of index levels
SEQ_RATIO        80       # Degree of sequentiality of index
NENTRY           50       # Number of index key values
# Column optimization information
COLUMN           COL_01   # Column name
NUNIQUE          50       # Number of unique values in column
NNULLS           2        # Number of null values in column
N_MAX_DUP_KEY    5        # Maximum number of duplicate column
                           values
N_MIN_DUP_KEY    1        # Minimum number of duplicate column
                           values
MAX_VALUE        ZZZ      # Maximum column value
MIN_VALUE        ABC      # Minimum column value

16.4.4 Specification rules for the optimization information parameter file

Begin the name of each item in byte 1and complete each item on one line.

Separate an item name and its value with a blank (two-byte blank) or a tab.

No more than one item can be specified on each line. One line consists of 80 bytes (not including linefeed code).

Anything between the # character and the linefeed code is regarded as a comment.

The same item cannot be specified more than once in the table, index, or column optimization information.

If a specified value contains a blank or has a length of zero, it (the value) must be enclosed in double quotation marks ("). If a specified value contains a backslash (\), the data immediately following \ is used. To use \ as part of the data, two consecutive backslashes in succession must be specified.

Items can be specified in any order within a range of index or column optimization information. A range of index or column optimization information begins with an index name or column name and ends when another index name or column name appears.

If the same index name or column name is specified more than once, the last one specified is effective.

16.5 Rules and notes

Organization of this section

(1) Rules

(2) Notes

(3) Using files with a BOM

(1) Rules

The optimizing information collection utility (pdgetcst) can be executed only when the HiRDB system is running.

The optimizing information collection utility (pdgetcst) should be executed on a single-server or a server machine with a system manager.

Columns of abstract data type cannot be specified in an optimizing information parameter file.

Only B-tree indexes can be specified in an optimizing information parameter file; plug-in indexes cannot be specified.

Optimizing information cannot be collected by searching tables for repetition columns, except for -c lvl1.

The optimizing information collected by pdgetcst becomes available for use during SQL optimization processing.

If the optimization information registered by pdgetcst does not match the actual database status, performance may become poor because the appropriate access path cannot be selected. If you have executed an SQL statement that changes the database status, execute pdgetcst to obtain the database status that matches the optimization information.

If an actual environment and a test environment both exist, make sure that the optimization information matches the actual number of table rows and distribution of data values. When the optimizing information collection level is lvl1, only the number of table rows must match.

To execute pdgetcst, the data dictionary RDAREA must be in shutdown release and open status.

Whether or not pdgetcst is executable on an RDAREA depends on the status of the index storage RDAREA for the table subject to pdgetcst processing. For details, see Appendix C. RDAREA Status During Command Execution.

For the output results file and parameter file that contains optimized information, you need to grant access privileges to the HiRDB administrator beforehand.

You must set the LANG environment variable in order to execute pdgetcst. You must set the PDLANG environment variable in order to use in the pdgetcst execution environment a character encoding that is not supported by the OS. For details about LANG and PDLANG, see the manual HiRDB Version 8 UAP Development Guide.

(2) Notes

The following are the pdgetcst utility's return codes:
0: Normal termination
4: Warning termination (warning occurred concerning data dictionary table manipulation)
8: Abnormal termination

Do not change definitions of the target table or index when the optimizing information collection utility is being executed; if definitions are changed, the optimizing information collection utility may produce spurious results.

Inserting or deleting rows or updating data in the target table or index when the optimizing information collection utility is running can produce errors in the resulting optimizing information.

The optimizing information collection utility should be run when a table contains actual data. Correct cost information cannot be obtained if the optimizing information collection utility is executed on a table that does not contain any data, for example, immediately after the table was defined.

If the character encoding in the character strings coded in the optimizing information parameter file is different from the character encoding used in the HiRDB system, the results of the optimizing information collection utility cannot be guaranteed.

Do not use the collection (-d option not specified) and the deletion (-d option specified) of optimizing information simultaneously on the same table. If these options are specified simultaneously, the results of the operation of the optimizing information collection utility cannot be guaranteed.

If the optimizing information collection utility terminates with an error, the results of its operation cannot be guaranteed. If this happens, resolve the error by referencing any error messages that were output and rerun the optimizing information collection utility.

When pdgetcst is executed, the access procedure changes. If the actual data characteristics do not match the optimizing information, there may be adverse effects on the performance. Therefore, conduct a thorough test before executing pdgetcst.

If there are a test environment and a real environment, and optimizing information is to be collected in the real environment, make sure that both environments have the same number of data items and the same distribution of data values so that the same optimizing information is obtained as for the test environment.

(3) Using files with a BOM

If you selected utf-8 as the character encoding in the pdsetup command, you may be able to use a file with a BOM as the optimization information parameter file for pdgetcst. Note that even when a file with a BOM is used as the optimization information parameter file, the BOM is skipped. No BOM is included in the file that is output by pdgetcst.

16.6 Output format

Organization of this section

(1) Collecting optimization information by retrieval

(2) Registering optimization information using the optimization information parameter file

(1) Collecting optimization information by retrieval

(a) Optimizing information collection level lvl2

The following shows the execution results of the optimizing information collection utility (optimizing information collection by retrieval with -c lvl2):

**      pdgetcst                             1995-03-31 12:00
                                                    [1]
 **  TABLE INFORMATION  **
 AUTHORIZATION         : user-id [2]
 TABLE NAME            : TABLE01 [3]
 ROW COUNT             : 120     [4]
 DATA PAGES            : 5       [5]
 CACHE SIZE            : 0       [6]

 **  INDEX-COLUMN INFORMATION  **
 INDEX NAME            : Idx001  [7]
 INDEX PAGES           : 5       [8]
 INDEX LEVELS          : 3       [9]
 COLUMN NAME           : Clm1    [10]
 COLUMN TYPE           : INTEGER [11]
 SEQUENTIAL RATIO      : 100     [12]
 MAX VALUE             : 2500    [13]
 MIN VALUE             : 0       [14]
 UNIQUE KEYS           : 23      [15]
 NULL VALUE COUNT      : 20      [16]
 MAX DUPLICATE KEY     : 10      [17]
 MIN DUPLICATE KEY     : 1       [18]
 SECTION COUNT         : 39      [19]

   **  SECTION INFORMATION  **
   SECTION NO          :1  [20]
   TOTAL COUNT         :1  [21]
   UNIQUE KEYS         :1  [22]
   MAX VALUE           :0  [23]

   **  SECTION INFORMATION  **
   SECTION NO          :2
   TOTAL COUNT         :2
   UNIQUE KEYS         :1
   MAX VALUE           :10

   **  SECTION INFORMATION  **
   SECTION NO          :3
   TOTAL COUNT         :6
   UNIQUE KEYS         :1
   MAX VALUE           :10

            :

   **  SECTION INFORMATION  **
   SECTION NO          :39
   TOTAL COUNT         :100
   UNIQUE KEYS         :1
   MAX VALUE           :2500

**  pdgetcst ENDED    RETURN CODE = 0 [24]

Explanation

** SECTION INFORMATION ** is displayed as many times as there are sections. ** INDEX-COLUMN INFORMATION ** (including ** SECTION INFORMATION **) is displayed as many times as there are indexes.

Date and time the optimizing information collection utility was executed (pdgetcst command entry time) in the format YYYY/MM/DD hh:mm.
YYYY: Year. MM: Month. DD: Date. hh: Hour. mm: Minute.

Authorization identifier of the table subject to collection of optimization information.

Identifier of the table subject to collection of optimization information.

Number of rows in the table.

Number of data pages used in the table.

Work area used by HiRDB.

Name of an index subject to collection of optimization information.

Number of index pages used for the index.

Number of index levels.

Name of the first component column of the index.

Data type of the first component column of the index.

Sequentialness.

Maximum column value in the first component column of the index.

Minimum column value in the first component column of the index.

Number of unique values in the first component column of the index.

Number of NULL values in the first component column of the index.

Maximum number of duplicate values in the first component column of the index.

Minimum number of duplicate values in the first component column of the index.

Number of sections for section distribution information.

Section number.

Cumulative number of data items for the section.

Number of unique values in the section.

Maximum value in the section.

Return code.

Note

When the -d option is specified, 8, 9, and 12-19 are not displayed. If the number of rows is zero, 13 and 14 are left blank, and 0 is displayed for the other items.

(b) Optimizing information collection level lvl1

The following shows the execution results of the optimizing information collection utility (optimizing information collection by retrieval with -c lvl1):

**      pdgetcst                             2000-03-31 12:00
                                                    [1]

 **  TABLE INFORMATION  **
 AUTHORIZATION         : user-id [2]
 TABLE NAME            : TABLE01 [3]
 ROW COUNT             : 120     [4]    [6]
 CACHE SIZE            : 0       [5]

**  pdgetcst ENDED    RETURN CODE = 0 [7]

Explanation

Date and time the optimizing information collection utility was executed (pdgetcst command entry time) in the format YYYY/MM/DD hh:mm.
YYYY: Year. MM: Month. DD: Date. hh: Hour. mm: Minute.

Authorization identifier of the table for which optimization information is being collected.

Identifier of the table for which optimization information is being collected.

Number of rows in the table.

Work area used by the HiRDB.

Information about other tables (applicable when -t ALL is specified).

Return code.

(2) Registering optimization information using the optimization information parameter file

 **     pdgetcst                                1997-10-30 15:06
                                                         [1]
   **  TABLE INFORMATION    **
   AUTHORIZATION       : MANUAL [2]
   TABLE NAME          : TBL01  [3]
   ROW COUNT           : 1      [4]
   DATA PAGES          : 1      [5]
   CACHE SIZE          : 2560   [6]

   **  INDEX INFORMATION  **
   INDEX NAME          : IDX_TBL01_C1 [7]
   INDEX PAGES         : 1            [8]
   INDEX LEVELS        : 1            [9]
   SEQUENTIAL RATIO    : 1            [10]
   INDEX KEY           : 1            [11]

   **  COLUMN INFORMATION  **
   COLUMN NAME         : C1   [12]
   COLUMN TYPE         : CHAR [13]
   UNIQUE KEYS         : 1    [14]
   NULL VALUE COUNT    : 1    [15]
   MAX DUPLICATE KEY   : 1    [16]
   MIN DUPLICATE KEY   : 1    [17]
   MAX VALUE           : "1"  [18]
   MIN VALUE           : "1"  [19]
   SECTION COUNT       : 100  [20]

 **  pdgetcst ENDED    RETURN CODE = 0 [21]   **

Explanation

** COLUMN INFORMATION ** is displayed as many times as there are columns. ** INDEX INFORMATION ** and ** COLUMN INFORMATION ** are displayed as many times as there are indexes.

Date and time optimizing information collection utility executed (pdgetcst command entry time), in the format YYYY-MM-DD hh:mm.
YYYY: Year. MM: Month. DD: Date. hh: Hour. mm: Minute.

Authorization identifier of the table subject to registration of optimization information.

Identifier of the table subject to registration of optimization information.

Number of rows in the table.

Number of data pages used in the tale.

Work area used by the HiRDB system.

Name of an index subject to registration of optimization information.

Number of index pages used for the index.

Number of index levels.

Degree of sequentiality.

Number of key values for the index.

Name of column for which index is defined.

Data type of column for which index is defined.

Number of unique values in column for which index is defined.

Number of null values in column for which index is defined.

Maximum number of duplicate values in column for which index is defined.

Minimum number of duplicate values in column for which index is defined.

Maximum value in column for which index is defined.

Minimum value in column for which index is defined.

Number of sections for section distribution information.

Return code.

16.7 Examples

Example 1 shows an example of using the optimizing information collection utility.

(a) Example 1

Collect optimization information for the following table and output the result to the following output results file:

Table identifier
TABLE01

Output results file
/usr/ofile

Overview

Command execution

pdgetcst -a USER-ID   ........................1
         -t TABLE01   ........................2
         -l /usr/ofile   .....................3

Explanation:

Authorization identifier of the table subject to collection of optimization information: USER-ID

Identifier of the table subject to collection of optimization information: TABLE01

File for output of the execution result of the optimizing information collection utility: /usr/ofile

17. Access Path Display Utility (pdvwopt)

This chapter explains the access path display utility (pdvwopt), which displays access path information that was determined by the SQL optimization processing.

This chapter contains the following sections:

Organization of this chapter

17.1 Overview

17.2 Command format

17.3 Execution procedure

17.4 Rules and notes

17.5 Output format

17.6 Concept of tuning

17.1 Overview

Executor: Any user

Organization of this section

17.1.1 Function

17.1.1 Function

HiRDB optimizes each SQL statement entered by the user in order to determine the optimum database access method (access path). The access path display utility (pdvwopt) displays the access path information obtained by this SQL optimization processing; the displayed information can be used for tuning purposes.

Figure 17-1 provides an overview of the access path display utility (pdvwopt).

Figure 17-1 Overview of the access path display utility (pdvwopt)

17.2 Command format

Organization of this section

17.2.1 Format

17.2.2 Option

17.2.3 Argument

17.2.1 Format

pdvwopt [-d] access-path-information-file

17.2.2 Option

-d
Specifies that join processing information, base table retrieval processing information, table IDs, and index IDs are to be displayed.

17.2.3 Argument

access-path-information-file<pathname>
If you specify 1 or a greater value in the PDVWOPTMODE client environment definition variable, the utility stores the access path information in the access path information file.
This argument specifies the access path information file that is to be subject to the execution of the access path display utility. For details about the PDVWOPTMODE client environment variable, see the HiRDB Version 8 UAP Development Guide.
The access path information file is created under the SQL information directory ($PDDIR/spool/pdsqldump) at the unit that contains the single server or front-end server accessed by the UAP.
Information is collected for each pair of CONNECT and DISCONNECT statements. HiRDB assigns the following name to each access path information file:

authorization-identifier_UAP-source-file-name_identification-number_server-type

authorization-identifier

Authorization identifier specified in the CONNECT statement.

UAP-source-file-name

Specifies the name of the UAP source file.

If the name is longer than 30 bytes, only the first 30 bytes are effective.

If the SQL was executed by the interactive SQL execution utility (pdsql), pdsql-process-ID, pdsql.exel-process-ID, or pdsqlwl-process-ID is used as the UAP source file name.

identification-number

Number used to identify the set of statements from CONNECT through DISCONNECT.

server-type

s for a HiRDB/Single Server; p for a HiRDB/Parallel Server.

Examples of access path information file names:

USER1_sample.ec_1-1-01_s

USER2_pdsql-00001_1-1-01_p

17.3 Execution procedure

To execute the access path display utility, use the following procedure:

Client

Set the client environment variables. For details about the client environment variables see the HiRDB Version 8UAP Development Guide.

Execute the UAP containing the SQL for which access path information is to be obtained. There is no need to complete the UAP's processing; the access path information file is created when the statements from CONNECT through DISCONNECT have executed.

Server

Execute the access path display utility at the server machine that contains the single server or front-end server accessed by the UAP.

Execution

$PDDIR/bin/pdvwopt $PDDIR/spool/pdsqldump/USER1_pdsql-00001_1-1-02_p

17.4 Rules and notes

Organization of this section

(1) Rules

(2) Notes

(1) Rules

The access path display utility can be executed at any time, whether or not HiRDB is active.

The access path display utility must be executed at the server machine containing the single server or front-end server that is accessed by the UAP subject to utility processing.

(2) Notes

(a) Notes about return code

For the pdvwopt utility, return code 0 indicates normal termination, and return code 8 indicates abnormal termination.

(b) Notes about collecting an access path information file

Specifying a value of 1 in the PDVWOPTMODE client environment definition variable increases the server's workload for creating an access path information file. Therefore, this value should be specified only when it is necessary to collect access path information. If output of access path information is specified with the UAP report facility, the server's workload may increase. For details about the UAP report facility, see the HiRDB Version 8UAP Development Guide.

If you specify a value of 1 in the PDVWOPTMODE client environment definition variable and if the SQL object being checked results in a cache hit, the utility uses the previously created SQL object because SQL optimization is not executed. Therefore, the utility does not obtain the access path information.

If you specify a value of 2 in the PDVWOPTMODE client environment definition variable, the utility obtains the access path information even when the SQL object being checked results in a cache hit. In this case, the utility creates SQL objects by executing SQL optimization regardless of the cache hit; therefore, the server's workload may be greater than when a value of 1 is specified in PDVWOPTMODE.

For an SQL statement specified in a stored procedure, executing the CALL statement does not obtain the access path information. In this case, one of the following actions must be taken in order to obtain access path information (a different access path might be obtained because the SQL object is re-created on the basis of current cost information):

Execute ALTER PROCEDURE to re-create the SQL object.

Delete the procedure with DROP PROCEDURE, then re-create the SQL object with CREATE PROCEDURE.

For a triggered SQL statement specified in a trigger, the utility does not obtain the access path information even if the trigger is executed. To obtain access path information for a triggered SQL statement, use the following method (note that the access path may be different from the previous path because the utility re-creates the SQL object on the basis of the current cost information):

Execute the ALTER TRIGGER statement to re-create the SQL object.

HiRDB does not delete access path information files. Any unneeded access path information files must be deleted by the user, taking care not to delete the SQL information directory ($PDDIR/spool/pdsqldump); if this directory is deleted, access path information files can no longer be created.

When you define in CREATE TABLE a referencing table for which CASCADE is specified as the referential constraint action, an internal trigger is created; therefore, access path information is acquired when such a referencing table is defined.

For the trigger created when a referencing table is defined, no access path information is acquired even when the trigger is executed. In this case, execute ALTER ROUTINE to re-create the SQL object and then acquire access path information. Note that the acquired access path may not match the existing access path because the SQL object is re-created on the basis of the current cost information.

If you execute the INSERT statement with VALUES specified, the utility acquires the access path information only when one of the following functions is executed:

Trigger

Referential constraint

Scalar subquery

(c) Notes about executing the access path display utility

The same version of the access path display utility and access path information file must be used; if their versions do not match, an error occurs.

(d) Notes on the output information in the output format

Internal system information in the execution results output by the access path display utility is enclosed in braces ({ }).

17.5 Output format

Version        :aa...a bb...bBES
UAP Name       :cc...c
Authorization  :dd...d
-------------------------------------------------------
Section No     :ee...e
UAP Source     :ff...f
Optimize Time  :gggg-gg-gg gg:gg:gg.gggggg
Optimize Mode  :hh...h
SQL Opt Level  :iiiiiiiiii(ii...i) = jj...j(kk...k),...
Add Opt Level  :llllllllll(ll...l) = mm...m(nn...n),...
Routine Name   :ss...s.ss...s
SQL            :oo...o
Work Table     :pp...p
Total Cost     :qq...q (including rr...r FOREIGN SERVER SCAN)
Trigger Name   :tt...t
                    Procedure Name :uu...u
                    Action Time    :vv...v(ww...w)
                    Action Type    :xx...xx
----- QUERY EXPRESSION BODY ID : ... -----  ...................1
 :
----- QUERY ID : ... ----- ....................................2
 :
JOIN  .........................................................3
 :
SCAN  .........................................................4
 :
---------- FOREIGN SERVER(PREDICATION) : ... ----------  ......5
 :

Explanation

Information about set operation; for details, see 17.5.2 Set operation information.

Information about query processing; for details see 17.5.3 Query processing information.

Information about join processing; for details, see 17.5.4 Join processing information.

Information about base table retrieval processing; for details, see 17.5.5 Base table retrieval processing information.

Information about foreign server retrieval processing (prediction). This information is displayed for each retrieval request issued to foreign servers. For details about foreign server retrieval (prediction) information, see 17.5.1 Foreign server retrieval processing (prediction) information.

Information following Section No is displayed as many times as there are SQL statements.

aa...a

Displays the HiRDB version. For a HiRDB update version, the version number is followed by a symbol.

bb...b

Displays the number of back-end servers for a HiRDB/Parallel Server. This information is not displayed for a HiRDB/Single Server.

cc...c

Displays the UAP name specified in the PDCLTAPNAME client environment variable.

dd...d

Displays the authorization identifier.

ee...e

Displays the section number (used to check the SQL statement correspondence).

ff...f

Displays the name of the UAP source file.

If the name is longer than 30 bytes, only the first 30 bytes are effective.

If the SQL was executed by the interactive SQL execution utility (pdsql), pdsql-process-ID, pdsql.exel-process-ID, or pdsqlwl-process-ID is used as the UAP source file name.

gggg-gg-gg gg:gg:gg.gggggg

Displays the date and time SQL optimization processing took place, in the format year-month-date hour:minute:second.microsecond.

hh...h

Displays the SQL optimization mode. For details about the SQL optimization mode, see the HiRDB Version 8UAP Development Guide.

COST_BASE_1
The utility applies the cost-based optimization mode 1.

COST_BASE_2
The utility applies the cost-based optimization mode 2.

iiiiiiiiii(ii...i) = jj...j(kk...k),...

Displays the value of the SQL optimization option during SQL compilation.

iiiiiiiiii(ii...i)
Displays the value of the SQL option in hexadecimal and in decimal (the latter in parentheses).

jj...j(kk...k),...
Displays the identifier of the function name specified in the SQL optimization option (unsigned integer). If more than one function name is specified, the utility separates each function by a comma.

llllllllll(ll...l) = mm...m(nn...n),...

Displays the value of the extended SQL optimization option during SQL compilation.

llllllllll(ll...l)
Displays the value of the extended SQL optimization option in hexadecimal and in decimal (the latter in parentheses).

mm...m(nn...n),...
Displays the identifier of the function name specified in the extended SQL optimization option (unsigned integer). If more than one function name is specified, the utility separates each function by a comma.

oo...o

Displays the compiled SQL statement.

pp...p

Displays the number of times a work table is created for the execution of the SQL statement. If no work table is to be created, the utility displays a value of 0.

If a sort operation does not take place, the utility creates only one work table. If a sort operation takes place, the utility creates two work tables.

Because the work table creation timing is not always the same, the execution of the SQL statement may require a smaller work table file than the estimated value. For details about how to estimate the work table file, see the HiRDB Version 8Installation and Design Guide.

If the query includes accesses to foreign tables, the utility displays the timing of creating work tables on the local HiRDB.

qq...q

Displays the total query cost obtained by HiRDB using cost-based optimization. This line is displayed only when the SQL optimization mode is cost-based optimization mode 2.

rr...r

If the query includes accesses to foreign tables, the utility displays the number of retrieval requests issued to foreign servers. If the query does not include access to foreign tables, this information is not displayed.

ss...s.ss...s

For an SQL statement in a routine, the utility displays the routine name in the format authorization-identifier.routine-identifier. If the SQL statement is not in a routine, this information is not displayed.

tt...t

Displays the name of the trigger to be executed by HiRDB. If there is no trigger to be executed, tt...t through xx...x are not displayed.

If there is more than one trigger to be executed, this information consists of multiple rows, in which case information is displayed in the order of execution.

uu...u

Displays the name of the trigger operation procedure.

vv...v

Displays the trigger operation timing:

BEFORE: Trigger to be executed before table manipulation

AFTER: Trigger to be executed after table manipulation

ww...w

For a trigger created when a referencing table is defined, this is the type of referential constraint action:

CASCADE
The referential constraint action is CASCADE.

xx...x

Displays the type of trigger operation units:

FOR EACH ROW
Trigger by row

FOR EACH STATEMENT
Trigger by statement

The following is an example of the output results from execution of a trigger by row with BEFORE (TRIGGER1) as the trigger operation timing, a trigger by statement with AFTER (TRIGGER2) as the trigger operation timing, and a trigger created when the referential constraint action was CASCADE (URA2004050521222324):

Trigger Name   : TRIGGER1
                    Procedure Name : (TRIG2003030405060708​)
                    Action Time    : BEFOR
                    Action Type    : FOR EACH ROW
                (URA2004050521222324​)
                    Procedure Name : (TRIG2004050521222324​)
                    Action Time    : AFTER(CASCADE)
                    Action Type    : FOR EACH ROW
                TRIGGER2
                    Procedure Name : (TRIG2003091011121314​)
                    Action Time    : AFTER
                    Action Type    : FOR EACH STATEMENT

Organization of this section

17.5.1 Foreign server retrieval processing (prediction) information

17.5.2 Set operation information

17.5.3 Query processing information

17.5.4 Join processing information

17.5.5 Base table retrieval processing information

17.5.6 Types of join methods

17.5.7 Types of retrieval methods

17.5.8 Types of transfer methods

17.5.9 Types of access paths

17.5.10 Types of grouping processing methods

17.5.11 Types of plug-in-provided functions

17.5.12 Search conditions

17.5.13 Key conditions

17.5.14 Types of ORDER BY processing methods

17.5.1 Foreign server retrieval processing (prediction) information

If a query includes accesses to foreign tables, access path information consists of information about the local HiRDB retrieval processing and information about the foreign server retrieval processing (prediction).

HiRDB first predicts the access path within the foreign server and obtains information about the foreign server retrieval processing (prediction). Next, based on this prediction, HiRDB determines information about the local HiRDB retrieval processing.

Information about the foreign server retrieval processing (prediction) is predicted by HiRDB in order to determine information about the local HiRDB retrieval processing; it is not the actual access path used for retrieval by the foreign DBMS. Information about the access path used by the foreign DBMS must be obtained at the foreign DBMS. If the foreign DBMS is a HiRDB, you can obtain the access path information file by executing an SQL statement with 1 or 2 specified in the PDVWOPTMODE operand of the foreign server definition.

--------- FOREIGN SERVER(PREDICTION) : aa...a ---------
 Derived Table  :bb...b
 Foreign Server :cc...c(dd...d) [ee...e ff...f]
 SQL            :gg...g
 Table Mapping  :hh...h(hh...h) [ii...i(ii...i)],...
 Var Mapping    :jj...j[kk...k],...
 Foreign Cost   :SERVER-ll...l,COMM-mm...m
 ----- QUERY EXPRESSION BODY ID : ... -----   ...........1
   :
 ----- QUERY ID : ... -----   ...........................2
   :
 JOIN   .................................................3
   :
 SCAN   .................................................4
   :

Explanation

Set operation information; for details, see 17.5.2 Set operation information.

Query processing information; for details, see 17.5.3 Query processing information.

Join processing information; for details, see 17.5.4 Join processing information.

Base table retrieval processing information; for details, see 17.5.5 Base table retrieval processing information.

aa...a

Displays the access number of the query that includes an access to a foreign table. The access number is assigned sequentially to each foreign server retrieval processing (prediction) information item beginning at 1.

bb...b

Displays the internally created table name (FOREIGNSQL table-number) for the result of retrieval from the foreign server. The table number is a sequential 3-digit integer beginning at 1.

cc...c(dd...d) [ee...e ff...f]

Displays information about the foreign server and foreign DBMS.

cc...c

Displays the name of the foreign server.

dd...d

Displays the name of the back-end server assigned to access the foreign server.

ee...e

Displays the server type of the foreign DBMS.

ff...f

Displays the server version of the foreign DBMS that was specified when the foreign server was defined.

gg...g

Displays the SQL statement that is issued to the foreign server.

Some SQL statement components are displayed using the foreign DBMS format and some are displayed without using the foreign DBMS format.

Components that are displayed using the foreign DBMS format:

Table identifier
The table identifier is converted to the actual table identifier defined in the foreign DBMS. If the table identifier defined in the foreign server is different from the table identifier defined in the foreign DBMS, the utility displays their correspondence in Table Mapping.

Variables
Embedded variables, ? parameters, SQL variables, SQL parameters, USER, CURRENT_DATE, CURRENT_TIME, and CURRENT_TIMESTAMP are converted to the foreign DBMS's variable format.
If a specified condition includes a column of another foreign table, the utility may convert it to the variable depending on the join method.
Correspondence of variables before and after conversion is displayed in Var Mapping.
If the foreign DBMS is ORACLE, :?-number is displayed for variables (?-number: sequential number assigned to :?-number, which is in the SQL statement issued to the foreign server, from left to right beginning at 1).

Components that are displayed without using the foreign DBMS format:

When executing actual retrieval, the utility issues to the foreign server an SQL statement in the format usable by the foreign DBMS.

Lock option
The utility specifies the lock option as required. The lock option is displayed in the format usable by HiRDB.

Update option
The utility adds the update option (FOR READ ONLY and FOR UPDATE clauses) as required and displays it in the format usable by HiRDB.

hh...h(hh...h)[ii...i(ii...i)],...

Displays the correspondence of the table identifier hh...h and correlation name (hh...h) contained in the SQL statement issued to the foreign server to the table identifier ii...i and correlation name (ii...i) contained in the SQL statement issued to the local HiRDB. If the correlation name is not used, neither (hh...h) nor (ii...i) is displayed.

If there is more than one table, each set of information is separated by a comma.

If the table identifiers are the same in both SQL statements, the correspondence is not displayed (same applies to the correlation names).

jj...j[kk...k],...

Displays the correspondence between the variable jj...j contained in the SQL statement issued to the foreign server and the embedded variable, ? parameter, SQL variable, SQL parameter, USER, CURRENT_DATE, CURRENT_TIME, or CURRENT_TIMESTAMP, or column specification kk...k contained in the SQL statement issued to the local HiRDB.

If there is more than one variable, each set of information is separated by a comma.

If the foreign DBMS is ORACLE, :?-number is displayed for variable jj...j; otherwise, ?(?-number) is displayed for variable jj...j (?-number: sequential number assigned to :?-number, which is in the SQL statement issued to the foreign server, from left to right beginning at 1).

For kk...k, the actual value specified in the SQL statement is usually displayed as is, but in the case of an embedded variable or ? parameter, ?(?-number) is displayed (?-number: sequential number assigned to the embedded variable or ? parameter, which is in the SQL statement issued to the local HiRDB, from left to right beginning at 1).

SERVER-ll...l,COMM-mm...m

Displays the predicted cost for the access to the foreign server.

ll...l

Displays the predicated cost for foreign server internal processing.

mm...m

Displays the predicted cost for communication from the foreign server to the local HiRDB.

17.5.2 Set operation information

----- QUERY EXPRESSION BODY ID : aa...a -----
Query Exp Type : bb...b cc...c(cc...c)  dd...d{AA...A}
Sub Query Type : ee...e{BB...B} [ff...f]
Transfer Type  : gg...g-CLM hh...h
Order by Mode  : ii...i
FLT Server     : jj...j
SetOpe Process : kk...k = [ll...l mm...m{CC...C}] nn...n [ll...l mm...m{CC...C}]
                    :

Explanation

aa...a

Displays the ID of the query expression.

The utility assigns a new number to each query expression including Set Operation. If the compiled SQL statement consists of multiple query expressions, information is separated by this line.

bb...b

Displays the type of query expression:

QUERY

Query

DERIVED TABLE

Derived table query when a query expression was specified in the FROM clause

SUBQUERY

Subquery

WITH

WITH clause query

VIEW

View definition query

FOREIGN

Query for accessing the foreign server

cc...c(cc...c)

One of the following, depending on the type of query expression:

Name of the WITH clause query (correlation name) for a WITH clause query expression

Name of the view table (correlation name) for a view definition query expression

(NO NAME) or (NO NAME)(correlation-name) for a query expression in the derived table that was specified in the FROM clause

dd...d{AA...A}

Displays information when a work table is to be created for the set operation result. This information is not displayed if no work table is created.

If work table creation does not accompany a sort operation, the utility displays LIST.

If work table creation accompanies a sort operation, the utility displays LIST(SORT).

ee...e

Displays the subquery execution method (for details, see Execution of subqueries with no external reference and Execution of subqueries with external reference in the HiRDB Version 8 UAP Development Guide):

WORK TABLE ATS SUBQ

The subquery execution method is work table ATS.

WORK TABLE SUBQ

The subquery execution method is work table.

ROW VALUE SUBQ

The subquery execution method is row value.

HASH SUBQ

The subquery execution method is hash.

NESTED LOOPS WORK TABLE SUBQ

The subquery execution method is nested loop work table.

NESTED LOOPS ROW VALUE SUBQ

The subquery execution method is nested loop row value.

ff...f

When the SQL optimization specification is used for the subquery execution method, displays whether or not the specification took effect (for details, see the manual HiRDB Version 8 SQL Reference):

AS SPECIFIED

SQL optimization specification was applied because the specification took effect.

SPECIFICATION IGNORED

SQL optimization specification was ignored because the specification did not take effect.

gg...g-CLM hh...h

Displays the method for transferring the result to the high-order query for a subquery, WITH clause query expression, view definition, or query expression created internally by HiRDB.

gg...g displays the number of rows used for transfer, and hh...h displays the type of transfer method. For details about the transfer method types, see 17.5.8 Types of transfer methods.

ii...i

Displays the ORDER BY processing method for the set operation. When ORDER BY is not specified, this line is not displayed. For details about the ORDER BY processing method, see 17.5.14 Types of ORDER BY processing methods.

For a HiRDB/Single Server, the ORDER BY processing method for queries is also displayed as query processing information.

jj...j

Displays the number of floating servers requested for the set operation. If no floating server is needed, 0 is displayed. This item is not displayed for a HiRDB/Single Server.

kk...k = [ll...l mm...m{CC...C}] nn...n [ll...l mm...m{CC...C}]

Displays the order of set operations. When multiple set operations are specified, this item consists of multiple lines.

kk...k

Displays the set operation number in the set operation results, in the format "LID(set-operation-number)".

ll...l

Displays "QID(query-ID)" if the query expression to be joined is a query specification. If a join result of multiple query specifications is the query expression to be joined, this item displays "LID(set-operation-number)".

mm...m{CC...C}

Displays information to create a work table before a set operation is executed. If no work table is created, this item is not displayed.

If a work table is created without sorting, LIST is displayed; if a work table is created with sorting, LIST(SORT) is displayed.

If the LIMIT clause is specified and only the first n items are obtained from the sorting results in memory without creating a work table, MEM(SUBSORT) is displayed.

nn...n

Displays the type of set operation ("UNION", "UNION ALL", "EXCEPT", or "EXCEPT ALL"). [ll...l mm...m{CC...C}] before and after nn...n indicate the query expressions to be joined.

The following is a display example of the order of set operations:

((SELECT C1 FROM T1   ...................query-ID:1
   UNION SELECT C1 FROM T2)   ..........query-ID:2
     UNION ALL SELECT C1 FROM T3)   ....query-ID:3

SetOpe Process : LID(1) = [QID(1) LIST(SORT) {...}] UNION [QID(2) LIST(SORT) {...}]
                LID(2) = [LID(1) LIST{...}] UNION ALL [QID(3) LIST{...}]

17.5.3 Query processing information

----- QUERY ID : aa...a -----
Query Type     : bb...b cc...c(cc...c)  dd...d{AA...A},...
Sub Query Type : ee...e{BB...B}  [ff...f]
IfThenCnd      :{CC...C}
Transfer Type  : gg...g-CLM hh...h
Order by Mode  : ii...i
Having         :{DD...D}
Group by Mode  : jj...j
FLT Server     : kk...k(ll...l)  mm...m-CLM nn...n

Explanation

aa...a

Displays the query ID.

The utility assigns a number to each query specification. If the compiled SQL query consists of multiple query specifications, the information is separated by this line.

For a query that includes access to a foreign table, the query ID for foreign server retrieval processing (prediction) information is the same as the query ID that is assigned to the SQL statement issued to the local HiRDB.

bb...b

Displays the type of query.

QUERY

Query

DERIVED TABLE

Derived table query (if a query expression was specified in the FROM clause)

SUBQUERY

Subquery

WITH

WITH clause query

VIEW

View definition query

DUMMY

Query internally created by HiRDB

FOREIGN

Query for accessing the foreign server

CONSTRAINT

Subquery in the referential constraint conditions

cc...c(cc...c)

Displays the following, depending on the query type:

Name of the WITH clause query (correlation name) for a WITH clause query specification

Name of the view table (correlation name) for a view definition query expression

(NO NAME) or (NO NAME)(correlation-name) for a query expression in the derived table that was specified in the FROM clause

If HiRDB created a query internally, the utility displays (DUMMY work-table-number) as the name of the temporary work table created internally to store the query results. The work table number is a 3-digit integer.

Name of the constraint for a subquery in the referential constraint conditions.

dd...d{AA...A}

Displays information if a work table is to be created to retrieve data and execute GROUP BY, ORDER BY, DISTINCT, set operation, or lock processing, etc., on the join result as required. This information is not displayed if no work table is created.

If multiple work tables are created due to a combination of operations, the tables are separated by the comma.

If work table creation does not accompany sorting, the utility displays LIST; if work table creation accompanies sorting, the utility displays LIST(SORT).

When the LIMIT clause is specified, if the first n items in the sorting result are to be obtained in memory without creating a work table, the utility displays MEM(SUBSORT).

ee...e{BB...B}

Displays the subquery execution method. For details about the subquery execution method, see the HiRDB Version 8 UAP Development Guide.

WORK TABLE ATS SUBQ

The subquery execution method is work table ATS.

WORK TABLE SUBQ

The subquery execution method is work table.

ROW VALUE SUBQ

The subquery execution method is row value.

HASH SUBQ

The subquery execution method is hash.

NESTED LOOPS WORK TABLE SUBQ

The subquery execution method is nested loop work table.

NESTED LOOPS ROW VALUE SUBQ

The subquery execution method is nested loop row value.

ff...f

If the SQL optimization specification is used for the subquery execution method, this item displays whether or not the specification takes effect. For details about the SQL optimization specification, see the manual HiRDB Version 8 SQL Reference.

AS SPECIFIED: Takes effect

SPECIFICATION IGNORED: Ignored

gg...g-CLM hh...h

Displays the method for transferring the result to the high-order query for a subquery, WITH clause query, view definition query, set operation, or query created internally by HiRDB. gg...g displays the number of rows used for transfer, and hh...h displays the type of transfer method. For details about the types of transfer methods, see 17.5.8 Types of transfer methods.

ii...i

Displays the ORDER BY processing method. The utility may execute ORDER BY processing implicitly even if the ORDER BY clause is not specified. For details about the ORDER BY processing method, see 17.5.14 Types of ORDER BY processing methods.

If ORDER BY processing does not take place, the utility does not display this line.

jj...j

Displays the grouping method (including implicit grouping). For details about the grouping methods, see 17.5.10 Types of grouping processing methods.

If grouping does not take place, the utility does not display this line.

kk...k

Displays the number of floating servers requested.

ll...l

Displays the purpose of using the floating servers.

During the retrieval, the utility uses all available floating servers within the number requested. This information is not displayed for a HiRDB/Single Server.

IMPLICIT GROUP BY

Purpose is to execute internal grouping for set function processing even if GROUP BY is not specified implicitly.

GROUP BY

Purpose is to execute grouping specified with GROUP BY.

DISTINCT

Purpose is to execute DISTINCT processing.

ORDER BY

Purpose is to execute ORDER BY processing.

FOR READ ONLY

Purpose is to process the FOR READ ONLY clause.

FOR UPDATE

Purpose is to process the FOR UPDATE clause.

FOR UPDATE OF

Purpose is to process FOR UPDATE OF column-name[,column-name]...

PRE-UPDATE DATA

Purpose is to allocate a floating server in order to reference pre-update data.

mm...m-CLM nn...n

Displays the method for transferring to the floating server. mm...m displays the number of rows used for transfer, and nn...n displays the type of transfer method. For details about the types of transfer methods, see 17.5.8 Types of transfer methods.

17.5.4 Join processing information

Organization of this subsection

(1) Join retrieval executed on a HiRDB/Single Server or HiRDB/Parallel Server (SELECT-APSL not used)

(2) Join retrieval executed on a HiRDB/Parallel Server (SELECT-APSL used)

(1) Join retrieval executed on a HiRDB/Single Server or HiRDB/Parallel Server (SELECT-APSL not used)

JOIN
 # Join ID     :aa...a
   L Join ID   : bb...b ff...f{BB...B}
   L Table     : cc...c(cc...c) dddddddddd(dd...d) ff...f{BB...B} {AA...A}
   L SubQ ID   : ee...e ff...f{BB...B}
   R Join ID   : gg...g kk...k{DD...D}
   R Table     : hh...h(hh...h) iiiiiiiiii(ii...i) kk...k{DD...D} {CC...C}
   R SubQ ID   : jj...j kk...k{DD...D}
   R SubQEX ID : tt...t kk...k{DD...D}
   JoinCnd     :{EE...E}
   Join Type   :ll...l-CLM mm...m(nn...n) oo...o-CLM pp...p(qq...q)  [rr...r]
   FLT Server  :ss...s
   RowCnd      :{FF...F}
   RowCndAfter :{GG...G}
   IfThenCndOn :{HH...H}
   IfThenCnd   :{II...I}

Explanation

aa...a

Displays the join processing ID.

The utility assigns this number to each join processing. If join processing is executed more than once, information about each join processing is separated by this line.

bb...b

If the left-hand term is another join result, the utility displays the corresponding join processing ID.

If the left-hand term is not a join result, the utility does not display this line.

cc...c(cc...c)

If the left-hand term is a table, the utility displays the table name (correlation name). The correlation name is not displayed if it is not used. Depending on the type of table, the following information is displayed:

Name of the query for a derived table in the WITH clause

Name of the view table (correlation name) for a view table

(NO NAME) or (NO NAME)(correlation-name) for a derived table that was specified in the FROM clause

If the join target is not a table, this line is not displayed.

dddddddddd(dd...d)

If the left-hand term is a table, the utility displays the table ID in hexadecimal and in decimal (the latter in parentheses).

If the left-hand term is not a table, the utility does not display this line.

ee...e

If the left-hand join target is a subquery, the utility displays the subquery ID.

If the join target is not a subquery, this line is not displayed.

ff...f{BB...B}

Displays information if a work table is to be created before join processing. This information is not displayed if no work table is created.

If work table creation does not accompany a sort operation, the utility displays LIST. If work table creation accompanies a sort operation, the utility displays LIST(SORT).

gg...g

If the right-hand term is another join result, the utility displays the corresponding join processing ID.

If the right-hand term is not a join result, the utility does not display this line.

hh...h(hh...h)

If the right-hand term is a table, the utility displays the table name (correlation name).The correlation name is not displayed if it is not used. Depending on the type of table, the following information is displayed:

Name of the query for a derived table in the WITH clause

Name of the view table (correlation name) for a view table

(NO NAME) or (NO NAME)(correlation-name) for a derived table that was specified in the FROM clause

If the right-hand term is not a table, the utility does not display this line.

iiiiiiiiii(ii...i)

If the right-hand term is a table, the utility displays the table ID in hexadecimal and in decimal (the latter in parentheses).

If the right-hand term is not a table, the utility does not display this line.

jj...j

If the right-hand join target is a subquery that includes no set operation, the utility displays the subquery ID. If the join target is not a subquery that includes no set operation, this line is not displayed.

kk...k{DD...D}

Displays information if a work table is to be created before executing join processing. This information is not displayed if no work table is created.

If work table creation does not accompany a sort operation, the utility displays LIST. If work table creation accompanies a sort operation, the utility displays LIST(SORT).

ll...l-CLM mm...m(nn...n)

Displays the join method:

ll...l

Displays the number of join conditions (number of columns) used for join processing.

mm...m

Displays the type of join method. For details about types of join methods, see 17.5.6 Types of join methods.

nn...n

Displays the execution type of join processing:

INNER
Inner join. The utility evaluates the retrieval condition and returns the join result if the condition is true.

LEFT OUTER
Left outer join. The utility evaluates the ON retrieval condition and returns the join result if the condition is true. If none of the inner table's rows is true for the outer table's row, the utility fills the null value in the inner table's column and returns the join result.

EXIST
The utility evaluates the retrieval condition and returns the outer table's row if at least one of the rows in the inner table is true for the outer table's row.

NOT EXIST
The utility evaluates the retrieval condition and returns the outer table's row if none of the rows in the inner table is true for the outer table's row.

ALL
The utility evaluates the retrieval condition and returns the outer table's row if all rows in the inner table are true for the outer table's row.

VALUE
The utility evaluates the retrieval condition and returns the outer table's row if only one of the rows in the inner table is true for the outer table's row. If more than one row in the inner table is true, an error results.

oo...o-CLM pp...p(qq...q)

Displays the method for transferring to the server used for join processing:

oo...o

Displays the number of columns used for transfer.

pp...p

Displays the type of transfer method. For details about types of transfer methods, see 17.5.8 Types of transfer methods.

qq...q

Displays the transfer direction:

FROM L TO R
Transfers from left to right to achieve join processing.

FROM R TO L
Transfers from right to left to achieve join processing.

TO FLT
Transfers both left- and right-hand terms to the floating server to achieve join processing.

rr...r

If the SQL optimization specification is used for the join method, this item displays whether or not the specification takes effect. For details about the SQL optimization specification, see the manual HiRDB Version 8 SQL Reference.

AS SPECIFIED: Takes effect

SPECIFICATION IGNORED: Ignored

ss...s

Displays the number of floating servers requested for sort processing on the HiRDB/Parallel Server. During the retrieval, the utility uses all available floating servers within the number requested. If the join method is NESTED LOOPS JOIN, this value is 0. This information is not displayed for a HiRDB/Single Server.

tt...t

If the right-hand join target is a subquery that includes a set operation, the utility displays the subquery ID.

If the join target is not a subquery containing a set operation, this line is not displayed.

(2) Join retrieval executed on a HiRDB/Parallel Server (SELECT-APSL used)

JOIN
 # Join ID     :aa...a
   L Join ID   : bb...b ee...e{AA...A}
   L Table     : cc...c(cc...c) dddddddddd(dd...d)  ee...e{AA...A}
   R Join ID   : ff...f  ii...i{BB...B}
   R Table     : gg...g(gg...g) hhhhhhhhhh(hh...h)  ii...i{BB...B}
   JoinCnd     :{CC...C}
   Join Type   :SELECT-APSL
         Table Name   :jj...j(jj...j) kkkkkkkkkk(kk...k)
         Column ID    :llllllllll(ll...l)
         Predicate    :mm...m
         Threshold    :nn...n
      [1] oo...o-CLM pp...p(qq...q)  rr...r-CLM ss...s(tt...t) ........1
          FLT Server  :uu...u
          IfThenCnd   :{DD...D}
      [2] oo...o-CLM pp...p(qq...q)  rr...r-CLM ss...s(tt...t) ........2
          FLT Server  :uu...u
          IfThenCnd   :{DD...D}

Explanation

1 and 2 indicate the first candidate and second candidate, respectively, for the join method.

aa...a

Displays the join processing ID.

The utility assigns this number to each join processing. If join processing is executed more than once, information about each join processing is separated by this line.

bb...b

If the left-hand term is another join result, the utility displays the corresponding join processing ID.

If the left-hand term is not a join result, the utility does not display this line.

cc...c(cc...c)

If the left-hand term is a table, the utility displays the table name (correlation name).

The correlation name is not displayed if it is not used. Depending on the type of table, the following information is displayed:

Name of the query for a derived table in the WITH clause

Name of the view table (correlation name) for a view table

(NO NAME) or (NO NAME)(correlation-name) for a derived table that was specified in the FROM clause

If the left-hand term is not a table, the utility does not display this line.

dddddddddd(dd...d)

If the left-hand term is a table, the utility displays the table ID in hexadecimal and in decimal (the latter in parentheses).

If the left-hand term is not a table, the utility does not display this line.

ee...e{AA...A}

Displays information if a work table is to be created before join processing. This information is not displayed if no work table is created.

If work table creation does not accompany a sort operation, the utility displays LIST. If work table creation accompanies a sort operation, the utility displays LIST(SORT).

ff...f

If the right-hand term is another join result, the utility displays the corresponding join processing ID.

If the right-hand term is not a join result, the utility does not display this line.

gg...g(gg...g)

If the right-hand term is a table, the utility displays the table name (correlation name).

The correlation name is not displayed if it is not used. Depending on the type of table, the following information is displayed:

Name of the query for a derived table in the WITH clause

Name of the view table (correlation name) for a view table

(NO NAME) or (NO NAME)(correlation-name) for a derived table that was specified in the FROM clause

If the right-hand term is not a table, the utility does not display this line.

hhhhhhhhhh(hh...h)

If the right-hand term is a table, displays the table ID in hexadecimal and in decimal (the latter in parentheses).

If the right-hand term is not a table, the utility does not display this line.

ii...i{BB...B}

Displays information if a work table is to be created before join processing. This information is not displayed if no work table is created.

If work table creation does not accompany a sort operation, the utility displays LIST. If work table creation accompanies a sort operation, the utility displays LIST(SORT).

jj...j(jj...j)

Displays the table name (correlation name) for the column used in the predicate that is subject to calculation of the SQL run-time hit rate when selecting an SQL object.

kkkkkkkkkk(kk...k)

Displays in hexadecimal and in decimal (the latter in parentheses) the table ID for the column used in the predicate that is subject to calculation of the SQL run-time hit rate when selecting an SQL object.

llllllllll(ll...l)

Displays in hexadecimal and in decimal (the latter in parentheses) the column ID used in the predicate that is subject to calculation of the SQL run-time hit rate when selecting an SQL object.

mm...m

Displays the predicate subject to calculation of the SQL run-time hit rate when selecting an SQL object.

nn...n

Displays the reference hit rate for selecting an SQL object.

If the hit rate obtained from calculation is less than this value, the first candidate is used for the SQL object; if it is equal to or greater than this value, the second candidate is used for the SQL object.

oo...o-CLM pp...p(qq...q)

Displays the join method used:

oo...o

Displays the number of join conditions (number of columns) used for join processing.

pp...p

Displays the type of join method. For details about types of join methods, see 17.5.6 Types of join methods.

qq...q

Displays the execution type of join processing:

INNER: Inner join. The utility evaluates the retrieval condition and returns the join result if the condition is true.

rr...r-CLM ss...s(tt...t)

Displays the method for transferring to the server used for join processing:

rr...r

Displays the number of columns used for transfer.

ss...s

Displays the type of transfer method. For details about types of transfer methods, see 17.5.8 Types of transfer methods.

tt...t

Displays the transfer direction:

FROM L TO R
Transfers from left to right to achieve join processing.

FROM R TO L
Transfers from right to left to achieve join processing.

TO FLT
Transfers both left- and right-hand terms to the floating server to achieve join processing.

uu...u

Displays the number of floating servers requested for sort processing on the HiRDB/Parallel Server. During the retrieval, the utility uses all available floating servers within the number requested. If the join method is NESTED LOOPS JOIN, this value is 0. This information is not displayed for a HiRDB/Single Server.

17.5.5 Base table retrieval processing information

Organization of this subsection

(1) Base table retrieval executed on a HiRDB/Single Server or HiRDB/Parallel Server (SELECT-APSL not used) without using an index or using only one index

(2) Base table retrieval executed on a HiRDB/Single Server or a HiRDB/Parallel Server (SELECT-APSL not used) using at least two indexes

(3) Base table retrieval executed on a HiRDB/Parallel Server (SELECT-APSL used)

(4) Base table retrieval (SELECT-APSL used) combined with join processing (SELECT-APSL used) executed on a HiRDB/Parallel Server

(5) Work table created for a view table retrieval

(6) Work table created for a WITH clause

(7) Work table created for the derived table specified in the FROM clause

(8) Work table created internally by HiRDB

(9) When retrieving the result of a query to a foreign server

(10) SELECT-APSL used with a HiRDB/Single Server

(1) Base table retrieval executed on a HiRDB/Single Server or HiRDB/Parallel Server (SELECT-APSL not used) without using an index or using only one index

SCAN
 # Table Name  :aa...a(aa...a) bbbbbbbbbb(bb...b) (xx...x) cc...c{AA...A}
   Cost        :d(ee...eROW) {T-BB...B,I-CC...C,P-DD...D,AND-EE...E,OR-FF...F}
   RDAREA      :ff...f-CLM gg...g(hh...h) (ii...iRD/jj...jBES) [kkkk(kk...k),...] ll...l
   Rebalance   :mm...m
   Scan Type   :nn...n(oo...o)  [pp...p]
   Index Name  :qq...q rrrrrrrrrr(rr...r) (ss...s)tt...t
                     SearchCnd :uu...u[vv...v],...
                     KeyCnd    :ww...w
   RowCnd      :{HH...H}
   IfThenCnd   :{II...I}

Explanation

The RDAREA row is not displayed for retrieval processing information for a foreign table.

If the INSERT statement with VALUES specified was executed, the Scan Type line is not displayed.

aa...a(aa...a)

Displays the name of the table (correlation name) being retrieved.

The correlation name is not displayed if it is not used. If retrieval processing is executed more than once, information about each retrieval processing is separated by this line.

bbbbbbbbbb(bb...b)

Displays in hexadecimal and in decimal (the latter in parentheses) the ID of the table being retrieved.

cc...c{AA...A}

Displays information if a work table is to be created after data retrieval from the base table. This information is not displayed if no work table is created.

If work table creation does not accompany a sort operation, the utility displays LIST. If work table creation accompanies a sort operation, the utility displays LIST(SORT).

d

Displays whether or not optimization information is to be collected by the optimizing information collection utility (pdgetcst):

Y: Optimization information collected

N: Optimization information not collected

ee...e

Displays the number of table rows used by HiRDB to determine the access path.

The default value depends on the SQL optimization mode:

Cost-based optimization mode 1 or cost-based optimization mode 2 with a HiRDB/Single Server
10 million lines

Cost-based optimization mode 1 with a HiRDB/Parallel Server
10 million lines number of back-end servers containing the table storage RDAREAs

By executing the optimizing information collection utility (pdgetcst), you can change the number of table rows to be used by HiRDB to determine the access path.

ff...f

Displays the number of columns into which a table is divided.

gg...g

Displays the type of table partitioning:

NON DIVISION: not partitioned

KEY RANGE: key range partitioning (with storage conditions specified)

PARTITION: key range partitioning (with boundary values specified)

MULTIDIM PARTITION: matrix partitioning (with boundary values specified)

MULTIDIM: Matrix partitioning including hash partitioning

FLEXIBLE HASH: flexible hash partitioning without using the rebalancing facility

FIX HASH: fix hash partitioning without using the rebalancing facility

RB FLEXIBLE HASH: flexible hash partitioning using the rebalancing facility

RB FIX HASH: fix hash partitioning using the rebalancing facility

hh...h

Displays the hash function during hash partitioning. This information is not displayed when hash partitioning is not performed. This information is not displayed for matrix partitioning that includes hash partitioning.

(ii...iRD/jj...jBES)

ii...i displays the number of table partitions (number of RDAREAs) and jj...j displays the number of back-end servers containing these table storage RDAREAs.

For a non-partitioned table, ii...i displays a value of 1. /jj...jBES is not displayed for a HiRDB/Single Server.

kkkk(kk...k)

Displays the ID of the table storage RDAREA in hexadecimal and in decimal (the latter in parentheses).

If the table is partitioned, the utility displays as many RDAREA IDs as there are table partitions. To obtain the name of the RDAREA associated with a given RDAREA ID, execute the pddbls command.

ll...l

ALL

This is displayed when all RDAREAs defining a table are to be retrieved.

RESTRICTED

This is displayed when, among the RDAREAs defining the table, only those RDAREAs that can potentially contain the target data based on the specified search conditions are to be retrieved.

mm...m

Displays the rebalancing status for a table using the rebalancing facility.

This line is not displayed for a table that does not use the rebalancing facility. For details about the rebalancing facility, see the HiRDB Version 8 System Operation Guide.

NORMAL

This is the normal status or the status when ALTER TABLE was used to add an RDAREA but the rebalancing utility (pdrbal) has not been executed yet.

ON REBALANCE

This is the status when the table is being rebalanced (from the start to the end of rebalance operation).

nn...n

Displays the retrieval method to be used.

For details about types of retrieval methods, see 17.5.7 Types of retrieval methods.

oo...o

Displays the index retrieval method if Group by Mode is IMPLICIT MIN-MAX INDEX

MIN

The utility searches a retrieval range of the index in ascending order and stops the retrieval at the point where a row satisfying the retrieval condition is found.

MAX

The utility searches a retrieval range of the index in descending order and stops the retrieval at the point where a row satisfying the retrieval condition is found.

MIN,MAX

The utility first searches the index in ascending order to find the MIN value, then searches the index in descending order to find the MAX value.

The retrieval time is about twice as much as when either MIN or MAX is specified in the set function.

Because MIN and MAX use mutually opposite search directions, their index search ranges based on the search condition are also opposite. If both MIN and MAX are used, the utility displays the search range only or MIN.

pp...p

If the SQL optimization specification is used for the index used, this item displays whether or not the specification takes effect. For details about the SQL optimization specification, see the manual HiRDB Version 8 SQL Reference.

AS SPECIFIED: Takes effect

SPECIFICATION IGNORED: Ignored

PARTIALLY IGNORED: Part of the specification is ignored

qq...q

Displays the name of the index used for retrieval.

If no index is used for retrieval, the utility does not display this line.

rrrrrrrrrr(rr...r)

Displays the index ID used for retrieval in hexadecimal and in decimal (the latter in parentheses).

ss...s

Displays a combination of index attributes:

Numeric character: Number of columns composing the index

G: Plug-in index

U: Unique key index

C: Cluster key index

D: Partition key index or plug-in index

d: Non-partitioning key index partitioned in the server

E: Index including an exceptional key value

M: Index containing repetition columns

P: Primary key index

tt...t

Indexes other than the plug-in index:

The utility displays the index component column information by separating each column by a comma and enclosing the entire information item in parentheses.

The index component column information consists of the search direction and the name of the index component column.

As the search direction, + means that the component column is searched in ascending order while - means that it is searched in descending order.

Example

Searching component column 1 (C1) in ascending order and component column 2 (C2) in descending order:

(+C1,-C2)

Plug-in index:

The utility displays detailed information according to types of plug-in-provided functions. For details about the types of plug-in-provided functions, see 17.5.11 Types of plug-in-provided functions. For the function call, only the first argument is displayed.

Example 1

Searching component column 1 (C1) using a plug-in-provided function (WITHIN) with type SCAN TYPE:

WITHIN(C1,..)[SCAN TYPE]

Example 2

Searching component column 1 (C1) using a plug-in-provided function (CONTAINS) with type INDEX SCAN TYPE:

CONTAINS (C1,..)[INDEX SCAN TYPE]

Example 3

Searching component column 1 (C1) using a plug-in-provided function (SEARCHFEATUREDATA) with type FULL SCAN TYPE:

SEARCHFEATUREDATA (C1,..)[FULL SCAN TYPE]

uu...u[vv...v],..

Displays the type and narrowed range of search condition. For details about the search conditions, see 17.5.12 Search conditions.

If there is no search condition for a retrieval using an index, the utility displays NONE(FULL SCAN) during the index all-range search. If the Group by mode is IMPLICIT MIN-MAX INDEX, the utility displays NONE (when the search condition becomes true, the utility stops the search, in which case (FULL SCAN) is not displayed because this may not be the index all-range search).

The number of narrowed ranges may become 0 or 1 depending on the search condition. If there is no search condition for the first component column, but there are search conditions for the subsequent columns, the utility displays (FULL SCAN) following the narrowed range of search conditions.

ww...w

Displays the key condition. For details about key conditions, see 17.5.13 Key conditions.

If there is no key condition, the utility does not display this line.

xx...x

If a shared table is the search target, the utility displays SHARED; if not, the utility does not display this item.

(2) Base table retrieval executed on a HiRDB/Single Server or a HiRDB/Parallel Server (SELECT-APSL not used) using at least two indexes

SCAN
 # Table Name   :aa...a(aa...a) bbbbbbbbbb(bb...b) (CC...C) cc...c{DD...DD}
   Cost         :d (ee...eROW)  {T-EE...E,I-FF...F,P-GG...G,AND-HH...H,OR-II...I}
   RDAREA       :ff...f-CLM gg...g(hh...h) (ii...iRD/jj...jBES) [kkkk(kk...k),...] LL...L
   Rebalance    :mm...m
   Scan Type    :nn...n  [oo...o]
   Index Name   :pp...p = qq...q rrrrrrrrrr(rr...r) (ss...s) tt...t BB...B{KK...K}
                        Scan Type :uu...u
                        SearchCnd :vv...v[ww...w],...
                        KeyCnd    :xx...x
                        RowCnd    :{HH...H}
                        IfThenCnd :{NN...N}
                 pp...p = qq...q rrrrrrrrrr(rr...r) (ss...s) tt...t BB...B{KK...K}
                        Scan Type :uu...u
                        SearchCnd :vv...v[ww...w],...
                        KeyCnd    :xx...x
                        RowCnd    :{HH...H}
                        IfThenCnd :{NN...N}
                 pp...p = [yy...y zz...z{JJ...J}] AA...A[yy...y zz...z{JJ...J}]
   RowCnd       :{MM...M}
   IfThenCnd    :{OO...O}

Explanation

The RDAREA row is not displayed for retrieval processing information for a foreign table.

aa...a(aa...a)

Displays the name of the table (correlation name) being retrieved.

The correlation name is not displayed if it is not used. If retrieval processing is executed more than once, information about each retrieval processing is separated by this line.

bbbbbbbbbb(bb...b)

Displays in hexadecimal and in decimal (the latter in parentheses) the ID of the table being retrieved.

cc...c{DD...D}

Displays information if a work table is to be created after data retrieval from the base table. This information is not displayed if no work table is created.

If work table creation does not accompany a sort operation, the utility displays LIST. If work table creation accompanies a sort operation, the utility displays LIST(SORT).

d

Displays whether or not optimization information is to be collected by the optimizing information collection utility (pdgetcst):

Y: Optimization information collected

N: Optimization information not collected

ee...e

Displays the number of table rows used by HiRDB to determine the access path.

The default value depends on the SQL optimization mode:

Cost-based optimization mode 1 or cost-based optimization mode 2 with a HiRDB/Single Server
10 million lines

Cost-based optimization mode 1 with a HiRDB/Parallel Server
10 million lines number of back-end servers containing the table storage RDAREAs

By executing the optimizing information collection utility (pdgetcst), you can change the number of table rows to be used by HiRDB to determine the access path.

ff...f

Displays the number of columns into which a table is divided.

gg...g

Displays the type of table partitioning:

NON DIVISION: not partitioned

KEY RANGE: key range partitioning (with storage conditions specified)

PARTITION: key range partitioning (with boundary values specified)

MULTIDIM PARTITION: matrix partitioning (with boundary values specified)

MULTIDIM: Matrix partitioning including hash partitioning

FLEXIBLE HASH: flexible hash partitioning without using the rebalancing facility

FIX HASH: fix hash partitioning without using the rebalancing facility

RB FLEXIBLE HASH: flexible hash partitioning using the rebalancing facility

RB FIX HASH: fix hash partitioning using the rebalancing facility

hh...h

Displays the hash function during hash partitioning. This information is not displayed when hash partitioning is not performed. This information is not displayed for matrix partitioning that includes hash partitioning.

(ii...iRD/jj...jBES)

ii...i displays the number of table partitions (number of RDAREAs) and jj...j displays the number of back-end servers containing these table storage RDAREAs.

For a non-partitioned table, ii...i displays a value of 1. /jj...jBES is not displayed for a HiRDB/Single Server.

kkkk(kk...k)

Displays the ID of the table storage RDAREA in hexadecimal and in decimal (the latter in parentheses).

If the table is partitioned, the utility displays as many RDAREA IDs as there are table partitions. To obtain the name of the RDAREA associated with a given RDAREA ID, execute the pddbls command.

ll...l

ALL

This is displayed when all RDAREAs defining a table are to be retrieved.

RESTRICTED

This is displayed when, among the RDAREAs defining the table, only those RDAREAs that can potentially contain the target data based on the specified search conditions are to be retrieved.

mm...m

Displays the rebalancing status for a table using the rebalancing facility.

This line is not displayed for a table that does not use the rebalancing facility. For details about the rebalancing facility, see the HiRDB Version 8 System Operation Guide.

NORMAL

This is the normal status or the status when ALTER TABLE was used to add an RDAREA but the rebalancing utility (pdrbal) has not been executed yet.

ON REBALANCE

This is the status when the table is being rebalanced (from the start to the end of rebalance operation).

nn...n

Displays the retrieval method to be used.

For details about types of retrieval methods, see 17.5.7 Types of retrieval methods.

oo...o

If the SQL optimization specification is used for the index used, this item displays whether or not the specification takes effect. For details about the SQL optimization specification, see the manual HiRDB Version 8 SQL Reference.

AS SPECIFIED: Takes effect

SPECIFICATION IGNORED: Ignored

PARTIALLY IGNORED: Part of the specification is ignored

pp...p

Displays the work table number to be created for AND PLURAL INDEXES SCAN in the format LID(work-table-number).

qq...q

Displays the index name used to create a work table for AND PLURAL INDEXES SCAN or OR PLURAL INDEXES SCAN as many times as there are such indexes. For the work table created without using an index, the utility displays (NO USE).

rrrrrrrrrr(rr...r)

Displays the index ID used for retrieval in hexadecimal and in decimal (the latter in parentheses).

ss...s

Displays a combination of index attributes:

Numeric character: Number of columns composing the index

G: Plug-in index

U: Unique key index

C: Cluster key index

D: Partition key index or plug-in index

d: Non-partitioning key index partitioned in the server

E: Index including an exceptional key value

M: Index containing repetition columns

P: Primary key index

tt...t

Indexes other than the plug-in index:

The utility displays the index component column information by separating each column by a comma and enclosing the entire information item in parentheses.

The index component column information consists of the search direction and the name of the index component column.

As the search direction, + means that the component column is searched in ascending order while - means that it is searched in descending order.

Example

Searching component column 1 (C1) in the ascending order and component column 2 (C2) in the descending order:

(+C1,-C2)

Plug-in index:

The utility displays detailed information according to types of plug-in-provided functions. For details about the types of plug-in-provided functions, see 17.5.11 Types of plug-in-provided functions. For the function call, only the first argument is displayed.

Example 1

Searching component column 1 (C1) using a plug-in-provided function (WITHIN) with type SCAN TYPE:

WITHIN(C1,..)[SCAN TYPE]

Example 2

Searching component column 1 (C1) using a plug-in-provided function (CONTAINS) with type INDEX SCAN TYPE:

CONTAINS (C1,..)[INDEX SCAN TYPE]

Example 3

Searching component column 1 (C1) using a plug-in-provided function (SEARCHFEATUREDATA) with type FULL SCAN TYPE:

SEARCHFEATUREDATA (C1,..)[FULL SCAN TYPE]

uu...u

Displays the search method for creating each work table.

For details about the types of retrieval methods, see 17.5.7 Types of retrieval methods.

vv...v[ww...w],..

Displays the type and narrowed range of search condition. For details about the search conditions, see 17.5.12 Search conditions.

If there is no search condition for a retrieval using an index, the utility displays NONE(FULL SCAN) as the type of search condition.

The number of narrowed ranges may become 0 or 1 depending on the search condition. If there is no search condition for the first component column, but there are search conditions for the subsequent columns, the utility displays (FULL SCAN) following the narrowed range of search condition.

xx...x

Displays the key condition. For details about key conditions, see 17.5.13 Key conditions.

If there is no key condition, the utility does not display this line.

pp...p = [yy...y zz...z{JJ...J}] AA...A [yy...y zz...z{JJ...J}]

Displays the order in which work tables are created during AND PLURAL INDEXES SCAN. If more than two indexes are used for retrieval, this information is displayed for each work table.

pp...p displays the work table number in the format LID(work-table-number).

AA...A displays AND, OR, or ANDNOT as the type of operation performed on the work tables.

yy...y displays the input work table for the operation in the format LID(work-table-number).

For zz...z, the utility displays LIST if work table creation does not accompany sorting; it displays LIST(SORT) if work table creation accompanies sorting.

Example: The following SQL statement was executed for a table with indexes IX1(C1) and IX2(C2) defined:

where C1='A'                   work table number: 1
 or C2=between 'a' and 'z'   work table number: 2

If Scantype is AND PLURAL INDEXES SCAN, then the following result is output:

      :
   Scan Type    :AND PLURAL INDEXES SCAN
   Index Name   :LID(1)=IX1 (1) (+C1)
                        Scan Type :INDEX SCAN
                        SearchCnd :AT['A']
                 LID(2)=IX2 (1) (+C2)
                        Scan Type :INDEX SCAN
                        SearchCnd :RANGE(CS-CE) ['a','z']
                 LID(3)=[LID(1) LIST(SORT){..}] OR [LID(2) LIST(SORT){..}]

BB...B{KK...K}

If a work table is to be created after the table search separately from the work table for AND PLURAL INDEXES SCAN, the utility displays this information.

If the work table is to be created without sorting, the utility displays LIST for II...I. If work table creation involves sorting, the utility displays LIST(SORT) for II...I. If the work table is not to be created, the utility does not display this information.

CC...C

If a shared table is the search target, the utility displays SHARED; if not, the utility does not display this item.

(3) Base table retrieval executed on a HiRDB/Parallel Server (SELECT-APSL used)

SCAN
 # Table Name   :aa...a(aa...a) bbbbbbbbbb(bb...b) (zz...z)
   Cost         :c (dd...dROW) {T-AA...A,I-BB...B,P-CC...C,AND-DD...D,OR-EE...E}
   RDAREA       :ee...e-CLM ff...f(gg...g) (hh...hRD/ii...iBES) [jjjj(jj...j),...] kk...k
   Rebalance    :ll...l
   Scan Type    :SELECT-APSL
         Table Name   :mm...m(mm...m) nnnnnnnnnn(nn...n)
         Column ID    :oooooo(oo...o)
         Predicate    :pp...p
         Threshold    :qq...q
      [1] rr...r  ................................................1
           Index Name :ss...s tttttttttt(tt...t) (uu...u) vv...v
                          SearchCnd :ww...w[xx...x],...
                          KeyCnd    :yy...y
                          RowCnd    :{FF...F}
      [2] rr...r  ................................................2
           Index Name :ss...s tttttttttt(tt...t) (uu...u) vv...v
                          SearchCnd :ww...w[xx...x],...
                          KeyCnd    :yy...y
                          RowCnd    :{FF...F}
   IfThenCnd    :{GG...G}

Explanation

Nos. 1 and 2 indicate the first and second candidates, respectively, for the retrieval method. For details about the retrieval method, see 17.5.7 Types of retrieval methods.

The RDAREA row is not displayed for retrieval processing information for a foreign table.

aa...a(aa...a)

Displays the name of the table (correlation name) being retrieved.

The correlation name is not displayed if it is not used. If retrieval processing is executed more than once, information about each retrieval processing is separated by this line.

bbbbbbbbbb(bb...b)

Displays in hexadecimal and in decimal (the latter in parentheses) the ID of the table being retrieved.

c

Displays whether or not optimization information is to be collected by the optimizing information collection utility (pdgetcst):

Y: Optimization information collected

N: Optimization information not collected

dd...d

Displays the number of table rows used by HiRDB to determine the access path.

The default value depends on the SQL optimization mode:

Cost-based optimization mode 1 or cost-based optimization mode 2 with a HiRDB/Single Server
10 million lines

Cost-based optimization mode 1 with a HiRDB/Parallel Server
10 million lines number of back-end servers containing the table storage RDAREAs

By executing the optimizing information collection utility (pdgetcst), you can change the number of table rows to be used by HiRDB to determine the access path.

ee...e

Displays the number of columns into which a table is divided.

ff...f

Displays the type of table partitioning:

NON DIVISION: not partitioned

KEY RANGE: key range partitioning (with storage conditions specified)

PARTITION: key range partitioning (with boundary values specified)

MULTIDIM PARTITION: matrix partitioning (with boundary values specified)

MULTIDIM: Matrix partitioning including hash partitioning

FLEXIBLE HASH: flexible hash partitioning without using the rebalancing facility

FIX HASH: fix hash partitioning without using the rebalancing facility

RB FLEXIBLE HASH: flexible hash partitioning using the rebalancing facility

RB FIX HASH: fix hash partitioning using the rebalancing facility

gg...g

Displays the hash function during hash partitioning. This information is not displayed when hash partitioning is not performed. This information is not displayed for matrix partitioning that includes hash partitioning.

(hh...hRD/ii...iBES)

hh...h displays the number of table partitions (number of RDAREAs) and ii...i displays the number of back-end servers containing these table storage RDAREAs.

For a non-partitioned table, hh...h displays a value of 1. /ii...iBES is not displayed for a HiRDB/Single Server.

jjjj(jj...j)

Displays the ID of the table storage RDAREA in hexadecimal and in decimal (the latter in parentheses).

If the table is partitioned, the utility displays as many RDAREA IDs as there are table partitions. To obtain the name of the RDAREA associated with a given RDAREA ID, execute the pddbls command.

kk...k

ALL

This is displayed when all RDAREAs defining a table are to be retrieved.

RESTRICTED

This is displayed when, among the RDAREAs defining the table, only those RDAREAs that can potentially contain the target data based on the specified search conditions are to be retrieved.

ll...l

Displays the rebalancing status for a table using the rebalancing facility.

This line is not displayed for a table that does not use the rebalancing facility. For details about the rebalancing facility, see the HiRDB Version 8 System Operation Guide.

NORMAL

This is the normal status or the status when ALTER TABLE was used to add an RDAREA but the rebalancing utility (pdrbal) has not been executed yet.

ON REBALANCE

This is the status when the table is being rebalanced (from the start to the end of rebalance operation).

mm...m(mm...m)

Displays the table name (correlation name) for the column used in the predicate that is subject to calculation of the SQL run-time hit rate when selecting an SQL object.

nnnnnnnnnn(nn...n)

Displays in hexadecimal and in decimal (the latter in parentheses) the table ID for the column used in the predicate that is subject to calculation of the SQL run-time hit rate when selecting an SQL object.

oooooo(oo...o)

Displays in hexadecimal and in decimal (the latter in parentheses) the column ID used in the predicate that is subject to calculation of the SQL run-time hit rate when selecting an SQL object.

pp...p

Displays the predicate subject to calculation of the SQL run-time hit rate when selecting an SQL object.

qq...q

Displays the reference hit rate for selecting an SQL object.

If the hit rate obtained from calculation is less than this value, the first candidate is used for the SQL object; if it is equal to or greater than this value, the second candidate is used for the SQL object.

rr...r

Displays the retrieval method to be used.

For details about the types of retrieval methods, see 17.5.7 Types of retrieval methods.

ss...s

Displays the name of the index used for retrieval.

If no index is used for retrieval, the utility does not display this line.

tttttttttt(tt...t)

Displays the index ID used for retrieval in hexadecimal and in decimal (the latter in parentheses).

uu...u

Displays a combination of index attributes:

Numeric character: Number of columns composing the index

G: Plug-in index

U: Unique key index

C: Cluster key index

D: Partition key index or plug-in index

d: Non-partitioning key index partitioned in the server

E: Index including an exceptional key value

M: Index containing repetition columns

P: Primary key index

vv...v

The utility displays the index component column information by separating each column by a comma and enclosing the entire information item in parentheses.

The index component column information consists of the search direction and the name of the index component column.

As the search direction, + means that the component column is searched in ascending order while - means that it is searched in descending order.

Example

Searching component column 1 (C1) in ascending order and component column 2 (C2) in descending order:

(+C1,-C2)

ww...w[xx...x],..

Displays the type and narrowed range of search condition. For details about the search conditions, see 17.5.12 Search conditions.

If there is no search condition for a retrieval using an index, the utility displays NONE(FULL SCAN) as the type of search condition.

The number of narrowed ranges may become 0 or 1 depending on the search condition. If there is no search condition for the first component column, but there are search conditions for the subsequent columns, the utility displays (FULL SCAN) following the narrowed range of search conditions.

yy...y

Displays the key condition. For details about key conditions, see 17.5.13 Key conditions.

If there is no key condition, the utility does not display this line.

zz...z

If a shared table is the search target, the utility displays SHARED; if not, the utility does not display this item.

(4) Base table retrieval (SELECT-APSL used) combined with join processing (SELECT-APSL used) executed on a HiRDB/Parallel Server

SCAN
 # Table Name   :aa...a(aa...a) bbbbbbbbbb(bb...b) (AA...A)
   Cost         :c (dd...dROW) {T-BB...B,I-CC...C,P-DD...D,AND-EE...E,OR-FF...F}
   RDAREA       :ee...e-CLM ff...f(gg...g) (hh...hRD/ii...iBES) [jjjj(jj...j),...] kk...k
   Rebalance    :ll...l
   Scan Type    :SELECT-APSL
         Table Name   :mm...m(mm...m) nnnnnnnnnn(nn...n)
         Column ID    :oooooo(oo...o)
         Predicate    :pp...p
         Threshold    :qq...q
      [1] rr...r (ss...s)  ........................................1
           Index Name :tt...t uuuuuuuuuu(uu...u) (vv...v) ww...w
                          SearchCnd :xx...x[yy...y],...
                          KeyCnd    :zz...z
                          RowCnd    :{GG...G}
                          IfThenCnd :{HH...H}
      [2] SELECT-APSL (ss...s)  ...................................2
            Table Name   :mm...m(mm...m) nnnnnnnnnn(nn...n)
            Column ID    :oooooo(oo...o)
            Predicate    :pp...p
            Threshold    :qq...q
         [1] rr...r  ..............................................3
           Index Name :tt...t uuuuuuuuuu(uu...u) (vv...v) ww...w
                          SearchCnd :xx...x[yy...y],...
                          KeyCnd    :zz...z
           RowCnd     :{GG...G}
           IfThenCnd  :{HH...H}
         [2] rr...r  ..............................................4
           RowCnd     :{GG...G}
           IfThenCnd  :{HH...H}

Explanation

The RDAREA row is not displayed for retrieval processing information for a foreign table.

1 indicates the table retrieval method used when the first candidate is selected for the join method.

2 indicates the table retrieval method used when the second candidate is selected for the join method (SELECT-APSL).

3 indicates the first candidate for the table retrieval method when the second candidate is selected for the join method.

4 indicates the second candidate for the table retrieval method when the second candidate is selected for the join method.

aa...a(aa...a)

Displays the name of the table (correlation name) being retrieved.

The correlation name is not displayed if it is not used. If retrieval processing is executed more than once, information about each retrieval processing is separated by this line.

bbbbbbbbbb(bb...b)

Displays in hexadecimal and in decimal (the latter in parentheses) the ID of the table being retrieved.

c

Displays whether or not optimization information is to be collected by the optimizing information collection utility (pdgetcst):

Y: Optimization information collected

N: Optimization information not collected

dd...d

Displays the number of table rows used by HiRDB to determine the access path.

The default value depends on the SQL optimization mode:

Cost-based optimization mode 1 or cost-based optimization mode 2 with a HiRDB/Single Server
10 million lines

Cost-based optimization mode 1 with a HiRDB/Parallel Server
10 million lines number of back-end servers containing the table storage RDAREAs

By executing the optimizing information collection utility (pdgetcst), you can change the number of table rows to be used by HiRDB to determine the access path.

ee...e

Displays the number of columns into which a table is divided.

ff...f

Displays the type of table partitioning:

NON DIVISION: not partitioned

KEY RANGE: key range partitioning (with storage conditions specified)

PARTITION: key range partitioning (with boundary values specified)

MULTIDIM PARTITION: matrix partitioning (with boundary values specified)

MULTIDIM: Matrix partitioning including hash partitioning

FLEXIBLE HASH: flexible hash partitioning without using the rebalancing facility

FIX HASH: fix hash partitioning without using the rebalancing facility

RB FLEXIBLE HASH: flexible hash partitioning using the rebalancing facility

RB FIX HASH: fix hash partitioning using the rebalancing facility

gg...g

Displays the hash function during hash partitioning. This information is not displayed when hash partitioning is not performed. This information is not displayed for matrix partitioning that includes hash partitioning.

(hh...hRD/ii...iBES)

hh...h displays the number of table partitions (number of RDAREAs) and ii...i displays the number of back-end servers containing these table storage RDAREAs.

For a non-partitioned table, hh...h displays a value of 1. /ii...iBES is not displayed for a HiRDB/Single Server.

jjjj(jj...j)

Displays the ID of the table storage RDAREA in hexadecimal and in decimal (the latter in parentheses).

If the table is partitioned, the utility displays as many RDAREA IDs as there are table partitions. To obtain the name of the RDAREA associated with a given RDAREA ID, execute the pddbls command.

kk...k

ALL

This is displayed when all RDAREAs defining a table are to be retrieved.

RESTRICTED

This is displayed when, among the RDAREAs defining the table, only those RDAREAs that can potentially contain the target data based on the specified search conditions are to be retrieved.

ll...l

Displays the rebalancing status for a table using the rebalancing facility.

This line is not displayed for a table that does not use the rebalancing facility. For details about the rebalancing facility, see the HiRDB Version 8 System Operation Guide.

NORMAL

This is the normal status or the status when ALTER TABLE was used to add an RDAREA but the rebalancing utility (pdrbal) has not been executed yet.

ON REBALANCE

This is the status when the table is being rebalanced (from the start to the end of the rebalance operation).

mm...m(mm...m)

Displays the table name (correlation name) for the column used in the predicate that is subject to calculation of the SQL run-time hit rate when selecting an SQL object.

nnnnnnnnnn(nn...n)

Displays in hexadecimal and in decimal (the latter in parentheses) the table ID for the column used in the predicate that is subject to calculation of the SQL run-time hit rate when selecting an SQL object.

oooooo(oo...o)

Displays in hexadecimal and in decimal (the latter in parentheses) the column ID used in the predicate that is subject to calculation of the SQL run-time hit rate when selecting an SQL object.

pp...p

Displays the predicate subject to calculation of the SQL run-time hit rate when selecting an SQL object.

qq...q

Displays the reference hit rate for selecting an SQL object.

If the hit rate obtained from calculation is less than this value, the first candidate is used for the SQL object; if it is equal to or greater than this value, the second candidate is used for the SQL object.

rr...r

Displays the retrieval method to be used.

For details about the types of retrieval methods, see 17.5.7 Types of retrieval methods.

ss...s

Displays the join method corresponding to the retrieval processing.

For details about the types of join methods, see 17.5.6 Types of join methods.

tt...t

Displays the name of the index used for retrieval.

If no index is used for retrieval, the utility does not display this line.

uuuuuuuuuu(uu...u)

Displays the index ID used for retrieval in hexadecimal and in decimal (the latter in parentheses).

vv...v

Displays a combination of index attributes:

Numeric character: Number of columns composing the index

G: Plug-in index

U: Unique key index

C: Cluster key index

D: Partition key index or plug-in index

E: Index including an exceptional key value

M: Index containing repetition columns

P: Primary key index

ww...w

The utility displays the index component column information by separating each column by a comma and enclosing the entire information in parentheses.

The index component column information consists of the search direction and the name of the index component column.

As the search direction, + means that the component column is searched in ascending order while - means that it is searched in descending order.

Example

Searching component column 1 (C1) in ascending order and component column 2 (C2) in descending order:

(+C1,-C2)

xx...x[yy...y],...

Displays the type and narrowed range of a search condition. For details about the search conditions, see 17.5.12 Search conditions.

If there is no search condition for a retrieval using an index, the utility displays NONE(FULL SCAN) as the type of search condition.

The number of narrowed ranges may become 0 or 1 depending on the search condition. If there is no search condition for the first component column, but there are search conditions for the subsequent columns, the utility displays (FULL SCAN) following the narrowed range of search conditions.

zz...z

Displays the key condition. For details about key conditions, see 17.5.13 Key conditions.

If there is no key condition, the utility does not display this line.

AA...A

If a shared table is the search target, the utility displays SHARED; if not, the utility does not display this item.

(5) Work table created for a view table retrieval

SCAN
 # Table Name :aa...a(aa...a) bbbbbbbbbb(bb...b)  {AA...A}
   Cost       :(cc...cROW)  {T-BB...B}
   Scan Type  :dd...d
   RowCnd     :{CC...C}
   IfThenCnd  :{DD...D}

Explanation

aa...a(aa...a)

Displays the name of the view table (correlation name).

The correlation name is not displayed if it is not used.

bbbbbbbbbb(bb...b)

Displays in hexadecimal and in decimal (the latter in parentheses) the ID of the view table.

cc...c

Displays the number of table rows to be used by HiRDB to determine the access path.

dd...d

Displays LIST SCAN.

For details about LIST SCAN, see 17.5.7 Types of retrieval methods.

(6) Work table created for a WITH clause

SCAN
 # Table Name :aa...a(aa...a)  {AA...A}
   Cost       :(bb...bROW)  {T-BB...B}
   Scan Type  :cc...c
   RowCnd     :{CC...C}
   IfThenCnd  :{DD...D}

Explanation

aa...a(aa...a)

Displays the name of the WITH clause query (correlation name).

The correlation name is not displayed if it is not used.

bb...b

Displays the number of table rows to be used by HiRDB to determine the access path.

cc...c

Displays LIST SCAN.

For details about LIST SCAN, see 17.5.7 Types of retrieval methods.

(7) Work table created for the derived table specified in the FROM clause

SCAN
 # Table Name :aa...a(aa...a) {AA...A}
   Cost       :(bb...bROW)  {T-BB...B}
   Scan Type  :cc...c
   RowCnd     :{CC...C}
   IfThenCnd  :{DD...D}

Explanation

aa...a(aa...a)

Displays (NO NAME) or (NO NAME)(correlation-name).

bb...b

Displays the number of table rows to be used by HiRDB to determine the access path.

cc...c

Displays LIST SCAN.

For details about LIST SCAN, see 17.5.7 Types of retrieval methods.

(8) Work table created internally by HiRDB

SCAN
 # Table Name :aa...a  {AA...A}
   Cost       :(bb...bROW)  {T-BB...B}
   Scan Type  :cc...c
   RowCnd     :{CC...C}
   IfThenCnd  :{DD...D}

Explanation

aa...a

Displays the name of the work table created internally by HiRDB.

(DUMMY work-table-number) is the name of a temporary work table created internally by HiRDB. The work table number is a three-digit integer.

bb...b

Displays the number of table rows to be used by HiRDB to determine the access path.

cc...c

Displays LIST SCAN.

For details about LIST SCAN, see 17.5.7 Types of retrieval methods.

(9) When retrieving the result of a query to a foreign server

SCAN
 # Table Name :aa...a
   Cost       :(bb...bROW){AA...A}
   Scan Type  :cc...c
   RowCnd     :{BB...B}
   IfThenCnd  :{DD...D}

Explanation

aa...a

Displays the table identifier FOREIGNSQL table-number that was created internally in order to receive the results of a retrieval conducted on the foreign server from the local HiRDB.

table-number is a 3-digit integer assigned sequentially beginning at 1.

bb...b

Displays the predicted number of rows containing the retrieval result from the foreign server. This value is used to determine the access path at the local HiRDB.

For details about the predicted number of rows containing the retrieval result from the foreign server, see the HiRDB Version 8 UAP Development Guide.

cc...c

Displays the method for retrieving the result of the query to the foreign server.

For details about how to retrieve the results of queries to foreign servers, see 17.5.7 Types of retrieval methods.

(10) SELECT-APSL used with a HiRDB/Single Server

--- SELECT-APSL ---
  Table Name    :aa...a(aa...a) bbbbbbbbbb(bb...b)
  Column ID     :cccccc(cc...c)
  Predicate     :dd...d
  Threshold     :ee...e
[1]  ......................................................1
Section No     :ff...f
   :
[2]  ......................................................2
Section No     :ff...f
   :

Explanation

1 and 2 indicate the first candidate and second candidate, respectively, for the access path. For details about the types of access paths, see 17.5.9 Types of access paths.

For a HiRDB/Single Server, the single server creates two SQL objects for the entire SQL statement without executing SELECT-APSL for each join and retrieval processing.

aa...a(aa...a)

Displays the table name (correlation name) for the column used in the predicate that is subject to calculation of the SQL run-time hit rate when selecting an SQL object.

bbbbbbbbbb(bb...b)

Displays in hexadecimal and in decimal (the latter in parentheses) the table ID for the column used in the predicate that is subject to calculation of the SQL run-time hit rate when selecting an SQL object.

cccccc(cc...c)

Displays in hexadecimal and in decimal (the latter in parentheses) the column ID for the column used in the predicate that is subject to calculation of the SQL run-time hit rate when selecting an SQL object.

dd...d

Displays the predicate subject to calculation of the SQL run-time hit rate when selecting an SQL object.

ee...e

Displays the reference hit rate for selecting an SQL object.

If the hit rate obtained from calculation is less than this value, the first candidate is used for the SQL object; if it is equal to or greater than this value, the second candidate is used for the SQL object.

ff...f

Displays the section number (assigned to each SQL statement).

For a dynamic SQL statement, this value is 1.

17.5.6 Types of join methods

In the editing result, L indicates an outer table and R indicates an inner table. For details about the join methods, see the HiRDB Version 8 UAP Development Guide.

Organization of this subsection

(1) Merge join

(2) Nested loops join

(3) Hash join

(4) SELECT-APSL

(5) Distributed nest-loop-join

(6) Direct product

(1) Merge join

The merge join method is effective when the outer table cannot be narrowed down significantly.

SORT MERGE JOIN

This method retrieves rows from the outer and inner tables, creates a work table for each of them, sorts the rows in the work tables, then joins the rows satisfying the join conditions.

KEY SCAN MERGE JOIN

This method retrieves rows from the outer and inner tables by KEY SCAN and joins the rows satisfying the join conditions.

LIST SCAN MERGE JOIN

This method creates work tables from the outer and inner tables, retrieves rows in ascending order of the joined columns without sorting, then joins the rows satisfying the join conditions.

L-KEY R-LIST MERGE JOIN

This method retrieves rows from the outer table by KEY SCAN, creates a work table for the inner table and retrieves rows without sorting, then joins the rows satisfying the join conditions.

L-KEY R-SORT MERGE JOIN

The method retrieves rows from the outer table by KEY SCAN, creates a work table for the inner table and retrieves rows after sorting, then joins the rows satisfying the join conditions.

L-LIST R-KEY MERGE JOIN

This method creates a work table for the outer table and retrieves rows without sorting, retrieves rows from the inner table by KEY SCAN, then joins the rows satisfying the join conditions.

L-LIST R-SORT MERGE JOIN

This method creates a work table for the outer table and retrieves rows without sorting, creates a work table for the inner table and retrieves rows after sorting, then joins the rows satisfying the join conditions.

L-SORT R-KEY MERGE JOIN

This method creates a work table for the outer table and retrieves rows after sorting, retrieves rows from the inner table by KEY SCAN, then joins the rows satisfying the join conditions.

L-SORT R-LIST MERGE JOIN

This method creates a work table for the outer table and retrieves rows after sorting, creates a work table for the inner table and retrieves rows without sorting, then joins the rows satisfying the join conditions.

(2) Nested loops join

The nested loops join method is effective when an index is defined for the inner table and the outer table can be narrowed down.

NESTED LOOPS JOIN

This join method involves nested loop processing; that is, it retrieves one row at a time from the outer table, matches it with each row in the inner table, then retrieves the row if it satisfies the join conditions.

R-LIST NESTED LOOPS JOIN

This method first retrieves rows from the inner table and creates a work table. Next, it retrieves one row at a time from the outer table, matches it with each row of the work table that was created from the inner table, then retrieves the row if it satisfies the join conditions.

(3) Hash join

HASH JOIN{FOR EACH}

This method first creates a hash table by hashing with the value of joined columns in the inner table. Next, it retrieves one row at a time from the outer table and hashes it with the value of joined columns in the outer table, then matches the row with the hash table created from the inner table to join the row.

(4) SELECT-APSL

SELECT-APSL is a method for dynamically determining the join method during SQL execution.

SELECT-APSL (applicable only to HiRDB/Parallel Server)

If the specified conditions contain a ? parameter, the optimum join method may depend on the value of the ? parameter. The optimum join method cannot be selected during SQL optimization processing because the value of the ? parameter cannot be determined. This method selects a join method by calculating the hit rate during SQL execution.

(5) Distributed nest-loop-join

Distributed nest-loop-join is a method for using nested loop join when a foreign table is different from the inner table.

DISTRIBUTED NESTED LOOPS JOIN

This join method uses nested loop processing, which means that it retrieves rows from the outer table, executes an SQL statement to pass a row values in the outer table as a variable to the foreign server that contains the foreign table to be used as the inner table for each retrieved row, and then compares the rows to retrieve only those that satisfy the join conditions.

(6) Direct product

CROSS JOIN

This method joins all rows in the outer table and inner table. After joining the tables, it checks any condition involving two or more tables.

17.5.7 Types of retrieval methods

For details about the retrieval methods, see the HiRDB Version 8 UAP Development Guide.

Organization of this subsection

(1) Retrieval without using an index

(2) Retrieval using one index

(3) SELECT-APSL

(4) Retrieval using a multicolumn index

(5) Retrieval of work tables

(6) Retrieval using row identifier

(7) Retrieval of the result of queries to foreign servers

(1) Retrieval without using an index

TABLE SCAN

This method retrieves data pages in a table without using an index.

(2) Retrieval using one index

INDEX SCAN

This method narrows down the table by retrieving the index pages of a single-column index, then retrieves the data pages of the table.

KEY SCAN

This method retrieves only the index pages of a single-column index. It does not retrieve data pages.

MULTI COLUMNS INDEX SCAN

This method narrows down the table by retrieving the index pages of a multicolumn index, then retrieves the data pages of the table.

MULTI COLUMNS KEY SCAN

This method retrieves only the index pages of a multicolumn index. It does not retrieve data pages.

PLUGIN INDEX SCAN

This method retrieves table data pages after narrowing the search by using a plug-in index.

PLUGIN KEY SCAN

This method retrieves index pages by using a plug-in index only. It does not retrieve data pages.

(3) SELECT-APSL

SELECT-APSL (applicable only to HiRDB/Parallel Server)

If the specified conditions contain a ? parameter, the optimum join method may depend on the value of the ? parameter. The optimum join method cannot be selected during preprocessing because the value of the ? parameter cannot be determined. This method selects a join method by calculating the hit rate during SQL execution.

(4) Retrieval using a multicolumn index

AND PLURAL INDEXES SCAN

This method retrieves rows using each applicable index according to the search conditions concatenated by AND and OR operators, and stores the row identifiers (ROWID) in each work table. The method combines all work tables into one by obtaining the product set for the AND operators, the union for the OR operators, and the difference set for the ANDNOT operators (specifiable only in the ASSIGN LIST statement). Then it retrieves rows on the basis of the row identifiers in the work table.

When a work table of row identifiers is created from a given set of conditions, the utility may create the work table using TABLE SCAN, even when there is no index for condition columns.

OR PLURAL INDEXES SCAN

This method retrieves rows using each index according to the search conditions concatenated by OR operators, and stores row identifiers (ROWID) in a single work table. The method eliminates all duplicate rows from the work table, then retrieves rows on the row identifier.

When a work table for row position information is created from a given set of conditions, the utility may create the work table using TABLE SCAN, even when there is no index for condition columns.

(5) Retrieval of work tables

LIST SCAN

This method retrieves the work tables there are created internally.

(6) Retrieval using row identifier

ROWID FETCH

This method searches a table by using the row identifier (ROWID) as a key. The system does not execute this search if there is no need to fetch rows.

(7) Retrieval of the result of queries to foreign servers

FOREIGN SERVER SCAN

This method issues SQL statements to foreign servers to receive the results of a query.

FOREIGN SERVER LIMIT SCAN

This may be displayed when the function for retrieving the first n rows of the retrieval result is used. This method issues an SQL statement containing the ORDER BY clause to a foreign server and receives the first n rows of the query result.

17.5.8 Types of transfer methods

Organization of this subsection

(1) Key range transfer

(2) Hash transfer

(3) One-to-one transfer

(4) Matrix partitioning transfer

(5) Broadcast transfer

(6) Unicast transfer

(7) Partial key range broadcast transfer

(8) Partial broadcast transfer

(1) Key range transfer

KEY RANGE

This method selects the destination servers on the basis of key ranges.

(2) Hash transfer

HASH

This method selects the destination servers by hashing.

(3) One-to-one transfer

1 TO 1

This method selects the destination server that has a one-to-one relationship with the server at the origin.

(4) Matrix partitioning transfer

MULTIDIM

This transfer method determines the target server using all partitioning keys of a matrix-partitioned table, including hash partitioning.

(5) Broadcast transfer

BROADCAST

This method copies the data to be transferred and sends it to all servers at the destination.

(6) Unicast transfer

UNICAST

This method transfers data from the origin to a single destination server. The utility displays BROADCAST except for the Join Type section in the join processing information.

(7) Partial key range broadcast transfer

KEY RANGE PARTIAL BROADCAST

This method uses partial key ranges of a matrix-partitioned (boundary values) table to narrow down the destination servers, copies the origin data, and then sends it to all the resulting destination servers.

(8) Partial broadcast transfer

PARTIAL BROADCAST

This method uses part of the partitioning keys of a matrix-partitioned table including hash partitioning to narrow down the destination servers, copies the origin data, and then sends it to all the resulting destination servers.

17.5.9 Types of access paths

SELECT-APSL (applicable only to HiRDB/Single Server)

If the specified conditions contain a ? parameter, the optimum access path may depend on the value of the ? parameter. The optimum access path cannot be selected during SQL optimization processing because the value of the ? parameter cannot be determined. This method selects an access path by calculating the hit rate during SQL execution.

17.5.10 Types of grouping processing methods

Implicit grouping
This method specifies a set function in either a selection expression or a HAVING clause without specifying a GROUP BY clause in the query expression.

Explicit grouping
This method specifies a GROUP BY clause in the query expression.

Organization of this subsection

(1) HiRDB/Single Server

(2) HiRDB/Parallel Server

(1) HiRDB/Single Server

(a) Implicit grouping

IMPLICIT MIN-MAX INDEX

This method retrieves only the minimum and the maximum values of the index when determining the set functions MIN and MAX.

IMPLICIT SET FUNCTION SCAN{+}

This method obtains the result of the set function at the same time as retrieving a row.

IMPLICIT NORMAL

This method obtains the result of the set function after retrieving a row.

IMPLICIT LIST SORT{SET FUNCTION SCAN}

If DISTINCT is included in the set function, this method creates a work table and sorts it to eliminate duplicate values before obtaining the result of the set function.

IMPLICIT SURROGATE(COUNT)

This method obtains the result of the set function (number of rows) by using the surrogate function. The surrogate function achieves special processing; that is, it evaluates search conditions by calling a plug-in index and simultaneously determines the result of the set function internally in a plug-in-supplied function to rapidly return the results of the set function.

IMPLICIT SORT CANCEL BY INDEX{SET FUNCTION SCAN}

If the column specified in the DISTINCT set function can be sorted by searching the index without having to perform sort processing for the purpose of eliminating duplicates, this method omits the sort processing and obtains the result of the set function.

(b) Explicit grouping

SORT CANCEL BY INDEX{SET SCAN}

This method skips the sorting for grouping in situations in which the columns to be grouped can be sorted by retrieving their index.

SORT CANCEL BY JOIN

This method skips the sorting for grouping in situations in which the sorting for grouping purposes is cancelled by merge-join sorting.

HASH

This method uses the rapid grouping facility. For details about the rapid grouping facility, see the HiRDB Version 8 UAP Development Guide.

LIST SORT

This method obtains the result of grouping by creating a work table and sorting it.

PRE-SORT JOIN

In situations in which all the columns to be grouped are included in an outer table before it is joined or in an outer-joined table, this method sorts the pre-joined outer table or the result of the outer join, then performs grouping by joining the tables while maintaining their sort order, thereby determining the result of grouping.

(2) HiRDB/Parallel Server

(a) Implicit grouping

IMPLICIT MIN-MAX INDEX

This method retrieves only the minimum and the maximum values of the index on each back-end server when determining the set functions MIN and MAX.

IMPLICIT SET FUNCTION SCAN{+}

This method obtains the result of the set function on each back-end server at the same time as retrieving a row.

IMPLICIT NORMAL

This method obtains the result of the set function after retrieving a row on each back-end server.

IMPLICIT FLOATABLE

This method obtains the results of all set functions by collecting the results on a floatable server.

IMPLICIT FLOATABLE SORT{SET FUNCTION SCAN}

If DISTINCT is included in the set function, this method collects the results on a floatable server, creates a work table, and sorts them to eliminate duplicate values before obtaining the result of the set function.

IMPLICIT SURROGATE(COUNT)

This method determines the result of the set function (number of rows) for each back-end server by using the surrogate function. The surrogate function achieves special processing; that is, it evaluates search conditions by calling a plug-in index and simultaneously determines the result of the set function internally in a plug-in-supplied function to rapidly return the results of the set function.

IMPLICIT SORT CANCEL BY INDEX{SET FUNCTION SCAN}

If the column specified in the DISTINCT set function can be sorted by searching the index without having to perform sort processing for the purpose of eliminating duplicates, this method omits the sort processing and obtains the result of the set function.

IMPLICIT LIST SORT{SET FUNCTION SCAN}

If the set functions include DISTINCT, this method creates a work table at each back-end server, performs sorting to eliminate duplicates, and then obtains the result of the set function.

(b) Explicit grouping

SORT CANCEL BY INDEX{SET SCAN}

This method skips the sorting for grouping in situations in which the columns to be grouped can be sorted by retrieving their index.

SORT CANCEL BY JOIN

This method skips the sorting for grouping in situations in which the sorting for grouping purposes is cancelled by merge-join sorting.

HASH

This method obtains the result of grouping by using the rapid grouping facility. For details about the rapid grouping facility, see the HiRDB Version 8 UAP Development Guide.

LIST SORT

This method obtains the result of grouping by creating a work table on each back-end server and sorting the work table.

PRE-SORT JOIN

In situations in which all the columns to be grouped are included in an outer table before it is joined or in an outer-joined table, this method sorts the table, then performs grouping by joining the tables while maintaining their sort order, thereby determining the result of grouping.

FLOATABLE SORT

This method obtains the result of grouping by transferring data to multiple floating servers, creating a work table, and sorting the data in it.

17.5.11 Types of plug-in-provided functions

The plug-in-provided functions that use an index-type plug-in for retrieval are classified into three types according to plug-in index utilization conditions described as follows.

Organization of this subsection

(1) SCAN TYPE plug-in-provided function

(2) INDEX SCAN TYPE plug-in-provided function

(3) FULL SCAN TYPE plug-in-provided function

(1) SCAN TYPE plug-in-provided function

This type of plug-in-provided function uses a logical predicate to specify search conditions.

Normally a plug-in index is used for retrieval. However, a SCAN TYPE plug-in-provided function can work even when no plug-in index is defined, or when a plug-in index is not available during retrieval.

(2) INDEX SCAN TYPE plug-in-provided function

This type of plug-in-provided function uses a logical predicate (IS TRUE only) to specify search conditions. It always uses a plug-in index for retrieval. This is called an index-type plug-in-dedicated function.

An INDEX SCAN TYPE plug-in-provided function results in an error if a plug-in index is undefined or unavailable.

(3) FULL SCAN TYPE plug-in-provided function

This type of plug-in-provided function uses a logical predicate to specify search conditions.

If a plug-in index is defined, the index can be used for retrieval, but the entire range of index is searched. Therefore, if the condition is provided only by the FULL SCAN TYPE plug-in-provided function, the plug-in index is used for retrieval. If there is another condition, the function checks that condition to obtain the result without using the plug-in index.

17.5.12 Search conditions

Organization of this subsection

(1) Overview of search conditions

(2) Types of search conditions

(3) Values used in a narrowed range

(1) Overview of search conditions

SearchCnd:search-condition-type[narrowed-range],...

A search condition determines the range of index to be searched.

(a) Search condition specified

Example

where C1 between 'a' and 'z'

Note

The index component column to be used is C1.

(b) Search condition deleted during execution

If you specify an embedded variable, ? parameter, SQL variable, LIKE predicate containing an SQL parameter, or a SIMILAR predicate in a pattern character string, and the pattern character string given during execution results in right truncation, such as abc%, the utility can narrow the index search range. However, if the pattern character string results in left truncation such as %abc, the utility cannot narrow the index search range.

If the index search range cannot be narrowed due to the value of pattern character string provided during execution, the utility displays in diamond brackets (< >) the start and end values used to narrow the index range.

Example

where C1 LIKE ?

Where the data type of C1 is CHAR(5).

Note

The index component column to be used is C1.

Explanation:

If ? is abc%, the utility searches the range from X'6162630000' to X'616263ffff', where the character code a is X'61', b is X'62', and c is X'63'.

If ? is %abc, the utility searches the entire range of the index.

?(1) indicates the ? number. For details, see (3) Values used in a narrowed range.

(2) Types of search conditions

Table 17-1 lists the search conditions by type.

Table 17-1 Search conditions by type

Type of search condition
Characteristics
Condition for creating the type of search condition

Single-column index
Multicolumn index

IS NULL
Effective when there are only a few null key values.
There is a NULL predicate (IS NULL) in all index component columns.

IS NOT NULL
Effective when there are only a few non-null key values.
There is a NULL predicate (IS NULL) in the index component columns.
Not created

IS TRUE
Depends on the plug-in-provided function.
There is checking using a Boolean predicate (IS TRUE) for the execution result of a plug-in-provided function.
Not created

AT
Effective when there are only a few duplicates in the narrowing value.
There is a comparison predicate (=) in one or more index component columns and a NULL predicate (IS NULL) in all other index component columns.

RANGE
Effective when there are only a few narrowed ranges.
The index component column contains a comparison predicate (>, >=, <, <=), BETWEEN predicate, LIKE or SIMILAR predicate that results in right truncation.
For a multicolumn index, there is a comparison predicate (=) or a NULL predicate (IS NULL) in some of the index component columns.
This does not apply to RANGES.

ATS
Effective when there are only a few duplicates in the narrowing value and only a few narrowing values.
There is an IN (row-value-constructor³), IN (table-subquery), =ANY (table-subquery), or =SOME (table-subquery) in one or more index component columns,¹ and either a comparison predicate (=) or an IS NULL in all the other index component columns.
If the product of the narrowing values specified in IN (row-value-constructor³), IN (table-subquery), =ANY (table-subquery), or =SOME (table-subquery) exceeds 255, RANGES is assumed.²

RANGES
Effective when there are only a few items in the narrowed ranges and only a few narrowed ranges.
Note created
The index component column containing an IN (row-value-constructor³), IN (table-subquery), =ANY (table-subquery), or =SOME (table-subquery) is the first index component column;¹ or, if it is not the first index component column, all the index component columns preceding this index component column contain either comparison predicate (=) or IS NULL.
This does not apply to ATS.

1 If the SQL optimization mode being used is the optimizing mode based on cost 2, IN(table-subquery), =ANY(table-subquery), or =SOME(table-subquery) uses only one column for narrowing down the search range. If a multicolumn index is used and the SQL optimization mode in use is the optimizing mode based on cost 1, IN(table-subquery), =ANY(table-subquery), or =SOME(table-subquery) is not used for narrowing the search range.

2 The number of narrowing values for IN(row-value-constructor) is the number of row value constructors. It is 44 for IN(table-subquery), =ANY(table-subquery), and =SOME(table-subquery).

3 This is applicable if the row value constructor elements of all row value constructors are value specification, scalar subquery, or row subquery.

(a) IS NULL

IS NULL searches a range of index in which the value is null.

Note

The index component column to be used is C1.

Example

where C1 IS NULL
SearchCnd: IS NULL

(b) IS NOT NULL

IS NOT NULL searches a range of index in which the value is not null.

Note

The index component column to be used is C1.

Example

where C1 IS NOT NULL
SearchCnd: IS NOT NULL

(c) IS TRUE

IS TRUE is displayed for a retrieval using a plug-in index.

FULL SCAN TYPE plug-in-provided function

Note

The index component column to be used is feature.

Example

where SearchImageData (feature,? as blob(1M),
                      ? as varchar(1024))IS TRUE
  SearchCnd: IS TRUE

Other than FULL SCAN TYPE plug-in-provided function

Note

The index component column to be used is SENTENCES.

Example

where Contains (SENTENCES,'DOCUMENT_DATA[EFFECTS
               {"FOOD_POISONING"}]')IS TRUE
  SearchCnd: IS TRUE

(d) AT

Search condition type

AT[narrowing-value]:

Use AT to search the index for a specific value.

The search condition can be C1='a', C1=(Select C1 from T2), etc.

Note

The index component column to be used is C1.

Example

where C1='a'
  SearchCnd: AT ['a']

Narrowing value

AT for a single-column index

AT[value]:

Displays the value for a single-column index.

Example

where C1='a'
  SearchCnd: AT ['a']

Note: The index component columns to be used is C1.

AT for a multicolumn index

AT[(value,...,value)]:

For a multicolumn index, the utility displays the values sequentially from the first index component column by separating the values with the comma (,) and enclosing the entire set of values in parentheses.

Example 1

where C1='a' and C2='A'
  SearchCnd: AT [('a','A')]

Note: The index component columns to be used are C1 and C2.

Example 2

where (C1,C2) in (('a','A'))
       SearchCnd: AT [('a','A')]

Note: The index component columns to be used are C1 and C2.

Example 3

where (C1,C2) = ((select C1 from T2),(select C2 from T3))
       SearchCnd: AT [((SUBQ(2)),(SUBQ(3)))]

Note: The index component columns to be used are C1 and C2.

Example 4

where array(C1,C2) [any] ((C1,C2)=('a','A'))
       SearchCnd: AT [('a','A')]

Note: The index component columns to be used are C1 and C2.

(e) RANGE

Search condition type

Use RANGE to search an index in a narrowed range from the start value to the end value. RANGE is classified into four types depending on whether it includes the start value for the narrowed range and whether it includes the end value for the narrowed range. This information is displayed in the portion enclosed in double quotation marks ("") in RANGE(...).

Both start and end values of narrowed range included
RANGE(CS_CE)[narrowing-start-value,narrowing-end-value]:

The search condition can be C1>='a' and C1<='z', C1 between 'a' and 'z', C1 like 'a%', etc.

Example 1

where C1 >= 'a' and C1 <= 'z'
    SearchCnd: RANGE(CS-CE) ['a','z']

Note: The index component column to be used is C1.

Example 2

where C1 >= 'a'
    SearchCnd: RANGE(CS-CE) ['a',MAX]

Note: The index component column to be used is C1.

Example 3

where C1 <= 'a'
    SearchCnd: RANGE(CS-CE) [MIN,'a']

Note: The index component column to be used is C1.

Narrowing start value included, but narrowing end value not included
RANGE(CS_OE)[narrowing-start-value,narrowing-end-value]:
The search condition can be C1>='a' and C1<'z', etc.

Example 1

where C1 >= 'a' and C1 < 'z'
    SearchCnd: RANGE(CS-OE) ['a','z']

Note: The index component column to be used is C1.

Example 2

where C1 < 'a'
    SearchCnd: RANGE(CS-OE) [MIN,'a']

Note: The index component column to be used is C1.

Narrowing start value not included, but narrowing end value included
RANGE(OS_CE)[narrowing-start-value,narrowing-end-value]:
The search condition can be C1>='a' and C1<='z', etc.

Example 1

where C1 > 'a' and C1 <= 'z'
    SearchCnd: RANGE(OS-CE) ['a','z']

Note: The index component column to be used is C1.

Example 2

where C1 > 'a'
    SearchCnd: RANGE(OS-CE) ['a',MAX]

Note: The index component column to be used is C1.

Neither narrowing start value nor end value included
RANGE(OS_OE)[narrowing-start-value,narrowing-end-value]:
The search condition can be C1>='a' and C1<'z', etc.

Example

where C1 > 'a' and C1 < 'z'
  SearchCnd: RANGE(OS-OE) ['a','z']

Note: The index component column to be used is C1.

Narrowed range (narrowing-start-value, narrowing-end-value)

RANGE for a single-column index

RANGE (...) [value,value]:

For a single-column index, the utility displays the start and end positions of the narrowed range by separating them by a comma. ... in RANGE (...) depends on the search condition type.

Example

where C1 between 'a' and 'z'
  SearchCnd: RANGE(CS-CE) ['a','z']

Note: The index component column to be used is C1.

RANGE for a multicolumn index

RANGE (...) [(value,...,value),(value,...,value)]:

For a multicolumn index, the utility displays a set of values sequentially from the first index component column by separating each value by a comma (,) and enclosing the entire values in parentheses for the start position and for the end position, which are further separated by a comma. ... in RANGE (...) depends on the search condition type.

Example 1

where C1 = 'a' and C2 between 'A' and 'Z'
  SearchCnd: RANGE(CS-CE) [('a','A'),('a','Z')]

Note: The index component columns to be used are C1 and C2.

Example 2

where (C1,C2) between ('A', 'Z') and (select C1, C2 from T2)
       SearchCnd: RANGE(CS-CE)[( 'A', 'Z'),((SUBQ(2)),(SUBQ(2)))]

Note: The index component columns to be used are C1 and C2.

Example 3

where (C1,C2) > ('a', 'z') and (C1,C2) < ('A', 'Z')
       SearchCnd: RANGE(OS-OE)[( 'a', 'z'),( 'A', 'Z')]

Note: The index component columns to be used are C1 and C2.

Example 4

where array(C1,C2) [any] ((C1,C2)<( 'A', 'Z'))
       SearchCnd: RANGE(CS-OE)[(MIN,MIN),( 'A', 'Z')]

Note: The index component columns to be used are C1 and C2.

(f) ATS

Search condition type

ATS with multiple narrowing values

ATS[narrowing-value],...,[narrowing-value]:

Use ATS to search an index more than once using narrowing values.

An example of search condition is C1 in ('a', 'b', 'c').

Example

where C1 in ('a','b','c')
  SearchCnd: ATS ['a'],['b'],['c']

Note: The index component column to be used is C1.

ATS with a set of narrowing values

ATS [set-of-narrowing-values]:

Use this type of ATS to search an index more than once using a set of narrowing values (work table created from table subqueries).

Examples of search condition are C1=any(Select C1 from T2), C1=some(Select C1 from T2), and C1 in (Select C1 from T2).

Example

where C1 =any(select C1 from T2)
       SearchCnd:ATS [SUBQ(2)]

Note: The index component column to be used is C1.

ATS with multiple sets of narrowing values

ATS [set-of-narrowing-values], ... ,[set-of-narrowing-values]:

Use this type of ATS to search an index more than once using the result of combining sets of narrowing values (work table created from table subqueries) and the IN predicate.

An example of search condition is C1 in ('a','b','c') and C2=any(Select C1 from T2).

Example

where C1 in ('a','b','c') and C2=any(Select C1 from T2)
       SearchCnd: ATS [('a',(SUBQ(2)))],
                 [('b',(SUBQ(2)))],
                 [('c',(SUBQ(2)))]

Note: The index component columns to be used are C1 and C2.

Narrowing value or a set of narrowing values

ATS for a single-column index by multiple narrowing values

ATS [value], ... ,[value]:

Displays the values separated by the comma.

Example

where C1 in ('a','b','c')
       SearchCnd:ATS ['a'],['b'],['c']

Note: The index component column to be used is C1.

ATS for a single-column index by a set of narrowing values

ATS [(SUBQ(query-ID))-or-(SUBQEX(query-expression-ID))]:

Displays the ID of the specified table subquery or query expression.

Example

where C1 =any(select C1 from T2)
     SearchCnd: ATS [(SUBQ(2))]

Note: The index component column to be used is C1.

ATS for a multicolumn index by multiple narrowing values

ATS [(value,...,value)], ... ,[(value,...,value)]:

For a multicolumn index, a single narrowing value consists of the values that are sequentially separated by the comma from the top of the index component columns and then enclosed in its entirety in double quotation marks ("). More than one such narrowing value is displayed by separating them with the comma.

Example 1

where C1 in ('a','b') and C2 in ('A','B') and C3=1
       SearchCnd:ATS [('a','A',1)],[('a','B',1)],[('b','A',1)],[('b','B',1)]

Note: The index component columns to be used are C1, C2, and C3.

Example 2

where (C1,C2) in (('a','b'), ('A','B'))
       SearchCnd: ATS [('a','b'),( 'A','B')]

Note: The index component columns to be used are C1 and C2.

ATS for a multicolumn index by a set of narrowing values

ATS [(value,(SUBQ(query-ID)) or (SUBQEX(query-expression-ID)),...,value,(SUBQ(query-ID)) or (SUBQEX(query-expression-ID)))]

For a multicolumn index, a set of narrowing values consists of values or query IDs of table subqueries that are sequential and separated by the comma from the top of the index component columns and then enclosed in their entirety in double quotation marks (").

Example 1

where C1=any(select C1 from T2) and C2='a' and C3='A'
       SearchCnd: ATS [((SUBQ(2)),'a','A')]

Note: The index component columns to be used are C1, C2, and C3.

Example 2

where C1= 'a' and (C2,C3) in (select C2, C3 from T2)
       SearchCnd: ATS [('a',(SUBQ(2)),(SUBQ(2)))]

Note: The index component columns to be used are C1, C2, and C3.

ATS for a multicolumn index by multiple sets of narrowing values

ATS [(value,(SUBQ(query-ID)) or (SUBQEX(query-expression-ID)),...,value,(SUBQ(query-ID)) or (SUBQEX(query-expression-ID)))]

, ... ,[(value,(SUBQ(query-ID)) or (SUBQEX(query-expression-ID)),...,value,(SUBQ(query-ID)) or (SUBQEX(query-expression-ID)))]

For a multicolumn index, a set of narrowing values consists of the values or query IDs of table subqueries that are sequential and separated by the comma from the top of the index component columns and then enclosed in their entirety in double quotation marks ("). More than one set of such narrowing values is displayed by separating them with the comma.

Example

where C1=any(select C1 from T2) and C2 in ('a','b')
           and C3 in ('A','B')
       SearchCnd: ATS [((SUBQ(2)),'a','A')],[((SUBQ(2)),'a','B')],
                    [((SUBQ(2)),'b','A')],[((SUBQ(2)),'b','B')]

Note: The index component columns to be used are C1, C2, and C3.

(g) RANGES

Search condition types

RANGES is applicable to multicolumn indexes only. Use it to search a range of index narrowing values, from start value to end value, more than once.

RANGES is classified into three types depending on whether it includes the start value for the narrowed range and whether it includes the end value for the narrowed range. This information is displayed in the portion enclosed in double quotation marks ("") in RANGE(...).

RANGES by multiple narrowed ranges

RANGES(...) [narrowing-start-value,narrowing-end-value], ... ,[narrowing-start-value,narrowing-end-value]:

Use this type of RANGES to search an index more than once using narrowed ranges.

An example of a search condition is C1 in ('a','b','c') and C2 between 'A' and 'Z',C1 in ('a','b','c').

Example 1

where C1 in ('a','b','c') and C2 between 'A' and 'Z'
         SearchCnd: RANGES(CS-CE)
                      [('a','A'),('a','Z')],[('b','A'),('b','Z')],[('c','A'),('c','Z')]

Note: The index component columns to be used are C1 and C2.

Example 2

where C1 in ('a','b','c')
         SearchCnd: RANGES(CS-CE)
                      [('a',MIN),('a',MAX)],[('b',MIN),('b',MAX)],
                      [('c',MIN),('c',MAX)]

Note: The index component columns to be used are C1 and C2.

Example 3

where (C1,C2) in (('a', 'a'), ('b', 'b'))
         SearchCnd: RANGES(CS-CE)
                      [('a', 'a',MIN),( 'a', 'a',MAX)] ,
                      [('b', 'b',MIN),( 'b', 'b',MAX)]

Note: The index component columns to be used are C1, C2, and C3.

RANGES by a set of narrowed ranges

RANGES(...) [set-of-narrowing-start-value,set-of-narrowing-end-value]:

Use this type of RANGES to search an index more than once using a set of narrowed ranges (work table created from table subqueries).

An example of a search condition is C1 =any(select C1 from T2).

Example 1

where C1 =any(select C1 from T2)
       SearchCnd: RANGES(CS-CE)
                    [((SUBQ(2)),MIN),((SUBQ(2)),MAX)]

Note: The index component columns to be used are C1 and C2.

Example 2

where (C1,C2) = any(select C1, C2 from T2)
       SearchCnd: RANGES(CS-CE)
                    [((SUBQ(2)),(SUBQ(2)),MIN),((SUBQ(2)),
                    (SUBQ(2)),MAX)]

Note: The index component columns to be used are C1, C2, and C3.

RANGES by multiple sets of narrowed ranges

RANGES(...) [narrowing-start-value-or-set-of-narrowing-start-value,narrowing-end-value-or-set-of-narrowing-end-value], ... ,[narrowing-start-value-or-set-of-narrowing-start-value,narrowing-end-value-or-set-of-narrowing-end-value]:

Use this type of RANGES to search an index more than once using the result of combining sets of narrowed ranges (work table created from table subqueries) and the IN predicate.

An example of a search condition is C1 in ('a','b','c') and C2=any(Select C1 from T2).

Example 1

where C1 in ('a','b','c') and C2=any(Select C1 from T2)
       SearchCnd: RANGES(CS-CE)
                    [('a',(SUBQ(2)),MIN),('a',(SUBQ(2)),MAX)],
                    [('b',(SUBQ(2)),MIN),('b',(SUBQ(2)),MAX)],
                    [('c',(SUBQ(2)),MIN),('c',(SUBQ(2)),MAX)]

Note: The index component columns to be used are C1, C2, and C3.

Example 2

where C1 in ('a','b') and
(C2,C3)=any(Select C1,C2 from T2) and C4>'A'
       SearchCnd: RANGES(CS-CE)
                    [('a',(SUBQ(2)),(SUBQ(2)),'A'),
                    ('a',(SUBQ(2)),(SUBQ(2)),MAX)],
                    [('b',(SUBQ(2)),(SUBQ(2)),'A'),
                    ('b',(SUBQ(2)),(SUBQ(2)),MAX)]

Note: The index component columns to be used are C1, C2, C3, and C4.

(3) Values used in a narrowed range

(a) Literal

The utility displays a value if a literal is used to narrow the search condition. For details about the literal output format, see the HiRDB Version 8 SQL Reference.

If a LIKE or SIMILAR predicate is used to specify a pattern character string that results in right truncation, the literal is displayed as shown in Table 17-2.

Table 17-2 Display example and search range when LIKE predicate is used to specify a pattern character string that results in right truncation

Data type of column
Pattern character string
Output example of narrowed range based on search condition
Index search range*

Fixed length
(e.g., char(5))
Literal
RANGE(CS-CE) ['abc'00,'abc'ff]
(where 'abc%' is the literal)
For the character string found, eliminate the first '%' part or the part following '_', then fill 0s up to the defined length for the start value and fill fs up to the defined length for the end value.
X'6162630000​'
to X'616263ffff'

Embedded variable or ? parameter
RANGE(CS-CE) [<?(1)0>,<?(1)f>]
Fill one 0 for the start value and one 'f' for the end value.
X'6162630000​'
to X'616263ffff'
(? parameter is 'abc%'.)

SQL variable or SQL parameter (SQLVAR assumed as the name of SQL variable)
RANGE(CS-CE) [<SQLVAR0>,<SQLVARf>]
Fill one 0 for the start value and one 'f' for the end value.
X'6162630000​'
to X'616263ffff'
(SQL variable is 'abc%'.)

Variable length
(e.g., varchar(5))
Literal
RANGE(CS-CE) ['abc','abc'ff]
(where 'abc%' is the literal)
For the start value, eliminate the first '%' part or the part following '_'; for the end value, fill fs in the start value up to the defined value.
X'616263'
to X'616263ffff'

Embedded variable or ? parameter
RANGE(CS-CE) [<?(1)>,<?(1)f>]
Only for the end value, fill one f.
X'616263'
to X'616263ffff'
(? parameter is 'abc%'.)

SQL variable or SQL parameter (SQLVAR assumed as the name of SQL variable)
RANGE(CS-CE) [<SQLVAR>,<SQLVARf>]
Only for the end value, fill one f.
X'616263'
to X'616263ffff'
(SQL variable is 'abc%'.)

* Character code is X'61'for a, X'62'for b, and X'63'for c.

(b) ? (?-number)

The utility displays ? (?-number) for an embedded variable or ? parameter. ?-number is a sequence number assigned to each embedded variable or ? parameter in the SQL statement in the order it appears from left to right, beginning at number 1.

If a LIKE or SIMILAR predicate is used to specify a pattern character string that results in right truncation, ? is displayed as shown in Table 17-2.

(c) SQL variable name

The utility displays the name of an SQL variable.

If a LIKE or SIMILAR predicate is used to specify a pattern character string that results in right truncation, the SQL variable name is displayed as shown in Table 17-2.

(d) SQL parameter name

The utility displays the name of an SQL parameter.

If a column with new value correlation name and a column with old correlation name are used in a trigger SQL statement, the former is displayed as (NEWROW).column-name and the latter as (OLDROW).column-name.

If a LIKE or SIMILAR predicate is used to specify a pattern character string that results in right truncation, the SQL parameter name is displayed as shown in Table 17-2.

(e) USER

The utility displays the user when using USER to narrow the search condition.

(f) CURRENT DATE

The utility displays the current date when using CURRENT DATE to narrow the search condition.

(g) CURRENT TIME

The utility displays the current time when using CURRENT TIME to narrow the search condition.

(h) CURRENT_TIMESTAMP(p)

The utility displays CURRENT_TIMESTAMP(p) when using CURRENT_TIMESTAMP to narrow the search condition (p = 0, 2, 4, or 6).

(i) SUBQ(subquery-ID)

The utility displays SUBQ(subquery-ID) when using the result of a subquery that does not contain a set operation to narrow the search condition. The parentheses enclose the query ID.

(j) SUBQEX(query-expression-ID)

The utility displays SUBQEX(query-expression-ID) when using the result of a subquery that contains a set operation to narrow the search condition. The parentheses enclose the query ID.

(k) Set function

The utility displays set function when a set function is used to narrow the search condition.

(l) NULL

The utility displays NULL when using the null value to narrow the search condition.

(m) table-name.column-name

The utility displays table-name.column-name when using columns to narrow the search condition.

If the table name is a correlation name, the correlation name is displayed in parentheses instead.

(n) (NEW ROW).column-name

The utility displays (NEW ROW).column-name when using an insertion or updating value for a foreign key to narrow the search condition in a subquery that is created internally by HiRDB for checking constraints.

(o) table-name.column-name[subscript]

The utility displays table-name.column-name[subscript] when using repetition columns (subscript is an integer) to narrow the search condition.

If the table name is a correlation name, the correlation name is displayed in parentheses instead.

(p) MIN

The utility displays MIN to search for the smallest index key value (for a character string, the smallest character encoding).

(q) MAX

The utility displays MAX to search for the largest index key value (for a character string, the largest character encoding).

17.5.13 Key conditions

Organization of this subsection

(1) Overview of key conditions

(2) Predicates used in key conditions

(3) Values used in key conditions

(1) Overview of key conditions

KeyCnd: key-condition

A key condition makes evaluation possible only with the index component columns.

Given a key condition, the utility can evaluate the search condition only with the index pages without having to reference the data pages, thereby achieving high-speed retrieval. Evaluation based on key conditions is effective if it is conducted after narrowing the index search range by search conditions. If it is impossible to evaluate a predicate with the specified search conditions and key conditions, the utility evaluates it during data page retrieval.

To specify multiple key conditions, use AND and OR along with parentheses to indicate the priority levels of AND and OR.

(a) Both search condition and key condition specified

The utility narrows the index search range by the specified search condition, then conducts evaluation based on the specified key condition.

Example

where T1.C1 between 'a' and 'z' and T1.C1 like '%c'

(b) Only key condition specified

The utility conducts evaluation based on the specified key condition from the top to the end of the index. Because the utility needs to search the entire range of index, performance is lower than when both search and key conditions are specified.

Example

where T1.C1 like '%c'

(c) Key condition deleted during execution

If you specify an embedded variable, ? parameter, SQL variable, LIKE predicate containing an SQL parameter, or a SIMILAR predicate in a pattern character string, and the pattern character string given during execution is something such as abc%d, the utility searches as the search condition for values that begin with abc and determines as the key condition whether or not the value ends with d. If the pattern character string given during execution results in right truncation, such as 'abc%', the utility assumes that the condition can be evaluated simply by searching for a value that begins with 'abc' and does not evaluate the key condition during execution.

The utility displays in diamond brackets (< >) a key condition that can be deleted due to the value of pattern character string.

Example

where T1.C1 like ?

Where the value of the ? parameter is 'abc%' (data type of C1: CHAR(5)).

Explanation:

?: 'abc%'
The utility searches the range from X'6162630000' to X'616263ffff'. (The key condition is deleted).

?: 'abc%d'
The utility searches the range from X'6162630000' to X'616263ffff' and evaluates T1.C1 like 'abc%d' using the key condition.

?: '%abc'
The utility searches the entire range of the index and evaluates T1.C1 like '%abc' using the key condition (only the search condition is deleted; for details about the search conditions, see 17.5.12 Search conditions).

?(1) indicates the ? number. For details, see (3) Values used in key conditions.

(2) Predicates used in key conditions

This section presents the format of predicates that can be included in the key condition. You cannot use a quantified predicate or EXISTS predicate in a key condition. The examples of key conditions explained here may be used for search conditions to achieve high-speed retrieval depending on the index definition method.

(a) NULL predicate

value is null:

The utility evaluates to see whether the index key value is null.

Example

where T1.C1 is null
  KeyCnd: T1.C1 is null

value is not null:

The utility evaluates to see whether the index key value is not null.

Example

where T1.C1 is not null
  KeyCnd: T1.C1 is not null

(b) IN predicate

value in (value,value,..., value):

The utility evaluates to see whether the index key value matches any of the specified values.

Example

where T1.C1 in ('a','b','c')
  KeyCnd: T1.C1 in ('a','b','c')

value not in (value,value,..., value):

The utility evaluates to see whether the index key value matches none of the specified values.

Example

where T1.C1 not in ('a','b','c')
  KeyCnd: T1.C1 not in ('a','b','c')

(c) LIKE predicate

value like pattern-character-string[escape escape-character]:

The utility evaluates to see whether the index key value matches the specified pattern.

Example

where T1.C1 like '%a'
  KeyCnd: T1.C1 like '%a'

value not like pattern-character-string[escape escape-character]:

The utility evaluates to see whether the index key value does not match the specified pattern.

Example

where T1.C1 not like '%a\_' escape '\'
  KeyCnd: T1.C1 not like '%a\_' escape '\'

(d) XLIKE predicate

value xlike pattern-character-string[escape escape-character]:

The utility evaluates to see whether the index key value matches the specified pattern regardless of the case (uppercase or lowercase).

Example

where T1.C1 xlike '%a'
  KeyCnd: T1.C1 xlike '%a'

value not xlike pattern-character-string[escape escape-character]:

The utility evaluates to see whether the index key value does not match the specified pattern regardless of the case (uppercase or lowercase).

Example

where T1.C1 not xlike '%a\_' escape '\'
  KeyCnd: T1.C1 not xlike '%a\_' escape '\'

(e) BETWEEN predicate

value between value-1 and value-2:

The utility evaluates to see whether the index key value is in the range from value-1 to value-2. Note that not between is converted to a combination of a comparison predicate (<, >) and OR.

Example 1

where T1.C1 >= 'a' and T1.C1 <= 'z'
  KeyCnd: T1.C1 between 'a' and 'z'

Example 2

where T1.C1 not between 'a' and 'z'
  KeyCnd: T1.C1 < 'a' OR T1.C1 > 'z'

(f) Comparison predicate

value{=, <, <=, >, >=, <>}value:

The utility evaluates to see whether the index key value meets the comparison predicate (=, <, <=, >, >=, <>).

Example 1

where T1.C1=T1.C2
  KeyCnd: T1.C1=T1.C2

Example 2

where T1.C1=(select C1 from T2)
  KeyCnd: T1.C1=SUBQ(2)

(g) Structured repetition predicate

array(...)[any](key-condition):

From the conditions specified with a structured repetition predicate, the utility eliminates the conditions that can be evaluated by the search conditions, then displays the conditions to be evaluated by the key condition.

Example

where array(T1.C1,T1.C2)[any]
  (T1.C1<'a' or (T1.C1>'z' and T2.C2='a'))
  KeyCnd: array(...)[any]
       (T1.C1<'a' or (T1.C1>'z' and T2.C2='a'))

(h) SIMILAR predicate

value similar to pattern-character-string[escape escape-character]:

The utility evaluates whether the index key value matches the specified pattern.

Example: where T1.C1 similar to '%a'
  KeyCnd: T1.C1 similar to '%a'

value not similar to pattern-character-string[escape escape-character]:

The utility evaluates whether the index key value does not match the specified pattern.

Example: where T1.C1 not similar to '%a\_' escape '\'
  KeyCnd: T1.C1 not similar to '%a\_' escape '\'

(3) Values used in key conditions

(a) table-name.column-name

The utility displays table-name.column-name if a column name is specified in the key condition.

If the table name is a correlation name, the correlation name is displayed in parentheses instead.

(b) (NEW ROW).column-name

The utility displays (NEW ROW).column-name when using an insertion or updating value for a foreign key to narrow the search condition in a subquery that is created internally by HiRDB for checking constraints.

(c) table-name.column-name[subscript]

The utility displays table-name.column-name[subscript] if a repetition column (subscript is an integer or ANY) is specified in the key condition.

If the table name is a correlation name, the correlation name is displayed in parentheses instead.

(d) literal

The utility displays a value if a literal is specified in the key condition. For details about the literal output format, see the HiRDB Version 8 SQL Reference.

(e) ? (?-number)

The utility displays ? (?-number) if an embedded variable or ? parameter is specified in the key condition. ?-number is a sequence number assigned to each embedded variable or ? parameter in the SQL statement in the order it appears from left to right, beginning at number 1.

(f) SQL variable name

The utility displays the name of an SQL variable if it is specified in the key condition.

(g) SQL parameter name

The utility displays the name of an SQL parameter if it is specified in the key condition.

If a column with new value correlation name and a column with old correlation name are used in a trigger SQL statement, the former is displayed as (NEWROW).column-name and the latter as (OLDROW).column-name.

(h) USER

The utility displays the user if USER is specified in the key condition.

(i) CURRENT DATE

The utility displays the current date if CURRENT DATE is specified in the key condition.

(j) CURRENT TIME

The utility displays the current time if CURRENT TIME is specified in the key condition.

(k) CURRENT_TIMESTAMP(p)

The utility displays CURRENT_TIMESTAMP(p) if CURRENT_TIMESTAMP is used in the key condition (p = 0, 2, 4, or 6).

(l) (SUBQ(query-ID))

The utility displays SUBQ(query-ID) if a row subquery or a scalar subquery that does not contain a set operation is specified in the key condition. The parentheses enclose the query ID.

(m) SUBQEX(query-expression-ID)

The utility displays SUBQ(query-ID) if a row subquery or a scalar subquery that contains a set operation is specified in the key condition. The parentheses enclose the query ID.

(n) Scalar operation

The utility displays a scalar operation if it is specified in the key condition.

(o) row value constructor

The utility displays a row value constructor if it is specified in the key condition.

17.5.14 Types of ORDER BY processing methods

Organization of this subsection

(1) HiRDB/Single Server

(2) HiRDB/Parallel Server

(1) HiRDB/Single Server

The following processing methods are available to a HiRDB/Single Server:

SORT CANCEL BY INDEX[(LIMIT SCAN)]

This method skips the sorting for ORDER BY in situations in which the columns subject to ORDER BY can be sorted by retrieving their index.

If a function for obtaining the first n rows of a search result is used, the utility may display (LIMIT SCAN). In such a case, the utility searches only the first n rows of the index and obtains the first n rows of the search result.

SORT CANCEL BY JOIN

This method skips the sorting for ORDER BY in situations in which all columns subject to ORDER BY are specified in the join condition because merge-join sorting takes place.

SORT CANCEL BY DISTINCT[(LIMIT SCAN)]

This method skips the sorting for ORDER BY in situations in which all the value expressions subject to ORDER BY are sorted by DISTINCT processing.

If a function for obtaining the first n rows of a search result is used, the utility may display (LIMIT SCAN). In such a case, the utility obtains the first n rows of the DISTINCT processing result.

SORT CANCEL BY GROUPING[(LIMIT SCAN)]

This method skips the sorting for ORDER BY in situations in which all the columns subject to ORDER BY can be sorted by grouping.

If a function for obtaining the first n rows of search result is used, the utility may display (LIMIT SCAN). In such a case, the utility obtains the first n rows of the grouping processing result.

LIST SORT

This method obtains the result of ORDER BY by creating a work table and sorting it.

LIMIT SCAN

The utility may display this if a function for obtaining the first n rows of the search result is used. In such a case, the utility obtains the first n rows of the ORDER BY result by sorting only a limited number of rows, not all the rows that satisfy the search condition.

PRE-SORT JOIN

In situations in which all the columns or value expressions subject to ORDER BY are included in an outer table before it is joined or in an outer-joined table, this method executes sorting before the join operation, executes the join operation in the sorted order, then obtains the result of ORDER BY.

PRE-SORT SET OPERATION[(LIMIT SCAN)]

This method executes a sort operation for each query prior to a set operation to use the sorted order for operations. The method then obtains the result of ORDER BY and set operation.

If a function for obtaining the first n rows of the search result is used, the utility may display (LIMIT SCAN). In such a case, the utility performs the set operation until it obtains the first n rows and then obtains the first n rows of the result of the ORDER BY and the set operation.

SORT CANCEL FOR SAME VALUES

This method omits sort processing by ORDER BY when ORDER BY's target value expressions are all guaranteed to be the result of window functions and have the same value in all rows.

(2) HiRDB/Parallel Server

The following processing methods are available to a HiRDB/Parallel Server:

SORT CANCEL BY INDEX[(LIMIT SCAN)]

This method skips the sorting for ORDER BY in situations in which the columns subject to ORDER BY can be sorted by retrieving their index.

If a function for obtaining the first n rows of the search result is used, the utility may display (LIMIT SCAN). In such a case, the utility searches only the first n rows of the index and obtains the first n rows of the search result.

SORT CANCEL BY DISTINCT[(LIMIT SCAN)]

This method skips the sorting for ORDER BY in situations in which all the value expressions subject to ORDER BY are sorted by DISTINCT processing.

If a function for obtaining the first n rows of the search result is used, the utility may display (LIMIT SCAN). In such a case, the utility obtains the first n rows of the DISTINCT processing result.

SORT CANCEL BY GROUPING[(LIMIT SCAN)]

This method skips the sorting for ORDER BY in situations in which all the columns subject to ORDER BY can be sorted by grouping.

If a function for obtaining the first n rows of the search result is used, the utility may display (LIMIT SCAN). In such a case, the utility obtains the first n rows of the grouping processing result.

LIST SORT

This method obtains the result of ORDER BY by creating a work table and sorting it at each back-end server.

LIMIT SCAN

The utility may display this if a function for obtaining the first n rows of the search result is used. In such a case, the utility obtains the first n rows of the ORDER BY result by sorting only a limited number of rows, not all the rows that satisfy the search condition.

PRE-SORT JOIN

In situations in which all the columns or value expressions subject to ORDER BY are included in an outer table before it is joined or in an outer-joined table, this method executes sorting before join operation, executes join operation in the sorted order, then obtains the result of ORDER BY.

FLOATABLE SORT

This method obtains the result of ORDER BY by transferring data to multiple floating servers, creating a work table, and sorting the data in it.

LIST SORT WITH SET OPERATION[(LIMIT SCAN)]

This method executes the sorting for ORDER BY during a set operation without executing a sort operation for each query. The method then executes operation in the sorted order to obtain the result of ORDER BY and set operation.

If a function for obtaining the first n rows of the search result is used, the utility may display (LIMIT SCAN). In such a case, the utility performs the set operation until it obtains the first n rows and then obtains the first n rows of the result of the ORDER BY and the set operation.

SORT CANCEL FOR SAME VALUES

This method omits sort processing by ORDER BY when ORDER BY's target value expressions are all guaranteed to be the result of window functions and have the same value in all rows.

17.6 Concept of tuning

You can improve retrieval performance by modifying the SQL statements and index definitions on the basis of pdvwopt's output result.

Modifying the access path may not always result in improved performance, depending on the data characteristics. When modifying the access path, be sure to evaluate the performance.

For details about performance design with regard to accesses to foreign tables, see the HiRDB External Data Access Version 7 Description and User's Guide.

Organization of this section

17.6.1 Examples of tuning procedure

17.6.2 Notes about index definitions

17.6.3 Notes about index retrieval

17.6.4 Notes about join retrieval

17.6.1 Examples of tuning procedure

This section shows a sample tuning procedure based on pdvwopt's output result. Use the information provided in Sections 17.6.2 Notes about index definitions to 17.6.4 Notes about join retrieval as guidelines for tuning.

*****     Result of SQL Optimizer     *****
Version        : HiRDB/Parallel Server VV-RR 4BES
UAP Name       : pdsql   -----------------------> Is the UAP name correct?
UAP Source     : pdsql-21775
Authorization  : user1   -----------------------> Is the authorization identifier correct?
--------------------------------------------------------------------------------
Section No     : 1
Optimize Time  : 2001-01-07 10:59:16.591727  ---> Is the SQL statement execution time correct?
Optimize Mode  : COST_BASE_2
SQL Opt Level  : 0x00000420​(1056) = "PRIOR_NEST_JOIN"(32),"RAPID_GROUPING"(1024)
Add Opt Level  : 0x00000003​(3) = "COST_BASE_2"(1),"APPLY_HASH_JOIN"(2)
 ------------> Are the SQL optimization option and extended SQL optimization option optimum?¹
SQL            : select T1.C1,T1.C2 from T1,T2,T3
                    where T1.C1='a' and T1.C2 like '%A'
                      and T1.C1=T2.C1 and T1.C2=T2.C2 and T2.C3>=1995
                      and T1.C1=T3.C1 and T1.C2=T3.C2 order by T1.C2
                                             --> Is the SQL statement correct?
Work Table     : 3
Total Cost     : 3314.567244
----- QUERY ID : 1 -----
Query Type     : QUERY LIST(SORT) {LLID1(2)}
Order by Mode  : FLOATABLE SORT
FLT Server     : 2 (ORDER BY)  2-CLM 1TO1
JOIN
# Join  ID    : 1   ----------------------------> Are the tables joined in the expected order?
  L Table     :  T1
  R Table     :  T2
  Join Type   : 2-CLM NESTED LOOPS JOIN(INNER) BROADCAST(FROM L TO R)
-------------> Is it possible to change the inner table's partitioning key to something other than BROADCAST?²
  FLT Server  : 0
# Join  ID    : 2
  L Table     :  T3
  R Join ID   :  1 LIST{JRLST(1)}
  Join Type   : 2-CLM HASH JOIN(INNER) 1-CLM HASH(FROM R TO L)
-------------> Is this the expected join method?³
  FLT Server  : 0

SCAN
# Table Name  : T1
  Cost        : N (10000000​ROW) {T-2962.358541,I-763.682244,AND-766.202330}
  RDAREA      : NON DIVISION (1RD/1BES) [0x07(7)] ALL
  Scan Type   : MULTI COLUMNS KEY SCAN
  Index Name  : X1 (2) (+C2,+C1)   --------------> Is this the expected index?
                    SearchCnd : RANGE(CS-CE) [(MIN,'a    '),(MAX,'a    ')] (FULL SCAN)
                    -----------------------------> Is the search range narrowed?⁴
                    KeyCnd    : T1.C1='a    ' AND T1.C2 like '%A'
# Table Name  : T2
  Cost        : N (20000000​ROW) {T-1388.652368,I-408.252884,AND-2647.479838}
  RDAREA      : 1-CLM FIX HASH(HASH6) (2RD/2BES) [0x07(7),0x0d(13)] ALL
  Scan Type   : MULTI COLUMNS KEY SCAN
  Index Name  : X2 (3) (+C1,+C2,+C3)
                    SearchCnd : RANGE(CS-CE) [(T1.C1,T1.C2,1995),(T1.C1,T1.C2,MAX)]
# Table Name  : T3
  Cost        : N (20000000​ROW) {T-1621.172368}
  RDAREA      : 1-CLM FIX HASH(HASH6)(4RD/2BES)[0x07(7),0x08(8),0x0d(13),0x0e(14)]ALL
  Scan Type   : TABLE SCAN   ------------------> Is this the expected scan type?

Note

This output result is partially edited; it is not the actual display example.

¹ Check to see if the specified SQL optimization option and extended SQL optimization option are optimum to the database status. For details about the SQL optimization options and extended SQL optimization options, see the HiRDB Version 8 UAP Development Guide.

² If the transfer method is BROADCAST, KEY RANGE PARTIAL BROADCAST, or PARTIAL BROADCAST during the nested loop join, performance may improve if the inner table's partitioning key subject to nested loop join is changed to something other than BROADCAST, KEY RANGE PARTIAL BROADCAST, or PARTIAL BROADCAST.

For details, see 17.6.4(1) Nested loop join using a partitioning key.

Before change:

# Join  ID    : 1
  L Table     :  T1
  R Table     :  T2
  Join Type   : 2-CLM NESTED LOOPS JOIN(INNER) BROADCAST(FROM L TO R)
  FLT Server  : 0

Changing table T2's partitioning key to C1 (join key).

After change:

# Join  ID    : 1
  L Table     :  T1
  R Table     :  T2
  Join Type   : 2-CLM NESTED LOOPS JOIN(INNER) 1-CLM HASH(FROM L TO R)
  FLT Server  : 0

Use the column with the most even data distribution as the partitioning key. If there is no such column or multiple columns are joined, select more than one joined column as the partitioning key in such a manner that data becomes fairly even.

³ If the join result of T1 and T2 is narrowed down, you can improve the retrieval speed by applying a nested loop join to T3 and the join result of T1 and T2. Define multicolumn index T3 that contains all columns of T3 (C1, C2) from the join condition including the columns of T3 (T1.C1=T3.C1 and T1.C2=T3.C2). For details, see 17.6.2(2) Index definitions for a table used for join retrieval.

Before change:

# Join  ID    : 2
  L Table     :  T3
  R Join ID   :  1 LIST{JRLST(1)}
  Join Type   : 2-CLM HASH JOIN(INNER) 1-CLM HASH(FROM R TO L)
  FLT Server  : 0
                :
                :
                :
# Table Name  : T3
  Cost        : N (2000000000​ROW)  {T-1621.172368}
  RDAREA      : 1-CLM FIX HASH (HASH6)  (4RD/2BES) [...] ALL
  Scan Type   : TABLE SCAN

Defining an index for T3(C1, C2)

After change:

# Join  ID    : 2
  L Join ID   :  1
  R Table     :  T3
  Join Type   : 2-CLM NESTED LOOPS JOIN(INNER) 1-CLM HASH(FROM L TO R)
  FLT Server  : 0
                :
                :
                :
# Table Name  : T3
  Cost        : N (2000000000​ROW)  {T-1621.172368,T-1581.852884}
  RDAREA      : 1-CLM FIX HASH (HASH6)  (4RD/2BES) [...] ALL
  Scan Type   : MULTI COLUMNS KEY SCAN
  Index Name  : X3 (2D) (+C1,+C2)
                   SearchCnd : AT [(T1.C1,T1,C2)]

⁴ The utility searches the entire range of index because it cannot form the range of conditions for the first index component column. The utility reverses index component columns 1 and 2 because = is specified for the second index component column. For details, see 17.6.2(1) Index definitions.

Before change:

Index Name  : X1 (2) (+C2,+C1)
                   SearchCnd : RANGE(CS-CE) [(MIN,'a    '),(MAX,'a    ')] (FULL SCAN)
                   KeyCnd    : T1.C1='a    ' AND T1.C2 like '%A'

Deleting the index for T1(C2, C1) and defining an index for T3(C1,C2)

After change:

Index Name  : X1 (2) (+C1,+C2)
                   SearchCnd : RANGE(CS-CE) [('a    ',MIN),('a    '),MAX]
                   KeyCnd    : T1.C2 like '%A'

17.6.2 Notes about index definitions

Use the interactive SQL execution utility (HiRDB SQL Executer) to check the index definition information.

HiRDB SQL Executer available

To obtain a list of defined indexes, use HiRDB SQL Executer's INDEXES command. To obtain the names of index component columns from the index name, use the INDEXCLM command. For details, see HiRDB SQL Executer's README.

HiRDB SQL Executer not available

If HiRDB SQL Executer is not available, obtain the information by searching the data dictionary tables. Examples of searching the data dictionary tables are shown as follows. For details about the data dictionary tables, see the HiRDB Version 8 UAP Development Guide.

To obtain a list of defined indexes, retrieve SQL_INDEXES from the data dictionary tables:

SELECT INDEX_ID , INDEX_NAME , TABLE_NAME ,
       UNIQUE_TYPE , VALUE(ARRAY_TYPE,' ') , COLUMN_COUNT
 FROM MASTER.SQL_INDEXES
 WHERE TABLE_SCHEMA LIKE USER
 ORDER BY 1

To obtain index component columns from the index name, execute join retrieval of SQL_INDEX_COLINF and SQL_COLUMNS on the data dictionary tables:

SELECT Y.INDEX_ORDER , X.COLUMN_ID , X.COLUMN_NAME ,
        VALUE(X.MAX_ELM,1) , Y.ASC_DESC
 FROM MASTER.SQL_COLUMNS X , MASTER.SQL_INDEX_COLINF Y
 WHERE X.TABLE_SCHEMA = Y.TABLE_SCHEMA
   AND X.TABLE_NAME = Y.TABLE_NAME  
   AND X.COLUMN_NAME = Y.COLUMN_NAME  
   AND Y.INDEX_NAME LIKE 'IDX1'
   AND Y.TABLE_SCHEMA LIKE USER
 ORDER BY 1

Organization of this subsection

(1) Index definitions

(2) Index definitions for a table used for join retrieval

(3) Index used for outer join

(4) Index definitions for a table used for retrieval specifying ORDER BY or GROUP BY

(5) Index definitions for a table being retrieved specifying set functions MIN and MAX

(6) Index definition using the null value as an exception value

(7) Other

(1) Index definitions

(a) Checking the display

Check the Scan Type information. If the performance is poor with TABLE SCAN or AND PLURAL INDEXES SCAN, consider defining a multicolumn index that includes all columns for which the index is defined.

Check the Index Name information to see if an expected index is used.

Check to see if the range of index is narrowed efficiently by the search condition and key condition. Following are some examples in which the index search range is not narrowed efficiently:

There is no search condition (SearchCnd:NONE(FULL SCAN) is displayed for the search condition).

The range of the first component column narrowed by the search condition is from MIN to MAX (FULL SCAN) is displayed after the narrowed range of search condition).

A wide range of index is being searched.

(b) Better method

If a table is subject to frequent retrieval processing specifying multiple predicates using AND, define a multicolumn index consisting of the predicate columns. In this case, specify the columns that are frequently combined with the = predicate as the index component columns in the ascending order of duplicate values contained in the columns.

(c) Reason

The search time is reduced because the index search range is narrowed.

(d) Example

SELECT * FROM T1 WHERE C1=10 AND C2=30 AND C3 BETWEEN 10 AND 20
SELECT * FROM T1 WHERE C1=10 AND C2=30 AND C3 <= 15
SELECT * FROM T1 WHERE C1=20 AND C2=40 AND C4 = 60

Defines an index of T1(C1,C2,C3), T1(C1,C2,C4).

(e) Notes

If there are too many index component columns, the time required to search the index itself increases.

If a column is updated, maintenance occurs on the index. If a column is updated frequently, you should not include this column in the index component columns.

Try to minimize the number of indexes to be defined.

(2) Index definitions for a table used for join retrieval

(a) Checking the display

If the Join Type is sort merge join and the performance is poor because a large amount of data is sorted, but the table retrieval condition can be narrowed efficiently, you can achieve effective retrieval by creating an index for the inner table's joined columns and using a nested loop join.

(b) Better method

For a table used for join retrieval with another table with a search range that is narrowed by limitations, define an index with a first component column of the joined column.

If multiple join conditions (n) are specified frequently, define an index that consists of the joined columns as its component columns 1 through n. If there are search conditions other than the join conditions, specify those search conditions following the joined columns (after component columns n + 1) to define the index.

(c) Reason

Because a nested loop join is executed on the outer table for which limitations are specified and the inner table, index for which is defined for the joined column, the utility can use the index for a join operation, thereby reducing the number of input/output operations.

(d) Example

SELECT * FROM T1,T2
WHERE T1.C3=20 AND T1.C1=T2.C1 AND T1.C2=T2.C2 AND T2.C3>10
                  JOINED COLUMN OF INNER TABLE IS T2 (C1, C2)

Defines an index of T2(C1,C2,C3).

(e) Notes

If there is no limitation on the outer table in the join conditions, a nested loop join usually does not take place.

If limitations are specified for both inner and outer tables, a nest loop join may not take place.

To use a nested loop join preferentially or forcibly, specify SQL optimization option forced nest-loop-join or prioritized nest-loop-join. For details, see the HiRDB Version 8 UAP Development Guide.

(3) Index used for outer join

(a) Checking the display

Check to see if an expected index is used for outer join (LEFT OUTER JOIN).

(b) Better method

None of the following indexes is used for outer join:

Index for the outer table's column that is specified for the ON retrieval condition in the FROM clause

Index for the inner table's column that is specified in the WHERE clause

To execute retrieval using an index, evaluate whether the conditions for the outer table can be specified in the WHERE clause and the conditions for the inner table in the ON retrieval condition.

Note

The following shows an outer table and an inner table for outer join:

outer-table LEFT OUTER JOIN inner-table ON ...
              WHERE ...

(c) Reason

The utility retrieves all columns from the outer table whether or not the ON retrieval condition in the FROM clause is true. Therefore, the limitation on the outer table's columns specified in the ON retrieval condition in the FROM clause are not subject to the narrowing of range using indexes.

For the inner table's columns, the utility evaluates the ON retrieval condition in the FROM clause, fills the null value, then evaluates the condition in the WHERE clause. Therefore, the limitation on the inner table's columns specified in the WHERE clause is not subject to the narrowing of range using indexes.

(d) Example

SELECT * FROM T1 LEFT JOIN T2 ON T1.C1=T2.C1 and T1.C2='a'
        and T2.C2='b'
 WHERE T1.C3='c' and T2.C4='d'

The underlined columns are evaluated using the index.

(4) Index definitions for a table used for retrieval specifying ORDER BY or GROUP BY

(a) Checking the display

If executing a sort operation for ORDER BY processing to retrieve a single table, you can eliminate the sort operation by modifying the index definitions in such a manner that the existing index's ascending or descending order is used to sort the ORDER BY column.

(b) Better method

If you are retrieving a single table for which ORDER BY or GROUP BY is specified after narrowing the range by the = predicate (column-specification=value-specification) or IS NULL predicate (column-specification IS NULL), define an index that meets the following two conditions:

The column specification in the = or IS NULL predicate includes component columns 1 through n consecutively.

The columns specified in GROUP BY or ORDER BY consecutively follow the component column n + 1.

(c) Reason

The CPU time and input/output time decrease because the range of data to be accessed is narrowed by using an index, and the sort operation can be omitted.

(d) Example

SELECT C2, C3 FROM T1
WHERE C1=10 AND C2= ? AND C3>10
ORDER BY C4 DESC,C5 ASC

Defines an index of T1(C1 ASC,C2 ASC,C4 DESC,C5 ASC) or T1(C1 ASC,C2 ASC,C4 DESC,C5 ASC,C3 ASC).

(e) Notes

Sort operation cannot be eliminated if any of the following conditions is met:

Limitations common to both a HiRDB/Single Server and a HiRDB/Parallel Server

DISTINCT is specified.

Specified retrieval condition selects a retrieval method that does not use an index.

T1 is partitioned and a non-partitioning key index is partitioned within the same server (index with an Index Name attribute of d). This does not apply when column=value-specification is specified for all partitioning keys.

Limitations to a HiRDB/Single Server

The sort operation cannot be eliminated if T1 is partitioned and the partitioning keys specified in CREATE TABLE are included in the same order of the index component columns from the top (index with an Index Name attribute of d). This does not apply when column=value-specification is specified for all partitioning keys.

Limitations to a HiRDB/Parallel Server

SQL executes the INSERT or SELECT statement.

Specification is made within a subquery.

A set operation is specified.

The HAVING clause is specified.

FOR UPDATE or FOR READ ONLY is specified.

The sort operation cannot be eliminated if T1 is partitioned, the partitioning keys specified in CREATE TABLE are included in the same order of the index component columns from the top (index with an Index Name attribute of d), and multiple RDAREAs at the same back-end server are allocated. This does not apply when column=value-specification is specified for all partitioning keys.

(5) Index definitions for a table being retrieved specifying set functions MIN and MAX

(a) Checking the display

If GROUP BY is not specified and the performance is poor during retrieval specifying set functions MIN(column) or MAX(column) in a selection expression, define an index in the column specification of the set function, so that the value of the set function can be obtained simply by referencing the minimum or maximum index value. In this case, Group by Mode is IMPLICIT MIN-MAX INDEX.

(b) Better method

There are two better methods:

Retrieval condition not specified

For a table used for retrieval specifying at least one of the set functions MIN or MAX, define an index that specifies MIN or MAX for its first component column.

= predicate (or IS NULL predicate) specified as retrieval condition

For a table used for retrieval specifying set function MIN or MAX after narrowing the range by the retrieval conditions (n conditions) specified in the = predicate (or IS NULL predicate), define an index that meets all the following conditions:

The = predicate consecutively specifies component columns 1 through n.

The column specified with MIN or MAX is component column n + 1.

A column specified in the other retrieval condition is component column n + 2 or a subsequent column.

(c) Reason

The CPU time and input/output time decrease because the result is obtained by referencing the minimum or maximum index value for the MIN or MAX set function, respectively.

(d) Example

Retrieval condition not specified

SELECT MIN(C1), MAX(C1) FROM T1

Defines an index of T1(C1).

Retrieval condition specified with the = predicate (or IS NULL predicate)

SELECT MIN(C1), MAX(C1) FROM T1 WHERE C2=10 AND C3=20 AND C4<30

Defines an index of T1(C2,C3,C1,C4).

(e) Notes

The index is not treated as IMPLICIT MIN-MAX INDEX if any of the following conditions is met:

Limitations common to both a HiRDB/Single Server and a HiRDB/Parallel Server

A set function other than MIN or MAX is specified.

When there are multiple MINs or MAXs, columns in the set function arguments do not match.

The GROUP BY clause is specified.

The search condition contains a system-defined scalar function, function call, or IS_USER_CONTAINED_IN_HDS_GROUP.

The search condition contains a column that is not an index component column.

If FLAT is specified as a argument of the MAX or MIN set function, the search condition contains a repetition column.

There is no index applicable to section (b), previously.

T1 is partitioned and retrieval uses a non-partitioning key index that is partitioned within the same server (index with an Index Name attribute of d). This does not apply when column=value-specification is specified for all partitioning keys.

Limitations to a HiRDB/Single Server

The sort operation cannot be eliminated if T1 is partitioned and the partitioning keys specified in CREATE TABLE are included in the same order of the index component columns from the top (index with an Index Name attribute of d). This does not apply when column=value-specification is specified for all partitioning keys.

When T1 is partitioned, retrieval is executed using the index that includes the partitioning keys specified in CREATE TABLE in the same order of the index component columns from the top (index with an Index Name attribute of d). This does not apply when column=value-specification is specified for all partitioning keys.

Limitations to a HiRDB/Parallel Server

A set operation is specified.

SQL executes the INSERT or SELECT statement.

The HAVING clause is specified.

FOR READ ONLY is specified.

When T1 is partitioned, retrieval is executed using the index that includes the partitioning keys specified in CREATE TABLE in the same order of the index component columns from the top (index with an Index Name attribute of d), and multiple RDAREAs at the same back-end server are allocated. This does not apply when column=value-specification is specified for all partitioning keys.

(6) Index definition using the null value as an exception value

(a) Checking the display

Check to see if any of the following is true:

A retrieval with search condition type IS NULL is executed on an index component column that has many duplicated null values, resulting in poor performance.

Insertion of the null value, updating to the null value, updating from the null value to another value, or deletion of a null-value row takes place, resulting in poor performance.

(b) Better method

Define an index that uses the null value as an exception value.

(c) Reason

If an index is defined that uses the null value as an exception value, the utility creates the index excluding the null value. If IS NULL is specified in the retrieval condition, the utility uses TABLE SCAN without using the index. However, if a predicate other than IS NULL is used (such as = or between), the utility uses the index.

If there are many occurrences of null value and the index is used to access data pages at random, you can achieve high-speed retrieval by defining an index that uses the null value as an exception value and using TABLE SCAN.

You can reduce the overhead of index maintenance as well as the amount of log information by excluding the null value from the index key values.

(d) Example

SELECT * FROM T1 WHERE C1 IS NULL

Defines an index of T1(C1) that uses the null value as an exception value.

SELECT * FROM T1 WHERE C1 IS NULL ( index not used)
SELECT * FROM T1 WHERE C1 ='a' ( index used)

(7) Other

If a lock release wait occurs frequently on a table with a retrieval method of TABLE SCAN, you may be able to reduce the occurrences of lock release wait by defining an index for a column specified in the retrieval condition because the range of data to be accessed can be narrowed.

If a lock release wait occurs frequently during retrieval using an index, evaluate whether or not you can specify a "search using condition evaluation with no lock" that locks only those rows or key values satisfying the retrieval condition. For details about the search using condition evaluation with no lock, see the HiRDB Version 8 UAP Development Guide.

If the retrieval method is AND PLURAL INDEXES SCAN, if multiple users update the same table at the same time, deadlock may result. In this case, consider changing the pd_work_table_option operand in the system definitions. For details about the pd_work_table_option operand, see the HiRDB Version 8 System Definition.

If the access path display utility finds an unused index, you should delete the index. This unneeded index may require extra workload during update processing or extra space in the database.

17.6.3 Notes about index retrieval

Organization of this subsection

(1) Retrieval specifying OR in the retrieval condition (1)

(2) Retrieval specifying OR in the retrieval condition (2)

(3) Join retrieval specifying OR in the join condition

(4) Retrieval with a range predicate

(5) Retrieval specifying GROUP BY

(6) Retrieval specifying both GROUP BY and ORDER BY

(1) Retrieval specifying OR in the retrieval condition (1)

(a) Checking the display

For a single-table retrieval, check to see if TABLE SCAN is used, resulting in poor performance.

(b) Better method

If the same conditions are specified on both sides of OR, take the condition outside OR.

(c) Reason

Single-table retrieval

If an index is defined for the predicate that was taken outside, the search range can be narrowed in the index, thereby reducing the search time.

Join retrieval

If join conditions are connected with OR, obtain the direct product (CROSS JOIN), then evaluate the join condition for the resulting direct product. If the predicate taken out is a join condition, the utility executes nested loop join or merge join, thereby reducing the number of data match operations during join processing. If the joined column has an index defined, the utility can use the index during join processing, thereby reducing the number of input/output operations.

(d) Examples

OR should be converted to the IN predicate in some cases. For details, see (2) Retrieval specifying OR in the retrieval condition (2).

Single-table retrieval

Index defined for C1

SELECT * FROM T1 WHERE (C1=10 AND C2=20) OR (C1=10 AND C2=30)

SELECT * FROM T1 WHERE C1=10 AND (C2=20 OR C2=30)

If a multicolumn index is defined for (C1,C2) because C1=10 cannot be narrowed sufficiently, performance may be better if C1=10 is kept inside.

Join retrieval

SELECT * FROM T1, T2
  WHERE (T1.C1=T2.C1 AND T1.C2=10) OR (T1.C1=T2.C1 AND T2.C2=20)

SELECT * FROM T1, T2 WHERE T1.C1=T2.C1 AND (T1.C2=10 OR T2.C2=20)

(2) Retrieval specifying OR in the retrieval condition (2)

(a) Checking the display

If the condition is specified with OR for the same column, check to see if performance is poor because there is no search condition or valid search condition to narrow the index search condition.

(b) Better method

The better method depends on whether the HiRDB version is 06-02 or later, the HiRDB version is earlier than 06-01 and a single-column index is defined, or the HiRDB version is earlier than 06-01 and a multicolumn index is defined.

When the HiRDB version is 06-02 or later
Use the IN predicate if the = predicate is specified for the same column on both sides of the OR operator and an index is defined for the column.

When the HiRDB version is earlier than 06-01 and a single-column index is defined
Use the IN predicate if the = predicate is specified for the same column on both sides of the OR operator and a single-column index is defined for the column.

When the HiRDB version is earlier than 06-01 and a multicolumn index is defined
Use the OR operator if the IN predicate is specified for the column which is the first component column of the multicolumn index.

(c) Reason

When the HiRDB version is 06-02 or later
For a single-column index or multicolumn index, the utility searches the index for each value specification in the IN predicate (search condition type ATS or RANGES), narrowing the index search range; therefore, the CPU time and the number of input/output operations can be reduced.

When the HiRDB version is earlier than 06-01 and a single-column index is defined
For a single-column index, the utility searches the index for each value specification in the IN predicate (search condition type ATS), narrowing the index search range; therefore, the CPU time and the number of input/output operations can be reduced.

When the HiRDB version is earlier than 06-01 and a multicolumn index is defined
For a multicolumn index, the utility searches the minimum value to the maximum value specified in the IN predicate (if the value specification includes a non-literal value, the utility references all leaf pages); therefore, the index search range is wide.
If it is converted to an OR operation, Scan Type may be OR PLURAL INDEXES SCAN. In such a case, the utility searches the index for the left-hand term of the OR operator separately from the right-hand term; therefore, the index search range is narrowed and the input/output time is reduced.

(d) Examples

When a single-column index is defined for T1(C1) or a multicolumn index is defined for T1(C1,C2) (when the HiRDB version is 06-02 or later)

SELECT * FROM T1 WHERE C1=10 OR C1=20

SELECT * FROM T1 WHERE C1 IN (10,20)

When a single-column index is defined for T1(C1) (when the HiRDB version is earlier than 06-01)

SELECT * FROM T1 WHERE C1=10 OR C1=20

SELECT * FROM T1 WHERE C1 IN (10,20)

When a multicolumn index is defined for T1(C1,C2) (C1 is the first component column) (when the HiRDB version is earlier than 06-01)

SELECT * FROM T1 WHERE C1 IN (10,20)

SELECT * FROM T1 WHERE C1=10 OR C1=20

(e) Notes

If the following two conditions are satisfied, use the IN predicate even for a multicolumn index whose HiRDB version is earlier than 06-01:

The item specification in the IN predicate consists of literals only.

The item specification in the IN predicate contains only a few key values from minimum to maximum.

(3) Join retrieval specifying OR in the join condition

(a) Checking the display

If Join Type is CROSS JOIN, internal direct product processing is taking place. If an OR operator is used in the join condition, you may be able to achieve efficient retrieval by replacing it with equivalent SQL using the set operations separately, specifying both sides of OR (UNION or UNION ALL).

(b) Better method

If join conditions are connected with OR, use the set operations separately, specifying both sides of OR.

DISTINCT specified in selection expression

Use UNION.

DISTINCT not specified in selection expression

Use UNION ALL.

(c) Reason

If join conditions are connected with OR, the utility obtains the direct product of the tables to be joined, then evaluate the join conditions for the resulting direct product.

If the OR operator is separated, the utility executes nested loop join or merge join, thereby reducing the number of data match operations during join processing.

If nested loop join is executed, the utility can use the index during join processing, thereby reducing the number of input/output operations.

(d) Examples

DISTINCT specified

SELECT DISTINCT * FROM T1, T2
   WHERE (T1.C1=T2.C1 OR T1.C2=T2.C2) AND T1.C3=10

SELECT * FROM T1, T2 WHERE T1.C1=T2.C1 AND T1.C3=10
 UNION
SELECT * FROM T1, T2 WHERE T1.C2=T2.C2 AND T1.C3=10

DISTINCT not specified

SELECT * FROM T1, T2 WHERE (T1.C1=T2.C1 OR T1.C2=T2.C2) AND T1.C3=10

SELECT * FROM T1, T2 WHERE T1.C1=T2.C1 AND T1.C3=10
 UNION ALL
SELECT * FROM T1, T2 WHERE T1.C2=T2.C2
   AND (T1.C1<>T2.C1 OR T1.C1 IS NULL OR T2.C1 IS NULL) AND T1.C3=10

(e) Notes

If UNION is specified, the utility internally creates a work table based on the result of each query specification. In this case, the utility executes a sort operation to eliminate the duplicate values.
If UNION ALL is specified, the utility also internally creates a work table based on the result of each query specification. In this case, however, the utility does not execute a sort operation.

If the range of the outer table is not narrowed by limitations, the utility does not use an index during join processing, even when the index is defined for the column subject to join processing. The table for which an index is defined for a column subject to join processing is the inner table, and the other table is the outer table.

For the example for DISTINCT not specified in (d) previously, the IS NULL predicate is not needed if T1.C1 and T1.C2 are NOT NULL columns or the null value is not inserted. When DISTINCT is specified in the selection expression, but an expected result is not obtained, use UNION for the set operation, not UNION ALL.

(4) Retrieval with a range predicate

(a) Better method

If an AND operation joins the >= and <= predicates for the same column, the utility converts it to the BETWEEN predicate prior to SQL optimization processing. In this case, the utility converts predicates sequentially beginning with the first one specified in the WHERE clause.

Inside HiRDB, the condition joining the >= and <= predicates for the same column in the AND operation is treated as being equal to the BETWEEN predicate; therefore, the result is the same, whichever is specified.

Check to see if the >= and <= predicates form a range.

(b) Examples

Two different SQL statements selecting the same access path

SELECT * FROM T1 WHERE C1 BETWEEN 10 AND 20
SELECT * FROM T1 WHERE C1 >=10 AND C1 <= 20

HiRDB's internal conversion

SELECT * FROM T1 WHERE C1<=50 AND C1>=20 AND C1<=30

SELECT * FROM T1 WHERE C1 BETWEEN 20 AND 50 AND C1<=30

(c) Notes

A redundant predicate results in unneeded condition checking during database access. You should delete any redundant predicate.

(5) Retrieval specifying GROUP BY

(a) Better method

If you are executing GROUP BY retrieval on multiple columns at a HiRDB/Parallel Server, specify the grouping column with fewer duplicate values in the GROUP BY clause. Note that this is not applicable when 1024 is specified in the SQL optimization option.

(b) Reason

When executing GROUP BY processing using multiple floating servers at a HiRDB/Parallel Server, the utility executes hashing on the first column in the GROUP BY clause to distribute data to the floating servers. If the first column in the GROUP BY clause has only a few duplicate values, the utility can hash evenly to each floating server, thereby improving the effects of parallel processing.

(c) Example

SELECT C1,C2,SUM(C3) FROM T1 GROUP BY C1,C2

If (C1's duplicates count) > (C2's duplicates count), the utility changes this as follows:

SELECT C1,C2,SUM(C3) FROM T1 GROUP BY C2,C1

(d) Note

If 1024 is specified in the SQL optimization option, the utility uses all grouping columns for hashing; therefore, there is no need to change the GROUP BY order. However, if 17.6.2(4) Index definitions for a table used for retrieval specifying ORDER BY or GROUP BY applies, do not change the order of grouping columns.

(6) Retrieval specifying both GROUP BY and ORDER BY

(a) Better method

There is an index that includes all GROUP BY columns as its component columns (for a HiRDB/Single Server)

Specify the GROUP BY columns in the order of the index component columns.

There is no such index that includes all GROUP BY columns as its component columns

If all ORDER BY columns are included in the GROUP BY columns during retrieval specifying both ORDER BY and GROUP BY, specify the GROUP BY columns in the order of the ORDER BY columns.

(b) Reason

There is an index that includes all GROUP BY columns as its component columns (for a HiRDB/Single Server)

The sort operation can be omitted for GROUP BY processing. In this case, the utility still executes a sort operation for ORDER BY processing, but retrieval performance improves because the sort operation is executed on the grouped data (fewer data items).

There is no such index that includes all GROUP BY columns as its component columns

If the order of columns is the same in the GROUP BY clause and in the ORDER BY clause, the sort operation can be omitted for ORDER BY processing.

(c) Examples

There is an index that includes all GROUP BY columns as its component columns (for HiRDB/Single Server)

SELECT C1,C2,SUM(C3) FROM T1 GROUP BY C1,C2 ORDER BY C1,C2

SELECT C1,C2,SUM(C3) FROM T1 GROUP BY C2,C1 ORDER BY C1,C2

There is no such index that includes all GROUP BY columns as its component columns

SELECT C1,C2,SUM(C3) FROM T1 GROUP BY C1,C2 ORDER BY C2,C1

SELECT C1,C2,SUM(C3) FROM T1 GROUP BY C2,C1 ORDER BY C2,C1

SELECT C1,C2,SUM(C3) FROM T1 GROUP BY C1,C2 ORDER BY C2 DESC

SELECT C1,C2,SUM(C3) FROM T1 GROUP BY C2,C1 ORDER BY C2 DESC

(d) Note

For the GROUP BY clause, define an index described in 17.6.2(4) Index definitions for a table used for retrieval specifying ORDER BY or GROUP BY, if possible.

17.6.4 Notes about join retrieval

Organization of this subsection

(1) Nested loop join using a partitioning key

(1) Nested loop join using a partitioning key

(a) Checking the display

With a HiRDB/Parallel Server, if Join Type is NESTED LOOPS JOIN and the transfer information is BROADCAST, KEY RANGE PARTIAL BROADCAST, or PARTIAL BROADCAST, you may be able to improve performance by changing the partitioning key of an inner table for nested loop join.

This is not so effective when there are not many data items in the table, but it is effective when there are many partitions.

(b) Better method

If partitioning the inner table subject to nested loop join during join retrieval, you can achieve parallel processing by defining the table in such a manner that its partitioning key becomes the joined column. Note that parallel processing is not available with flexible hash partitioning. Make sure that the transfer information is number-CLM HASH, number-CLM KEY RANGE, or 1TO1, or number-CLM MULTIDIM.

(c) Reason

If the inner table subject to nested loop join is partitioned by the key range or hash partitioning method, and the inner table's partitioning keys are all included in the joined columns, the inner table search range can be narrowed by the table partitioning conditions, thereby reducing the number of input/output operations as well as the CPU time.

(d) Example

SELECT * FROM T1, T2 WHERE T1.C1=T2.C1 and T1.C1='a'

CREATE TABLE T1 (C1 INT NOT NULL, C2 INT)
   FIX HASH HASH6 BY C1 IN (USER1,USER2,USER3,USER4)
CREATE TABLE T2 (C1 INT NOT NULL, C2 INT)
   FIX HASH HASH6 BY C1 IN (USER1,USER2,USER3,USER4)

(e) Note

If the flexible hash partitioning method is used, the utility always assumes BROADCAST for the transfer information because it cannot identify the data storage location; therefore, parallel processing is not possible. If possible, you should use the FIX hash partitioning method instead of the flexible hash partitioning method. For details about these partitioning methods, see the HiRDB Version 8 Installation and Design Guide.

18. Database Copy Utility (pdcopy)

This chapter explains how to use the database copy utility (pdcopy), which makes a backup of a database.

This chapter contains the following sections:

Organization of this chapter

18.1 Functions of the database copy utility

18.2 Information required for making backup copies

18.3 Examples

18.4 Command format

18.5 Notes

18.6 Database copy utility process results listing

18.7 Backup file format

18.1 Functions of the database copy utility

Executor: HiRDB administrator

The HiRDB administrator must periodically back up databases to protect against possible database errors. To back up a database, use the database copy utility (the obtained backup can be used only to restore the same HiRDB's database). To restore the database due to a disk error, etc., use the created backup copy as an input to the database recovery utility (pdrstr command) to restore the database. Figure 18-1 shows an overview of database recovery.

Figure 18-1 Overview of database recovery

18.2 Information required for making backup copies

Organization of this section

(1) Backup units

(2) Backup acquisition mode

(3) Backup timing

(4) RDAREAs that need to be backed up at the same time

(5) Server machine storing backup files

(6) Creating a backup file in a character special file

(7) Operation without unloading the system log

(8) Creating a backup using the differential backup facility

(9) Creating a backup using the inner replica facility

(10) HiRDB status during database copy utility execution

(11) Size of a backup file

(1) Backup units

You can make backup copies in the following units. The database copy utility provides an option to specify these backup units. Table 18-1 shows the backup units.

Table 18-1 Backup units

Backup unit | Description | Option
By the system | Backs up all RDAREAs in the system (including master directory RDAREAs), except the user RDAREAs. The list RDAREAs are not subject to backup processing. | -a
By the unit* | Backs up all RDAREAs in a specified unit. | -u
By the server* | Backs up all RDAREAs in a specified server. | -s
By the RDAREA | Backs up specified RDAREAs. A group of RDAREAs can be backed up by specifying its RDAREA names as a regular expression. | -r

* This is applicable to a HiRDB/Parallel Server only, not applicable to a HiRDB/Single Server.

(2) Backup acquisition mode

The database copy utility's -M option lets you select a backup acquisition mode. Table 18-2 lists available backup acquisition modes.

Table 18-2 Backup acquisition modes

Backup acquisition mode (value of -M option)
Description
Database recovery method

x
This mode does not allow an RDAREA under backup processing to be referenced or updated. Use the pdhold command to place the RDAREA subject to backup processing in the shutdown and closed status.
Only the backup copy is needed to restore the database to the status existing when the backup copy was made.

r
This mode allows an RDAREA under backup processing to be referenced but does not allow it to be updated.

s
This mode allows an RDAREA to be referenced or updated while it is being backed up. If LVM (logical volume manager) is used for the database, the RDAREA to be backed up must be placed in backup hold status. This option is applicable when the RDAREA to be backed up is created in a character special file.
The backup copy and the system log obtained during backup processing* are needed to restore the database.

* The database copy utility process results listing contains the name and generation number of the system log file required for restoring the RDAREA. For details about the database copy utility process results listing, see Section 18.6 Database copy utility process results listing.

Note

To back up all RDAREAs during HiRDB operation (in units of systems), specify r or s for the backup acquisition mode (-M option). You cannot specify x for the following reason: to specify x, you need to place all RDAREAs subject to backup processing in the shutdown and closed status using the pdhold command. However, the master directory RDAREA cannot be placed in the shutdown and closed status. Therefore, you cannot specify x in the -M option to back up all RDAREAs during HiRDB operation.

(3) Backup timing

You should back up data periodically as well as at the following times. If backups are not made at these times, the databases cannot be restored in the event of an error.

Before and after executing a UAP or utility in the no-log mode, when applicable

After executing a UAP or utility in the pre-update log acquisition mode, when applicable

After adding, expanding, or re-initializing RDAREAs

After recovering a database with the pdstart -r command

After transferring dictionary information with the dictionary import/export utility

After recovering a database from log information

After upgrading HiRDB

(4) RDAREAs that need to be backed up at the same time

When backing up a specific RDAREA, you also need to back up those RDAREAs that are updated by the RDAREA backup processing (such as data dictionary RDAREAs). For details about the RDAREAs that need to be backed up at the same time, see the HiRDB Version 8 System Operation Guide.

(5) Server machine storing backup files

You can create a backup file in any server machine where HiRDB is running. There is no need to create a backup file in the same server machine that contains the corresponding RDAREA. You might want to create backup files in the server machine that has a CMT device.

(6) Creating a backup file in a character special file

To create a backup file in a character special file, define that character special file as a HiRDB file system area for the utility. To do this, specify UTL in the -k option of the pdfmkfs command.

(7) Operation without unloading the system log

If you are running the system without unloading the system log, you need to obtain a log point information file when making a backup copy. To obtain a log point information file, specify the -z option with the database copy utility.

For details about how to operate without unloading the system log, see the HiRDB Version 8 System Operation Guide.

(8) Creating a backup using the differential backup facility

The differential backup facility backs up only the information that has changed since the previous backup, thereby reducing the backup processing time. Consider using the differential backup facility when the database is large and the amount of data that has been updated is small.

To use the differential backup facility, specify the -g, -d, -K, -o, and -L options.

For details about using the differential backup facility, see the HiRDB Version 8 System Operation Guide.

(9) Creating a backup using the inner replica facility

The inner replica facility is used when there is not enough time to make a backup of the database, such as when online applications are running 24 hours a day, 365 days a year. The inner replica facility permits the database to be referenced and updated while the database is being backed up.

To make a backup using the inner replica facility, specify the -q option.

For details about the inner replica facility and the required products, see the HiRDB Staticizer Option Version 7 Description and User's Guide.

(10) HiRDB status during database copy utility execution

You can execute the database copy utility only when HiRDB is active.

Execute the database copy utility at the server machine containing the single server or the server machine where the system manager is located.

To execute the database copy utility, the unit containing the RDAREA subject to backup processing and the unit in which a backup file is to be created must be active. If you specify x or r in the -M option, the server containing the RDAREA subject to backup processing may not be active, but if you specify s in the -M option, it must be active.

(11) Size of a backup file

If the disk has enough space, but a message indicating a shortage of disk space is displayed during execution of the database copy utility, the size of the backup file may be greater than 2 gigabytes. HiRDB can only handle files whose size is less than 2 gigabytes. If this is the case, take one of the following actions:

(a) Action 1

Specify multiple backup files. For example, if you are backing up 3 gigabytes of data, specify at least two backup files.

(b) Action 2

Use a regular file on a UNIX system for which the option allowing use of large files (size of 2 gigabytes or more) was specified during the construction of the UNIX file system, or use a HiRDB file system area. For details about creating a large file in a HiRDB file system area, see the HiRDB Version 8 Installation and Design Guide.

(c) Action 3

Create the backup file in a HiRDB file system area in a character special file. For details about creating a large file in a HiRDB file system area, see the HiRDB Version 8 Installation and Design Guide.

18.3 Examples

This section presents examples of making backup copies. The topics include:

Backing up in units of systems

Backing up in units of RDAREAs

Backing up in units of servers

Backing up to files on DAT

Backing up using JP1/OmniBack II

Backing up using the differential backup facility

Backing up using the inner replica facility and specifying an RDAREA generation

Backing up using NetBackup

For details about the pdcopy command options used in these examples, see Section 18.4 Command format.

Organization of this section

18.3.1 Backing up in units of systems

18.3.2 Backing up in units of RDAREAs

18.3.3 Backing up in units of servers

18.3.4 Backing up to files on DAT

18.3.5 Backing up using JP1/OmniBack II

18.3.6 Backing up using the inner replica facility and specifying an RDAREA generation

18.3.7 Backing up using the differential backup facility

18.3.8 Backing up using NetBackup

18.3.1 Backing up in units of systems

This example backs up all RDAREAs:

pdcopy -m /hirdb/rdarea/mast/mast01 -M r -p /usr/hirdb/pdcopy/list/list01
-z /usr/hirdb/pdcopy/logpoint/logpoint01 -b /usr/hirdb/pdcopy/backup/backup01 -a

Explanation

-m: Specifies the name of the first HiRDB file in the master directory RDAREA.

-M: Specifies the backup acquisition mode.

-p: Specifies the output file name for the database copy utility process results listing.

-z: Specifies the name of the log point information file. There is no need to specify this option if the system operation involves unloading of the system log. This option is applicable to a HiRDB/Single Server but not to a HiRDB/Parallel Server.

-b: Specifies the name of the backup file.

-a: Specifies that all RDAREAs are to be backed up.

18.3.2 Backing up in units of RDAREAs

This example backs up two user RDAREAs (RDAREA01 and RDAREA02):

pdcopy -m /hirdb/rdarea/mast/mast01 -M r -p /usr/hirdb/pdcopy/list/list01
-b /usr/hirdb/pdcopy/backup/backup01 -r RDAREA01,RDAREA02

Explanation

-m: Specifies the name of the first HiRDB file in the master directory RDAREA.

-M: Specifies the backup acquisition mode.

-p: Specifies the output file name for the database copy utility process results listing.

-b: Specifies the name of the backup file.

-r: Specifies the name of the RDAREAs to be backed up (RDAREA01 and RDAREA02).

18.3.3 Backing up in units of servers

This example backs up all RDAREAs in a back-end server (bes1):

pdcopy -m /hirdb/rdarea/mast/mast01 -M r -p /usr/hirdb/pdcopy/list/list01
-z /usr/hirdb/pdcopy/logpoint/logpoint01 -b /usr/hirdb/pdcopy/backup/backup01
-s bes1

Explanation

-m: Specifies the name of the first HiRDB file in the master directory RDAREA.

-M: Specifies the backup acquisition mode.

-p: Specifies the output file name for the database copy utility process results listing.

-z: Specifies the name of the log point information file. There is no need to specify this option if the system operation involves unloading of the system log.

-b: Specifies the name of the backup file.

-s: Specifies that all RDAREAs in the back-end server (bes1) are to be backed up.

18.3.4 Backing up to files on DAT

This example backs up all RDAREAs to files on DAT:

pdcopy -m /hirdb/rdarea/mast/mast01 -M r -p /usr/hirdb/pdcopy/list/list01
-z /usr/hirdb/pdcopy/logpoint/logpoint01 -b /dev/rmt/0m -a

Explanation

-m: Specifies the name of the first HiRDB file in the master directory RDAREA.

-M: Specifies the backup acquisition mode.

-p: Specifies the output file name for the database copy utility process results listing.

-z: Specifies the name of the log point information file. There is no need to specify this option if the system operation involves unloading of the system log. This option is applicable to a HiRDB/Single Server but not to a HiRDB/Parallel Server.

-b: Specifies the name of the backup file.

-a: Specifies that all RDAREAs are to be backed up.

18.3.5 Backing up using JP1/OmniBack II

This example uses JP1/OmniBack II to back up all RDAREAs in batch mode:

pdcopy -m /hirdb/rdarea/mast/mast01 -M r -p /usr/hirdb/pdcopy/list/list01
-z /usr/hirdb/pdcopy/logpoint/logpoint01 -b host01:backup001 -a -k o -G DLT01

Explanation

-m: Specifies the name of the first HiRDB file in the master directory RDAREA.

-M: Specifies the backup acquisition mode.

-p: Specifies the output file name for the database copy utility process results listing.

-z: Specifies the name of the log point information file. There is no need to specify this option if the system operation involves unloading of the system log. This option is applicable to a HiRDB/Single Server but not to a HiRDB/Parallel Server.

-b: Specifies the name of the backup file.

-a: Specifies that all RDAREAs are to be backed up.

-k: Specifies the type of backup file. This example specifies o to back up RDAREAs to JP1/OmniBack II's object.

-G: Specifies the name of the barlist file. The following shows the contents of the barlist file (DLT01):

BARLIST "DLT01"   ..........1
DEFAULTS
{
}
DEVICE "backup01"   ........2
{
}
CLIENT HiRDB host4   .......3
{
  -public   ................4
} -protect none   ..........5

Explanation

Name of the barlist file

Name of the logical device (backup file)

Name of the host containing JP1/OmniBack II's disk agent

Required operand

Object protection specification (not protected)

18.3.6 Backing up using the inner replica facility and specifying an RDAREA generation

This example backs up a specified generation of RDAREAs using the inner replica facility.

pdcopy -m /hirdb/rdarea/mast/mast01 -b /bkdir/bkup02
-r MAST,DIR,DIC,USR01,USR02,USR03 -q 1

Explanation

-m: Specifies the name of the first HiRDB file in the master directory RDAREA.

-b: Specifies the name of the backup file.

-r: Specifies the names of the RDAREAs to be backed up (MAST, DIR, DIC, USR01, USR02, and USR03).

-q: Specifies the generation number of the RDAREAs to be backed up.

18.3.7 Backing up using the differential backup facility

This example backs up user RDAREAs (RDAREA01 and RDAREA02) using the differential backup facility. The example assumes that a full backup has already been made with -d a specified.

pdcopy -m /rdarea/mast/mast01 -M r -g backupg1 -b /pdcopy/backup02
-d -K /pdcopy/admfile -o /pdcopy/rfile

Explanation

-m: Specifies the name of the first HiRDB file in the master directory RDAREA.

-M: Specifies the reference-possible mode as the backup acquisition mode.

-g: Specifies the name of the differential backup group. Specification of (S) is not required.

-b: Specifies the name of the backup file (differential backup file name).

-d: Specifies the backup type (this example specifies -d to make a differential backup).

-K: Specifies the name of the HiRDB file system area used to store the differential backup management file.

-o: Specifies the name of the historical file for differential backups.

18.3.8 Backing up using NetBackup

This example makes a backup of all RDAREAs in the batch mode using NetBackup.

pdcopy -m /hirdb/rdarea/mast/mast01 -M r -p /usr/hirdb/pdcopy/list/list01
-z /usr/hirdb/pdcopy/logpoint/logpoint01 -b host01:POLICY01 -a -k n

Explanation

-m: Specifies the name of the first HiRDB file in the master directory RDAREA.

-M: Specifies the backup acquisition mode.

-p: Specifies the output file name for the database copy utility processing results listing.

-z: Specifies the name of the log point information file. There is no need to specify this option if the system operation involves unloading of the system log. This option is applicable to a HiRDB/Single Server but not to a HiRDB/Parallel Server.

-b: Specifies the name of the NetBackup policy as the backup file name, in the format post-name:policy-name.

-a: Specifies that all RDAREAs are to be backed up.

-k: Specifies the type of backup file. This example specifies n to make a backup using NetBackup.

18.4 Command format

Organization of this section

18.4.1 Option format

18.4.2 Options

18.4.1 Option format

The required or frequently specified options are indicated in bold. In the table below, each number corresponds to the number assigned to each option, which is explained in 18.4.2 Options.

When separating an option's flag arguments with the comma, do not specify spaces before or after the comma. If a space is specified, the command ignores whatever is specified following the space.

No.
Option

1

pdcopy -m [host-name:]first-HiRDB-file-name-in-master-directory-RDAREA

2

      [-M {x|r|s}]

3

      [-p process-results-output-file-name]

4

      [-i]

5

      [-j lock-release-wait-time]

6

      [-E EasyMT-MT-attributes-definition-file-name]

7

      [-B EasyMT-I/O-buffer-sectors-count]

8

      [-z log-point-information-file-name]

9

      [-J]

10

      [-w pause-time,read-count]

11

      [-f control-statement-file-name*]

* The options that can be specified in the control information file are shown below. You can also specify these options directly in the pdcopy command.

Contents of control statement file

No.
Option

12

      -b {[host-name:]backup-file-name[,backup-file-name]...
          |[host-name:]device-symbolic-name[,device-symbolic-name]
          |[host-name:]device-group-name
          |[host-name:]object-name
          |[host-name:]policy-name}

13

      { -a

14

      |-u unit-identifier[,unit-identifier]...

15

      |-s server-name[,server-name]...

16

      |-r RDAREA-name[,RDAREA-name]... }

17

     [-k {u|i|e|m|o|n}]

18

     [-v volume-name[,volume-name]...]

19

     [-N EasyMT-file-name]

20

     [-G barlist-file-name]

21

     [-g differential-backup-group-name]

22

     [-d backup-type]

23

     [-K HiRDB-file-system-area-name-storing-differential-backup-management-file]

24

     [-o differential-backups-history-file-name]

25

     [-L differential-backups-management-file-size]

26

     [-q generation-number]

27

     [-S{backup-file-initial-size,extension-value
     |'(backup-file-initial-size,extension-value)
     [,(backup-file-initial-size,extension-value)]...'}]

Specifiability of options when another backup program is linked

Option | Other backup program
EasyMT | JP1/OmniBack II | NetBackup
-m | M | M | M
-M {x|r|s} | O | O | O
-p | O | O | O
-i | O | O | O
-j | O | O | O
-E | O | N | N
-B | O | N | N
-z | O | O | O
-J | O | O | O
-w | O | O | O
-f | O | O | O
-b | M | M | M
{-a|-u|-s|-r} | M¹ | M¹ | M¹
-k | u | N | N | N
i | N | N | N
e | M² | N | N
m | M² | N | N
o | N | M | N
n | N | N | M
-v | O | N | N
-N | O | N | N
-G | N | M | N
-g | O | O | O
-d {a|b|c|d} | O | O | O
-K | O | O | O
-o | O | O | O
-L | O | O | O
-q | O | O | O
-S | N | N | N

Legend:

M: Mandatory (must be specified)

O: Optional (can be specified)

N: Not permitted (cannot be specified)

1 You must specify one of -a, -u, -s, or -r.

2 You must specify either e or m.

18.4.2 Options

Organization of this subsection

(1) -m [host-name:]first-HiRDB-filename-in-master-directory-RDAREA

(2) -M{x|r|s}

(3) -p process-results-output-filename

(4) -i

(5) -j lock-release-wait-time

(6) -E EasyMT-MT-attributes-definition-filename

(7) -B EasyMT I/O buffer sectors count

(8) -z log-point-information-file-name

(9) -J

(10) -w pause-period,read-count

(11) -f control-information-filename

(12) -b {[host-name:]backup-file-name[,backup-file-name]...|[host-name:]device-symbolic-name[,device-symbolic-name]|[host-name:]device-group-name|[host-name:]object-name|[host-name:]policy-name}

(13) -a

(14) -u unit-identifier[,unit-identifier]...

(15) -s server-name[,server-name]...

(16) -r RDAREA-name[,RDAREA-name]...

(17) -k {u|i|e|m|o|n}

(18) -v volume-name[,volume-name]...

(19) -N EasyMT-filename

(20) -G barlist-filename

(21) -g differential-backup-group-name

(22) -d backup-type

(23) -K HiRDB-file-system-area-name-storing-differential-backup-management-file

(24) -o differential-backups-history-filename

(25) -L differential-backup-management-file-size

(26) -q generation-number

(27) -S {backup-file-initial-size,increase-value | '(backup-file-initial-size, increase-value) [,(backup-file-initial-size,increase-value)]...'}

(1) -m [host-name:]first-HiRDB-filename-in-master-directory-RDAREA

<identifier:pathname> ((up to 167 characters))

Specifies the name of the first HiRDB file in the master directory RDAREA. Specify the name of the host containing the master directory RDAREA and the path name, separated by a colon (:). This is the name specified in the pd_master_file_name operand in the system common definitions.

Example

-m host01:/hirdb_s/rdarea/rdmast

Rules

You can omit the host name if the master directory RDAREA is located at the server machine where the database copy utility is executed (where the pdcopy command is entered). In this case, specify only the path name.

If you specify the host name, make sure that it is a host name specified in the -x option of the pdunit operand in the system definition.

If you are using the system switchover facility, make sure that the host name of the primary system is specified.

(2) -M{x|r|s}

Specifies the backup acquisition mode. The following table shows available backup acquisition modes:

-M Option
Description
Database recovery method

x
(Reference/update-impossible mode)
This mode does not allow an RDAREA under backup processing to be referenced or updated. Use the pdhold command to place the RDAREA subject to backup processing in the shutdown and closed status.
Only the backup copy is needed to restore the database to the status existing when the backup copy was made.

r
(Reference-possible mode)
This mode allows an RDAREA under backup processing to be referenced but does not allow it to be updated.

s
(Updatable mode)
This mode allows an RDAREA under backup processing to be referenced or updated. To use this mode, the RDAREA subject to backup processing must be created in a character special file.
To restore the database, you need the backup copy and the system log obtained at the synchronization point immediately before the backup*.

Notes

To back up the master directory RDAREA with -M x specified, start HiRDB using the pdstart -r command, then back up the master directory RDAREA using the database copy utility.
If you specify -M r, you can back up the master directory RDAREA with the pdcopy command by starting HiRDB with the normal pdstart command.

If RECOVERY PARTIAL or RECOVERY NO is specified in CREATE TABLE for a LOB column (including when the RECOVERY operand is omitted), -M s does not back up the user LOB RDAREA containing the LOB column nor the data dictionary LOB RDAREA storing the object.

If -M s is specified and another transaction is updating a page subject to backup processing, the utility waits until the transaction issues a COMMIT. Therefore, pdcopy may result in a time-out.

If you are executing pdcopy in the updatable mode using an LVM for the database, you must place the target RDAREAs in backup hold status.

* The database copy utility process results listing contains the name and generation number of the system log file required for restoring the RDAREA. For details about the database copy utility process results listing, see Section 18.6 Database copy utility process results listing.

Notes

To back up all RDAREAs during HiRDB operation (in units of systems), specify r or s as the backup acquisition mode (-M option). You cannot specify x for the following reason: to specify x, you need to place all RDAREAs subject to backup processing in the shutdown and closed status using the pdhold command. However, the master directory RDAREA cannot be placed in the shutdown and closed status. Therefore, you cannot specify x in the -M option to back up all RDAREAs during HiRDB operation.

You cannot make a backup copy specifying -M s while a UAP or utility is executing in the no-log mode or pre-update log acquisition mode. To back up data after completion of a UAP or utility in the no-log mode or pre-update log acquisition mode, you need to specify -M r or -M x.

When you make a backup copy with -M s specified in either of the following cases, you must first use the pdlogswap -w command to swap system logs:

When pdmod has been executed (to exclude configuration modification processing from the system log file)

After operating in the no-log mode (to exclude no-log processing from the system log file)

For a shared RDAREA, -M s cannot be specified to acquire a backup.

(3) -p process-results-output-filename

<pathname>

Specifies the name of the file to which the processing result of the database copy utility is to be output.

Example

-p /usr/pdcopy/list01

Rules

Specify the path name of the server machine at which the database copy utility is executed (where the pdcopy command is entered).

If the specified path name is not found or this option is omitted, the database copy utility outputs its processing result to the server machine where the utility is executed. The utility displays the output destination in the KFPR26022-I message.

Regardless of the specification of this option, the utility outputs all error messages to the system log file and standard output, and the final processing result to the standard output. However, error messages may not be output to the system log file and to the standard output in the same order.

(4) -i

Specifies that utilization status is to be output to the process results output file. This option is applicable to the following RDAREAs:

Data dictionary RDAREAs

Data dictionary LOB RDAREAs

User RDAREAs

User LOB RDAREAs

The following information is output to the process results output file:

Type
Information
Description

Page
Page count

Number of available pages

Number of unused pages

Number of used pages
(a) Number of pages storing index¹
(b) Number of pages storing table¹

Ratio

Ratio of unused pages to available pages

Ratio of used pages to available pages

Ratio of pages storing index to used pages¹

Ratio of pages storing table to used pages¹

Area length¹
Length

Sum of free areas in used pages

Sum of free areas in pages storing index

Sum of free areas in pages storing table

Area length of all pages storing index

Area length of all pages storing table

Ratio

Ratio of sum of free areas to the area length of all pages storing index

Ratio of sum of free areas to the area length of all pages storing table

System information fragmentation rate²
Ratio
Extent of fragmentation of system information in data dictionary LOB RDAREAs and user LOB RDAREAs³

1 This information is not output for data dictionary LOB RDAREAs or user LOB RDAREAs.

2 This information is output only for data dictionary LOB RDAREAs and user LOB RDAREAs.

3 A value greater than 1% can have adverse effects on access performance, in which case you need to reorganize the database using the database reorganization utility. For a data dictionary LOB RDAREA, reorganize the dictionary tables related to stored procedures (SQL_ROUTINES, SQL_ROUTINE_RESOURCES, SQL_ROUTINE_PARAMS).

(5) -j lock-release-wait-time

<unsigned integer> ((0-200,000))

Specifies in seconds the maximum wait time for monitoring lock release.

Lock-release wait time is the time from when a lock request enters a wait status, until the status is released. If the lock is not released within the specified time, pdcopy terminates with an error.

If you specify a value of 0, the utility waits until the lock is released, without monitoring the lock-release wait time. If you omit this operand, the utility assumes the value of the pd_lck_wait_timeout operand in the system definitions.

Notes

If -M r is specified and the specified RDAREA is already locked by another user, pdcopy terminates with an error.

If -M s is specified and a requested page is being released by another user, pdcopy is placed in lock-release wait status until the user's transaction is terminated. In this case, specify a lock-release wait time that is greater than the execution time of the transaction conducting the page release. Page release occurs mainly in the following cases:

DROP TABLE

DROP INDEX

PURGE TABLE statement

INSERT or UPDATE statement executed on a column with an index

DELETE statement executed on a column with an index (with duplicate key)

DELETE statement executed after LOCK statement; or, UPDATE statement executed after LOCK statement resulting in a change to row length

(6) -E EasyMT-MT-attributes-definition-filename

<path name>

Specifies the name of the EasyMT MT attributes definition file. This file must be connected to the server machine where the database copy utility is executed (where the pdcopy command is entered). The -E option is applicable to a backup file that has been created with e or m specified in the -k option. The following attributes take effect:

buffno: Number of I/O buffer sectors

magazin: MT device allocation pattern

job: Job name

expire: Expiration date

preserve: Number of days to be saved

When the -B option is specified, it takes precedence over the number of I/O buffer sectors specified in the MT attributes definition file.

The utility checks the information specified in this file when EasyMT is executed.

(7) -B EasyMT I/O buffer sectors count

<unsigned integer> ((1 255))

Specifies the number of I/O buffer sectors to be used for magnetic tape input/output operations. A larger value results in better performance, but it requires more memory.

Rules

The -B option is applicable to a backup file that has been created with e or m specified in the -k option.

If the -E and -B options are both omitted, the utility assumes EasyMT's default values.

(8) -z log-point-information-file-name

<pathname>

This option is applicable to an operation that does not involve unloading of the system log. Specify the name of the file used to store the log point information.

Example

-z /usr/pdcopy/logp01

Rules

Specify the path name of the server machine where the database copy utility is executed (where the pdcopy command is entered).

If this log point information file is specified in the pdlogchg command, any unneeded system log file created before the log point is placed in the unload completed status. When this option is specified, the utility also stores the log point information in the backup file.

Notes

For a HiRDB/Parallel Server, for RDAREAs subject to backup processing, specify only the names of those RDAREAs that are located at the same server.

The server containing the RDAREAs subject to backup processing may be active when the utility is executed.

If a backup copy is to be made by starting HiRDB with the pdstart -r command, the -z option cannot be specified. To back up all data by specifying the -z option, start HiRDB with pdstart, then specify pdcopy -M r. The utility obtains a log point information file for each server; therefore, for a HiRDB/Parallel Server, it is impossible to back up all data at the same time. Additionally, the master directory RDAREAs cannot be placed in the shutdown or closed status. Therefore, if the processing is started with pdstart, pdcopy -M x -a cannot be specified.

(9) -J

Specifies that when a skip target error is detected while copying RDAREAs, the next RDAREA is to be copied immediately without terminating the pdcopy command.

The -J option is mutually exclusive with the -g, -K, and -d options. If they are specified, specification of the -J option is ignored.

The table below describes the skip target errors. Note that a skip may not have occurred if the KFPR26061-W message was not issued before or after the error message.

Skip target error | Message issued for a skip target error
A name specified in the -r option is not defined as an RDAREA, or a list RDAREA was specified. | KFPR26006-E
-M x was specified, but the RDAREAs to be copied include the master directory RDAREA. | KFPR26111-E
An open or close error was detected before copy processing started. | KFPR26012-E
-M s was specified, but the server containing an RDAREA to be copied is not active. | KFPR26015-E
recovery partial or recovery no was specified during table definition and -M s was specified, but the RDAREAs to be copied include a user LOB RDAREA. | KFPR26030-E
-M x was specified, but an RDAREA to be copied is not in shutdown and closed status. | KFPR26110-E

(10) -w pause-period,read-count

Because execution of pdcopy involves transfer of a large amount of data, the CPU usage rate increases and other online jobs may be affected adversely. Specifying the -w option pauses the utility for a specified period of time after reading a specific amount of data, thereby minimizing adverse effects on other online jobs.

Although specifying this option reduces the CPU usage rate, the pdcopy processing time increases.

Figure 18-2 provides an overview of the processing when the -w option is specified.

Figure 18-2 Overview of processing when the -w option is specified

pause-period<unsigned integer> ((1060000))

Specifies the pause period during data read operations in units of 10 milliseconds (example: 10, 20, 30,...). If the specified value is not a multiple of 10 milliseconds, it is rounded up.

The utility performs as many read operations as specified in read-count and then pauses for the specified period.

read-count<unsigned integer> ((110000))

Specifies the number of read operations to be performed before the processing is paused.

The utility performs as many read operations as specified here and then pauses for the specified period.

Rules

In determining the pause period and read count, take into account the total size of the data to be read by pdcopy and the total number of read operations.

For a HiRDB/Parallel Server, the processing specified with the -w option is performed for each server. Read operations are counted for each server and pause processing is performed for each server. Check the server that contains the target RDAREA before specifying the pause period and read count.

Determining the processing time when the -w option is specified

Obtain the data read count for each RDAREA.
For a data directory RDAREA
(4096 number of records in the HiRDB file system)/65536
+ (number of HiRDB files constituting the RDAREA - 1)
For other RDAREA
Page length (number of records in the HiRDB file system
- (number of unused segments segment size))/65536
+ (number of HiRDB files constituting the RDAREA - 1)

Obtain the total number of data read operations.
For a HiRDB/Single Server
Sum of the numbers of data read operations for all target RDAREAs
For a HiRDB/Parallel Server
Largest sum of the numbers of data read operations for all target RDAREAs among all applicable servers

Obtain the processing time.
(total number of data read operations obtained in 2/number of read operations)
pause period (milliseconds)
+ pdcopy processing time

(11) -f control-information-filename

<pathname>

Specifies the name of the control information file.

Example

-f /usr/pdcopy/cont01

This control statement must contain the options beginning at (12) as follows. You can also specify these options directly in the pdcopy command.

Notes

Create the control statement file at the server where the database copy utility is executed (where the pdcopy command is entered).

Specify in the control statement file at least one set of a backup file name, options for the RDAREAs subject to backup processing, a file type, a volume name, and an EasyMT file name. Note that each set of this information must be specified on a single line (which is up to 32,768 bytes). You can specify a maximum of 16 lines of information.

If you are using the differential backup facility with the -a or -q option specified, you can specify only one control statement line.

Format of the control statement file

 -b flag-argument {-a|-u flag-argument|-s flag-argument|-r flag-argument}
                [-k flag-argument][-v flag-argument][-N flag-argument]
                [-S flag-argument][-G flag-argument]
[-b flag-argument [{-u flag-argument|-s flag-argument|-r flag-argument}]  
                 [-k flag-argument][-v flag-argument][-N flag-argument]
                 [-S flag-argument]][-G flag-argument]
[-b flag-argument [{-u flag-argument|-s flag-argument|-r flag-argument}]
                 [-k flag-argument][-v flag-argument][-N flag-argument]
                            [-S flag-argument]][-G flag-argument]
                       .
                       .
                       .

Notes

For details about each option flag, see the explanation of the -b option as follows.

When specifying multiple lines, you can specify only those option flags specified on the first line also on the subsequent lines (except for the -a option). For example, if you specify the -u option on the first line, you can specify the -u option on any subsequent line.

(12) -b {[host-name:]backup-file-name[,backup-file-name]...|[host-name:]device-symbolic-name[,device-symbolic-name]|[host-name:]device-group-name|[host-name:]object-name|[host-name:]policy-name}

<identifier: path name> ((up to 167 characters when -k i is specified))

Specifies the backup file name, object name of JP1/OmniBack II, or policy name specified with NetBackup.

When specifying a backup file name, device symbolic name, or device group name
Specify the name of the host that will contain the backup files, separated by a colon (:) from the names of the backup files, or from the device symbolic names, or from the device group name. Specify a path name for a backup file name, and specify an identifier for a device symbolic name or device group name.

Example: -b host01:/usr/pdcopy/backup01

When specifying an object name of JP1/OmniBack II
When using JP1/OmniBack II, specify the name of the host where a disk agent of JP1/OmniBack II is located, separated by a colon (:) from an object name. Note that an object name containing an underscore (_) or a hyphen cannot be specified.

Example: -b host01:backup001

When specifying a policy name of NetBackup
When using NetBackup, specifying the name of the host that contains the NetBackup client, separated by a colon (:) from a policy name. Note that a policy name containing a hyphen cannot be specified.

Example: -b host01:POLICY01

Rules

If you are creating a backup file at the server machine where the database copy utility is executed (where the pdcopy command is entered), you can omit the host name, in which case you need to specify the path name only.

If you are specifying a host name, make sure that it is a host name specified in the -x option of the pdunit operand in the system definition.

If the server machine used to execute the database copy utility (where the pdcopy command is entered) has a disk agent of JP1/OmniBack II or a NetBackup client, you can omit the host name.

If you are using a control statement file, make sure that there is no duplication of backup file names on a line.

If you execute backup processing with an existing backup file name specified, that backup file will be overwritten.

A maximum of 1,120 RDAREAs can be backed up into a single backup file.

To back up RDAREAs into a file under a host using the system switchover facility, make sure that the host name of the primary system is specified. The utility creates a backup file under the host of the running system.

When using a disk agent of JP1/OmniBack II or a NetBackup client at a host that uses the system switchover facility, make sure that the host name of the primary system is specified. The disk agent of JP1/OmniBack II or NetBackup client will be the running system.

If you are using NetBackup and making a backup copy using the same policy name, do not change the RDAREAs to be backed up. If the policy name is the same but some of the RDAREAs are different, the system may not be able to restore the RDAREAs.

The following table describes the relationship between the -b and -k options:

-k option specification
-b option specification

-k u
You can specify one or more regular file names or one MT special file name. The second and subsequent files will be used only when there is more backup data than can be accommodated in the first file. Therefore, you need to specify in such a manner that each file is allocated to a different partition.

-k i
You can specify multiple sets of "HiRDB-file-system-area-name/HiRDB-file-name". The second and subsequent files will be used only when there is backup data that can be accommodated in the first file. You must create the HiRDB file system area as a utility-dedicated area in advance with the pdfmkfs command.

-k e
You can specify an MT special file name.

-k m
You can specify a maximum of two device symbolic names or one device group name managed by MTguide. The system does not check whether a device symbolic name or a device group name is specified.

-k o
You can specify any name with a maximum length of 512 bytes. The specified name becomes the object name of JP1/OmniBack II.
For the host name, specify the name of the host that has both a disk agent of JP1/OmniBack II and HiRDB.
You can check the object names with the omnidb command (with the -stream option specified) of JP1/OmniBack II.

-k n
You can specify the policy name specified with NetBackup. Express a policy name as 1-128 bytes of alphanumeric characters.
For the host name, specify the name of a host that has both NetBackup client and HiRDB.
You can check the policy names with the bpimagelist command of NetBackup.

Notes

When you create multiple backup files, note the following:

NFS files cannot be used.

A tape device cannot be used directly without EasyMT.

When you specify multiple backup files, use regular files or HiRDB files.

If you specify the same policy name to execute pdcopy more than once, you can specify a backup file using the -U option's time specification when the database is restored (during execution of pdrstr). For the time of the backup file, specify the date and time of the KFPR26071-I message that is displayed during execution of pdcopy.

(13) -a

Specifies that RDAREAs are to be backed up in units of systems (all RDAREAs in the system are to be backed up).

Rules

If you specify the -a option, the control statement file can contain only one line of control statement.

If you specify the -a option when a replica RDAREA has been defined, the replica RDAREA will also be backed up.

If an open error occurs on a HiRDB file in a replica RDAREA, the utility skips backup of that RDAREA and backs up another RDAREA. If the differential backup facility is used and an open error occurs in a HiRDB file in a replica RDAREA, the utility terminates with an error.

If an input/output error occurs while a HiRDB file in a replica RDAREA is being read, the utility terminates with an error.

(14) -u unit-identifier[,unit-identifier]...

<identifier> ((4 characters))

Specifies unit identifiers when RDAREAs are to be backed up in units of units (all RDAREAs in the specified units are to be backed up).

Rules

If specifying multiple unit identifiers, make sure none of them is duplicated.

When using a control statement file, make sure that each specified unit identifier is unique among all the control statements.

If you specify the -u option when a replica RDAREA has been defined, the replica RDAREA will also be backed up.

If an open error occurs in a HiRDB file in a replica RDAREA, the utility skips backup of that RDAREA and backs up another RDAREA. If the differential backup facility is used and an open error occurs in a HiRDB file in a replica RDAREA, the utility terminates with an error.

If an input/output error occurs while a HiRDB file in a replica RDAREA is being read, the utility terminates with an error.

(15) -s server-name[,server-name]...

<identifier> ((1-8 characters))

Specifies the names of servers when RDAREAs are to be backed up in units of servers (all RDAREAs in the specified servers are to be backed up).

Rules

If specifying multiple server names, make sure none of them is duplicated.

When using a control statement file, make sure that each specified server name is unique among all the control statements.

If you specify the -s option when a replica RDAREA has been defined, the replica RDAREA will also be backed up.

If an open error occurs in a HiRDB file in a replica RDAREA, the utility skips backup of that RDAREA and backs up another RDAREA. If the differential backup facility is used and an open error occurs in a HiRDB file in a replica RDAREA, the utility terminates with an error.

If an input/output error occurs while a HiRDB file in a replica RDAREA is being read, the utility terminates with an error.

(16) -r RDAREA-name[,RDAREA-name]...

<identifier> ((1-30 characters))

Specifies the names of the RDAREAs to be backed up.

Rules

If specifying multiple RDAREA names, make sure none of them is duplicated.

When using a control statement file, make sure that each specified RDAREA name is unique among all the control statements (except for a regular expression).

You can specify RDAREA names in three different regular expressions, as follows. They enable a group of RDAREAs to be backed up collectively. When using a regular expression, be sure to use only one type of expression.

Regular expression
Explanation
Example

character-string*
Any RDAREA name beginning with the specified character string
PDUSER*
All RDAREAs with names beginning with PDUSER are processed.

*character-string*
Any RDAREA name containing the specified character string
*PDUSER*
All RDAREAs with names containing the character string PDUSER are processed.

-
Any RDAREA name containing the specified character string at the specified location
..USER
All RDAREAs with names containing the character string USER beginning in character 3 are processed.

Note

You can combine a regular expression of RDAREA names with individual RDAREA names.

Example

-r RDUSER*,RDMASTER

The following shows the rules for specifying RDAREA names:

Type
Coding method without using regular expression
Coding method using regular expression

Command line specification (without using a control statement file)
When specifying an RDAREA name in lowercase alphabetic characters or when the RDAREA name contains a space, enclose the entire name in double quotation marks ("). If you use the Bourne shell (sh), C shell (csh), or Korn shell (ksh), you also need to enclose the RDAREA name in single quotation marks (').
Enclose the entire regular expression with single quotation marks ('). Regular expression is case sensitive.

Specifying in a control statement file
When specifying an RDAREA name in lowercase alphabetic characters or when the RDAREA name contains a space, enclose the entire name in double quotation marks (").
Regular expression is case sensitive.

If the -q and -r options are both specified, only system RDAREAs and original RDAREAs can be specified. In this case, in the inner replica group to which an original RDAREA belongs, the replica RDAREA with the generation specified in the -q option is subject to processing.

If the replica RDAREA with the generation specified in the -q option is undefined, the utility ignores this RDAREA and backs up another RDAREA.

If an open error occurs in a HiRDB file in a replica RDAREA, the utility skips backup of that RDAREA and backs up another RDAREA. If the differential backup facility is used and an open error occurs in a HiRDB file in a replica RDAREA, the utility terminates with an error.

If an input/output error occurs while a HiRDB file in a replica RDAREA is being read, the utility terminates with an error.

If the -q option is specified, the regular expression is applicable to the original RDAREA. If the -q option is omitted, the regular expression is applicable to all RDAREAs including the replica RDAREAs.

(17) -k {u|i|e|m|o|n}

Specifies the type of backup file.

u

Specifies that the backup is to be made to a regular file or to MT without using EasyMT, JP1/OmniBack II, or NetBackup. You cannot specify this option if the backup file consists of multiple volumes (specify -k m instead).

i

Specifies that the backup is to be made to a HiRDB file system area. This option is applicable when the backup file is shared by the running system and a standby system, and the standby system is to be recovered using the backup made by the running system.

e

Specifies that the backup is to be made to magnetic tape using EasyMT. You cannot specify this option if the backup file consists of multiple volumes. This specification requires the use of EasyMT.

m

Specifies that the backup is to be made to magnetic tape using EasyMT and MTguide. You must specify this option if the backup file consists of multiple volumes. This specification requires the use of EasyMT and MTguide.

o

Specifies that the backup is to be made using JP1/OmniBack II. Specify in the-b option the object name of JP1/OmniBack II.

n

Specifies that the backup is to be made using NetBackup. Specify in the -b option the policy name set by NetBackup.

(18) -v volume-name[,volume-name]...

<alphanumerics> ((1-6 characters))

Specifies the volume names of the magnetic tapes to which the backup will be made. When this option is specified, an error results if a volume mounted at a tape deck does not match any of the specified values. If the number of volumes actually needed to make the backup is larger than the number of volumes specified here, the utility does not check any excess volume names. When this specification is omitted, the utility does not perform volume name checking.

This option is applicable to the backup file for which e or m is specified in the -k option. To specify multiple volume names, you need to specify m in the -k option.

Make sure that each specified volume name is unique among all volumes used.

(19) -N EasyMT-filename

<alphanumerics> ((1-17 characters))

Specifies the file name to be assigned when the backup file is created. This specification takes effect only on the backup file made with e or m specified in the -k option. The utility always creates a backup file as the first file on the mounted magnetic tape (beginning at file number 1).

(20) -G barlist-filename

<alphanumerics (excluding an underline (_))> <<1-64 characters>>

Specifies a barlist filename for JP1/OmniBack II.

A barlist file must be created at the server machine where JP1/OmniBack II's cell server is located.

Create the barlist file in the following directory:

/etc/opt/omni/barlists/stream

The following shows an example of a barlist file format:

Example

BARLIST "barlist-filename"   ...................1
DEFAULTS
{
}
DEVICE "logical-device-name"   .................2
{
}
CLIENT HiRDB host-name   .......................3
{
 -public   ....................................4
} -protect protection-specification   ..........5

Explanation

Barlist file name (e.g., BARLIST "DLT01FILE")

Logical device name (e.g., DEVICE"DLT01")
For details about the logical device, see the applicable JP1/OmniBack II manual.

Name of the host where the disk agent is located (e.g., CLIENT HiRDB h9000vr3)

Required operand

Protection specification
protection-specification={none|days n|weeks n|until Date|permanent}
none: Not protected.
days n: For n, specify the number of days to be protected.
weeks n: For n, specify the number of weeks to be protected.
until Date: For Date, specify the date at which protection expires in the format YYYY/MM/DD, enclosed in double quotation marks (").
permanent: Permanent protection.

(21) -g differential-backup-group-name

<alphanumerics> ((1-30))

Specifies the name of a group as a unit subject to the differential backup facility.

If the specified differential backup group name ends with S, the utility immediately starts differential backup management, at which time the differential backup management file specified in the -k option is created. If an existing differential backup management file has the specified time, the utility deletes it. Therefore, you need to delete the backup files in the previous differential backup group.

For details about the differential backup facility, see the HiRDB Version 8 System Operation Guide.

Rules

The utility always obtains a full backup for user LOB RDAREAs, data dictionary LOB RDAREAs, and registry LOB RDAREAs.

For the same differential backup group, you cannot change the RDAREAs subject to backup processing.

Store all backup files belonging to the same differential backup group at the same host (specify only one host name in the -b option).

Create a differential backup file and a differential backup management file in separate HiRDB file systems.

When the differential backup facility is used, the method for specifying the differential backup file name in the -b option depends on the specification of the -k option.

If -k u, -k i, or -k o is specified, you must specify a different name for each differential backup file.

This is not applicable when -k e or -k m is specified (the differential backup facility cannot be used).

If -k n is specified, there is no need to specify a different policy name for each differential backup file (different names may be specified, in which case the operation becomes complex because a policy needs to be created for each differential backup file).

(22) -d backup-type

If you are using the differential backup facility, use this option to specify the type of backup to be made:

a: Makes a full backup.

b: Makes an accumulation-differential backup from the most recent full backup.

c: Makes an accumulation-differential backup from one of the following backups, whichever is most recent:

Previous accumulation-differential backup

Previous full backup

d: Makes a differential backup from the previous backup.

(23) -K HiRDB-file-system-area-name-storing-differential-backup-management-file

<pathname>

If you are using the differential backup facility, use this option to specify the name of the HiRDB file system area where the differential backup management file is to be stored. The utility uses the differential backup group name specified in the -g option as the name of the differential backup management file.

After executing pdcopy, you need to back up the differential backup management file using the pdfbkup command. If an error occurs in the differential backup management file, you must restore the differential backup management file from this backup copy using the pdfrstr command.

If you have executed pdmod while using the differential backup facility, make a full backup. In this case, also create a differential backup management file by specifying the -K option.

Make sure that "name-of-HiRDB-file-system-area-storing-differential-backup-management-file/differential-backup-group-name" does not exceed 167 characters.

(24) -o differential-backups-history-filename

<pathname>

If you are using the differential backup facility, use this option to specify the name of the file to which historical information about differential backups is to be output.

For details about historical information, see Section 18.6 Database copy utility process results listing.

(25) -L differential-backup-management-file-size

<unsigned integer> ((1-2,046)) <<1>>

If you are using the differential backup facility, use this option to specify the size of the differential backup file in MB.

This size must be less than the value used when the HiRDB file system area was created (value of the -n option in the pdfmkfs command minus 5).

You can increase the size of this file a maximum of 23 times. The utility uses this value when increasing the size of the file.

(26) -q generation-number

<unsigned integer> ((0-10))

Specifies the generation number of the RDAREA to be backed up when the inner replica facility is used. When 0 is specified, the utility backs up the original RDAREA; when a value in the range 1-10 is specified, the utility backs up the specified replica RDAREA generation.

Rules

Specify this option together with the -r option. This option cannot be specified together with the -a, -u, or -s option.

Specify this option to back up the replica RDAREA with the indicated generation number in the inner replica group to which the original RDAREA specified in the -r option belongs.

(27) -S {backup-file-initial-size,increase-value | '(backup-file-initial-size, increase-value) [,(backup-file-initial-size,increase-value)]...'}

<unsigned integer> ((1-1048574)) <<100,10>>

This option is applicable to the backup file for which i is specified in the -k option.

Specify in MB an initial size and a size increase value for the backup file (the specified increase value is allocated when the amount of backup data exceeds the initial size).

Rules

The initial size must be less than the value specified in the -n option of the pdfmkfs command when the HiRDB file system area was created. This is because an area for system management information is required.

When this option is omitted, the utility assumes 100 MB as the backup file initial size and 10 MB as the increase size.

You can increase the size of a backup file a maximum of 23 times, provided that the number of increases does not exceed the permitted maximum number of increases specified when the HiRDB file system area was created.

If specifying multiple files, you can specify an initial allocation size and increase value for each file. In this case, enclose each set of initial allocation sizes and increase values in parentheses, then enclose the entire specification in single quotation marks. If you are specifying this information in the control statement file, do not use single quotation marks.

If the number of initial allocation sizes paired with increase values is less than the number of specified files, the utility assumes the last pair of values for the remaining files. If the number of initial allocation sizes paired with increase values is more than the number of specified files, the utility ignores the excess pairs of values.

Example

-b file1,file2,file3,file4
-k i
-s '(10,1),(1,1)'

File | Initial size | Increase value | Remarks
file1 | 10 | 1 | Set by the (10, 1) specification.
file2 | 1 | 1 | Set by the (1, 1) specification.
file3 | 1 | 1 | Because there is no specification, the last specified values (1, 1) are applied.
file4 | 1 | 1

18.5 Notes

Do not back up an erroneous RDAREA. A backup copy of an erroneous RDAREA is invalid and cannot be used to restore the database.

To use EasyMT and MTguide, you need to initialize the magnetic tape before using this utility.

If both EasyMT and JP1/Magnetic Tape Access are installed, the utility starts JP1/Magnetic Tape Access.

The maximum number of copies of the database copy utility that can be executed concurrently depends on the value of the pd_utl_exec_mode operand in the system common definitions. If pd_utl_exec_mode=0 is specified, you can execute a maximum of 32 copies; if pd_utl_exec_mode=1 is specified, you can execute as many copies as there are specified in the pd_max_users operand. The number of copies of the database copy utility that can be executed concurrently depends on the number of specified backup files. The following describes the concept of concurrently executing database copy utility copies:

Concept

If six copies of database copy utility are executed concurrently, each of which uses a single backup file, the number of concurrently executing database copy utility copies is 1 6 = 6.

If four copies of database copy utility are executed concurrently, each of which uses two single backup files, the number of concurrently executing database copy utility copies is 2 4 = 8.

If all the above database copy utilities are running concurrently, the number of concurrently executing utility copies is 6 + 8 = 14.

If you specify multiple backup files in the control statement file using a regular expression in the -r option, make sure that the RDAREAs subject to backup processing are output to a single backup file. An error results if they are output to multiple backup files. The following shows examples:

Example 1

-b back-up-file-1 -r RDUSER*,RDMASTER

-b back-up-file-2 -r ..USER,RDDICTIONARY

Explanation:

An error results because the RDAREAs with names beginning with RDUSER are output to backup files 1 and 2.

Example 2

-b back-up-file-1 -r RD*,RDMASTER

Explanation:

This specification does not result in an error because there is only one backup file, although RD* includes RDMASTER.

The return codes of pdcopy are as follows:
0: Normal termination
8: Abnormal termination (some of the copy operations failed or were skipped)
12: Abnormal termination (all copy operations failed)

You can copy a maximum of 1,120 RDAREAs in a single execution of pdcopy. If you have specified multiple backup files in the -b option in the control statements file, you can copy a maximum of 1,120 RDAREAs per backup file.

If you selected utf-8 as the character encoding in the pdsetup command, you can use a file with a BOM as the control statements file for pdcopy. Note that even when a file with a BOM is used as the control statements file, the BOM is skipped. No BOM is included in the file that is output by pdcopy.

18.6 Database copy utility process results listing

Organization of this section

(1) Contents of process results output file

(2) Contents of the history file for differential backups

(1) Contents of process results output file

The following shows the contents of the process results output files for the database copy utility.

pdcopy (VV-RR)  ***** DB COPY *****   1996-04-24 14:08:20 [1] utl3 [2]
-----------------------------------------------------------------
*** DB BACKUP INFORMATION LIST ***       BACKUPMODE : SHARED [3]
<<LOG FILE INFORMATION>>
 SYSTEM ID      : utl13 [4]
 UNIT ID        : sds1  [5]
 TYPE           : sys   [6]
 SERVER NAME    : sds   [7]
 SERVER RUN ID  : 455d67c7 [8]
 LOG SERVER RUN ID : 455d67c7 [9]
 FILE NAME      : logfg01 [10]
 GENERATION NO  : 1 [11]
 BLOCK NO       : d2 [12]
 HEADER WRITE COUNTER : 3 [13]
 HEADER WRITE TIME : 455d68d2 [14]
<<BACKUP FILE INFORMATION>>
 VOL NAME       : vol1,vol2 [15]
 FILE NAME      : host1:/usr/bkup01 [16]
                        /usr/bkup02
 FILE KIND      : u [17]
 STARTED AT     : 1996-04-24 14:08:20 [18]
 ENDED AT       : 1996-04-24 14:08:21 [19]
<REPLICA BACKUP INFORMATION>
 REPLICA BACKUP GENERATION NO : 0 [41]

<<RDAREA INFORMATION>>
 UNIT NAME      :un16 [20] SERVER NAME : sds [21]

 RDAREA NAME    :USER1[22][23]           [24]                      [25]
 RDAREA ID      :          4 ATTRIBUTE : USER          PAGE SIZE : 4096
 STARTED AT     : 1996-04-24 14:08:20 [26]
 ENDED AT       : 1996-04-24 14:08:21 [27]

<REPLICA RDAREA INFORMATION>
 ORIGINAL RDAREA NAME : USER1 [42]
 REPLICA RDAREA GENERATION NO : 0 [43]
<RDAREA STATUS>      [28]
TOTAL PAGE:           200 USED PAGE(RATE)   :        3   ( 1.5%) [29]
                          FREE SPACE        :       10.8         [30]
                          UNUSED PAGE(RATE) :      197   (98.5%) [31]
                              [32]
 INDEX PAGE(RATE) :            1( 33.3%) TOTAL SPACE :  4.0k      [33]
                          FREE SPACE(RATE)  :        3.8k( 94.7%) [34]
                              [35]
 DATA PAGE(RATE)  :            2( 66.7%) TOTAL SPACE :  8.0k      [36]
                          FREE SPACE(RATE)  :        7.0k( 87.6%) [37]

<FILE INFORMATION>
1 /dbarea/area1/rdmt06 [38]
  EXTENT COUNT :   1 [40]
2 /dbarea/area1/rdmt07
  EXTENT COUNT :   1

<<RDAREA INFORMATION>>
 UNIT NAME   : un16        SERVER NAME : sds

 RDAREA NAME : USER2
 RDAREA ID   :            5 ATTRIBUTE  : USER             PAGE SIZE : 4096
 STARTED AT  : 1996-04-24 14:08:21
 ENDED AT    : 1996-04-24 14:08:21

<REPLICA RDAREA INFORMATION>
 ORIGINAL RDAREA NAME : USER2
 REPLICA RDAREA GENERATION NO : 0
<RDAREA STATUS>
TOTAL PAGE:           200 USED PAGE(RATE)   :        3   ( 1.5%)
                          FREE SPACE        :       10.8
                          UNUSED PAGE(RATE) :      197   (98.5%)
 INDEX PAGE(RATE) :            1( 33.3%) TOTAL SPACE :  4.0k
                          FREE SPACE(RATE)  :        3.8k( 94.7%)
 DATE PAGE(RATE)  :            2( 66.7%) TOTAL SPACE :  8.0k
                          FREE SPACE(RATE)  :        7.0k( 87.6%)

<FILE INFORMATION>
1 /dbarea/area1/rdmt08
  EXTENT COUNT :   2
2 /dbarea/area1/rdmt09
  EXTENT COUNT :   2

<<RDAREA INFORMATION>>
 UNIT NAME   : un16        SERVER NAME : sds

 RDAREA NAME : USER3
 RDAREA ID   :            6 ATTRIBUTE  : USER            PAGE SIZE : 4096  
 STARTED AT  : 1996-04-24 14:08:21
 ENDED AT    : 1996-04-24 14:08:21
<REPLICA RDAREA INFORMATION>
 ORIGINAL RDAREA NAME : USER3
 REPLICA RDAREA GENERATION NO : 0
<RDAREA STATUS>
 TOTAL PAGE:        200 USED PAGE(RATE)   :          3   (  1.5%)
                        FREE SPACE        :         10.8
                        UNUSED PAGE(RATE) :        197   ( 98.5%)
 INDEX PAGE(RATE) :          1( 33.3%) TOTAL SPACE :    4.0k
                        FREE SPACE(RATE)  :          3.8k( 94.7%)
 DATA PAGE(RATE)  :          2( 66.7%) TOTAL SPACE :    8.0k
                        FREE SPACE(RATE)  :          7.0k( 87.6%)

<FILE INFORMATION>
1 /dbarea/area1/rdmt10
  EXTENT COUNT :   2
2 /dbarea/area1/rdmt11
  EXTENT COUNT :   2

<<RDAREA INFORMATION>>
 UNIT NAME : un16     SERVER NAME : sds

 RDAREA NAME : USER_LOB1
 RDAREA ID   :         31  ATTRIBUTE : USER_LOB       PAGE SIZE : 8192
 STARTED AT  : 1996-04-24 14:08:21
 ENDED AT    : 1996-04-24 14:08:21

<REPLICA RDAREA INFORMATION>
 ORIGINAL RDAREA NAME : USER_LOB1
 REPLICA RDAREA GENERATION NO : 0
<RDAREA STATUS>
 TOTAL PAGE:     75000  USED PAGE(RATE)   :      30000   ( 40.0%)
                        UNUSED PAGE(RATE) :      45000   ( 60.0%)

 DISORDERED LOB DIRECTORY RATIO :   0% [39]

<FILE INFORMATION>
1 /dbarea/area1/rdmt12
  EXTENT COUNT :   2
2 /dbarea/area1/rdmt13
  EXTENT COUNT :   2

Explanation

Date and time the database copy utility was executed (in the format YYYY/MM/DD hh:mm:ss).
YYYY: Year. MM: Month. DD: Date. hh: Hour. mm: Minute. ss: Second.

HiRDB identifier

Backup acquisition mode:
EXCLUSIVE: -M x or -M r
SHARED: -M s

HiRDB identifier

Unit identifier

Log type:
sys: System log file

Server name

Server run ID (8 hexadecimal digits)

Log server run ID (8 hexadecimal digits)

Name of the system log file needed to restore the database, together with the corresponding backup file.

Generation number of the system log file in 10.

Beginning block number (up to 8 hexadecimal digits)

Number of times header has been updated (up to 8 hexadecimal digits)

Usage start time (8 hexadecimal digits)

Volume name
When e or m is specified in the -k option, the utility displays the value specified in the -v option; if the -v option was omitted, the utility displays ******.

Backup file name (displayed as host-name:path-name*).
If multiple file names were specified, the utility displays only the names of those files that were used.
If -k e or -k m was specified, the utility displays the value specified in the -N option. If the -N option was omitted, the utility displays ******.
If -k o was specified, the header becomes OBJECT NAME, not FILE NAME. In this case, the utility displays the object name of JP1/OmniBack II.
If -k n was specified, the header becomes POLICY NAME, not FILE NAME. In this case, the utility displays the policy name specified with NetBackup.
* If the system switchover facility is used, the utility displays the host name of the primary system.

Type of backup file (value specified in the -k option)

Backup start time (same format as in 1)

Backup end time (same format as in 1)

Name of the unit containing the RDAREA

Name of the server containing the RDAREA

Name of the copied RDAREA

Number of the copied RDAREA

Type of RDAREA:
MASTERDIRECTORY: Master directory RDAREA
DATADIRECTORY: Data directory RDAREA
DATADICTIONARY: Data dictionary RDAREA
SYSTEM_LOB: Data dictionary LOB RDAREA
USER: User RDAREA
USER_LOB: User LOB RDAREA
REG: Registry RDAREA
REG_LOB: Registry LOB RDAREA

Page length of the RDAREA (in bytes)

Backup start time for the RDAREA (same format as in 1)

Backup end time for the RDAREA (same format as in 1)

Number of available pages in the RDAREA (number of pages in the RDAREA where a table or index can be stored)

Number of used pages (number of pages in the RDAREA that already contains a table or index), and the percentage ratio of the number of used pages to the number of available pages

Size of free space in the pages used (in bytes)
This information is displayed in the following format:
ZZZ9 (applicable from 0 to less than 1 KB)
ZZZ9.9K (applicable from 1 KB to less than 1 MB)
ZZZ9.9M (applicable from 1 MB to less than 1 GB)
ZZZ9.9G (applicable to 1 GB or greater)
Note: Z is omitted if the value is 0; 9 is never omitted, even if the value is 0.

Number of unused pages (of all available pages in the RDAREA, the number of pages that has not yet been used), and the ratio of the number of unused pages to the number of available pages

Number of index storage pages (of all the used pages, the number of pages used to store an index), and the percentage ratio of the number of index storage pages to the number of used pages

Total size of the index storage pages (in bytes)

Total size of the free space in the index storage pages (in bytes), and the ratio of this size to the total size of the index storage pages

Number of table storage pages (of all the used pages, the number of pages used to store a table), and the percentage ratio of the number of table storage pages to the number of used pages

Total size of table storage pages (in bytes)

Total size of the free space in the table storage pages (in bytes), and the ratio of this size to the total size of the table storage pages

Names of the HiRDB files constituting the RDAREA

Access performance deteriorates if the system information disorganization ratio for a data dictionary LOB RDAREA or user LOB RDAREA is 1% or greater. In this case, reorganize the RDAREA using the database reorganization utility. For a data dictionary LOB RDAREA, reorganize the dictionary tables related to stored procedures (SQL_ROUTINES, SQL_ROUTINE_RESOURCES, and SQL_ROUTINE_PARAMS).

Number of HiRDB file extents

Generation number specified in the -q option

Name of original RDAREA

Generation number of replica RDAREA

Note

<<LOG FILE INFORMATION>> is displayed when s is specified in the -M option or when the -z option is specified.

Nos. 4-6, 8, 9, and 12-14 are displayed when the -z option is specified.

Nos. 42 and 43 are displayed when the inner replica facility is used.

(2) Contents of the history file for differential backups

The following shows the contents of the differential backups history file provided by the database copy utility:

pdcopy (VV-RR) ***** DB COPY *****  2000-10-26 21:30:20[1] utl3[2]

/hirdb/pdcopy/admfile[3]
backupg1[4]
2000-10-19 21:00:20[5]
2000-10-26 21:18:20[6]
RDAREA NAME :rdarea01,rdarea02[7]
[8]          [9]                 [10]    [11][12]           [13]
a 2000-10-19 21:08:20,2000-10-19 21:09:25 r u host01: /hirdb/pdcopy/backup/backup01
d 2000-10-20 21:01:20,2000-10-20 21:01:38 r u host01: /hirdb/pdcopy/backup/backup02
c 2000-10-21 21:05:20,2000-10-21 21:06:10 r u host01: /hirdb/pdcopy/backup/backup03
b 2000-10-22 21:01:20,2000-10-22 21:01:45 r u host01: /hirdb/pdcopy/backup/backup04

Explanation

Date and time the pdcopy command was executed

HiRDB identifier

Name of the HiRDB file system area containing the differential backup management file

Backup group name

Date and time the backup group was created

The last update date and time for the backup group

Names of the RDAREAs belonging to the backup group

Type of backup:
a: Full backup
b: Accumulation-differential backup from the most recent full backup
c: Accumulation-differential backup from the previous accumulation-differential backup or previous full backup, whichever is more recent
d: Differential backup

Backup start date and time

Backup end date and time

Backup acquisition mode:
x: Reference/update-impossible mode
r: Reference-possible mode
s: Updatable mode

Type of backup file
u: Regular File
i: HiRDB file system area for backup files
o: JP1/OmniBack II object

Backup file name or object name
The backup file name is displayed in the format host-name:backup-filename. The object name is followed by (G barlist-filename).

18.7 Backup file format

Figures 18-3 to 18-7 show the formats used in the database backup file that is created by the database copy utility. Information in these backup files is used to manage backup generations, such as when a backup management tool is created. These backup file formats are applicable to a HiRDB/Single Server only.

Figure 18-3 Structure of the database backup file

Figure 18-4 Data format of the backup file record header

Figure 18-5 Data format of the file check record

Figure 18-6 Data format of the backup RDAREA header record

Figure 18-7 Data format of the backup RDAREA record

19. Database Recovery Utility (pdrstr)

This chapter explains how to use the database recovery utility (pdrstr).

This chapter contains the following sections:

Organization of this chapter

19.1 Functions of the database recovery utility

19.2 Information required for recovering databases

19.3 Examples

19.4 Command format

19.5 Notes

19.6 Database recovery utility process results listing

19.1 Functions of the database recovery utility

Executer: HiRDB

The database recovery utility provides the following functions:

Database recovery

Re-creation of log point information file

Organization of this section

19.1.1 Database recovery

19.1.2 Re-creating a log point information file

19.1.1 Database recovery

Whenever a database needs to be restored due to a disk error, etc., use the database recovery utility. In this case, you need the following information:

Backup file

Unload log file (or system log file if the HiRDB system is run without unloading the system log)

Figures 19-1 and 19-2 show an overview of database recovery.

Figure 19-1 Overview of database recovery (operation involving unloading of the system log)

Explanation

You can restore the database to the following status:

Status existing when the last backup was made
To restore the database to the status existing when the last backup was made, you only need the backup file. No unload log file is needed.

Most recent status (most recent synchronization point)
To restore the database to the most recent status, you need the backup file and the unload log file that was created by unloading the system log after the last backup processing.

Figure 19-2 Overview of database recovery (operation without unloading the system log)

Explanation

You can restore the database to the following status:

Status existing when the last backup was made
To restore the database to the status existing when the last backup was made, you only need the backup file. No system log is needed.

Most recent status (most recent synchronization point)
To restore the database to the most recent status, you need the backup file and the system log file that contains the system log output after the last backup processing.

19.1.2 Re-creating a log point information file

If running the HiRDB system without unloading system log, you need to store a log point information file. If the log point information file is damaged due to disk errors, etc., re-create it using the database recovery utility. To do this, you need the following input information:

Backup file

Figure 19-3 shows an overview of re-creation of a log point information file.

Figure 19-3 Overview of re-creation of a log point information file

19.2 Information required for recovering databases

Organization of this section

(1) Database recovery units

(2) Status of RDAREAs subject to recovery processing

(3) Relationship with the backup acquisition mode

(4) Restoring the master directory RDAREAs

(5) Restoring only backup data using the backup file acquired before a configuration change

(6) Restoring to the most recent status

(7) Database restored using the unload log file or system log file

(8) Recovery when operating HiRDB without unloading the system log

(9) Recovery from a backup using the differential backup facility

(10) Recovery from a backup using the inner replica facility

(11) Recovery with range specification

(12) HiRDB status during database recovery utility execution

(1) Database recovery units

You can restore a database in the following units. The database recovery utility provides an option to specify these recovery units. Table 19-1 shows the database recovery units.

Table 19-1 Database recovery units

Database recovery unit | Description | Option
By the system | Restores all RDAREAs in the system (including master directory RDAREAs), except the user RDAREAs. | -a
By the backup file | Restores the RDAREAs in the backup file. | -c
By the unit* | Restores all RDAREAs in a specified unit. | -u
By the server* | Restores all RDAREAs in a specified server. | -s
By the RDAREA | Restores specified RDAREAs. A group of RDAREAs can be restored by specifying their RDAREA names as a regular expression. | -r

* This is applicable to a HiRDB/Parallel Server only, not applicable to a HiRDB/Single Server.

(2) Status of RDAREAs subject to recovery processing

The RDAREAs subject to recovery processing (except the master directory RDAREA) must be in shutdown and closed status (CLOSE HOLD(CMD) or CLOSE HOLD displayed by the pddbls command).

(3) Relationship with the backup acquisition mode

If the backup file was created by the database copy utility specifying the -M s option, you need not only the backup file but also the unload log file or system log file.

(4) Restoring the master directory RDAREAs

To restore an RDAREA, you need to place the RDAREA in the shutdown and closed status by the pdhold command. However, the master directory RDAREA cannot be placed in the shutdown and closed status. To restore the master directory RDAREA, you need to terminate HiRDB once and then restart it using the pdstart -r command.

Therefore, to restore all RDAREAs including the master directory RDAREA, you must start HiRDB using the pdstart -r command.

(5) Restoring only backup data using the backup file acquired before a configuration change

To restore only backup data using the backup file acquired before the configuration was changed (HiRDB file was added), first delete all the HiRDB files constituting the RDAREA.

(6) Restoring to the most recent status

To restore an RDAREA to the most recent status, you need the backup file and the system log file that is output after the last backup. This means that you need the system log stored in the current system log file. Because the current system log file cannot be unloaded, use the pdlogswap command to swap the log files, then unload the file containing the current system log information.

(7) Database restored using the unload log file or system log file

If you have restored a database using an unload log file or a system log file, be sure to back up the restored RDAREA immediately after recovery processing. If you do not and an error occurs, the database recovery utility cannot restore the database to the synchronization point immediately before the error.

To restore a database using unload log files, you must specify all required unload log files. If any required unload log files are missing, the utility displays a message (KFPR16203-E or KFPR16301-E) and terminates with an error.

(8) Recovery when operating HiRDB without unloading the system log

If you are operating HiRDB without unloading system log information, then in the event of a database error you can recover the database using the system log information as the input information for the database recovery utility, without having to unload the system log information. This mode of operation is called operation without unloading the system log.

Operation without unloading the system log is based on the log point concept. To recover a database from an error, you do not need the system log information from before the point when the last backup was made. The location that distinguishes the system log information required for recovery of the database from the unneeded system log information is called a log point. A log point is set when the database copy utility is used to make a backup copy.

To recover the database during operation without unloading the system log, specify the -L and -z options.

For details about operation without unloading the system log, see the HiRDB Version 8 System Operation Guide.

(9) Recovery from a backup using the differential backup facility

To recover the database from its backup obtained using the differential backup facility, specify the -g and -K options.

For details about the differential backup facility, see the HiRDB Version 8 System Operation Guide.

(10) Recovery from a backup using the inner replica facility

To recover the database from its backup obtained using the inner replica facility, specify the -q and -x options.

For details about the inner replica facility, see the HiRDB Staticizer Option Version 7 Description and User's Guide.

(11) Recovery with range specification

When restoring a database using an unload log file or system log file, you can specify a range of recovery time. This time range can also be specified for each RDAREA to be recovered. When a time range is specified, only those logs output by transactions with synchronization points that fall within the specified time range are recovered. Following is an example of logs subject to recovery when the database is restored with a time range specified. For details about recovery with a time range specification, see the HiRDB Version 8 System Operation Guide.

Figure 19-4 shows an overview of recovery with a time range specified.

Figure 19-4 Overview of recovery with a time range specified

Explanation

If a transaction is executing at the start point, such as Transaction 1 in the figure, the utility recovers it using the log collected since the start point.

The utility does not recover a transaction, such as Transaction 3, that has not reached a synchronization point by the recovery end time. The utility recovers a transaction that has reached a synchronization point within the specified time range, using the log up to the synchronization point. For a transaction, such as Transaction 3, that has not reached a synchronization point, the utility issues a warning message to that effect.

(12) HiRDB status during database recovery utility execution

You can execute the database recovery utility only when HiRDB is active.

Execute the database recovery utility at the server machine containing the single server or the server machine where the system manager is located.

To execute the database recovery utility, the unit containing the RDAREAs subject to recovery processing must be active, as well as the unit containing the unload log file, system log file, or backup file used for recovery processing. If only a backup file is used to restore RDAREAs, the server containing the RDAREAs to be restored may not be active; however, if an unload log file or system log file is to be used, the server must be active.

19.3 Examples

This section presents examples of database recovery and log point information file re-creation. The topics include:

Restoring in units of systems

Restoring in units of RDAREAs

Restoring in units of servers

Restoring RDAREAs using JP1/OmniBack II

Restoring from a backup using the differential backup facility

Restoring RDAREAs from their backups using NetBackup

Re-creating the log point information file

For details about the pdrstr command options used in these examples, see Section 19.4 Command format.

Organization of this section

19.3.1 Restoring in units of systems

19.3.2 Restoring in units of RDAREAs

19.3.3 Restoring in units of servers

19.3.4 Restoring RDAREAs using JP1/OmniBack II

19.3.5 Restoring from a backup using the differential backup facility

19.3.6 Restoring a specified RDAREA generation when the inner replica facility is used

19.3.7 Restoring RDAREAs from their backup using NetBackup

19.3.8 Re-creating the log point information file

19.3.1 Restoring in units of systems

Organization of this subsection

(1) Restoring all RDAREAs

(2) Restoring all RDAREAs from a backup on DAT

(1) Restoring all RDAREAs

This example restores all RDAREAs to the point when the last backup was made:

pdrstr -m /hirdb/rdarea/mast/mast01 -b /usr/hirdb/pdcopy/backup/backup01
-p /usr/hirdb/pdrstr/list/list01 -a

Explanation

-m: Specifies the name of the first HiRDB file in the master directory RDAREA.

-b: Specifies the name of the backup file.

-p: Specifies the output file name for the database recovery utility process results listing.

-a: Specifies that all RDAREAs are to be restored.

(2) Restoring all RDAREAs from a backup on DAT

This example restores all RDAREAs to the point when the last backup was made, using the backup made to a file on DAT.

pdrstr -m /hirdb/rdarea/mast/mast01 -b /dev/rmt/0m
-p /usr/hirdb/pdrstr/list/list01 -a

Explanation

-m: Specifies the name of the first HiRDB file in the master directory RDAREA.

-b: Specifies the name of the backup file.

-p: Specifies the output file name for the database recovery utility process results listing.

-a: Specifies that all RDAREAs are to be restored.

19.3.2 Restoring in units of RDAREAs

Organization of this subsection

(1) Restoring in units of RDAREAs

(2) Restoring RDAREAs during operation without unloading the system log

(1) Restoring in units of RDAREAs

This example restores two user RDAREAs (RDAREA01 and RDAREA02) to the most recent status:

pdrstr -m /hirdb/rdarea/mast/mast01 -b /usr/hirdb/pdcopy/backup/backup01
-l /usr/hirdb/pdlogunld/unld01 -p /usr/hirdb/pdrstr/list/list01 -w /tmp/sortwork
-r RDAREA01,RDAREA02

Explanation

-m: Specifies the name of the first HiRDB file in the master directory RDAREA.

-b: Specifies the name of the backup file.

-l: Specifies the name of the unload log file. This is the name of the unload log file that was created after the backup was made.

-p: Specifies the output file name for the database recovery utility process results listing.

-w: Specifies the work directory for sorting.

-r: Specifies that RDAREAs to be restored.

(2) Restoring RDAREAs during operation without unloading the system log

This example restores two user RDAREAs (RDAREA01 and RDAREA02) to the most recent status. It assumes that the HiRDB system is running without unloading the system log:

pdrstr -m /hirdb/rdarea/mast/mast01 -b /usr/hirdb/pdcopy/backup/backup01
-L -p /usr/hirdb/pdrstr/list/list01 -w /tmp/sortwork -r RDAREA01,RDAREA02

Explanation

-m: Specifies the name of the first HiRDB file in the master directory RDAREA.

-b: Specifies the name of the backup file.

-L: Specifies that the system log file is to be read.

-p: Specifies the output file name for the database recovery utility process results listing.

-w: Specifies the work directory for sorting.

-r: Specifies that all RDAREAs are to be restored.

19.3.3 Restoring in units of servers

This example restores all RDAREAs in a back-end server (bes1) to the most recent status. It assumes that a HiRDB/Parallel Server is running without unloading the system log:

pdrstr -m /hirdb/rdarea/mast/mast01 -b /usr/hirdb/pdcopy/backup/backup01
-L -p /usr/hirdb/pdrstr/list/list01 -w /tmp/sortwork -s bes1

Explanation

-m: Specifies the name of the first HiRDB file in the master directory RDAREA.

-b: Specifies the name of the backup file.

-L: Specifies that the system log file is to be read.

-p: Specifies the output file name for the database recovery utility process results listing.

-w: Specifies the work directory for sorting.

-s: Specifies that all RDAREAs in the back-end server (bes1) are to be restored.

19.3.4 Restoring RDAREAs using JP1/OmniBack II

Organization of this subsection

(1) Restoring to the point when the last backup was made

(2) Restoring to the most recent status

(1) Restoring to the point when the last backup was made

This example restores all RDAREAs to the point when the last backup was made:

pdrstr -m /hirdb/rdarea/mast/mast01 -b host01:backup001 -p /usr/hirdb/pdrstr/list/
list01 -k o -G DLT01 -a

Explanation

-m: Specifies the name of the first HiRDB file in the master directory RDAREA.

-b: Specifies the name of the backup file (JP1/OmniBack II's object name).

-p: Specifies the output file name for the database recovery utility process results

-k: Specifies the type of backup file. This example specifies o as the type of backup file because it uses JP1/OmniBack II's object file.

-G: Specifies the name of the barlist file.

-a: Specifies that all RDAREAs are to be restored.

(2) Restoring to the most recent status

This example restores two user RDAREAs (RDAREA01 and RDAREA02) to the most recent status:

pdrstr -m /hirdb/rdarea/mast/mast01 -b host01:backup001
-l /usr/hirdb/pdlogunld/unld01 -w /tmp/sortwork -p /usr/hirdb/pdrstr/list/list01
-k o -G DLT01 -r RDAREA01,RDAREA02

Explanation

-m: Specifies the name of the first HiRDB file in the master directory RDAREA.

-b: Specifies the name of the backup file (JP1/OmniBack II's object name).

-l: Specifies the name of the unload log file. This is the name of the unload log file that was created after the last backup was made.

-w: Specifies the work directory for sorting.

-p: Specifies the output file name for the database recovery utility process results listing.

-k: Specifies the type of backup file. This example specifies o as the type of backup file because it uses JP1/OmniBack II's object file.

-G: Specifies the name of the barlist file.

-r: Specifies the RDAREAs to be restored.

19.3.5 Restoring from a backup using the differential backup facility

This example restores user RDAREAs (rdarea01 and rdarea02) to the point where their differential backup was obtained.

pdrstr -m /rdarea/mast/mast01 -g backupg1 -K /pdcopy/admfile -r rdarea01,rdarea02

Explanation

-m: Specifies the name of the first HiRDB file in the master directory RDAREA.

-g: Specifies the name of the differential backup group.

-K: Specifies the name of the HiRDB file system area that stores the differential backup management file.

-r: Specifies the names of the RDAREAs to be restored (rdarea01 and rdarea02).

19.3.6 Restoring a specified RDAREA generation when the inner replica facility is used

This example restores a specified RDAREA generation when the inner replica facility is used.

pdrstr -m /hirdb/rdarea/mast/mast01 -b /bkdir/bkup02
-r MAST,DIR,DIC,USR01,USR02,USR03 -q 1

Explanation

-m: Specifies the name of the first HiRDB file in the master directory RDAREA.

-b: Specifies the name of the backup file.

-r: Specifies the RDAREAs to be restored (MAST, DIR, DIC, USR01, USR02, and USR03).

-q: Specifies the generation number of the RDAREAs to be restored.

19.3.7 Restoring RDAREAs from their backup using NetBackup

This example restores user RDAREAs (RDAREA01 and RDAREA02) to the point where their backup was made.

pdrstr -m /hirdb/rdarea/mast/mast01 -b host01:POLICY01 -k n -r RDAREA01,RDAREA02

Explanation

-m: Specifies the name of the first HiRDB file in the master directory RDAREA.

-b: Specifies the name of the backup file (NetBackup policy name).

-k: Specifies the type of backup file. This example specifies n to use NetBackup policy.

-r: Specifies the RDAREAs to be restored.

19.3.8 Re-creating the log point information file

This example re-creates the log point information file:

pdrstr -b /usr/hirdb/pdcopy/backup/backup01 -z /usr/hirdb/pdcopy/logpoint/logpoint01

Explanation

-b: Specifies the name of the backup file to be read.

-z: Specifies the name of the log point information file to be re-created.

19.4 Command format

Organization of this section

19.4.1 Option format

19.4.2 Options

19.4.1 Option format

The required or frequently specified options are indicated in bold. In the table below, each number corresponds to the number assigned to each option, which is explained in 19.4.2 Options.

When separating an option's flag arguments with the comma, do not specify spaces before or after the comma. If a space is specified, the command ignores whatever is specified following the space.

Organization of this subsection

(1) Database recovery

(2) Re-creation of log point information file

(3) Specifiability of options when another backup program is linked

(1) Database recovery

No.
Option

1

pdrstr -m [host-name:]name-of-first-HiRDB-file-in-master-directory-RDAREA

2

   [-b {[host-name:]backup-file-name
               [,backup-file-name]...
           |[host-name:]device-symbolic-name[,device-symbolic-name]
           |[host-name:]device-group-name
           |[host-name:]object-name
           |[host-name:]policy-name}]

6

    [-p process-results-output-file-name]

7

    [-w name-of-work-directory-for-sorting]

8

    [-y work-buffer-size-for-sorting]

9

    [-k {u|i|e|m|o|n}

10

    [-E EasyMT-MT-attributes-definition-file-name]

11

    [-B EasyMT-I/O-buffer-sectors-count]

12

    [-v volume-name[,volume-name]...]

13

    [-N EasyMT-file-name]

14

    [-G barlist-file-name]

15

    [-U {backup-search-condition-start-time,backup-search-condition-end-time
           |,backup-search-condition-end-time}]

16

    [-g differential-backup-group-name]

17

    [-K name-of-HiRDB-file-system-area-storing-differential-backup-management-file]

18

    [-q generation-number

19

        [-x generation-number]]

20

        [-Y write-buffer-size]

21

        [-f control-statement-file-name*]

* The options that can be specified in the control information file are shown as follows. You can also specify these options directly in the pdrstr command.

Contents of control statement file

No.
Option

3

   {{-l [host-name:]unload-log-file-name
             [,unload-log-file-name]...

4

        |-L

5

        |-d [host-name:]unload-log-file-storage-directory-name
          [,unload-log-file-storage-directory-name]...}

22

     |{-a

23

         |-c

24

         |-u unit-identifier[,unit-identifier]...

25

         |-s server-name[,server-name]...

26

         |-r RDAREA-name[,RDAREA-name]...}

27

            [-T{recovery-start-time,recovery-end-time|recovery-start-time|,recovery-end-time}]}

(2) Re-creation of log point information file

No.
Option

2

pdrstr -b {[host-name:]backup-file-name
         |[host-name:]device-symbolic-name
         |[host-name:]device-group-name
         |[host-name:]object-name
         |[host-name:]policy-name}

9

    [-k {u|i|e|m|o|n}]

10

    [-E EasyMT-MT-attributes-definition-file-name]

11

    [-B EasyMT-input-output-buffer-sectors-count]

12

    [-v volume-name]

13

    [-N EasyMT-file-name]

14

    [-G barlist-file-name]

15

    [-U {backup-search-condition-start-time,backup-search-condition-end-time
           |,backup-search-condition-end-time}]

28

    -z log-point-information-file-name

(3) Specifiability of options when another backup program is linked

Option | Other backup program
EasyMT | JP1/OmniBack II | NetBackup
-m | M | M | M
-b | M | M | M
-l | O | O | O
-L | O | O | O
-d | O | O | O
-p | O | O | O
-w | O | O | O
-y | O | O | O
-k | u | N | N | N
i | N | N | N
e | M¹ | N | N
m | M¹ | N | N
o | N | M | N
n | N | N | M
-E | O | N | N
-B | O | N | N
-v | O | N | N
-N | O | N | N
-G | N | M | N
-U | N | N | O
-g | O | O | O
-K | O | O | O
-q | O | O | O
-x | O | O | O
-y | O | O | O
-f | O | O | O
{-a|-c|-u|-s|-r} | M² | M² | M²
-T | O | O | O
-z | O | O | O

Legend:

M: Mandatory (must be specified)

O: Optional (can be specified)

N: Not permitted (cannot be specified)

1 You must specify either e or m.

2 You must specify one of -a, -c, -u, -s, or -r.

19.4.2 Options

Organization of this subsection

(1) -m [host-name:]name-of-first-HiRDB-file-in-master-directory-RDAREA

(2) -b {[host-name:]backup-file-name[,backup-file-name]...|[host-name:]device-symbolic-name[,device-symbolic-name]|[host-name:]device-group-name|[host-name:]object-name|[host-name:]policy-name}

(3) -l [host-name:]unload-log-filename [,unload-log-filename]...

(4) -L

(5) -d [host-name:]unload-log-file-storage-directory-name[,unload-log-file-storage-directory-name]...

(6) -p process-results-output-file-name

(7) -w name-of-work-directory-for-sorting

(8) -y work-buffer-size-for sorting

(9) -k {u|i|e|m|o|n}

(10) -E EasyMT-MT-attributes-definition-file-name

(11) -B EasyMT-I/O-buffer-sectors-count

(12) -v volume-name[,volume-name]...

(13) -N EasyMT-filename

(14) -G barlist-filename

(15) -U {backup-search-condition-start-time,backup-search-condition-end-time|,backup-search-condition-end-time}

(16) -g differential-backup-group-name

(17) -K name-of-HiRDB-file-system-area-storing-differential-backup-management-file

(18) -q generation-number

(19) -x generation-number

(20) -Y write-buffer-size

(21) -f control-statement-file-name

(22) -a

(23) -c

(24) -u unit-identifier[,unit-identifier]...

(25) -s server-name[,server-name]...

(26) -r RDAREA-name[,RDAREA-name]...

(27) -T{recovery-start-time,recovery-end-time|recovery-start-time |recovery-end-time}

(28) -z log-point-information-file-name

(1) -m [host-name:]name-of-first-HiRDB-file-in-master-directory-RDAREA

<identifier:pathname>

Specifies the name of the first HiRDB file in the master directory RDAREA. Specify the name of the host containing the master directory RDAREA and the path name, separated by a colon (:). This is the name specified in the pd_master_file_name operand in the system common definitions.

Example

-m host01:/hirdb_s/rdarea/rdmast

Rules

You can omit the host name if the master directory RDAREA is located at the server machine where the database recovery utility is executed (where the pdrstr command is entered). In this case, specify only the path name.

If you specify a host name, make sure that it is a host name specified in the -x option of the pdunit operand in the system definition.

If you are using the system switchover facility, be sure to specify the host name of the primary system.

(2) -b {[host-name:]backup-file-name[,backup-file-name]...|[host-name:]device-symbolic-name[,device-symbolic-name]|[host-name:]device-group-name|[host-name:]object-name|[host-name:]policy-name}

<identifier: path name> ((up to 167 characters when -k i is specified))

Specifies a backup file name, object name of JP1/OmniBack II, or a policy name of NetBackup.

When specifying a backup file name, device symbolic name, or device group name

Specify the name of the host that will contain the backup files, separated by a colon (:) from the names of the backup files, or from the device symbolic name, or from the device group name. Specify a pathname for a backup filename, and an identifier for a device symbolic name or device group name.

Example

-b host01:/usr/pdcopy/backup01

JP1/OmniBack II's object name specified

When using JP1/OmniBack II, specify the name of the host where JP1/OmniBack II's disk agent is located, separated by a colon from the object name.

Example

-b host01:backup001

When specifying a policy name of NetBackup

When using NetBackup, specify the name of the host that contains the NetBackup client, separated by a colon (:) from a policy name.

Example

-b host01:POLICY01

Rules

If the backup file is located at the server machine where the database recovery utility is executed (where the pdrstr command is entered), you can omit the host name; in which case, specify the path name only.

If you specify a host name, make sure that it is a host name specified in the -x option of the pdunit operand in the system definition.

If the server machine used to execute the database recovery utility has a JP1/OmniBack II disk agent or a NetBackup client (where the pdrstr command is entered), you can omit the host name.

If you are using the system switchover facility, make sure that the host name of the primary system is specified. Note, however, that the actual backup file, the JP1/OmniBack II disk agent, or the NetBackup client must on the running system.

When re-creating the log point information file, specify only the first file or first volume, even if multiple backup files or volumes are to be used (the utility references only the first file or volume, even if multiple files or volumes are specified).

If you specify multiple backup files that were acquired individually by RDAREA, only the first backup file specified is recognized. No other backup file is recognized.

The following table shows the relationship between the -b and -k options:

-k option specification
Specifiable backup file

-k u
You can specify a regular file name or MT special file name. If a single backup was created in multiple files, specify the names of all such backup files in the order they were created.

-k i
You can specify a backup file in the format "HiRDB-file-system-area-name/HiRDB-file-name". If a single backup was created in multiple files, specify the names of all such backup files in the order they were created. Note that a HiRDB file system area name is not case-sensitive, but an HiRDB file name is case-sensitive.

-k e
You can specify an MT special file name.

-k m
You can specify a maximum of two device symbolic names or one device group name managed by MTguide. The system does not check whether a device symbolic name or a device group name is specified.

-k o
Specify the object name of JP1/OmniBack II that was obtained by pdcopy. For the host name, specify the name of the host that has both a disk agent of JP1/OmniBack II and HiRDB. HiRDB retrieves only the most recent object of JP1/OmniBack II.

-k n
Specify the policy name of NetBackup that was obtained by pdcopy. For the host name, specify the name of the host that has both NetBackup client and HiRDB. HiRDB retrieves only the most recent backup of NetBackup.

(3) -l [host-name:]unload-log-filename [,unload-log-filename]...

<identifier: pathname>

Specifies the names of unload log files created after the last backup file was created. Specify the name of the host containing the unload log files separated from the path names by a colon.

Example

-l host01:/usr/pdlogunld/unld01

Rules

When the -l option is specified, the -L, -c, and -d options cannot be specified.

If the backup file is located at the server machine where the database recovery utility is executed (where the pdrstr command is entered), you can omit the host name; in which case, specify the path name only.

If you are using the system switchover facility, make sure that the host name of the primary system is specified. Note that the actual backup file must be located in the running system.

If a regular file was used to create the unload log file, specify the name of that regular file as the unload log file name. If a HiRDB file was used to create the unload log file, specify the unload log file name in the format "HiRDB-file-system-area-name/HiRDB-file-name". Make sure that "HiRDB-file-system-area-name/HiRDB-file-name" does not exceed 167 characters.

If the pdstart -r command was used to start the HiRDB, the pdrstr command with the -l option specified can recover only the master directory RDAREA.

Notes

If you have specified the backup file for the -b option, created by the database copy utility specifying the -M s option, be sure to also specify the -l option. If there are multiple unload log files, you need to specify all of them in the chronological order of their generations, starting with the oldest one. In this case, specify the host name only once at the beginning. This means that all unload log files must be located at the specified host.

To use unload log files for recovery, you must specify all required unload log files. If any required unload log file is missing, the utility issues a message (KFPR16203-E or KFPR16301-E) and terminates with an error.

(4) -L

When the system operation does not involve unloading of the system log, this option specifies that the system log files are to be input directly for database recovery.

Rules

When you are specifying this option, you also need to specify the name of the backup file with the -b option. This backup file must have been created by the pdcopy command specifying the -z option.

When this option is specified, the -l, -c, and -d options cannot be specified.

(5) -d [host-name:]unload-log-file-storage-directory-name[,unload-log-file-storage-directory-name]...

<identifier: path name>

Specifies the names of the directories that contain all the unload log files required for recovery. Separate the name of the host containing the unload log files and the path names with a colon (:).

Criteria

Use this option when many unload log files are needed for recovery (such as when there are too many unload log files to be specified on the command line for a single execution of pdrstr).

Rules

Make sure that the total length of the name of an unload log file storage directory and the file names in the directory does not exceed 1,023 bytes. You can specify a maximum of 128 directories.

Make sure that the specified directories do not contain any files other than unload log files. The utility ignores any file that is not an unload log file.

This option cannot be specified together with the -l or -L option.

When this option is specified, the utility reads the unload log files in the order they were created (in chronological order of the system log allocation times); therefore, make sure that an unload log file created before or after the machine time was changed is not mixed in in a directory.

A HiRDB file system area cannot be specified in this option.

The input start position of the unload log files in a specified directory depends on the backup acquisition mode of the backup file and the options specified during recovery. The following table describes the input start position of the unload log files:

Condition
Input start position of unload log files

A backup file acquired in the updatable mode is used.
The utility inputs all unload log files in the directory.

A backup file in the referencing-possible mode or in the reference/update-impossible mode is used.
Of the unload log files in the directory, the utility inputs all log information starting with the unload log file that includes the backup file acquisition start time.
If there is any unload log file that needs to be input before the backup acquisition start time due to a time difference between machines, use the -T option to specify the recovery start time. Obtain the recovery start time based on the time difference between the backup destination host and the recovery target host.

The -q option was specified during backup acquisition and recovery, and the generation numbers specified in the -q option during backup acquisition and recovery do not match.
The utility inputs all unload log files in the directory.

-x c is specified during recovery.

No backup file is used during recovery.

The recovery start time is specified in the -T option during recovery.
The utility inputs the unload log files that fall on or after the recovery start time.

(6) -p process-results-output-file-name

<pathname>

Specifies the name of the file to which the processing result of the database recovery utility is to be output.

Example

-p /usr/pdrstr/list01

Rules

Specify the path name of the server machine at which the database recovery utility is executed (where the pdrstr command is entered).

If the specified path name is not found or this option is omitted, the database recovery utility outputs its processing result to the server machine where the utility is executed. The utility displays the output destination in the KFPR26222-I message.

Regardless of the specification of this option, the utility outputs all error messages to the system log file and standard output, and the final processing result to the standard output. However, error messages may not be output to the system log file and to the standard output in the same order.

(7) -w name-of-work-directory-for-sorting

<pathname>

When the -l, -L, or -d option is specified, use this option to specify the name of the directory under which the temporary file is to be created. If the RDAREAs subject to recovery processing are located on multiple server machines, the specified directory must be in each of the server machines. When this option is omitted, the utility assumes /tmp.

At least the following amount of free space must be available in the work directory for sorting (bytes):

(a + a/130 36) 2

a: Value depends on the maximum amount of log information that is output per transaction:

When the amount of log information does not exceed 1536000000 bytes
min (total capacity of log file used per recovery, 1536000000)

When the amount of log information exceeds 1536000000 bytes
Total amount of log information output per transaction + 1536000000

(8) -y work-buffer-size-for sorting

<unsigned integer> ((256-2097152)) <<1024>>

When the -l, -L, or -d option is specified, specifies the size of the work buffer (in kilobytes). If this value is too small, the KBLS300-E message is displayed and the database recovery process terminates abnormally. Use the following guideline for determining an appropriate value:

(9) -k {u|i|e|m|o|n}

Specifies the type of backup file.

u

Specifies that a regular file backup or an MT backup is to be input without using EasyMT, JP1/OmniBack II, or NetBackup. If the backup file consists of multiple volumes, you cannot specify this option.

i

Specifies that the input is a backup file created in a HiRDB file system area. This option is applicable when the backup file is shared by the running system and a standby system, and the standby system is to be recovered using the backup made by the running system.

e

Specifies that the input is a magnetic tape backup file (EasyMT). You cannot specify this option if the backup file consists of multiple volumes. This specification requires the use of EasyMT.

m

Specifies that the input is a magnetic tape backup file using EasyMT and MTguide. You must specify this option if the backup file consists of multiple volumes. This specification requires the use of EasyMT and MTguide.

o

Specifies that the database is to be restored using JP1/OmniBack II. If you are specifying this option, specify JP1/OmniBack II's object name in the -b option.

n

Specifies that the database is to be recovered using NetBackup. In this case, specify the policy name of NetBackup in the -b option.

(10) -E EasyMT-MT-attributes-definition-file-name

<path name>

Specifies the name of the EasyMT MT attributes definition file. This file must be connected to the server machine where the database recovery utility is executed (where the pdrstr command is entered). The -E option is applicable to a backup file that has been created with e or m specified in the -k option. The following attributes take effect:

buffno: Number of I/O buffer sectors

magazin: MT device allocation pattern

job: Job name

expire: Expiration date

preserve: Number of days to be saved

When the -B option is specified, it takes precedence over the number of I/O buffer sectors specified in the MT attributes definition file.

The utility checks the information specified in this file when EasyMT is executed.

(11) -B EasyMT-I/O-buffer-sectors-count

<unsigned integer> ((1-255))

Specifies the number of I/O buffer sectors to be used for magnetic tape input/output operations. A larger value results in better performance, but it requires more memory.

Rules

The -B option is applicable to a backup file that has been created with e or m specified in the -k option.

If the -E and -B options are both omitted, the utility assumes EasyMT's default values.

(12) -v volume-name[,volume-name]...

<alphanumerics> ((1-6 characters))

Specifies the volume names of the magnetic tapes that contain the backup data. When this option is specified, an error results if a volume mounted at a tape deck does not match any of the specified values. If the number of existing backup volumes is larger than the number of volumes specified here, the utility does not check any excess volume names. When this specification is omitted, the utility does not perform volume name checking.

This option is applicable to the backup file for which e or m is specified in the -k option. To specify multiple volume names, you need to specify m in the -k option. Make sure that each specified volume name is unique among all volumes used.

When re-creating the log point information file, specify only the first volume, even if multiple volumes are to be used (the utility references only the first volume, even if multiple volumes are specified).

(13) -N EasyMT-filename

<alphanumerics> ((1-17 characters))

Specifies the file name assigned when the backup file is created. This specification takes effect only on the backup file made with e or m specified in the -k option. An error results if the specified value does not match the input backup file.

The backup file must be created from the beginning of the mounted magnetic tape (beginning at file number 1).

(14) -G barlist-filename

<alphanumerics (excluding an underline (_))> <<1-64 characters>>

Specifies a barlist file name for JP1/OmniBack II that was used during the execution of the database copy utility. The barlist file must be at the server machine where JP1/OmniBack II's cell server is located.

The directory containing the barlist file is shown as follows. Note that the protection specification in the barlist file is ignored.

/etc/opt/omni/barlists/stream

(15) -U {backup-search-condition-start-time,backup-search-condition-end-time|,backup-search-condition-end-time}

Specifies that the database is to be recovered from a backup made at the specified time from among all the backups made with the same policy name. This option is applicable when the NetBackup linkage facility is used (-k n is specified). Otherwise, the utility ignores this option, if specified.

If both a backup search condition start time and a backup search condition end time are specified, the utility uses the most recent backup within the specified period for recovery. If only a backup search condition end time is specified, the utility uses the backup in effect at the specified end time for recovery.

Rules

When this option is omitted, the utility uses the most recent backup from among the backups made with the same policy name.

You can use the bpimagelist command (with the -policy option specified) to check the dates and times at which backups were made.

For the backup search condition start time and backup search condition end time, connect the date and time by an underscore (_), shown below. If the time is omitted, the utility assumes 000000 for the start time and 235959 for the end time.

-U YYYYMMDD[_hhmmss],YYYYMMDD[_hhmmss]

YYYY: Year <unsigned integer> ((1990-2037))

Specifies the calendar year.

MM: Month <unsigned integer> ((01-12))

DD: Date <unsigned integer> ((01-31))

hh: Hour <unsigned integer> ((00-23))

mm: Minute <unsigned integer> ((00-59))

ss: Second <unsigned integer> ((00-59))

To specify only the end time, specify a comma immediately followed by the desired end time.

(16) -g differential-backup-group-name

<alphanumerics> ((1-30))

If you are using the differential backup facility, use this option to specify the differential backup group name used with pdcopy.

(17) -K name-of-HiRDB-file-system-area-storing-differential-backup-management-file

<pathname>

If you are using the differential backup facility, use this option to specify the name of the HiRDB file system area that contains the differential backup management file used with pdcopy.

Make sure that "name-of-HiRDB-file-system-area-storing-differential-backup-management-file/differential-backup-group-name" does not exceed 167 characters.

(18) -q generation-number

<unsigned integer> ((0-10))

Specifies the generation number of the RDAREA to be restored when the inner replica facility is used. When 0 is specified, the utility restores the original RDAREA; when a value in the range 1-10 is specified, the utility restores the specified replica RDAREA generation.

Rules

Specify this option together with the -r option. This option cannot be specified together with the -a, -c, -u, or -s option.

Specify this option to restore the replica RDAREA of the indicated generation number in the inner replica group to which the original RDAREA specified in the -r option belongs.

The following table describes the -q option specification during the backup and recovery operations:

During recovery operation | During backup operation
-q option omitted | -q option specified
-q option omitted | The utility restores the RDAREAs for which a backup is available. The utility does not recover an RDAREA whose backup is not available.
-q option specified | The utility restores the RDAREAs whose backup is available. The utility does not recover an RDAREA whose backup is not available. | The utility restores the RDAREAs even if their backups are not available as long as a backup of RDAREAs in the same inner replica group is available.

(19) -x generation-number

<unsigned integer or alphanumerics> ((0-10 or c))

Specifies the generation number of the RDAREA to be restored if the inner replica facility is used and the target RDAREA has been updated over multiple generations. If you specify this option, also specify the -q option.

0

Specifies that the original RDAREA is to be restored.

1 to 10

Specifies that the specified RDAREA generation is to be restored. For example, if you are restoring the first generation of an RDAREA using the log information for the first and second generations of the RDAREA, specify 1 in the -q option and 2 in the -x option.

c

Specifies that the current RDAREA in the system log file is to be restored. In this case, the utility uses log information for the current RDAREA in the system log file, ignoring the generation number.

Rules

If no RDAREA is defined that has the generation number specified in this option, the utility terminates with an error.

Specifying the same generation number in both the -q and the -x options will not result in an error.

By specifying c, you can always restore the current RDAREA using its log information even if the RDAREA is updated over three or more generations, or multiple generations are updated at the same time. When swapping occurs on the current RDAREA, the RDAREA must have the same contents immediately before and after swapping (not only the data but also the locations within file).

When c is specified, the utility supports only the log information that has been output by HiRDB version 07-00 or later. If you are upgrading your HiRDB to version 07-00, make sure that all RDAREAs have been backed up using pdcopy with -a specified.

(20) -Y write-buffer-size

<unsigned integer> ((4-131072))

Specifies the buffer size (in kilobytes) when recovery data is written during database recovery processing. Specifying this option reduces the number of write operations because the amount of data written at one time increases.

Criteria

Hitachi recommends that you specify this option when the following conditions are satisfied, to improve performance.

Data to be used for recovery | Condition
Differential backup file | The only data update operation performed after the previous differential backup was addition (INSERT statement) or deletion of all data (DELETE or PURGE TABLE statement).
Unload log file or system log file | The principal update operation performed by the database updating application is addition (INSERT statement).

Specification guidelines

You should specify a value in the range from 1024 to 2048.

As a guideline for the value, specify a common multiple of the page length of all RDAREAs that are subject to database recovery processing.

Rules

When this option is omitted, the following value is assumed:
When the recovery processing uses a differential backup file, unload log file, or system log file, the page length of each RDAREA that is to be recovered
Otherwise, 60

If the specified value is less than the maximum page length of the RDAREA to be recovered, the specified value is ignored and the default value is used.

(21) -f control-statement-file-name

<pathname>

Specifies the name of the control information file.

Example

-f /usr/pdrstr/cont01

You can specify options (3) through (5) and (22) through (27) in the control statement file. You can also specify these options directly in the pdrstr command.

The format of the control statement file is as follows:

 {{-l flag-argument|-L|-d flag-argument}|{-a|-c|-u flag-argument|-s flag-argument|-r flag-argument}[-T flag-argument]}
 [{{-l flag-argument|-L|-d flag-argument}|{-u flag-argument|-s flag-argument|-r flag-argument}[-T flag-argument]}]
 [{{-l flag-argument|-L|-d flag-argument}|{-u flag-argument|-s flag-argument|-r flag-argument}[-T flag-argument]}]
                                 .
                                 .
                                 .

Notes

Create the control statement file at the server machine where the database recovery utility was executed (where the pdrstr command was entered).

In the control statement file, you must specify the combination of target RDAREA specification options and the -T option on a single line.

A line in the control statement file must not exceed 32,768 bytes.

For details about the option flags, see the explanations of the individual options.

If the -u, -s, or -r option consists of multiple lines, you can specify on the subsequent lines only those option flags specified on the first line (except for the -a and -c options). For example, if you specify the -u option on the first line, you can specify the -u option on any subsequent line.

If the -l option is specified on multiple lines, the last specification takes effect; the same applies to the -d option.

An option specified on the command line cannot also be specified in the control statement file. However, the -T option can be specified on both the command line and in the control statement file, in which case the -T option specification on the command line applies to any item for which the -T option is omitted in the control statement file.

Specification of a control statement file may not be supported depending on the combination of options specified on the command line. The following table shows the combinations of options and whether or not a control statement file can be specified:

-l, -L, or -d option | -a, -c, -u, -s, or -r option
Omitted | Specified
Omitted | Y¹ | Y²
Specified | Y³ | N

Legend:

Y: Can be specified

N: Cannot be specified

¹ All options specifiable in the control statement file can be specified.

² The -l, -L, or -d option can be specified.

³ The -a, -c, -u, -s, or -r option and the -T option can be specified.

Example of correct control statement

-r pdbuser1 -T 20040809​,20040810​
-r pdbuser2 -T 20040809​
-l /unldlog/unld01,/unldlog/unld02,
/unldlog/unld03,/unldlog/unld04

This example uses the database update history stored in the unload log files unld01, unld02, unld03, and unld04 to recover the database. To recover the RDAREA pdbuser1, the example uses the database update history from 2004-08-09 00:00:00 to 2004-08-10 24:59:59. To recover the RDAREA pdbuser2, the example uses the database update information starting at 2004-08-09 00:00:00.

Example of incorrect control statement (1)

-r pdbuser1 -T 20040809​,20040810​
/unldlog/unld01,/unldlog/unld02   Error

A line containing the -l, -L, or -d option cannot contain any other option.

Example of incorrect control statement (2)

-r pdbuser1 -T 20040809​,20040810​
-r pdbuser2 -T 20040809​
-l /unldlog/unld01
,/unldlog/unld02   Error

Because there is a limit to the length of a single line (maximum of 32,768 bytes including linefeed code), when the -l or -d option has a long argument, you can enter a linefeed code and continue specification onto the next line. The linefeed code can be entered only after the comma (,) that separates the path name of an unload log file. If the line specifying the -l or -d option ends with a character other than the comma, the utility treats it as the end of the line.

(22) -a

Specifies that all RDAREAs are to be restored (except for list RDAREAs).

Rule

If you specify the -a option, the control statement file can contain only one line of control statement.

If a replica RDAREA has been defined, it will also be subject to recovery processing.

(23) -c

Specifies that all RDAREAs in the backup files specified with the -b option (except the list RDAREAs) are to be restored.

Rules

If the -c option is specified, the control statement file can contain only one line of control statement.

If you are specifying the -c option, be sure to also specify the -b option. However, when using the differential backup facility, you do not need to specify the -b option (if the -b option is specified, the utility assumes manual recovery; if the -b option is omitted, the utility assumes automatic recovery).

If you are specifying the -c option, do not specify the -l option.

If the backup file contains a backup of a replica RDAREA, the utility restores the source generation of that replica RDAREA.

If you made a backup copy with the pdcopy command with the -J option specified and the KFPR26063-I was issued, recovery processing using that backup copy will not result in normal termination (because the skipped RDAREAs are also subject to recovery processing).

(24) -u unit-identifier[,unit-identifier]...

<identifier> ((4 characters))

If all RDAREAs under specified units are to be restored (except the list RDAREAs), use this option to specify the unit identifiers.

Rules

If specifying multiple unit identifiers, make sure none of them is duplicated.

When using a control statement file, make sure that each specified unit identifier is unique among all the control statements.

If a replica RDAREA has been defined, it will also be subject to recovery processing.

(25) -s server-name[,server-name]...

<identifier> ((1-8 characters))

If all RDAREAs under specified servers are to be restored (except the list RDAREAs), use this option to specify the server names.

Rules

If specifying multiple server names, make sure none of them is duplicated.

When using a control statement file, make sure that each specified server name is unique among all the control statements.

If a replica RDAREA has been defined, it will also be subject to recovery processing.

(26) -r RDAREA-name[,RDAREA-name]...

<identifier> ((1-30 characters))

Specifies the names of the RDAREAs to be restored.

Rules

You cannot specify a list RDAREA.

If specifying multiple RDAREA names, make sure none of them is duplicated. When using a control statement file, make sure that each specified RDAREA name is unique among all the control statements (except for a regular expression).

You can specify RDAREA names in regular expressions. For details, see the explanation of the -r option in Chapter 18. Database Copy Utility (pdcopy).

The following rules apply to the RDAREA names specified in the -r option:

Type
Coding method without using regular expression
Coding method using regular expression

Command line specification (without using a control statement file)
When specifying an RDAREA name in lowercase alphabetic characters or when the RDAREA name contains a space, enclose the entire name in double quotation marks ("). If you use the Bourne shell (sh), C shell (csh), or Korn shell (ksh), you also need to enclose the RDAREA name in single quotation marks (').
Enclose the entire regular expression with single quotation marks ('). Regular expression is case sensitive.

Specifying in a control statement file
When specifying an RDAREA name in lowercase alphabetic characters or when the RDAREA name contains a space, enclose the entire name in double quotation marks (").
Regular expression is case sensitive.

If the -q and -r options are both specified, only system RDAREAs and original RDAREAs can be specified. In this case, in the inner replica group to which the original RDAREA belongs, the replica RDAREA of the generation specified in the -q option is subject to processing.

If the replica RDAREA with the generation specified in the -q option is undefined, the utility ignores this RDAREA and restores another RDAREA.

When the -q option is specified, the regular expression is applicable to the original RDAREA. If the -q option is omitted, the regular expression is applicable to all RDAREAs including the replica RDAREAs.

(27) -T{recovery-start-time,recovery-end-time|recovery-start-time |recovery-end-time}

Use this option to specify a recovery range.

When the -l, -d, or -L option is specified, specifies the output times of the first and last log information items to be used for database recovery.

Rules

If you specify the -l or -L option but omit this option, the utility assumes the output times of the first and last system log files or unload log files.

If you omit the -l or -L option, the utility ignores this option, if specified, unless the differential backup facility is used.

The recovery start time must be earlier than the recovery end time. If the specified recovery start time is later than the recovery end time, an error results and processing terminates. When you are specifying this option, make sure that a recovery start time, a recovery end time, or both are specified.

The recovery start time and recovery end time are expressed as a date and time separated by an underscore (_), as shown below. If the time is omitted, the utility assumes 000000 for the recovery start time and 235959 for the recovery end time.

-T YYYYMMDD[_hhmmss],YYYYMMDD[_hhmmss]

YYYY: year <unsigned integer> ((1990-2037))
MM: month <unsigned integer> ((01-12))
DD: Date <unsigned integer> ((01-31))
hh: hour <unsigned integer> ((00-23))
mm: minute <unsigned integer> ((00-59))
ss: second <unsigned integer> ((00-59))
If the recovery end time only is specified, it must be preceded by a comma (,); if the recovery start time only is specified, it must not be followed by a comma.

Notes

When executing recovery with a time range specified, be sure to specify the time of the server machine that contains the RDAREAs being recovered because the time differs from one server to another.

When using a backup file to execute recovery with a time range specified, there is no need to specify the recovery start time. The utility ignores the recovery start time, if specified, and assumes the backup start time. For the recovery end time, specify a time that falls after the backup end time.

When restoring multiple individual RDAREAs updated by a single transaction with a time range specified, specify a time that falls after the transaction end time (synchronization point) for the recovery end time. An error results if the specified time falls before the transaction end time, in which case you need to specify the correct time (which falls after the transaction end time) again.

The following shows an example of the pdrstr command specifying the -T option and the control statement file specifying the -T option in the -r option:

Command specification

pdrstr ...
  -T X1,Y1
  ...
  -f control-statement-file-1

Contents of control statement file 1

-r pduser1
-r pduser2 -T X2,Y2
-r pduser3 -T X3
-r pduser4 -T ,Y4

(28) -z log-point-information-file-name

<pathname>

When re-creating the log point information file, use this option to specify the name of the file. This file is created at the host where the pdrstr command is entered.

Rules

If specifying this option, you need to specify the backup file name with the -b option. This backup file must have been created by the pdcopy command specifying the -z option.

For the log point information file name, specify an absolute path name beginning with the root (/). If the specified file already exists, the utility deletes this file before re-creating the log point information file.

19.5 Notes

A maximum of 1120 RDAREAs can be restored per server by a single execution of the database recovery utility.

During database recovery, no other user can access an RDAREA subject to recovery processing.

When executing the database recovery utility, do not specify an unload log file that was created before executing the database initialization utility. If such an unload log file is specified, the operation cannot be guaranteed.

To restore an extracted database subject to data linkage, use the backup copy of the database and the log obtained after the backup was made. If you use any other method to restore the database, inconsistency results between the extracted database and the target database.

If the database recovery utility execution is cancelled due to a power failure or by the kill command, the HiRDB file system area may be damaged. If the pdfls command detects inconsistency, restore the HiRDB file system area using one of the following methods:

Re-create the HiRDB file system area using the pdfmkfs command and execute the recovery utility for each RDAREA to restore the HiRDB files contained in the HiRDB file system area.

Execute the pdfbkup and pdfrstr commands to back up and restore the HiRDB file system area.

If a regular file is used for the HiRDB file system area that contains the RDAREAs subject to recovery processing, and the pdfmkfs command is executed without specifying the -I option, you need to use the backup file created by the database copy utility to restore database from the log.

If both EasyMT and JP1/Magnetic Tape Access are installed in the system, the utility starts JP1/Magnetic Tape Access.

The maximum number of copies of the database recovery utility that can be executed concurrently depends on the value of the pd_utl_exec_mode operand in the system common definition:

pd_utl_exec_mode=0
You can execute a maximum of 32 copies concurrently.

pd_utl_exec_mode=1
You can execute as many copies as there are specified in the pd_max_users operand.

If you made a backup copy with the pdcopy command with the -J option specified and some RDAREAs were skipped, recovery processing using that backup copy will not restore the skipped RDAREAs.

The return codes of pdrstr are as follows:
0: Normal termination
4: Warning termination (recovery processing terminated normally, but an error occurred at the warning level that is unrelated to recovery processing)
8: Abnormal termination (an error occurred during recovery processing, but some RDAREAs were restored)
12: Abnormal termination

If you use Real Time SAN Replication based on the log-only synchronous method and execute pdrstr at the transaction execution site, you must perform the preparations for log application. For details about the preparations for log application, see the manual HiRDB Version 8 Disaster Recovery System Configuration and Operation Guide.

If you selected utf-8 as the character encoding in the pdsetup command, you can use a file with a BOM as the control statements file for pdrstr. Note that even when a file with a BOM is used as the control statements file, the BOM is skipped. No BOM is included in the file that is output by pdrstr.

19.6 Database recovery utility process results listing

The following shows an example of the process results output files for the database recovery utility.

pdrstr(VV-RR)     ***** DB RECOVERY *****   1995-05-16 11:35:35 [1] utl3 [2]
*** DB RECOVERY INFORMATION LIST ***
---------------------------------------------------------
<<RDAREA INFORMATION>>
 UNIT NAME  :      un16 [3] SERVER NAME:sds [4]
 RDAREA NAME: pdbuser01 [5]
 RDAREA ID :          4 [6] ATTRIBUTE : USER [7]      PAGE SIZE :  4096 [8]
 RECOVERY STARTED AT : 1995-05-16 11:34:19 [9]
 RECOVERY ENDED AT   : 1995-05-16 11:34:46 [10]
<REPLICA RDAREA INFORMATION>
 ORIGINAL RDAREA NAME : pdbuser01 [19]
 REPLICA RDAREA GENERATION NO : 0 [20]
<<BACKUP INFORMATION>>
 BACKUP STARTED AT : 1995-05-16 11:11:42 [11]
 BACKUP ENDED AT   : 1995-05-16 11:11:42 [12]
<<LOG INFORMATION>>
 1ST LOG    : 1995-05-16 10:57:48 [13]
 LAST LOG   : 1995-05-16 10:58:26 [14]
 LOG COUNT  :         42 [15]
<FILE INFORMATION>
1 /dbarea/area1/rdmt06 [16]
  EXTENT COUNT :   2 [18]
  PAGE NUMBER  :    124 [17]
2 /dbarea/area1/rdmt07 [16]
  EXTENT COUNT :   2 [18]
  PAGE NUMBER  :    108 [17]
--------------------------------------------------------
<<RDAREA INFORMATION>>
 UNIT NAME  :      un16 SERVER NAME:sds
 RDAREA NAME: pdbuser03
 RDAREA ID :           5 ATTRIBUTE : USER            PAGE SIZE :  4096
 RECOVERY STARTED AT : 1995-05-16 11:34:46
 RECOVERY ENDED AT   : 1995-05-16 11:35:10
<REPLICA RDAREA INFORMATION>
 ORIGINAL RDAREA NAME : pdbuser03
 REPLICA RDAREA GENERATION NO : 0
<<BACKUP INFORMATION>>
 BACKUP STARTED AT : 1995-05-16 11:11:42
 BACKUP ENDED AT   : 1995-05-16 11:11:43
<<LOG INFORMATION>>
 1ST LOG    : 1995-05-16 10:59:50
 LAST LOG   : 1995-05-16 11:02:35
 LOG COUNT  :         42
<FILE INFORMATION>
1 /dbarea/area1/rdmt08
  EXTENT COUNT :   2
  PAGE NUMBER  :    124
2 /dbarea/area1/rdmt09
  EXTENT COUNT :   2
  PAGE NUMBER  :    108
--------------------------------------------------------
<<RDAREA INFORMATION>>
 UNIT NAME  :      un16 SERVER NAME:sds
 RDAREA NAME: pdbuser05
 RDAREA ID :           6 ATTRIBUTE : USER            PAGE SIZE :  4096
 RECOVERY STARTED AT : 1995-05-16 11:35:10
 RECOVERY ENDED AT   : 1995-05-16 11:35:34
<REPLICA RDAREA INFORMATION>
 ORIGINAL RDAREA NAME : pdbuser05
 REPLICA RDAREA GENERATION NO : 0
<<BACKUP INFORMATION>>
 BACKUP STARTED AT : 1995-05-16 11:11:43
 BACKUP ENDED AT   : 1995-05-16 11:11:43
<<LOG INFORMATION>>
 1ST LOG    : 1995-05-16 11:03:21
 LAST LOG   : 1995-05-16 11:08:47
 LOG COUNT  :         42
<FILE INFORMATION>
1 /dbarea/area1/rdmt10
  EXTENT COUNT :   2
  PAGE NUMBER  :    124
2 /dbarea/area1/rdmt11
  EXTENT COUNT :   2
  PAGE NUMBER  :    108
--------------------------------------------------------

Explanation

Date and time the database recovery utility was executed (in the format YYYY/MM/DD hh:mm:ss).
YYYY: Year. MM: Month. DD: Date. hh: Hour. mm: Minute. ss: Second.

HiRDB identifier

Name of the unit containing an RDAREA

Name of the unit containing an RDAREA

Name of the recovered RDAREA

Number of the recovered RDAREA

Type of RDAREA:
MASTERDIRECTORY: Master directory RDAREA
DATADIRECTORY: Data directory RDAREA
DATADICTIONARY: Data dictionary RDAREA
SYSTEM_LOB: Data dictionary LOB RDAREA
USER: User RDAREA
USER_LOB: User LOB RDAREA
REG: Registry RDAREA
REG_LOB: Registry LOB RDAREA

Page length of the RDAREA (in bytes)

Recovery start time of the RDAREA (format is the same as in 1)

Recovery end time of the RDAREA (format is the same as in 1)

Backup start time of the RDAREA (format is the same as in 1)

Backup end time of the RDAREA (format is the same as in 1)

Time the first log record was output during recovery processing (format is the same as in 1)

Time the last log record was output during recovery processing (format is the same as in 1)

Number of updated log records used during recovery processing

Name of a HiRDB file constituting the RDAREA

Number of pages allocated to the HiRDB file

Number of extents in the HiRDB file

Name of the original RDAREA

Generation number of the replica RDAREA

Notes

If there is no data to be restored, the utility displays No data for recovery at 9, and displays nothing at 8-15.

If there is no backup file, the utility does not display 11 or 12.

If there are no log records for an RDAREA, the utility does not display 13 or 14.

19 and 20 are output if the inner replica facility is used.

20. Registry Facility Initialization Utility (pdreginit)

This chapter explains the registry facility initialization utility (pdreginit), which can be used to register registry RDAREAs and registry LOB RDAREAs for managing and operating the registry facility and to create registry management tables.

This chapter contains the following sections:

Organization of this chapter

20.1 Overview

20.2 Command format

20.3 Control statements

20.4 Rules and notes

20.5 Examples

20.1 Overview

Executor

HiRDB administrators can execute this command.

Organization of this section

20.1.1 Function

20.1.1 Function

The registry facility initialization utility can be used to install the registry facility in the HiRDB system so that plug-in modules can be used.

Adding a registry RDAREA and a registry LOB RDAREA using the registry facility initialization utility creates a registry management table for keeping track of the registry information used by a plug-in.

Preconditions

Before the Registry facility initialization utility can be executed, the HiRDB system must be enabled to use the stored procedure function. Whether the stored procedure function is enabled can be tested by using the pddbls command. Use the pddbls command whether a data dictionary LOB RDAREA is available. The stored procedure function can be used if a data dictionary LOB RDAREA is available. If a data dictionary LOB RDAREA does not exist, add a data dictionary LOB RDAREA by using the database structure modification utility to enable the stored procedure function.

Figure 20-1 shows an overview of the registry facility initialization utility (pdreginit).

Figure 20-1 Overview of the registry facility initialization utility (pdreginit)

20.2 Command format

Organization of this section

20.2.1 Format

20.2.2 Options

20.2.1 Format

pdreginit [-k processing-type][-a control-statement-file-name]

20.2.2 Options

-k processing-type

Specifies whether a registry RDAREA or a registry LOB RDAREA is to be added, or only a registry manipulation stored procedure is to be registered. The default is all.

all

Specifies that any of the following operations are to be performed: a control statement file must first be specified in the -a option:

Add a registry RDAREA and a registry LOB RDAREA.

Create a registry management table for using the registry facility.

Register a stored procedure for operating the registry.

proc

Specifies that a registry operation stored procedure only is to be registered.

If the registry facility initialization utility terminates with an error after normal termination of the addition of a registry RDAREA (the database structure modification utility produced a KFPX24200-I message with a return code of 0 or 4), this option can be specified to register the registry operation stored procedure only. The -a option cannot be specified together with this option.

renew

Specifies that a registry operation stored procedure is to be reregistered.

This option can be specified to re-register a registry operation stored procedure when moving from a HiRDB/Single Server to HiRDB/Parallel Servers. The -a option cannot be specified together with this option.

-a control-statement-file-name<path-name> ((up to 255 characters))

On HiRDB/Parallel Servers, the control statement file needs to be referenced from the node at which the dictionary server is located.

In this control statement, the create rdarea statement must be specified for each of the registry RDAREA and the registry LOB RDAREA. If a registry RDAREA or a registry LOB RDAREA already exists, specification of this option causes an error.

20.3 Control statements

Organization of this section

20.3.1 create rdarea statement

20.3.2 Notes

20.3.1 create rdarea statement

This section explains the operands of the create rdarea statement. In the following table, each number corresponds to the number assigned to each operand.

No. | Operand
1 | create rdarea RDAREA-name
2 | [globalbuffer global-buffer-name]
3 | for {registry|LOB used by HiRDB (SQL REGISTRY)}
4 | [page page-length characters]
5 | [storage control segment segment-size pages]
6 | [extension {use extension-segments-count segments|nouse}]
7 | file name "HiRDB file-system-area-name/HiRDB-file-name"
8 | initial HiRDB-file-segments-count segments
| [file name "HiRDB file-system-area-name/HiRDB-file-name"
| initial HiRDB-file-segments-count segments]...
| ;

Organization of this subsection

(1) RDAREA-name

(2) globalbuffer global-buffer-name

(3) for {registry |LOB used by HiRDB (SQL_REGISTRY)}

(4) page page-length characters

(5) storage control segment segment-size pages

(6) extension {use extension-segments-count segments|nouse}

(7) filename-"HiRDB-file-system-area-name/HiRDB-file-name"

(8) initial HiRDB-file-segments-count segments

(1) RDAREA-name

<identifier> ((1-30))

Specify the name of the RDAREA to be used in the HiRDB system. ALL cannot be specified in an RDAREA name. When enclosed in double quotation marks ("), an RDAREA name is case sensitive; otherwise, it is not treated as being all in uppercase.

Examples

create rdarea "pdbuser01" for ...
In this case, the RDAREA name is treated as pdbuser01.

create rdarea pdbuser01 for ...
In this case, the RDAREA name is treated as PDBUSER01.

(2) globalbuffer global-buffer-name

<identifier> ((1-16))

Specifies the name of a global buffer in the HiRDB system (or in the dictionary server for a HiRDB/Parallel Server) to temporarily allocate it to the RDAREA to be added. You cannot specify an index global buffer. To check the global buffer, use the pdbufls command.

Rules

This operand is required for the addition of a registry RDAREA.

The specified global buffer must have a buffer length greater than or equal to the page length of the RDAREA to be added. To check the size of global buffer, use the pdbufls command.

The global buffer length is the value specified in the -l operand of the pdbuffer statement in the system common definitions, or the maximum page length for the RDAREA to which the global buffer is assigned at the time of HiRDB startup, whichever is greater.

The specification of this operand loses effect once the HiRDB system starts normally. Therefore, you need to change the global buffer specification in the system common definitions at the next normal startup.

If you specify this operand, but the utility cannot allocate a global buffer, then an RDAREA cannot be added.

(3) for {registry |LOB used by HiRDB (SQL_REGISTRY)}

Specifies the type of RDAREA to be added.

registry

This option is specified if the RDAREA to be added is a registry RDAREA.

LOB used by HiRDB (SQL_REGISTRY)

This option is specified if the RDAREA to be added is a registry LOB RDAREA.

(4) page page-length characters

<unsigned integer> ((4096-30720)) <<4096 or 8192>>

Specifies the page length of the HiRDB file comprising the RDAREA in bytes, in an integral multiple of 2048.

Registry LOB RDAREA

A value of 8192 must be specified. Even if other values are specified, 8192 is assumed.

The page length specified in this operand is used as the smallest unit of data that is input/output by the HiRDB system to or from the RDAREA.

(5) storage control segment segment-size pages

<unsigned integer> ((1-16000)) <<1 or 50>>

Specifies the size of a segment in terms of pages.

Registry LOB RDAREA

A value of 1 must be specified. Even if other values are specified, 1 is assumed.

(6) extension {use extension-segments-count segments|nouse}

Specifies whether or not to apply automatic extension of RDAREA.

In the event of a space shortage in an RDAREA, the RDAREA automatic extension facility expands the RDAREA automatically if there is enough space in the HiRDB file system area. If you apply this facility to an RDAREA and a shortage of unused segments occurs, the system allocates new unused segments to the RDAREA. These new unused segments are added at the end of the HiRDB file constituting the RDAREA.

Prerequisites

You need to specify the -e option (specifying the number of extensions) for the HiRDB file system area containing the RDAREA.

There must be enough space in the HiRDB file system area that contains the last HiRDB file constituting the RDAREA.

use extension-segments-count segments

Specifies that automatic extension of RDAREA is to be applied.

In the case of a registry RDAREA, automatic extension occurs when there are no more used free segments or used segments in the RDAREA. In the case of a registry LOB RDAREA, automatic extension occurs when there are no more unused segments.

extension-segments-count <unsigned integer> ((1-64000))

Specifies the number of extension segments.

The maximum number of HiRDB file extensions is 24. If this value is exceeded, an error occurs. The maximum number of extensions per HiRDB file system area is determined by the value specified when the HiRDB file system area is created. Therefore, you need to define the maximum number of extensions, taking into account the number of files in the HiRDB file system area and the frequency of extension.

nouse

Specifies that automatic extension of RDAREA is not to be applied.

Notes

If allocation of unused segments fails due to a shortage of space in the HiRDB file system area, either you must extend or re-initialize the RDAREA or you must use the database reorganization utility to reorganize the data dictionary table.

If the number of extents exceeds the maximum value, integrate the extents in the HiRDB file system area containing the RDAREA or add HiRDB file in another HiRDB file system area to the RDAREA.
To integrate extents, make a backup copy with pdfbkup, initialize the HiRDB file system area with pdfmkfs, then restore the HiRDB file system area from its backup copy using pdfrstr.

The last file is locked from the beginning to the end of the automatic extension process.

(7) filename-"HiRDB-file-system-area-name/HiRDB-file-name"

((up to 167 characters))

Specifies the name of the HiRDB file system area and the name of the HiRDB file to be allocated to the RDAREA.

Rules

Enclose HiRDB-file-system-area-name/HiRDB-file-name in double quotation marks (").

Do not include a linefeed character inside the double quotation marks.

You can allocate a maximum of 16 HiRDB files per RDAREA.

HiRDB-file-system-area-name/HiRDB-file-name must be unique in the HiRDB system.

HiRDB-file-system-area-name <pathname>

Specifies the name of the HiRDB file system area.

HiRDB-file-name < HiRDB filename> (1-30 characters))

Specifies the name of a HiRDB file not beginning with pl.

(8) initial HiRDB-file-segments-count segments

<unsigned integer>

Specifies the number of segments for the HiRDB file, such that the size of the HiRDB file will not exceed 64 GB.

20.3.2 Notes

Make sure that the number of RDAREAs specified does not exceed the maximum number of RDAREAs specified in the system common definition (pd_max_rdarea_no). Similarly, make sure that the number of HiRDB files constituting the RDAREAs does not exceed the maximum number of HiRDB files that can constitute RDAREAs (pd_max_file_no). If it is necessary to make a specification that exceeds one of these limits, you must use the pdchgconf command to change the system common definition or terminate the HiRDB system normally and then change the system common definition. For details about the system common definition, see the manual HiRDB Version 8 System Definition.

A comment can be added in a control statement by enclosing it in a slash-asterisk (/*) asterisk-slash (*/) combination.

20.4 Rules and notes

Organization of this section

(1) Rules

(2) Notes

(1) Rules

The registry facility initialization utility can be executed only when HiRDB is running.

The registry facility initialization utility should be executed on either a single-server or a server machine with a system manager.

The registry facility becomes available after the registry facility initialization utility has terminated and a global buffer is allocated to the registry LOB RDAREA that has been added. Registry information for plug-ins can be registered after the registry facility has become available.

Before executing the registry facility initialization utility, define a HiRDB file system area on a single-server or on a dictionary server. The pdfmkfs command can be used to initialize the HiRDB file system area.

When executing the registry facility initialization utility, set appropriate client environment variables (PDNAMEPORT, PDHOST, and PDUSER) and an authorization identifier with CONNECT privileges. For details about the client environment variables, see the HiRDB Version 8 UAP Development Guide.

After completing the execution of the registry facility initialization utility, be sure to use the database copy utility (pdcopy) to back up the registry RDAREAs, the registry LOB RDAREAs, the master directory, and the data dictionary LOB RDAREAs that were added.

(2) Notes

The following are the pdreginit command's return codes:
0: Normal termination
4: Normal termination (warning-level error occurred, but processing terminated normally)
8: Abnormal termination

The addition of registry RDAREA and registry LOB RDAREAs and the creation of a registry management table are performed when control is passed to the database structure modification utility (pdmod).

The registration of a registry operation stored procedure is executed upon normal termination of the database structure modification utility (with a KFPX24200-I message with a return code of 0 or 4). In the event of abnormal termination of the database structure modification utility (with a KFPX24200-I message with a return code of 12), the addition of the RDAREA and the creation of the registry management table will be rolled back.

If an error occurred during the registration of a registry operation stored procedure, specify the registration of the registry operation stored procedure only, using the -k option, when executing the registry facility initialization utility next time. An attempt to specify the addition of a registry RDAREA and a registry LOB RDAREA without registering a registry operation stored procedure may cause an error.

If you selected utf-8 as the character encoding in the pdsetup command, you can use a control statements file that contains a BOM. However, only ASCII characters are permitted for comments in the control statements file. If character encoding other than ASCII is used, pdreginit may not function correctly.

20.5 Examples

Example 1 shows how to use the registry facility initialization utility.

Example 1

Create the following RDAREAs:

PDREG (registry RDAREA)

PDREGLOB (registry LOB RDAREA)

Assume that the following HiRDB file system areas are already created:

/dbarea/area1 (regular file)

/dbarea/area2 (regular file)

Overview

Example of command execution

pdreginit -a /usr/seifile/regcont

Contents of the control statement file (/usr/seifile/regcont)

/* Defining registry RDAREA */
create rdarea PDREG globalbuffer gb1   ..................1
              for registry   ............................2
              page 4096 characters   ....................3
              storage control segment 50 pages   ........4
              file name "/dbarea/area1/rdreg01"
                  initial 50 segments ;   ...............5

/* Defining registry LOB RDAREA */
create rdarea PDREGLOB globalbuffer gb2   ...............6
              for LOB used by HiRDB(SQL_REGISTRY)   .....7
              page 8192 characters   ....................8
              storage control segment 1 pages   .........9
              file name "/dbarea/area2/rdreglob01"
                  initial 1000 segments ;   .............10

Explanation

Name of the RDAREA: PDREG

Type of the RDAREA: registry RDAREA (stores registry management information)

Page length: 4096 characters

Segment size: 50 pages

Specification of the HiRDB file comprising the RDAREA:
Name: /dbarea/area1/rdreg01
Number of segments: 50

Name of the RDAREA: PDREGLOB

Type of RDAREA: registry LOB RDAREA

Page length: 8192 characters

Segment size: 1 page

Specification of the HiRDB file comprising the RDAREA:
Name: /dbarea/area2/rdreglob01
Number of segments: 1000

Appendixes

Organization of the appendixes

A. List of Commands

B. Lock Mode During Command Execution

C. RDAREA Status During Command Execution

D. Maximum Number of Concurrently Executable Utilities

E. Creation of Input Data Files for the Database Load Utility

F. Creation of a UOC for Use by pdload and pdrorg

G. Number of Concurrent Command Connections

H. List of Command Return Codes

Appendix A. List of Commands

HiRDB provides operation commands and utilities. Table A-1 lists the commands that can be used with HiRDB.

Table A-1 List of commands

Type | Command | Description | Reference
System operation | pdadmvr | Displays the HiRDB version information | pdadmvr
pdcat | Displays file contents | pdcat
pdchgconf | Changes the system configuration | pdchgconf
pdconfchk | Checks system definitions | pdconfchk
pdcspool | Deletes troubleshooting information and temporary work files | pdcspool
pdgen | System generator | pdgen
pdgeter | Collects error information | pdgeter
pditvstop | Stops periodic acquisition of the HiRDB status | pditvstop
pditvtrc | Acquires the HiRDB status periodically | pditvtrc
pdjarsync | Manipulates JAR files | pdjarsync
pdlistls | Displays list definition information | pdlistls
pdlodsv | Reduces the size of the installation directory | pdlodsv
pdls | Displays the HiRDB system status | pdls
pdmemsv | Saves memory space | pdmemsv
pdobjconv | Migrates SQL objects into a 64-bit-mode HiRDB | pdobjconv
pdopsetup | Sets up optional program products | pdopsetup
pdsetup | Registers or deletes a HiRDB system in the OS | pdsetup
pdsvhostname | Displays the server's host name | pdsvhostname
pdvrup | Upgrades HiRDB | pdvrup
HiRDB file system | pdfbkup | Backs up the HiRDB file system | pdfbkup
pdffsck | Checks and repairs the integrity of a HiRDB file system area | pdffsck
pdfls | Displays HiRDB file system information | pdfls
pdfmkfs | Initializes a HiRDB file system area | pdfmkfs
pdfrm | Deletes a HiRDB file | pdfrm
pdfrstr | Restores the HiRDB file system | pdfrstr
pdfstatfs | Displays the status of a HiRDB file system area | pdfstatfs
Log files | pdlogadpf | Allocates a log-related file | pdlogadpf
pdlogatul | Manages the automatic log unloading facility | pdlogatul
pdlogchg | Changes the status of a log-related file | pdlogchg
pdlogcls | Closes a log-related file | pdlogcls
pdloginit | Initializes a log-related file | pdloginit
pdlogls | Displays log-related file information | pdlogls
pdlogopen | Opens a log-related file | pdlogopen
pdlogrm | Deletes a log-related file | pdlogrm
pdlogswap | Swaps log-related files | pdlogswap
pdlogsync | Collects a synchronization point dump | pdlogsync
pdlogucat | Displays information about unload log files | pdlogucat
pdlogunld | Unloads a log-related file | pdlogunld
Status files | pdstscls | Closes a status file | pdstscls
pdstsinit | Initializes a status file | pdstsinit
pdstsopen | Opens a status file | pdstsopen
pdstsrm | Deletes a status file | pdstsrm
pdstsswap | Swaps status files | pdstsswap
HiRDB startup and termination | pdstart | Starts a HiRDB system, unit, or server | pdstart
pdstop | Terminates a HiRDB system, unit, or server | pdstop
Statistics log | pdstbegin | Starts output of statistical information | pdstbegin
pdstend | Stops output of statistical information | pdstend
pdstjswap | Swaps statistics log files | pdstjswap
pdstjsync | Applies the statistics log buffer to the statistics log file | pdstjsync
RDAREAs | pdclose | Closes RDAREAs | pdclose
pddbls | Displays the status of RDAREAs | pddbls
pdhold | Shuts down RDAREAs | pdhold
pdopen | Opens RDAREAs | pdopen
pdrels | Releases RDAREAs from shutdown status | pdrels
pddbfrz | Freezes updating of a full HiRDB file constituting a user LOB RDAREA | pddbfrz
pdrdrefls | Displays information about related RDAREAs | pdrdrefls
Global buffer | pdbufls | Displays global buffer information | pdbufls
pdbufmod | Updates a global buffer dynamically | pdbufmod
Transaction control | pdcmt | Commits a transaction | pdcmt
pdfgt | Terminates a transaction forcibly | pdfgt
pdrbk | Rolls back a transaction | pdrbk
pdtrndec | Settles an unsettled transaction forcibly and automatically | pdtrndec
Process control | pdcancel | Terminates a UAP or utility forcibly | pdcancel
pdchprc | Changes the number of resident server processes | pdchprc
pdpfresh | Refreshes a server process | pdpfresh
pdrpause | Restarts a process service | pdrpause
Updating HiRDB version | pdprgcopy | Copies a HiRDB update version | pdprgcopy
pdprgrenew | Updates to a HiRDB update version | pdprgrenew
HiRDB Datareplicator linkage | pdrplstart | Starts HiRDB Datareplicator linkage | pdrplstart
pdrplstop | Stops HiRDB Datareplicator linkage | pdrplstop
Directory Server linkage facility | pdgrprfl | Refreshes user information | pdgrprfl
pdusrchk | Checks the directory server for user registration information | pdusrchk
Inner replica facility | pddbchg | Switches the replica status of replica RDAREAs | pddbchg
Updatable online reorganization | pdorbegin | Commits a database for online reorganization | pdorbegin
pdorcheck | Checks application conditions for online reorganization | pdorcheck
pdorchg | Changes the current RDAREA for online reorganization | pdorchg
pdorcreate | Creates an environment for reflection processing for online reorganization | pdorcreate
pdorend | Executes reflection processing for online reorganization | pdorend
Security audit | pdaudbegin | Starts acquisition of audit trails | pdaudbegin
pdaudend | Stops acquisition of audit trails | pdaudend
pdaudrm | Deletes audit trail files in shutdown status | pdaudrm
pdaudswap | Swaps current audit trail files | pdaudswap
Connection security facility | pdacunlck | Releases the consecutive certification failure account lock state | pdacunlck
Transaction queuing facility | pdtrnqing | Starts and releases the transaction queuing facility | pdtrnqing
HiRDB External Data Access facility | pddbadset | Sets up HiRDB External Data Access Adapter | pddbadset
Real Time SAN Replication | pdrisechk | Checks the configuration of Real Time SAN Replication | pdrisechk
pdrisedbto | Inherits a database in Real Time SAN Replication | pdrisedbto
pdriseset | Sets the site status in Real Time SAN Replication | pdriseset
SQL trace acquisition | pdclttrc | Acquires SQL trace dynamically | pdclttrc
SQL object information display | pdobils | Displays statistical information about an SQL object buffer | pdobils
SQL compilation | pdcbl | COBOL preprocessor | ¹
pdcpp | C preprocessor | ¹
pdocb | OOCOBOL preprocessor | ¹
pdocc | C++ preprocessor | ¹
Database creation | pdinit | Database initialization utility | Chapter 3
pddef | Database definition utility | Chapter 4
pdload | Database load utility | Chapter 5
pdsql | Interactive SQL execution utility² | Chapter 6
pddefrev | Generates a definition SQL statement | pddefrev
Database operations | pdmod | Database structure modification utility | Chapter 7
pdrorg | Database reorganization utility | Chapter 8
pdexp | Dictionary import/export utility | Chapter 9
pdrbal | Rebalancing utility | Chapter 10
pdreclaim | Free page release utility | Chapter 11
pdpgbfon | Global buffer residence utility | Chapter 12
pdconstck | Integrity check utility | Chapter 13
Tuning | pdstedit | Statistics analysis utility | Chapter 14
pddbst | Database condition analysis utility | Chapter 15
pdgetcst | Optimizing information collection utility | Chapter 16
pdvwopt | Access path display utility | Chapter 17
Database error handling | pdcopy | Database copy utility | pdbkupls
pdbkupls | Displays information about backup files | Chapter 18
pdrstr | Database recovery utility | Chapter 19
Plug-in-related | pdplgrgst | Registers and deletes plug-ins | pdplgrgst
pdplgset | Sets up a plug-in | pdplgset
pdreginit | Registry facility initialization utility | Chapter 20

: Not applicable.

¹ For details about pdcbl, pdcpp, pdocb, and pdocc, see the HiRDB Version 8 UAP Development Guide.

² HiRDB SQL Executor is required in order to execute the interactive SQL execution utility.

Appendix B. Lock Mode During Command Execution

Some HiRDB commands place a resource in an appropriate lock mode automatically. Thus, when multiple programs (including UAPs) are executing concurrently, the user needs to check the command lock mode table and the UAP (SQL) lock table to determine the combination of lock modes. For details about the combinations of lock modes according to the SQL statements executed and the execution environment, see the HiRDB Version 8 UAP Development Guide.

The following lock modes are referenced in the tables in this appendix:

PR: Shared mode

EX: Lock mode

SR: Shared retrieval mode

SU: Shared update mode

PU: Protected update mode

: The lock mode during acquisition of check pending status is inherited.

: Not locked

Organization of this section

B.1 Lock mode for operation commands

B.2 Lock mode for utilities

Appendix B.1 Lock mode for operation commands

Table B-1 shows the lock modes for the operation commands.

Table B-1 Lock modes for operation commands

Execution environment | Resource
Command | Option | Data dict table | Inner replica config | Replica group config | RDAREA status | RDAREA | Backup hold
pdbufls | All |  |  |  |  |  |
pdclose | None |  |  |  | EX | EX |
pddbchg | None or -w | EX | EX | EX | EX | EX |
pddbfrz | All |  |  |  | EX | EX |
pddbls | -a |  |  |  |  | SR |
None, -l, -b, or -o |  |  |  |  |  |
pdhold | None or -c |  |  |  | EX | EX |
-i |  |  |  | EX | PR |
-b |  |  |  | EX | PR |
-bw or -buw |  |  |  | EX | PR | EX²
-bu |  |  |  | EX |  | EX²
-s |  |  |  | EX | EX | EX²
pdopen | None |  |  |  | EX | EX |
pdorbegin | None | EX | EX | EX³ | EX | EX |
-u | EX |  |  | EX | EX |
pdorchg | None | EX |  |  | EX | EX |
pdorend | None or -z | EX | EX | EX | EX | EX |
-u | EX |  |  | EX | EX |
pdrels | None or -o |  |  |  | EX | PR/¹ |

Legend:

config: configuration

dict: dictionary

1 Lock is not placed when the resource is in updatable backup-hold status.

2 Lock is not released until it is released by the pdrels command or the resource is placed in error shutdown status.

3 Lock is not released until the pdorchg command terminates.

Appendix B.2 Lock mode for utilities

Tables B-2 through B-17 show the lock modes for each of the utilities.

The utilities listed as follows are not described here, because they do not provide the automatic lock function (the database definition utility is the same as for a definition SQL; see the HiRDB Version 8 UAP Development Guide):

Database initialization utility (pdinit)

Dictionary export/import utility (pdexp)

Statistics analysis utility (pdstedit)

Access path display utility (pdvwopt)

Table B-2 Lock modes for the database load utility

Execution environment | Resource
Table | Index | No-wait table | Resources management table | User LOB RDAREA
RDAREA | Table ID | RDAREA | Index ID
Data load by table | SU | EX | SU | EX | EX² | SR | SU
PU²
Data load by RDAREA | EX |  | SU | EX¹ |  | SR | EX
Data load of LOB data only | SR | PR |  |  |  | SR | EX

Note

When data loading is executed on a LOB column structure base table only, the lock mode is the same as for data loading by table when loading data by table or the same as for data loading by RDAREA when loading data by RDAREA.

1 In the case of index loading by RDAREA, lock is not placed on a non-partitioning key index.

² During data deletion processing, the EX lock mode takes place. For other operations, if the option statement specifies nowait=no, the EX lock mode takes place; if it specifies nowait=yes, the PU lock mode takes place.

Table B-3 Lock modes for the database load utility (for shared tables)

Exe env | Resource
Table | Index | No-wait table | RDAREA mgmt block
Updatbl back-end server | Ref-only back-end server | Shared RDAREA for updatbl back-end server | Shared RDAREA for ref-only back-end server | IX ID
Shared RDAREA | Tbl ID | Shared RDAREA | Tbl ID
Data load | EX | EX | EX | EX | EX | EX | EX | EX | SR

Legend:

env: environment

Exe: Execution

IX: Index

load: loading

mgmt: management

Ref: Referencing

Tbl: Table

updatbl: updatable

Table B-4 Lock modes for the database structure modification utility

Exe env | Resource
DB structure mod utility | Data dict table | RDAREA status | RDAREA | Tbl | Res mgmt table | Inner replica config mgmt info | Replica group config mgmt info
RDAREA addition | EX | EX | EX⁴ | EX⁴ |  |  |  |
RDAREA expansion | EX | EX | EX⁴ | PU(EX)⁴ |  | EX⁴ |  |
RDAREA reinit | EX | EX | EX⁴ | EX⁴ | EX |  |  |
RDAREA deletion | EX | EX | EX⁴ | EX⁴ |  |  | EX⁴ | EX⁴
Modification of data dictionary table attribute definition | EX | EX |  | EX² |  |  |  |
Modification of RDAREA attribute | EX | EX | EX | EX |  |  |  |
Changing an RDAREA from a HiRDB/Single Server structure to a HiRDB/Parallel Server structure | EX | EX | EX | EX |  |  |  |
Changing to a back-end server structure¹ | EX | EX | EX | EX |  |  |  |
Moving an RDAREA | EX | EX | EX⁴ | EX⁴ |  |  |  |
Registration of a generation of a HiRDB file system area | EX | EX |  |  |  |  |  |
Deletion of a generation of a HiRDB file system area | EX | EX |  |  |  |  |  |
Definition of an RDAREA replica | EX | EX | EX⁴ | EX⁴ |  |  | EX⁴ | EX⁴
Copying RDAREA configuration information | EX | EX | EX⁴ | EX⁴ |  |  | EX⁴ | EX⁴
Integration of RDAREAs | EX | EX | EX³,⁴ | EX³,⁴ |  |  | EX⁴ | EX⁴
Auditor registration | EX | EX |  |  |  |  |  |
Creation of an audit trail table | EX | EX |  | EX |  | EX |  |

Legend:

config: configuration

DB: Database

Data dict table: Data dictionary table

Exe: Execution

info: information

mgmt: management

mod: modification

reinit: reinitialization

Res: Resources

Tbl: Table

¹ This applies only to a HiRDB/Parallel Server; it is not applicable to a HiRDB/Single Server.

2 Applies only to the data dictionary RDAREA.

³ Applicable to both original and replica RDAREAs.

⁴ Applicable to both updatable back-end servers and referencing-only back-end servers in the case of shared RDAREAs.

Table B-5 Lock modes for the database reorganization utility

Execution environment
Resource

Table
Index
NW TBL
Res mgmt table
IX info file
User LOB RDAREA¹

RD AREA¹
TBL ID
RD AREA¹
IX ID

Unloading by table
(-k unld))
unldenq=tblenq is specified in option statement
SR
PR
SR²

SR

SR

unldenq=rdenq is specified in option statement
PR
SR
PR²

SR

PR

unldenq=nowait is specified in option statement
SR

SR²

SR
SR

SR

Unloading by RDAREA (-k unld)
unldenq=tblenq is specified in option statement
SR
PR
SR²

SR

SR

unldenq=rdenq is specified in option statement
PR
SR
PR²

SR

PR

unldenq=nowait is specified in option statement
SR

SR²

SR
SR

SR

Reloading by table
(-k reld)
SU
EX
SU
EX
EX
SR

SU

Reloading by RDAREA (-k reld)
EX
³
SU
EX⁴

SR

EX

Reorganization by table
(-k rorg)
SU
EX
SU
EX
EX
SR

SU

Reorganization by RDAREA
(-k rorg)
EX
SR
SU
EX⁴

SR

EX

Batch creation of index
(-k ixmk)
SR
SR
SU
EX

SR

Re-creation of index
(-k ixrc)
index statement specified⁵
EX SR⁶
SR⁶
SU
EX

SR

EX ⁶

SU SR⁶
EX SR⁶
EX ⁶
SU ⁶

idxname statement specified
SU
EX
SU
EX
EX
SR

Reorganization of index
(-k ixor)⁷
SR
PR
SU
EX

SR

EX

Batch creation of plug-in index (-k ixmk)
SR
SR
SU
EX

SR
EX

Re-creation of plug-in index
(-k ixrc)
index statement specified⁵
EX SR⁶
SR⁶
SU
EX

SR
EX
EX ⁶

SU SR⁶
EX SR⁶
EX ⁶
SU ⁶

idxname statement specified
SU
EX
SU
EX
EX
SR

SU

Reloading of LOB data only (-k reld)
SR
PR

SR

EX

Reorganization of LOB data only (-k rorg)
SU
EX
SR⁴

EX
SR

SU

Legend:

RD AREA: RDAREA

TBL ID: Table ID

IX ID: Index ID

NW TBL: No-wait table

Res mgmt table: Resource management table

IX info file: Index information file

Note

When reload or reorganization is executed on a LOB column structure base table only, the lock mode is the same as for reloading or reorganization by table when loading or reorganizing data by table or the same as for reloading or reorganization by RDAREA when reloading or reorganizing data by RDAREA.

¹

An RDAREA that is not the target of processing is not locked.

²

If data is unloaded in physical order, lock is not placed.

³

Lock is placed in the SR mode during unload processing.

⁴

Lock is not placed on a non-partitioned index during reload processing.

⁵

The upper row applies to a row-partitioned index; the lower row applies to a non-partitioned index.

⁶

The lock mode during unload processing on the index information (from KFPL00725-I to KFPL00726-I) is changed during index creation (from KFPL00715-I to KFPL00716-I).

⁷

The upper row applies when the index storage RDAREA is in command shutdown status; the lower row applies when it is not in command shutdown status.

Table B-6 Lock modes for the database reorganization utility (for shared tables)

Exe env
Resource

Table
Index
No-wait tbl
RD AREA mgmt block
IX info file

Updatable backend server
Ref-only backend server
Shared RD AREA for updatbl backend server
Shared RD AREA for ref-only backend server
IX ID

Shared RD AREA
Tbl ID
Shared RD AREA
Tbl ID

Unload by table
(-k unld)
SR
PR

SR¹

SR

Reload by table (-k reld)
EX
EX
EX
EX
EX
EX
EX
EX
SR

Reorg by table (-k rorg)
EX
EX
EX
EX
EX
EX
EX
EX
SR

Batch index creation (-k ixmk)
SR
SR

EX
EX
EX

SR

Re-crtn of index (-k ixrc, and index stmt specif)²
EX SR
EX SR
EX
EX
EX
EX
EX
EX
SR

Re-crtn of index (-k ixrc, and idxname stmt specif)
EX
EX
EX
EX
EX
EX
EX
EX
SR

Index reorg (-k ixor)
SR
PR

EX
EX
EX

SR

Legend:

env: environment

Exe: Execution

info: information

IX: Index

mgmt: management

RD AREA: RDAREA

Re-crtn: Re-creation

Ref: referencing

Reorg: Reorganization

specif: specified

stmt: statement

Tbl: Table

updatbl: updatable

1 If data is unloaded in physical order, lock is not placed.

2 The lock mode for index information during an unload operation (from KFPL00725-I through KFPL00726-I) is changed when the index is loaded (from KFPL00715-I to KFPL00716-I).

Table B-7 Lock modes for the rebalancing utility

Execution environment | Resource
RDAREA | Table | No-wait table | Index | Rebalance* | Preprocessed table
Shared mode | SU | EX | EX | EX | EX | SR
Exclusive mode | SU | EX | EX | EX |  | SR

* For the rebalancing resources, lock is placed at the single server or front-end server.

Table B-8 Lock modes for free page release utility

Exe env | Resource
Table | No-wait table | Index
RD AREA | RD AREA mgmt block | Tbl ID | Free page rel util | RD AREA | RD AREA mgmt block | IX ID | Free page rel util | Wait for trxn compl
Releasing free pages from table | SU | SR | SU | EX | SR |  |  |  |  |
Releasing free segments from table | EX | SR |  | EX |  |  |  |  |  |
Releasing free pages from index |  |  |  |  | SR | SU | SR | EX | EX | PR
Releasing free segments from index |  |  | SR |  |  | EX | SR |  | EX |

Legend:

RD AREA: RDAREA

RD AREA mgmt block: RDAREA management block

Tbl ID: Table ID

Free page rel util: Free page release utility

IX ID: Index ID

IX info file: Index information file

Wait for trxn compl: Wait for transaction completion

Table B-9 Lock modes for the free page release utility (for shared tables)

Exe env | Resource
Table | Index
Updatbl backend server | Ref-only backend server | RMB | Free page rel util | SR for UBS | SR for RBS | RMB | IX ID | Free page rel util | Wait for trxn compl
SR | Tbl ID | SR | Tbl ID
Release free pages from table | EX | EX | EX | EX | SR | EX |  |  |  |  |  |
Release free segmts from table | EX | EX | EX | EX | SR | EX |  |  |  |  |  |
Release free pages from index |  | SR |  |  |  |  | EX | EX | SR | EX | EX | PR
Release free segmts from index |  | SR |  |  |  |  | EX | EX | SR |  | EX |

Legend:

compl: completion

env: environment

Exe: Execution

IX: Index

mgmt: management

rel: release

segmts: segments

RMB: RDAREA management block

SR: Shared RDAREA

SR for UBS: Shared RDAREA for updatable back-end server

SR for RBS: Shared RDAREA for referencing-only back-end server

Tbl: Table

Updatbl: Updatable

util: utility

Table B-10 Lock modes for the global buffer residence utility

Exe env
Resource

Table
Index

RDAREA
RDAREA management block
No-wait table
RDAREA
RDAREA management block
Index ID

Reading data page
(-k table)
SR
SR
SR

Reading index page
(-k index)

SR
SR
SR
SR

Legend:

env: environment

Exe: Execution

Table B-11 Lock modes for the global buffer residence utility (for shared tables)

Exe env
Resource

Table
Index

Updatable backend server
Referencing-only backend server
Updatable backend server
Referencing-only backend server

R
RMB
No-wait tbl
R
RMB
No-wait tbl
R
RMB
IX ID
R
RMB
IX ID

Reading data page
(-k table)
SR
SR
SR
SR
SR
SR

Reading index page
(-k index)

SR

SR
SR
SR
SR
SR
SR
SR

Legend:

env: environment

Exe: Execution

IX: Index

R: RDAREA

RMB: RDAREA management block

Table B-12 Lock modes for the database condition analysis utility

Execution environment | Resource
RDAREA | Resources management table | Table | No-wait table¹
For table | For index | Specified RDAREA
Analysis by RDAREA |  |  | SR | SR |  | SR
Analysis by table | SR |  |  | SR | SR | SR
Analysis by index |  | SR |  | SR | SR | SR
Condition analysis result accumulation facility | SR | SR | SR | SR | SR |
Facility for predicting reorganization time² | SR | SR | SR | SR | SR | SR

1 A no-wait table is locked only when the -d option is specified.

2 This lock is applicable when the -m option is specified.

Table B-13 Lock modes for the optimizing information collection utility

Execution environment | Resource
RDAREA | Resources management table | Table | No-wait table | Data dictionary table
For table | For index | For table | For index | Row | Key
Acquisition of optimization information | SR | SR | SR | SR | SR/SU¹ | SR | PR²/EX¹ | PR²/EX¹
Deletion of optimization information |  |  |  |  | SU¹ |  | PR²/EX¹ | PR²/EX¹

1 Lock is placed temporarily during data dictionary table retrieval.

2 Lock is placed during data dictionary table update processing.

Table B-14 Lock modes for the database copy utility

Execution environment | Resource
Data dictionary table | RDAREA | Directory block 6 | Resources management table
-M option | x | PR | PR |  |
r | PR | PR |  |
s |  |  | PR | SR

Table B-15 Lock modes for the database recovery utility

Execution environment | Resource
Data dictionary table | RDAREA
Recovery of RDAREA | EX* | EX

* Lock is placed if the master directory RDAREA is to be recovered.

Table B-16 Lock modes for the registry facility initialization utility

Execution Environment | Resource
Database structure modification utility | Data dictionary table | RDAREA condition | RDAREA
Addition of registry RDAREAs, registry LOB RDAREAs, and registry management tables (-k all) | EX | EX | EX | EX

Table B-17 Lock modes for the integrity check utility

Execution environment | Resource
User table | Data dictionary table
RDAREA | TBL | NW TBL | Row | PP TBL | TBL | RDAREA
For TBL | For IX | For TBL | For IX
Integrity checking (-k check) | When searching data dictionary table |  |  |  |  | PR | PR | SR | SR | SR
When acquiring RDAREA check pending status* | SR | SR | PR |  |  |  |  |  |
When performing integrity checking |  |  |  |  |  |  |  |  |
When setting check pending status | SU | SU | EX | EX | EX | PR | SU | SU | SU
Forced setting of check pending status (-k set) or forced release of check pending status (-k release) | When searching data dictionary table |  |  |  |  | PR | PR | SR | SR | SR
When acquiring RDAREA check pending status* | SR | SR | PR |  |  |  |  |  |
When setting or releasing check pending status | SU |  | EX | EX | EX | PR | SU | SU | SU

Legend:

For TBL: For table

For IX: For index

NW TBL: No-wait table

PP TBL: Preprocessing table

TBL: Table

* Lock is placed by UNTIL DISCONNECT (lock is maintained until DISCONNECT is executed after the setting of check pending status is completed).

Appendix C. RDAREA Status During Command Execution

Organization of this section

C.1 RDAREA status transitions

C.2 Availability of utility or UAP execution depending on RDAREA status

C.3 Whether or not the check pending status can be set

Appendix C.1 RDAREA status transitions

Tables C-1 and C-2 describe the RDAREA status transitions during execution of operation commands.

Table C-1 RDAREA status transitions (1/2)

RDAREA status (before transition) | RDAREA status (after transition)
Open | Shutdown | Closed | Shutdown and closed | Reference-possible shutdown | Reference-possible shutdown and closed
Open¹ |  | pdhold | Transaction termination³ | pdhold -c | pdhold -i | N
Shutdown | pdrels or pdrels -o |  | N | pdclose | pdhold -i | N
Closed | pdopen, pdrels -o, or transaction startup² | N |  | pdhold or pdhold -c | N | pdhold -i
Shutdown and closed | pdrels -o | pdopen | pdrels |  | N | pdhold -i
Ref-possible shutdown | pdrels or pdrels -o | N | N | N |  | pdclose or transaction termination³
Ref-possible shutdown and closed | N | N | pdrels | pdhold or pdhold -c | pdopen or transaction startup² |
Ref-possible backup-hold | pdrels or pdrels -o | N | N | N | N | N
Ref-possible backup-hold and closed | pdrels -o | N | pdrels | N | N | N
Updatable backup-hold | pdrels or pdrels -o | N | N | N | N | N
Updatable backup-hold and closed | pdrels -o | N | pdrels | N | N | N
Synchro shutdown | pdrels or pdrels -o | N | N | N | N | N
Synchro shutdown and closed | pdrels -o | N | pdrels | N | N | N
Online reorganization hold | pdorbegin -u⁴, pdorend⁴, pdorend -z⁴, or pdorend -u | pdhold | N | pdhold -c, pdorbegin -u⁵, pdorend⁵, or pdorend -z⁵ | N | N
Online reorganization hold and closed | N | N | pdorbegin -u⁴, pdorend⁴, pdorend -z⁴, or pdorend -u | pdhold, pdorbegin -u⁵, pdorend⁵, or pdorend -z⁵ | N | N

Legend:

: Not applicable

N: Cannot be in this RDAREA status after the transition

Ref: Reference

Synchro: Synchronization

1 The pdclose command will result in an error because the RDAREA is not shut down.

2 This status changes if the RDAREA open timing is either DEFER or SCHEDULE.

3 This status changes if the RDAREA open timing is SCHEDULE.

4 This status change is applicable to original RDAREAs.

5 This status change is applicable to replica RDAREAs.

Table C-2 RDAREA status transitions (2/2)

RDAREA status (before change) | RDAREA status (after change)
RPH | RPHC | UH | UHC | SS | SSC | ORH | ORHC
Open¹ | pdhold -b | N | pdhold -b -u | N | pdhold -s | N | pdorbegin⁶ | N
Shutdown | N | N | N | N | N | N | pdrels | N
Closed | pdhold -b⁵ | N | pdhold -b -u⁵ | N | N | N | pdorbegin⁵, ⁶ | pdorbegin³, ⁶
Shutdown and closed | N | pdhold -b² | N | pdhold -b -u² | N | N | pdrels -o | pdrels or pdorbegin⁷
Ref-possible shutdown | N | N | N | N | N | N | N | N
Ref-possible shutdown and closed | N | N | N | N | N | N | N | N
Ref-possible backup-hold |  | trxn term³ or pdclose⁴ | N | N | pdhold -s | N | N | N
Ref-possible backup-hold and closed | Trxn startup² or pdopen⁴ |  | N | N | N | N | N | N
Updatable backup-hold | N | N |  | Trxn term³ | N | N | N | N
Updatable backup-hold and closed | N | N | Trxn startup² |  | N | N | N | N
Synchro shutdown | N | N | N | N |  | pdclose or trxn term³ | N | N
Synchro shutdown and closed | N | N | N | N | pdopen or trxn startup² |  | N | N
Online reorg hold | N | N | N | N | N | N |  | pdclose or trxn term
Online reorg hold and closed | N | N | N | N | N | N | pdopen, trxn startup, or pdorchg⁷ |

Legend:

N: Cannot be in this RDAREA status after the transition

RPH: Reference-possible backup hold

RPHC: Reference-possible backup hold and closed

UH: Updatable backup-hold

UHC: Updatable backup-hold and closed

SS: Synchronization shutdown

SSC: Synchronization shutdown and closed

ORH: Online reorganization hold

ORHC: Online reorganization hold and closed

: Not applicable

Ref: Reference

reorg: reorganization

Synchro: Synchronization

term: termination

Trxn: Transaction

1 The pdclose command will result in an error because the RDAREA is not shut down.

2 This status changes if the RDAREA open timing is either DEFER or SCHEDULE.

3 This status changes if the RDAREA open timing is SCHEDULE.

4 This status changes if the RDAREA is not in reference-possible backup hold (update WAIT mode).

5 This status changes if the RDAREA open timing is DEFER.

6 This status change is applicable to original RDAREAs.

7 This status change is applicable to replica RDAREAs.

Appendix C.2 Availability of utility or UAP execution depending on RDAREA status

Whether or not a utility or UAP can be executed depends on the RDAREA's open timing and status. Tables C-3 through C-8 describe the availability of utility or UAP execution depending on the RDAREA status.

Table C-3 Availability of utility or UAP execution depending on RDAREA status (when open timing is set to INITIAL) (1/3)

Utility or UAP | No shutdown | Command shutdown | Ref-possible shutdown
Open | Closed | Open | Closed | Open | Closed
Database structure modification utility | RDAREA addition |  |  |  |  |  |
RDAREA deletion | N | N | N | Y | N | Y
RDAREA re-initialization | N | N | N | Y | N | Y
RDAREA expansion³ | Y | N | Y | N | Y | N
Modification of RDAREA attribute | N | N | N | Y | N | Y
Definition of an RDAREA replica | Original RDAREA | Y | Y | Y | Y | Y | Y
Replica RDAREA |  |  |  |  |  |
Copying of RDAREA configuration information | Copy source | Y | Y | Y | Y | Y | Y
Copy target | N | N | N | Y | N | Y
Integration of RDAREAs | Original RDAREA | N | N | N | Y | N | Y
Replica RDAREA | N | N | N | Y | N | Y
Database load utility³ | Y⁴ | N | Y⁴ | N | Y⁴ | N
Database reorganization utility³ | Reorganization (-k rorg) | Y2, ⁴ | N | Y | N | Y2, ⁴ | N
Unloading (-k unld) | Y | N | Y | N | Y | N
Reloading (-k reld) | Y2, ⁴ | N | Y | N | Y2, ⁴ | N
Batch creation of index (-k ixmk) | Y | N | Y | N | Y | N
Re-creation of index (-k ixrc) | Y | N | Y | N | Y | N
Re-organization of index (-k ixor) | Y | N | Y | N | Y | N
Free page release utility³ | Y | N | Y | N | Y | N
Global buffer residence utility | Y | N | N | N | Y | N
Rebalancing utility | Y | N | Y | N | Y | N
Database copy utility | -M x | N | Y | N | Y | N | Y
-M r | Y | Y | Y | Y | Y | Y
-M s | Y | Y | Y | Y | Y | Y
Database recovery utility | N | N | N | Y | N | N
Database condition analysis utility | Y | N | Y | N | Y | N
Optimizing information collection utility | Y | N | N | N | Y | N
Dictionary import/export utility | Y | N | N | N | N | N
Database definition utility | Y | N | N | N | N | N
Integrity check utility | Y | N | N | N | N | N
Reflection processing for online reorganization (pdorend command) | N | N | N | N | N | N
UAP | Y | N | N | N | Y¹ | N

Legend:

Y: Can be executed

N: Cannot be executed

: Not applicable

config: configuration

Ref: reference

1 Only a UAP that executes referencing operations can be executed.

2 A utility or UAP cannot be executed on a falsification prevented table.

3 This cannot be executed if the original RDAREA in online reorganization hold status in the same replica group is the current RDAREA.

⁴For whether or not the referencing table can be placed in check pending status by executing the utility on the referenced table, see C.3 Whether or not the check pending status can be set.

Table C-4 Availability of utility or UAP execution depending on RDAREA status (when open timing is set to INITIAL) (2/3)

Utility or UAP | Reference- possible backup hold | Updatable backup-hold | Error shutdown
Open | Closed | Open | Open | Closed
Database structure modification utility | RDAREA addition |  |  |  |  |
RDAREA deletion | N | N | N | N | Y
RDAREA re-initialization | N | N | N | N | Y
RDAREA expansion⁴ | N | N | N | N | N
RDAREA modification | N | N | N | N | N
Definition of an RDAREA replica | Original RDAREA | Y | Y | Y | Y | Y
Replica RDAREA |  |  |  |  |
Copying of RDAREA configuration information | Copy source | Y | Y | Y | Y | Y
Copy target | N | N | N | N | N
Integration of RDAREAs | Original RDAREA | N | N | N | N | N
Replica RDAREA | N | N | N | N | N
Database load utility⁴ | N | N | N | N | N
Database reorganization utility⁴ | Reorganization (-k rorg) | N | N | N | N | N
Unloading (-k unld) | Y | N | Y | N | N
Reloading (-k reld) | N | N | N | N | N
Batch creation of index (-k ixmk) | N | N | N | N | N
Re-creation of index (-k ixrc) | N | N | N | N | N
Re-organization of index (-k ixor) | N | N | N | N | N
Free page release utility⁴ | N | N | N | N | N
Global buffer residence utility | Y | N | Y | N | N
Rebalancing utility | N | N | N | N | N
Database copy utility | -M x | N | Y | N | N | Y
-M r | Y | Y | Y¹ | N | N
-M s | Y | Y | Y | Y | Y
Database recovery utility | N | N | N | N | Y
Database condition analysis utility | Y | N | Y | N | N
Optimizing information collection utility | Y² | N | Y² | N | N
Dictionary import/export utility | N | N | Y | N | N
Database definition utility | N | N | Y | N | N
Integrity check utility | Y | N | Y | N | N
Reflection processing for online reorganization (pdorend command) | N | N | N | N | N
UAP | Y³ | N | Y | N | N

Legend:

Y: Can be executed

N: Cannot be executed

: Not applicable

1 A utility or UAP cannot be executed if an updating transaction is being executed.

2 A utility or UAP cannot be executed if the dictionary RDAREA is in reference-possible backup hold status.

3 Only a UAP that executes referencing operations can be executed.

4 This cannot be executed if the original RDAREA in online reorganization hold status in the same replica group is the current RDAREA.

Table C-5 Availability of utility or UAP execution depending on RDAREA status (when open timing is set to INITIAL) (3/3)

Utility or UAP | No-log shutdown | Synchronization shutdown | Online reorganization hold
Open | Closed | Open | Closed | Open | Closed
Database structure modification utility | RDAREA addition |  |  |  |  |  |
RDAREA deletion | N | Y | N | N | N | N
RDAREA re-initialization | N | Y | N | Y | N | Y
RDAREA expansion⁸ | N | N | N | N | Y | N
RDAREA modification | N | N | N | N | N | N
Definition of an RDAREA replica | Original RDAREA | Y | Y | Y | Y | Y | Y
Replica RDAREA |  |  |  |  |  |
Copying of RDAREA configuratin information | Copy source | Y | Y | Y | Y | Y | Y
Copy target | N | N | N | N | N | N
Integration of RDAREAs | Original RDAREA | N | N | N | N | N | N
Replica RDAREA | N | N | N | N | N | N
Database load utility⁸ | N | N | N | N | Y³, 10 | N
Database reorganization utility⁸ | Reorganization (-k rorg) | N | N | N | N | Y⁴, ⁵, 10 | N
Unloading (-k unld) | N | N | N | N | Y⁵ | N
Reloading (-k reld) | N | N | N | N | Y⁴, ⁵, 10 | N
Batch creation of index (-k ixmk) | N | N | N | N | Y⁵ | N
Re-creation of index (-k ixrc) | N | N | N | N | Y⁵ | N
Re-organization of index (-k ixor) | N | N | N | N | Y⁵ | N
Free page release utility⁸ | N | N | N | N | Y | N
Global buffer residence utility | N | N | N | N | Y | N
Rebalancing utility | N | N | N | N | N | N
Database copy utility | -M x | N | Y | N | N | N | Y
-M r | N | N | N | N | Y | Y
-M s | Y | Y | N | N | Y | Y
Database recovery utility | N | Y | N | Y | N | N
Database condition analysis utility | N | N | N | N | Y⁹ | N
Optimizing information collection utility | N | N | N | N | N⁷ | N
Dictionary import/export utility | N | N |  |  |  |
Database definition utility | N | N |  |  |  |
Integrity check utility | N | N | Y¹¹ | N¹² | Y | N
Reflection processing for online reorganization (pdorend command) | N | N | N | N | Y | N
UAP | Y¹ | N | Y² | Y² | Y⁶ | Y⁶

Legend:

Y: Can be executed

N: Cannot be executed

: Not applicable

config: configuration

1 Only the PURGE TABLE statement can be executed.

2 A utility or UAP will be placed in lock-release wait status.

3 The utility cannot be executed if the creation mode, no-log mode (or pre-update log acquisition mode), or the number of local buffer sectors for batch output is specified for a replica RDAREA, or on a table for which a LOB column has been defined.

4 A utility or UAP cannot be executed on a falsification prevented table.

5 This cannot be executed on a replica RDAREA.

6 Only an SQL statement in the log acquisition mode that accesses the current RDAREA can be executed (except in the case of the CREATE TABLE, CREATE INDEX, ALTER TABLE, DROP TABLE, DROP INDEX, DROP SCHEMA, PURGE TABLE, or LOCK statement).

7 The utility can be executed if -c lvl1 is specified for the replica RDAREA.

8 This cannot be executed if the original RDAREA in online reorganization hold status in the same replica group is the current RDAREA.

9 This cannot be executed when the -s option is specified.

10 For whether or not the referencing table can be placed in check pending status by executing the utility on the referenced table, see C.3 Whether or not the check pending status can be set.

11 A utility or UAP is placed in lock-release wait status until the shutdown status is released. After the shutdown status is released, the utility or UAP can be executed.

12 A utility or UAP is placed in lock-release wait status until the shutdown status is released. After the shutdown status is released, the utility or UAP can be executed by opening the RDAREA, which has been closed.

Table C-6 Availability of utility or UAP execution depending on RDAREA status (when open timing is set to DEFER or SCHEDULE) (1/3)

Utility or UAP | No shutdown | Command shutdown | Ref-possible shutdown
Open | Closed | Open | Closed | Open | Closed
Database structure modification utility | RDAREA addition |  |  |  |  |  |
RDAREA deletion | N | N | N | Y | N | Y
RDAREA re-initialization | N | N | N | Y | N | Y
RDAREA expansion⁴ | Y | Y | Y | N | Y | N
Modification of RDAREA attribute | N | N | N | Y | N | Y
Definition of an RDAREA replica | Original RDAREA | Y | Y | Y | Y | Y | Y
Replica RDAREA |  |  |  |  |  |
Copying of RDAREA configuration information | Copy source | Y | Y | Y | Y | Y | Y
Copy target | N | N | N | Y | N | Y
Integration of RDAREAs | Original RDAREA | N | N | N | Y | N | Y
Replica RDAREA | N | N | N | Y | N | Y
Database load utility⁴ | Y⁵ | Y⁵ | Y⁵ | N | Y⁵ | Y⁵
Database reorganization utility⁴ | Reorganization (-k rorg) | Y3, ⁵ | Y3, ⁵ | Y | N | Y3, ⁵ | Y3, ⁵
Unloading (-k unld) | Y | Y | Y | N | Y | Y
Reloading (-k reld) | Y3, ⁵ | Y3, ⁵ | Y | N | Y3, ⁵ | 3, ⁵
Batch creation of index (-k ixmk) | Y | Y | Y | N | Y | Y
Re-creation of index (-k ixrc) | Y | Y | Y | N | Y | Y
Re-organization of index (-k ixor) | Y | Y | Y | N | Y | Y
Free page release utility⁴ | Y | Y | Y | N | Y | Y
Global buffer residence utility | Y | Y | N | N | Y | Y
Rebalancing utility | Y | Y | Y | N | Y | Y
Database copy utility | -M x | N | Y | N | Y | N | Y
-M r | Y | Y | Y | Y | Y | Y
-M s | Y | Y | Y | Y | Y | Y
Database recovery utility | N | N | N | Y | N | N
Database condition analysis utility | Y | Y | Y | N | Y | Y
Optimizing information collection utility | Y | Y | N | N | Y | Y
Dictionary import/export utility¹ |  |  |  |  |  |
Database definition utility | Y | N | N | N | N | N
Integrity check utility | Y | Y | N | N | N | N
Reflection processing for online reorganization (pdorend command) | N | N | N | N | N | N
UAP | Y | Y | N | N | Y² | Y²

Legend:

Y: Can be executed

N: Cannot be executed

: Not applicable

config: configuration

Ref: Reference

1 This utility is not applicable because the RDAREA's open timing can never be DEFER or SCHEDULE.

2 Only a UAP that executes referencing operations can be executed.

3 A utility or UAP cannot be executed on a falsification prevented table.

4 This cannot be executed if the original RDAREA in online reorganization hold status in the same replica group is the current RDAREA.

⁵For whether or not the referencing table can be placed in check pending status by executing the utility on the referenced table, see C.3 Whether or not the check pending status can be set.

Table C-7 Availability of utility or UAP execution depending on RDAREA status (when open timing is set to DEFER or SCHEDULE) (2/3)

Utility or UAP | Ref-possible backup hold | Updatable backup-hold | Error shutdown
Open | Closed | Open | Closed | Open | Closed
Database structure modification utility | RDAREA addition |  |  |  |  |  |
RDAREA deletion | N | N | N | N | N | Y
RDAREA re-initialization | N | N | N | N | N | Y
RDAREA expansion⁵ | N | N | N | N | N | N
RDAREA modification | N | N | N | N | N | N
Definition of an RDAREA replica | Original RDAREA | Y | Y | Y | Y | Y | Y
Replica RDAREA |  |  |  |  |  |
Copying of RDAREA configuration information | Copy source | Y | Y | Y | Y | Y | Y
Copy target | N | N | N | N | N | N
Integration of RDAREAs | Original RDAREA | N | N | N | N | N | N
Replica RDAREA | N | N | N | N | N | N
Database load utility⁵ | N | N | N | N | N | N
Database reorganization utility⁵ | Reorganization (-k rorg) | N | N | N | N | N | N
Unloading (-k unld) | Y | Y | Y | Y | N | N
Reloading (-k reld) | N | N | N | N | N | N
Batch creation of index (-k ixmk) | N | N | N | N | N | N
Re-creation of index (-k ixrc) | N | N | N | N | N | N
Re-organization of index (-k ixor) | N | N | N | N | N | N
Free page release utility⁵ | N | N | N | N | N | N
Global buffer residence utility | Y | Y | Y | Y | N | N
Rebalancing utility | N | N | N | N | N | N
Database copy utility | -M x | N | Y | N | Y | N | Y
-M r | Y | Y | Y¹ | Y¹ | N | N
-M s | Y | Y | Y | Y | Y | Y
Database recovery utility | N | N | N | N | N | Y
Database condition analysis utility | Y | Y | Y | Y | N | N
Optimizing information collection utility | Y³ | Y³ | Y³ | Y³ | N | N
Dictionary import/export utility² |  |  |  |  |  |
Database definition utility | N | N | Y | Y | N | N
Integrity check utility | N | N | Y | Y | N | N
Reflection processing for online reorganization (pdorend command) | N | N | N | N | N | N
UAP | Y⁴ | Y⁴ | Y | Y | N | N

Legend:

Y: Can be executed

N: Cannot be executed

: Not applicable

config: configuration

Ref: Reference

1 A utility or UAP cannot be executed if an updating transaction is being executed.

2 This utility is not applicable because the RDAREA's open timing can never be DEFER or SCHEDULE.

3 A utility or UAP cannot be executed if the dictionary RDAREA is in reference-possible backup hold status.

4 Only a UAP that executes referencing operations can be executed.

5 This cannot be executed if the original RDAREA in online reorganization hold status in the same replica group is the current RDAREA.

Table C-8 Availability of utility or UAP execution depending on RDAREA status (when open timing is set to DEFER or SCHEDULE) (3/3)

Utility or UAP | No-log shutdown | Synchronization shutdown | Online reorganization hold
Open | Closed | Open | Closed | Open | Closed
Database structure modification utility | RDAREA addition |  |  | N | N |  |
RDAREA deletion | N | Y | N | N | N | N
RDAREA re-initialization | N | Y | N | Y | N | Y
RDAREA expansion⁹ | N | N | N | N | Y | N
RDAREA modification | N | N | N | N | N | N
Definition of an RDAREA replica | Original RDAREA | Y | Y | Y | Y | Y | Y
Replica RDAREA |  |  |  |  |  |
Copying of RDAREA configuration information | Copy source | Y | Y | Y | Y | Y | Y
Copy target | N | N | N | N | N | N
Integration of RDAREAs | Original RDAREA | N | N | N | N | N | N
Replica RDAREA | N | N | N | N | N | N
Database load utility⁹ | N | N | N | N | Y⁵, 11 | Y⁵, 11
Database reorganization utility⁹ | Reorganization (-k rorg) | N | N | N | N | Y⁴, ⁶, 11 | Y⁴, ⁶, 11
Unloading (-k unld) | N | N | N | N | Y⁶ | Y⁶
Reloading (-k reld) | N | N | N | N | Y⁴, ⁶, 11 | Y⁴, ⁶, 11
Batch creation of index (-k ixmk) | N | N | N | N | Y⁶ | Y⁶
Re-creation of index (-k ixrc) | N | N | N | N | Y⁶ | Y⁶
Re-organization of index (-k ixor) | N | N | N | N | Y⁶ | Y⁶
Free page release utility⁹ | N | N | N | N | Y | Y
Global buffer residence utility | N | N | N | N | Y | Y
Rebalancing utility | N | N | N | N | N | N
Database copy utility | -M x | N | Y | N | N | N | Y
-M r | N | N | N | N | Y | Y
-M s | Y | Y | N | N | N | Y
Database recovery utility | N | Y | N | Y | N | N
Database condition analysis utility | N | N | N | N | Y¹⁰ | Y¹⁰
Optimizing information collection utility | N | N | N | N | N⁸ | N
Dictionary import/export utility¹ |  |  |  |  |  |
Database definition utility | N | N |  |  |  |
Integrity check utility | N | N | Y¹² | Y¹² | Y | Y
Reflection processing for online reorganization (pdorend command) | N | N | N | N | Y | Y
UAP | Y² | Y² | Y³ | Y³ | Y⁷ | Y⁷

Legend:

Y: Can be executed

N: Cannot be executed

: Not applicable

config: configuration

1 This utility is not applicable because the RDAREA's open timing can never be DEFER or SCHEDULE.

2 Only the PURGE TABLE statement can be executed.

3 A utility or UAP will be placed in lock-release wait status.

4 A utility or UAP cannot be executed on a falsification prevented table.

5 The utility cannot be executed if the creation mode, no-log mode (or pre-update log acquisition mode), or the number of local buffer sectors for batch output is specified for a replica RDAREA, or on a table for which a LOB column has been defined.

6 This cannot be executed on a replica RDAREA.

7 Only an SQL statement in the log acquisition mode that accesses the current RDAREA can be executed (except in the case of the CREATE TABLE, CREATE INDEX, ALTER TABLE, DROP TABLE, DROP INDEX, DROP SCHEMA, PURGE TABLE, or LOCK statement).

8 The utility can be executed if -c lvl1 is specified for the replica RDAREA.

9 This cannot be executed if the original RDAREA in online reorganization hold status in the same replica group is the current RDAREA.

10 This cannot be executed when the -s option is specified.

11 For whether or not the referencing table can be placed in check pending status by executing the utility on the referenced table, see Appendix C.3 Whether or not the check pending status can be set.

12 A utility or UAP is placed in lock-release wait status until the shutdown status is released. After the shutdown status is released, the utility or UAP can be executed.

Appendix C.3 Whether or not the check pending status can be set

Whether or not a utility can be executed on a referenced table in order to place its referencing table in check pending status depends on the RDAREA open timing and the RDAREA's status. Tables C-9 through C-14 show whether or not the check pending status can be set by a utility depending on the RDAREA's status.

Table C-9 Whether or not the check pending status can be set by a utility depending on the RDAREA's status (when open timing is set to INITIAL) (1/3)

Utility | No shutdown | Command shutdown | Ref-possible shutdown
Open | Closed | Open | Closed | Open | Closed
Database structure modification utility | Y | S | S | S | S | S
Database load utility | Y | N | Y | N | Y | N
Database reorganization utility | Y | N | Y | N | Y | N
Reflection processing for online reorganization (pdorend command) | Y | S | S | S | S | S

Legend:

Y: Can be set to check pending status.

S: Cannot be set to check pending status. The utility skips this processing and executes the next processing.

N: Cannot be set to check pending status.

Table C-10 Whether or not the check pending status can be set by a utility depending on the RDAREA's status (when open timing is set to INITIAL) (2/3)

Utility | Reference-possible backup hold | Updatable backup-hold | Error shutdown
Open | Closed | Open | Open | Closed
Database structure modification utility | S | S | Y | S | S
Database load utility | N | N | Y | N | N
Database reorganization utility | N | N | Y | N | N
Reflection processing for online reorganization (pdorend command) | S | S | Y | S | S

Legend:

Y: Can be set to check pending status.

S: Cannot be set to check pending status. The utility skips this processing and executes the next processing.

N: Cannot be set to check pending status.

Table C-11 Whether or not the check pending status can be set by a utility depending on the RDAREA's status (when open timing is set to INITIAL) (3/3)

Utility | No-log shutdown | Synchronization shutdown | Online reorganization hold
Open | Closed | Open | Closed | Open | Closed
Database structure modification utility | S | S | S | S | Y | S
Database load utility | N | N | W¹ | N² | Y | N
Database reorganization utility | N | N | W¹ | N² | Y | N
Reflection processing for online reorganization (pdorend command) | S | S | S | S | Y | S

Legend:

Y: Can be set to check pending status.

W: Waits until the shutdown status is released and then sets the check pending status.

S: Cannot be set to check pending status. The utility skips this processing and executes the next processing.

N: Cannot be set to check pending status.

1 A utility or UAP is placed in lock-release wait status until the shutdown status is released. After the shutdown status is released, the utility or UAP can be executed.

2 A utility or UAP is placed in lock-release wait status until the shutdown status is released. After the shutdown status is released, the utility or UAP can be executed by opening the RDAREA, which has been closed.

Table C-12 Whether or not the check pending status can be set by a utility depending on the RDAREA's status (when open timing is set to DEFER or SCHEDULE) (1/3)

Utility | No shutdown | Command shutdown | Ref-possible shutdown
Open | Closed | Open | Closed | Open | Closed
Database structure modification utility | Y | Y | S | S | S | Y
Database load utility | Y | Y | Y | N | Y | Y
Database reorganization utility | Y | Y | Y | N | Y | Y
Reflection processing for online reorganization (pdorend command) | Y | Y | S | S | S | Y

Legend:

Y: Can be set to check pending status.

S: Cannot be set to check pending status. The utility skips this processing and executes the next processing.

N: Cannot be set to check pending status.

Table C-13 Whether or not the check pending status can be set by a utility depending on the RDAREA's status (when open timing is set to DEFER or SCHEDULE) (2/3)

Utility | Reference-possible backup hold | Updatable backup-hold | Error shutdown
Open | Closed | Open | Closed | Open | Closed
Database structure modification utility | S | S | Y | Y | S | S
Database load utility | N | N | Y | Y | N | N
Database reorganization utility | N | N | Y | Y | N | N
Reflection processing for online reorganization (pdorend command) | S | S | Y | Y | S | S

Legend:

Y: Can be set to check pending status.

S: Cannot be set to check pending status. The utility skips this processing and executes the next processing.

N: Cannot be set to check pending status.

Table C-14 Whether or not the check pending status can be set by a utility depending on the RDAREA's status (when open timing is set to DEFER or SCHEDULE) (3/3)

Utility | No-log shutdown | Synchronization shutdown | Online reorganization hold
Open | Closed | Open | Closed | Open | Closed
Database structure modification utility | S | S | S | S | Y | Y
Database load utility | N | N | W* | W* | Y | Y
Database reorganization utility | N | N | W* | W* | Y | Y
Reflection processing for online reorganization (pdorend command) | S | S | S | S | Y | Y

Legend:

Y: Can be set to check pending status.

W: Waits until the shutdown status is released and then sets the check pending status.

S: Cannot be set to check pending status. The utility skips this processing and executes the next processing.

N: Cannot be set to check pending status.

* A utility or UAP is placed in lock-release wait status until the shutdown status is released. After the shutdown status is released, the utility or UAP can be executed.

Appendix D. Maximum Number of Concurrently Executable Utilities

Table D-1 shows the maximum number of utilities that can be executed concurrently. The table assumes that appropriate values are set in the system definition. For settings, see the HiRDB Version 8 System Definition.

Maximum number of concurrent connections (system common definition: pd_max_users)

Maximum number of processes that can be started per back-end server (server common definition, back-end server definition: pd_max_bes_process)

Table D-1 Maximum number of utilities that can be executed concurrently

Utility
Maximum number of concurrently executable copies
Number of connections required for execution of 1 utility

pd_utl_exec_mode=0
pd_utl_exec_mode=1

Database initialization utility
1
1

Database structure modification utility
1
1

Database load utility
32
Value specified in pd_max_users operand
1

Database reorganization utility²
32
Value specified in pd_max_users operand
1

Rebalancing utility
32
Value specified in pd_max_users operand
1

Database definition utility³
Value specified in pd_max_users operand
1

Integrity check utility
Value specified in pd_max_users operand 2
2

Database condition analysis utility
16
Value specified in pd_max_users operand
1

Optimizing information collection utility
16
Value specified in pd_max_users operand 2
2

Dictionary import/export utility
1
1

Database copy utility

gi: Number of backup files specified in pdcopy
e: Maximum number of copies of pdcopy that can be executed concurrently¹

gi: Number of backup files specified in pdcopy
e: Maximum number of copies of pdcopy that can be executed concurrently¹
0

Database recovery utility
32
Value specified in pd_max_users operand
0

¹ The maximum number of copies of a utility that can be executed concurrently also depends on the number of backup files specified in pdcopy. This can be determined as follows:

If each copy of the pdcopy utility uses one backup file and if six such copies of the utility are executed concurrently, the number of concurrently executing copies will be 1 x 6 = 6.

If each copy of the pdcopy utility uses two backup files and if four such copies of the utility are executed concurrently, the number of concurrently executing copies will be 2 x 4 = 8.

If two such sets of copies of the utility are run simultaneously, the number of concurrently executing copies will be 6 + 8 = 14.

² When the free page release utility or the global buffer residence utility is used, the database reorganization utility is executed internally.

3 Lock-release wait status occurs because definition SQL statements cannot be executed concurrently.

Appendix E. Creation of Input Data Files for the Database Load Utility

The following types of files can be input to the database load utility (pdload):

File type | Record length | DAT format | Binary format or fixed-size data format | Fixed-size data format
Regular file | Any | Y | Y | Y
FIFO | Any¹ | Y | Y | N
Fixed-length blocked tape | 512-byte | Y² | N | N
Variable-length blocked tape | 32KB(any length for last block) | Y | Y | Y
EasyMT tape | Any³ | Y | Y | Y

Y: Can be input.

N: Cannot be input.

¹ The maximum record length is 32 KB in the normal DAT format, and is the value of the maxreclen operand in the source statement in the extended DAT format.

² The end of the tape is padded with 0x00 at a 512-byte boundary.

³ The data length equals the record length, except for EasyMT.

Because the procedures for creating the following three types of files are complicated, this appendix explains the procedures:

Fixed-length blocked tape

Variable-length blocked tape

EasyMT

Organization of this section

E.1 Creating an input file on fixed-length blocked tape

E.2 Creating an input file on variable-length blocked tape

E.3 Creating an input file on EasyMT tape

Appendix E.1 Creating an input file on fixed-length blocked tape

Organization of this subsection

(1) Principal media

(2) File name examples

(3) Overview

(4) Creation examples

(1) Principal media

CMT,AT

(2) File name examples

/dev/cmt00 (internal CMT), /dev/sysdat (internal DAT)

(3) Overview

The length of a fixed-length blocked tape is an integer multiple of 512-byte blocks. Because management information is not recorded on the medium, only 512-byte integer multiples of data can be handled. Therefore, this medium cannot handle binary format.

Files in DAT format are handled by padding the unused portion of the last block with 0x00 (0x00 is not normally found in DAT-format files).

(4) Creation examples

(a) Regular file to fixed-length blocked tape

Copy DAT-format file '/etc/csh.login' to CMT internal tape '/dev/cmt00':

dd if=/etc/csh.login of=/dev/cmt00 conv=sync
5+1 input records
6+0 output records

System output

Explanation:

5+1 indicates that five 512-byte blocks and one block with fewer than 512 bytes are to be input.

6+0 indicates that six 512-byte blocks are to be output (the last block is padded with 0x00).

Appendix E.2 Creating an input file on variable-length blocked tape

Organization of this subsection

(1) Principal media

(2) File name examples

(3) Creating a file name

(4) Overview

(5) Creation example

(1) Principal media

DAT,CGMT,OMT

(2) File name examples

/dev/dat/vdat010 (internal DAT),

/dev/cgmt/vcgmt160 (cartridge magnetic tape),

/dev/omt/vomt055 (open reel magnetic tape)

(3) Creating a file name

To install a variable-length blocked device, the file name must first be created.

The super user then executes the following command:

/etc/mknod /dev/dat/vdat010 c 119 0x010001
/bin/chmod 0666 /dev/dat/vdat010

Explanation:

Normally, when this command is executed, a variable-length blocked access device for the internal DAT is created.

/dev/dat/vdat010: Device name

c: Character special file

119: Major number (indicates DAT variable-block usage)

0x010001: Minor number (indicates internal DAT will be used in compressed mode)

See man below for unknown words or concepts.

mknod or chmod: man lm mknod or man chmod

Instruction name rule for major numbers, minor numbers, and device names: man 6 mt

(4) Overview

Blocks of any lengths can be written on variable-length blocked tape.

Because blocks of any lengths can be written, this type of tape can directly handle data in binary format, in addition to data in DAT format. The tape must be read in blocks the same length as they were written (for example, if a block written in 64 KB is read in 32 KB, the remaining 32 KB are discarded). Because there is no means of communicating to a reader that the record length changes, all blocks except the last block are normally written at the same length, and only the last block is written as a fractional block length.

Because the database load utility (pdload) makes that last block 32 KB, tapes with block lengths longer than 32 KB cannot be read correctly.

When a file is created, the block length should be 32 KB or less.

In the following example, the block length is set at 32 KB when the file is created.

(5) Creation example

The file is created in the same way in DAT format and binary format.

(a) Regular file to variable-length blocked tape

Because the cp command cannot set the buffer length, it cannot be used; the dd command must be used instead.

/usr/bin/vi output to /dev/dat/vdat010 variable-length blocked tape

dd if=/usr/bin/vi of=/dev/dat/vdat010 bs=32k
7+1 input records
7+1 output records

System output

Explanation:

7+1 indicates that seven 32-KB blocks and one block with fewer than 32 KB were processed.

(b) Creating programs

When the following types of programs are created, data of any length (specified by data_len) is output to variable-length blocked tape in 32-KB blocks. This is done by allocating the 32-KB write_buf to the system buffer and specifying full buffering (_IOFBF).

#define PROC_BUFSIZ 1024 * 32
FILE* fp;
int data_len; /* data length (needed in binary format) */
char write_buf[PROC_BUFSIZ]; /* buf system call */
char data_buf[PROC_BUFSIZ]; /* buf user */
:
fp = fopen("/dev/dat/vdat010","w")
setvbuf(fp, write_buf, _IOFBF, PROC_BUFSIZ)
:
while(while there is data) {
data write processing
}
:
fclose(fp);

Explanation:

Data write processing

DAT format
Load data into data_buf. Data + \n + \0
fputs (data_buf, fp);

Binary format
Load data into data_buf. The data length is data_len.
fwrite (data_buf, data_len, 1, fp);

(c) Data loaded mistakenly with the cp command

If the original data was in a regular file, it must be reloaded using the method in (a).

When there are two DAT devices, the buffer length can be converted with the following method:

dd if=/dev/vdat010 ibs=64k of=/dev/vdat011 obs=32k

Explanation:

/dev/vdat010: Data loaded mistakenly with the cp command

/dev/vdat011: Tape to be newly loaded for pdload

Appendix E.3 Creating an input file on EasyMT tape

EasyMT is a program product that uses a variable-length blocked tape such as in E.2 Creating an input file on variable-length blocked tape and provides tape management by means of volume names and file names.

Organization of this subsection

(1) Main media

(2) File name examples

(3) Creating a file name

(4) Overview

(5) Input file creation example

(1) Main media

DAT,CGMT,OMT

(2) File name examples

/dev/dat/vdat010 (internal DAT),

/dev/cgmt/vcgmt160 (cartridge magnetic tape),

/dev/omt/vomt055 (open reel magnetic tape)

(3) Creating a file name

To install a variable-length blocked device, the file name must first be created.

The super user then executes the following command:

/etc/mknod /dev/dat/vdat010 c 119 0x010001
/bin/chmod 0666 /dev/dat/vdat010

Explanation:

Normally, when this command is executed, a variable-length blocked access device for the internal DAT is created.

/dev/dat/vdat010: Device name

c: Character special file

119: Major number (indicates DAT variable block usage)

0x010001: Minor number (indicates internal DAT is used in compressed mode)

Refer to man below for unknown words or concepts.

mknod or chmod: man lm mknod or man chmod

Instruction name rule for major numbers, minor numbers, and device names: man 6 mt

(4) Overview

EasyMT has the following header formats:

Symbol | Description
EMTVOL_EL | EasyMT label
EMTVOL_SL | Standard label
EMTVOL_JL | JIS code label
EMTVOL_NL | No label

The header is read first by the database load utility (pdload), and then items in a recognizable format are read. An error results if the format is not recognizable or there is no label.

EasyMT has the following record formats:

Symbol | Description | Block specification | Record specification | Label specification
F | Fixed-length non-blocked records | N | F | SL or EL
FB | Fixed-length blocked records | B
V | Variable-length non-blocked records | N | V
VB | Variable-length blocked records | B
U | Unspecified-length records | N | U

The database load utility (pdload) can support all the above formats. However, the maximum of the set containing the block length, record length, or data length is as follows:

Model where file is created | Maximum value
3050RX Group | 32KB (32768-BYTE)
3500 Series
HITAC-M Series | 32KB-8 (32760-BYTE)

Because the length of one record in the F and FB record formats is fixed, only FIX tables and tables in which the column structures of all rows are fixed-length and which are input as a binary file can use these formats. If the input is an ASCII file, these formats can be used only when all data lengths are the same.

The database load utility (pdload) can handle the following two types of files as input files:

Binary-format files (-b specified)

DAT-format files (-b not specified (default))

(a) Binary-format files

Binary-format files have the record formats shown as follows.

F (Fixed-length non-blocked records)

FB (Fixed-length blocked records)

One row is specified as the data length (record length).

F or FB can be specified only for FIX tables or tables in which the column structures of all rows are fixed in length.

V (Variable-length non-blocked records)

VB (Variable-length blocked records)

U (Unspecified-length records)

(b) DAT-format files

DAT-format files have one record per row (up to NL characters). The normal record formats are V, VB, or U. The F and FB formats can be used only if the data lengths are all the same.

The data length includes NL (LF: 0x0a, '\n'). Records that do not include NL result in an error.

The maximum and minimum values for the data length, record length, and block length above are as follows:

File created on the 3050RX Group and 3500 Series

Record Format | Data length | Record length | Block length
min | max | min | max | min | max
F/FB | 1 | 32768 | 1 | 32768 | 1 | 32768
V/VB | 1 | 32760 | 5 | 32764 | 9 | 32768
U | 1 | 32768 |  |  | 1 | 32768

File created on the HITAC-M Series

Record Format | Data length | Record length | Block length
min | max | min | max | min | max
F/FB | 1 | 32760 | 1 | 32760 | 1 | 32760
V/VB | 1 | 32752 | 5 | 32756 | 9 | 32760
U | 1 | 32760 |  |  | 1 | 32760

(5) Input file creation example

Following is an example of creating an input file on the 3050RX Group or the 3500 Series for the database load utility (pdload) using the functions provided by EasyMT.

The EasyMT definition is specified in the MT attributes definition file.

(a) Program example

The MT attributes definition file is specified in the first argument (argv[1]).

Specify error processing as required.

#include    <stdio.h>
#include    <stdlib.h>
#include    <unistd.h>
#include    "easymt.h"
#define     PROC_BUFSIZ     1024 * 32
char        buf[PROC_BUFSIZ];
int         data_len;               /* data length */
    :
void main(int argc, char *argv[])
{
    EmtDescr_t* emt_fp;
    if (EmtInit(NULL, argv[1])) {
        printf("EmtInit failure, ,EmtErrno=%i\n", EmtErrno);
        exit(EXIT_FAILURE);
    }
    if (emt_fp = EmtAlloc(NULL, argv[1])) {
    } else {
        printf("EmtAlloc failure, ,EmtErrno=%i\n", EmtErrno);
        exit(EXIT_FAILURE);
    }
    if (EmtFopen(emt_fp, NULL)) {
        printf("EmtFopen failure, ,EmtErrno=%i\n", EmtErrno);
        goto proc_free;
    }

    while(while there is data) {
            :

Data is loaded into buf; the data length is assigned to data_len.
For DAT format data, NL (0x0a) is included in the data.

            :
        rc = EmtWrite(emt_fp, buf, data_len);
        if (rc != data_len) {
            printf("EmtWrite failure,EmtErrno=%i\n", EmtErrno);
            goto proc_close;
        }
    }
proc_close:
    if (EmtFclose(emt_fp)) {
        printf("EmtFclose failure,EmtErrno=%i\n", EmtErrno);
        goto proc_free;
    }

proc_free:
    if (EmtFree(emt_fp)) {
        printf("EmtFree failure,EmtErrno=%i\n", EmtErrno);
        exit(EXIT_FAILURE);
    }
}

(b) MT attributes definition file example

In the definition file, a blank immediately following an equals sign (=) means that the corresponding value is omitted.

Device name: /dev/dat/vdat010

Buffer sectors count: 2

Volume name: HiRDB

Label type: Standard label (SL)

File name: input_data

Open mode: Write-specified

Record type: VB maximum value

To handle the M-series, the maximum value is set to 32 KB - 8 bytes (32,760 bytes).

A data length of up to the record length - 4 bytes (32,752 bytes) can be handled.

The following entries in the MT attributes definition file correspond to pdload control information file source statement entries:

MT Attributes definition file entry | pdload control information file source statement entry | Maximum number of characters
volname= | vol= | 6
filename= | file= | 17*

* When an MT file is created on the HITAC-M series, a file name of up to 44 characters can be specified; however, only the last 17 characters are valid characters, and must be specified as such.

Because the bufno entry is simply the specification of the buffer sectors count to be used for writing, there is no need to match it to the pdload specification.

An example definition for creating the above file is as follows:

#/*-------------------------------------------------------
#  
(1) Operating specifications
#/*-------------------------------------------------------
devname=/dev/dat/vdat010
blking=OFF
bufno=2
#/*-------------------------------------------------------
#   (2) Volume attribute specifications
#/*-------------------------------------------------------
volname=HiRDB
voltype=SL
#/*-------------------------------------------------------
#   (3) File attribute specifications
#/*-------------------------------------------------------
filename=input_data
openmode=EMT_WRONLY
blklen=32760
reclen=32756
blktype=B
rectype=V

Appendix F. Creation of a UOC for Use by pdload and pdrorg

Organization of this section

F.1 Creating a shared library

F.2 Notes on UOC creation

Appendix F.1 Creating a shared library

After you finish coding the UOC, you must create a shared library. Specify the created shared library and the functions to be called in the control statements for pdload or pdrorg.

Organization of this subsection

(1) For HP-UX

(2) For Solaris

(3) For Linux

(4) For AIX 5L

(1) For HP-UX

This example creates a shared library named libuoc.sl from the three source files sample1.c, sample2.c, and sample3.c:

Compile the files with the +z option specified.

$ /usr/bin/cc -c -I $PDDIR/include +z sample1.c sample2.c sample3.c
sample1.c:
sample2.c:
sample3.c:

Link the created files with extension .o.

$ /bin/ld -b -o libuoc.sl sample1.o sample2.o sample3.o

(a) For HiRDB in the 64-bit mode

To execute the UOC on a HiRDB in the 64-bit mode, you must compile it in the 64-bit mode. In this case, specify +DD64 as the compile option. For the HP-UX (IPF) version, specify .so as the extension for shared libraries.

(b) POSIX library version of HiRDB

To execute the UOC on a POSIX library version of HiRDB, multi-threads must be supported. Note that multi-threads cannot be used within the UOC.

If you are using the POSIX library version of HiRDB, also note the following:

You must use HP-UX 11.0.

To support multi-threads, specify the following options during compilation:
-D_REENTRANT -D_POSIX_C_SOURCE=199506L -D_THREAD_SAFE -D_HPUX

Use thread-safe functions.

(2) For Solaris

This example creates a shared library named libuoc.so from the three source files sample1.c, sample2.c, and sample3.c:

Compile the files.

$ /usr/ucb/cc -c -I$PDDIR/include sample1.c sample2.c sample3.c
sample1.c:
sample2.c:
sample3.c:

Link the created files with extension .o.

$ /usr/css/bin/ld -G -o libuoc.so sample1.o sample2.o sample3.o

(a) HiRDB in the 64-bit mode

To execute the UOC on a HiRDB in the 64-bit mode, you must compile it in the 64-bit mode. In this case, specify -xarch=v9 as the compile option.

(3) For Linux

This example creates a shared library named libuoc.so from the three source files sample1.c, sample2.c, and sample3.c:

Compile the files.

$ /usr/bin/cc -c -I$PDDIR/include sample1.c sample2.c sample3.c
sample1.c:
sample2.c:
sample3.c:

Link the created files with extension .o.

$ /usr/bin/cc -shared -o libuoc.so sample1.o sample2.o sample3.o

(4) For AIX 5L

This example creates a shared library named libuoc.so from the three source files sample1.c, sample2.c, and sample3.c:

Compile the files.

$ /usr/vac/bin/xlc -c -I$PDDIR/include sample1.c sample2.c sample3.c
sample1.c:
sample2.c:
sample3.c:

Link the created files with extension .o.

$ /usr/vac/bin/xlc -G -o libuoc.so sample1.o sample2.o sample3.o

(a) HiRDB in the 64-bit mode

To execute the UOC on a HiRDB in the 64-bit mode, you must compile it in the 64-bit mode. In this case, specify -q64 as the compile option.

(b) POSIX library version of HiRDB

To execute the UOC on a POSIX library version of HiRDB, multi-threads must be supported. Note that multi-threads cannot be used within the UOC.

If you are using a POSIX library version of HiRDB, also note the following:

During compilation, use the xlc_r command.

For details about supporting multi-threads, see the applicable OS documentation.

Appendix F.2 Notes on UOC creation

When a UOC is used, a user-created program is installed on HiRDB for processing. In other words, the user-created program becomes part of the database management system. Any problem with the UOC may develop into a problem with HiRDB itself. For this reason, the UOC must be created very carefully and tested thoroughly. In addition, UOC creation must follow the HiRDB programming rules.

Organization of this subsection

(1) Common rules for pdload and pdrorg

(2) pdload-specific rules

(3) pdrorg-specific rules

(1) Common rules for pdload and pdrorg

The programming language that can be used is C language.

Create the UOC in the shared libraryformat.

Grant read and execution permissions to the created shared library. Do not grant write permission. If you grant write permission by mistake, the UOC execution time becomes long, resulting in adverse effects on performance.

A function that accesses a database uses a global buffer. A function that accesses a database from a buffer also uses a global buffer. If the buffer usage time is long, HiRDB detects a system error. Therefore, minimize the UOC processing and return control back to pdload or pdrorg as soon as possible.

If processing terminates abnormally within the UOC, pdload or pdrorg also terminates abnormally. For details about the database status in the event of abnormal termination and the recovery method, see 5.12 Database status in the event of an error and recovery methods or 8.13 Database status in the event of an error and recovery method.

The header file for UOC creation (pdutluoc.h) that declares the UOC interface area and symbolic constants is located under $PDDIR/include. To reference or update the interface area, we recommend that you include this header file during UOC compilation. If you are defining a user-specific header file for UOC creation for reasons such as variable name settings, note that there are differences in the table structure.

Make sure that no global variable or function name begins with any of the following characters:

Uppercase SQL, Y, or Z

Lowercase p_, pd, yy, or z

If you are using plug-ins or Java stored routines, also make sure that none of the names begin with any of the following characters:

When using plug-ins:

Lowercase _p

When using Java stored routines:

Lowercase da

Lowercase dbr

Lowercase dp

Use the void type for the UOC's return value.

Do not use the UOC to set or change environment variables.

No SQL statement can be issued within the UOC.

Do not perform signal manipulation.

The main function cannot be used as the UOC.

Do not create a recursive function.

A stack shortage may result in abnormal termination within the UOC. If you use a large amount of stack, change the value of the relevant operating system parameter. For details about the operating system parameters, see the HiRDB Version 8 Installation and Design Guide.

Do not create threads.

Do not use any functions other than the following:

File manipulation functions

Character processing functions

Memory allocation and release functions

Do not use any of the following functions:

Process manipulation functions, such as fork(), exit(), abort(), and exec()

sleep(), select(), and wait()

Stack manipulation functions (such as setjmp() and longjmp())

Shared memory manipulation functions

Semaphore manipulation functions

Socket manipulation functions

System resources manipulation functions (such as setrlimit)

mmap() and munmap()

gethostent(), sethostent(), endhostent(), gethostbyname(), gethostbyaddr(), and herror()

tempnam() and tmpnam()

pstat()

system()

Do not use within the UOC the ID of a process that is executed by the UOC.

With respect to file manipulation, note the following:

Do not manipulate any file in the HiRDB installation directory or HiRDB directory.

Do not manipulate any OS file.

To create a file, specify its absolute path name. Otherwise, a file will be created in the current directory. The current directory of a HiRDB process is under $PDDIR/tmp/home; do not create files here.

If a file is to be created within a UOC, the file permissions must be set explicitly.

Make sure that all temporary files created by the UOC are deleted (unlinked).

Do not use any special files, such as PIPE.

Do not use the standard input, standard output, or standard error output.

If you execute multiple utilities, multiple sets of the UOC are also executed concurrently. If the UOC locks file resources, make sure that any of the other UOCs that are running concurrently will not be placed in lock-release wait status.

The user is responsible for managing files output by the UOC.

(2) pdload-specific rules

For a HiRDB/Parallel Server, provide the shared librarycontaining the UOC at the host where the server specified in the source statement is located.

If pdload is to read a binary-format input data file and pass a line of data to the UOC, but it cannot edit data to a single line due to invalid length of a variable-length character string, pdload cancels processing.

If there is no response from pdload, you can use the pdls -d rpc command to determine whether pdload or the UOC has control. If the resulting USR_EVENT is 0x00052601, the UOC has control.

(3) pdrorg-specific rules

Provide the shared librarycontaining the UOC at the host where the server used to call the UOC is located. For details about the server that calls the UOC and the host, see 8.10.2 Relationships between options and control statements.

The UOC must not manipulate any files other than UOC data files.

If memory space is allocated by the UOC by means of a OS functions (such as malloc), make sure that the memory space is released by the following call methods:

Returning a nonzero value as the return code during startup processing

Termination processing

Cancellation processing

If there is no response from pdrorg, you can use the pdls -d rpc command to determine whether pdrorg or the UOC has control. If the resulting USR_EVENT is 0x00051601, the UOC has control.

Appendix G. Number of Concurrent Command Connections

Some commands (operation commands and utilities) perform connection processing internally in HiRDB. When you execute commands or determine the pd_max_users operand value in the system definition, you must note the following:

The connection frame specified in the pd_max_users operand is used at the time of command connection; therefore, the number of connections available to users is reduced temporarily.

If there are more command connections than the number of connections available in the connection frame at the time of a command execution, a connection error occurs and the command may result in an error.

Table G-1 shows the number of additional concurrent connections that are possible for each command. The provided number of concurrent connections is relative to there already being one command execution.

Table G-1 Number of additional concurrent connections for each command

Command name | Number of additional concurrent connections
pdacunlck | 0
pdadmvr | 0
pdaudbegin | 0
pdaudend | 0
pdaudrm | 0
pdaudswap | 1
pdbkupls | 0
pdbufls | 0
pdbufmod | 0
pdcancel | 0
pdcat | 0
pdchgconf | 0
pdchprc | 0
pdclose | 0
pdclttrc | 0
pdcmt | 0
pdconfchk | 0
pdconstck | 2
pdcopy | 0
pdcspool | 0
pddbadset | 0
pddbchg | 0
pddbfrz | 0
pddbls | 0
pddbst | 1
pddef | 1
pddefrev | 1
pdexp | 1
pdfbkup | 0
pdffsck | 0
pdfgt | 0
pdfls | 0
pdfmkfs | 0
pdfrm | 0
pdfrstr | 0
pdfstatfs | 0
pdgen | 0
pdgetcst | 2
pdgeter | 0
pdgrprfl | 0
pdhold | 0
pdinit | 1
pditvstop | 0
pditvtrc | 0
pdjarsync | 0
pdlistls | 0
pdload | 1
pdlodsv | 0
pdlogadpf | 0
pdlogatul | 0
pdlogchg | 0
pdlogcls | 0
pdloginit | 0
pdlogls | 0
pdlogopen | 0
pdlogrm | 0
pdlogswap | 0
pdlogsync | 0
pdlogucat | 0
pdlogunld | 0
pdls -d aud | When HiRDB is active, 1; when HiRDB is inactive, 0
pdls (other than -d aud) | 0
pdmemsv | 0
pdmod | 1
pdobils | 0
pdobjconv | 1
pdopen | 0
pdopsetup | 0
pdorbegin | 0
pdorcheck | 1
pdorchg | 0
pdorcreate | 1
pdorend | (number of servers specified in the pdorend -s option) (value of the pdorend -m option)
pdpfresh | 0
pdpgbfon | 1
pdplgrgst | 1
pdplgset | 0
pdprgcopy | 0
pdprgrenew | 0
pdrbal | 1
pdrbk | 0
pdrdrefls | 1
pdreclaim | 1
pdreginit | 1
pdrels | 0
pdrorg | 1
pdrisechk | For a HiRDB/Single Server, 1; for a HiRDB/Parallel Server, the number of units that contain a dictionary server or back-end server
pdrisedbto | 0
pdriseset | 0
pdrpause | 0
pdrplstart | 0
pdrplstop | 0
pdrstr | 0
pdsetup | 0
pdsql | 1
pdstart | 0
pdstbegin | 0
pdstedit | 0
pdstend | 0
pdstjswap | 0
pdstjsync | 0
pdstop | 0
pdstscls | 0
pdstsinit | 0
pdstsopen | 0
pdstsrm | 0
pdstsswap | 0
pdsvhostname | 0
pdtrndec | 0
pdtrnqing | 0
pdusrchk | 0
pdvrup | 1
pdvwopt | 0

Appendix H. List of Command Return Codes

Table H-1 lists and describes the return codes that can be set by HiRDB commands.

Table H-1 List of return codes set by commands

Command
Output message
Return code
Description

Message ID
Code

pdacunlck
KFPD01113-I
0
0
Normal termination

8
8
Abnormal termination

pdadmvr

0
Normal termination

8
Abnormal termination (invalid option)

pdaudbegin

0
Normal termination

4
Some units terminated normally.

8
Abnormal termination

pdaudend

0
Normal termination

4
Some units terminated normally.

8
Abnormal termination

pdaudrm

0
Normal termination

8
Abnormal termination

pdaudswap

0
Normal termination

8
Abnormal termination

pdbkupls
KFPR26276-I
0
0
Normal termination

12
12
Abnormal termination

pdbufls

0
Normal termination

4
Warning termination (some server processes terminated with error)

8
Abnormal termination

12
Abnormal termination (an event disabling display of error messages occurred)

pdbufmod

0
Normal termination

4
Warning termination (some server processes terminated with error)

8
Abnormal termination

12
Abnormal termination (an event disabling display of error messages occurred)

pdcancel

0
Normal termination

8
Abnormal termination (such as invalid option or rsh error)

pdcat

0
Normal termination

8
Abnormal termination

pdcbl

0
Normal termination

4
Error occurred (process was resumed through the end).

8
Error occurred (process was resumed through the end).

12
Error occurred (process was cancelled).

16
Error occurred (process was cancelled).

pdchgconf
KFPS04661-I
0
0
Normal termination

8
8
Abnormal termination

pdchprc

0
Normal termination

8
Abnormal termination (such as invalid option or rsh error)

pdclose

0
Normal termination

4
Warning termination (some RDAREA processes terminated with error)

8
Abnormal termination

12
Abnormal termination (an event disabling display of error messages occurred)

pdclttrc

0
Normal termination

8
Abnormal termination

pdcmt

0
Normal termination

1
Abnormal termination (such as invalid option or rsh error)

pdconfchk
KFPS05007-I
0
0
Normal termination

8
8
Abnormal termination (invalid argument or pdconfchk command execution error)

pdconstck
KFPL50001-I
0
0
Normal termination

4
4
Normal termination (constraint violation occurred)
This includes when processing was cancelled because the number of key values resulting in a constraint violation exceeded the maximum number permissible.

8
8
Abnormal termination

pdcpp

0
Normal termination

4
Error occurred (process was resumed through the end).

8
Error occurred (process was resumed through the end).

12
Error occurred (process was cancelled).

16
Error occurred (process was cancelled).

pdcopy
KFPR00756-I
0
0
Normal termination

8
8
Abnormal termination (some copy processes failed or were skipped)

12
12
Abnormal termination (all copy processes failed)

pdcspool

0
Normal termination

4
Normal termination

12
Abnormal termination

pddbadset
KFPS04631-I
0
0
Normal termination

8
8
Abnormal termination

pddbchg

0
Normal termination

4
Warning termination (some RDAREA processes terminated with error)

8
Abnormal termination

12
Abnormal termination (an event disabling display of error messages occurred)

pddbfrz

0
Normal termination

4
Warning termination (some RDAREA processes terminated with error)

8
Abnormal termination

12
Abnormal termination (an event disabling display of error messages occurred)

pddbls

0
Normal termination

4
Warning termination

8
Abnormal termination

12
Abnormal termination (an event disabling display of error messages occurred)

pddbst
KFPK10301-I
0
0
Normal termination

4
4
Abnormal termination (invalid specification)

8
8
Abnormal termination

pddef

0
Normal termination

8
Abnormal termination

pddefrev
KFPX18400-I
0
0
Normal termination

8
8
Abnormal termination

12
12
Abnormal termination

pdexp
KFPX18400-I
0
0
Normal termination

4
4
Normal termination (invalid procedure or trigger export)

8
8
Abnormal termination

12
12
Abnormal termination

pdfbkup

0
Normal termination

1
Warning termination

-1
Abnormal termination

pdffsck

0
Normal termination

1
Warning termination (integrity error was detected during verification)

-1
Abnormal termination

pdfgt

0
Normal termination

1
Abnormal termination (such as invalid option or rsh error)

pdfls

0
Normal termination

-1
Abnormal termination

pdfmkfs

0
Normal termination

-1
Abnormal termination

pdfrm

0
Normal termination

-1
Abnormal termination

pdfrstr

0
Normal termination

1
Warning termination

-1
Abnormal termination

pdfstatfs

0
Normal termination

-1
Abnormal termination

pdgen

0
Normal termination

pdgetcst
KFPN00011-I
0
0
Normal termination

4
4
Normal termination (warning occurred on data dictionary table manipulation)

8
8
Abnormal termination

pdgeter
KFPN10301-I
0
0
Normal termination

4
4
Warning termination (part of the information acquisition processing was skipped)

8
8
Abnormal termination

12
12
Termination by interrupt

pdgrprfl
KFPD01102-I
0
0
Normal termination

8
8
Abnormal termination

pdhold

0
Normal termination

4
Warning termination (some RDAREA processes terminated with error)

8
Abnormal termination

12
Abnormal termination (an event disabling display of error messages occurred)

pdinit
KFPX24013-I
0
0
Normal termination

4
4
Normal termination (warning-level error occurred, but processing terminated normally)

8
8
Normal termination (initialization terminated normally, but communication for the termination of initialization resulted in an error)

12
12
Abnormal termination

pditvstop

0
Normal termination

1
Abnormal termination

pditvtrc

0
Normal termination

1
Abnormal termination

pdjarsync

0
Normal termination

4
Abnormal termination (JAR file has or has not been registered)

8
Abnormal termination

pdlistls

0
Normal termination

8
Abnormal termination

pdload
KFPL00704-I
0
0
Normal termination

4
4
Normal termination (detection of input data error)

8
8
Abnormal termination

pdlodsv

0
Normal termination

1
Abnormal termination (user privilege error, etc.)

8
Abnormal termination (environment variable has not been set)

12
Abnormal termination (invalid option, user privilege error, etc.)

pdlogadpf

0
Normal termination

4
Abnormal termination

8
Abnormal termination (such as invalid option or rsh error)

pdlogatul

0
Normal termination

4
Cancelled or timeout occurred.

8
Abnormal termination (such as invalid option or rsh error)

pdlogchg

0
Normal termination

4
Abnormal termination

8
Abnormal termination (such as invalid option or rsh error)

12
Abnormal termination (when processing was retried at the standby system in a configuration without inheritance of IP addresses)

pdlogcls

0
Normal termination

4
Abnormal termination

8
Abnormal termination (such as invalid option or rsh error)

pdloginit

0
Normal termination

4
Abnormal termination

8
Abnormal termination (such as invalid option or rsh error)

12
Abnormal termination (when processing was retried at the standby system in a configuration without inheritance of IP addresses)

pdlogls

0
Normal termination

4
Abnormal termination

8
Abnormal termination (such as invalid option or rsh error)

12
Abnormal termination (when processing was retried at the standby system in a configuration without inheritance of IP addresses)

pdlogopen

0
Normal termination

4
Abnormal termination

8
Abnormal termination (such as invalid option or rsh error)

pdlogrm

0
Normal termination

4
Abnormal termination

8
Abnormal termination (such as invalid option or rsh error)

12
Abnormal termination (when processing was retried at the standby system in a configuration without inheritance of IP addresses)

pdlogswap

0
Normal termination

4
Swapping occurred, but the synchronization point dump was not validated and the command was terminated forcibly.

8
Abnormal termination (such as invalid option or rsh error)

pdlogsync

0
Normal termination

4
Abnormal termination

8
Abnormal termination (such as invalid option or rsh error)

pdlogucat

0
Normal termination

8
Abnormal termination

pdlogunld

0
Normal termination

4
Abnormal termination

8
Abnormal termination (such as invalid option or rsh error)

12
Abnormal termination (when processing was retried at the standby system in a configuration without inheritance of IP addresses)

pdls(-d act)

0
Normal termination

8
Abnormal termination

pdls(-d aud)

0
Normal termination

8
Abnormal termination

pdls(-d ha)

0
Normal termination

8
Abnormal termination

pdls(-d lck)

0
Normal termination

8
Abnormal termination

pdls(-d mem)

0
Normal termination

8
Abnormal termination

pdls(-d org)

0
Normal termination

8
Abnormal termination

pdls(-d prc)

0
Normal termination

8
Abnormal termination

pdls(-d ris)

0
Normal termination

8
Abnormal termination

pdls(-d rpc)

0
Normal termination

8
Abnormal termination

pdls(-d rpl)

0
Normal termination

8
Abnormal termination

pdls(-d scd)

0
Normal termination

8
Abnormal termination

pdls(-d stj)

0
Normal termination

8
Abnormal termination

pdls(-d sts)

0
Normal termination

8
Abnormal termination

pdls(d svr)

0
All units are active and HiRDB startup processing was completed (after the KFPS05210-I message was displayed). 0 is also returned when all front-end servers were terminated by the pdstop -s command after HiRDB started.

4
Some units are inactive

4
Before completion of HiRDB startup processing (status of front-end server is SUSPEND)

8
Abnormal termination

pdls(-d ust)

0
Unit is active (front-end server can be connected if it is located at the unit where the command is executed).

4
Unit is starting (front-end server is located at the unit where the command is executed, but the front-end server cannot be connected), or unit is stopping.

8
Restart of the process service was cancelled.

12
Unit is stopped (pdsetup -d command can be executed).

16
OS registration has been deleted.

pdls(-d trn)

0
Normal termination

8
Abnormal termination

pdmemsv
Memory saving level:

0
Normal termination

2
Abnormal termination (such as invalid option)

pdmod
KFPX24213-I
0
0
Normal termination

4
4
Normal termination (warning-level error occurred, but processing terminated normally)

8
8
Normal termination (some configuration change processes terminated normally)

12
12
Abnormal termination

16
16
Abnormal termination (inconsistent database)

pdobils

0
Normal termination

4
Abnormal termination

pdobjconv
KFPX21002-I
0
0
Normal termination

4
4
Warning termination

8
8
Terminated normally, but some resulted in a re-registration error. Or, error occurred on command execution.

12
12
Abnormal termination

pdocb

0
Normal termination

4
Error occurred (process was resumed through the end).

8
Error occurred (process was resumed through the end).

12
Error occurred (process was cancelled).

16
Error occurred (process was cancelled).

pdocc

0
Normal termination

4
Error occurred (process was resumed through the end).

8
Error occurred (process was resumed through the end).

12
Error occurred (process was cancelled).

16
Error occurred (process was cancelled).

pdopen

0
Normal termination

4
Warning termination (some RDAREA processes terminated with error)

8
Abnormal termination

12
Abnormal termination (an event disabling display of error messages occurred)

pdopsetup
KFPS04618-I

0
Normal termination

8
Privilege error, HiRDB is active, insufficient disk space, uninstalled, or already installed

12
Invalid parameter or path

pdorbegin
KFPH27045-I
0
0
Normal termination

4
4
Warning termination (processing was successful at some servers)

8
8
Abnormal termination

12
12
Abnormal termination (an event disabling display of error messages occurred)

pdorcheck

0
Normal termination

4
Warning termination (some resources do not satisfy the conditions)

8
Abnormal termination

pdorchg
KFPH27045-I
0
0
Normal termination

4
4
Warning termination (processing was successful at some servers)

8
8
Abnormal termination

12
12
Abnormal termination (an event disabling display of error messages occurred)

pdorcreate
KFPT02014-I
0
0
Normal termination

4
4
Warning termination (requested processing has already been executed, or deletion processing was cancelled by interactive entry)

8
8
Abnormal termination

pdorend
KFPH27045-I
0
0
Normal termination

4
4
Warning termination for one of the following reasons:

The corresponding SQL statement was skipped because processing was successful at some servers or an SQL error subject to skipping occurred.

The corresponding SQL statement was skipped because the UPDATE statement specifying the SET or DELETE clause containing an element number that is not in the repetition column was executed and a warning error occurred.

The system was unable to change at least one of the tables to check pending status; it ignored that processing and resumed normal processing.

8
8
Abnormal termination

12
12
Abnormal termination (an event disabling display of error messages occurred)

pdpfresh
KFPS00730-I
0
0
Normal termination

8
Abnormal termination (such as invalid option or rsh error)

pdpgbfon
KFPL00738-I
0
0
Normal termination

4
4
Normal termination (buffer miss occurred because there were not enough buffer sectors when data was read into the global buffer)

8
8
Abnormal termination

12
12
Abnormal termination (pdrorg terminated abnormally)

pdplgrgst
KFPY02016-I
0
0
Registration or deletion was successful.

8
8
Registration or deletion failed.

pdplgset
KFPY01201-I
0
0
Setup was successful.

8
8
Setup failed.

pdprgcopy
KFPS04645-I
0
0
Normal termination

8
8
Abnormal termination

pdprgrenew
KFPS04646-I
0
0
Normal termination

8
8
Abnormal termination (HiRDB status before updating)

12
12
Abnormal termination (HiRDB terminated)

KFPS05033-E
8
8
Abnormal termination (abnormal termination of system function)

pdrbal
KFPL33001-I
0
0
Normal termination

4
4
Normal termination (rebalancing stopped temporarily)

8
8
Abnormal termination

pdrbk

0
Normal termination

1
Abnormal termination (such as invalid option or rsh error)

pdrdrefls

0
Normal termination

4
Warning termination (there is no resource to be analyzed)

8
Abnormal termination

pdreclaim
KFPL00739-I
0
0
Normal termination

4
4
Normal termination (processing was cancelled because timeout occurred while waiting for settlement of UAP transaction)

8
8
Abnormal termination

pdreginit
KFPX24601-I
0
0
Normal termination

4
4
Normal termination (warning-level error occurred, but processing terminated normally)

8
8
Abnormal termination

pdrels

0
Normal termination

1
Warning termination
At the updatable backup-hold (WAIT mode), the update buffer contents were applied to the RDAREA. Shutdown release processing has terminated normally.

4
Warning termination (there is an error in at least one of the RDAREAs that were specified)

8
Abnormal termination

12
Abnormal termination (an event disabling display of error messages occurred)

pdrisechk

0
Normal termination

8
Abnormal termination

pdrisedbto

0
Normal termination

4
Some units terminated abnormally

8
Abnormal termination

pdriseset

0
Normal termination

8
Abnormal termination

pdrorg
KFPL00719-I
0
0
Normal termination

4
4
Normal termination (some processes were skipped)

8
8
Abnormal termination

pdrpause

0
Normal termination

8
Abnormal termination (such as invalid option or rsh error)

pdrplstart

0
Normal termination

8
Abnormal termination

pdrplstop

0
Normal termination

4
Abnormal termination (some units were inactive (except ones that had not been started due to reduced activation), or some log information was not extracted by HiRDB Datareplicator)

8
Abnormal termination

pdrstr
KFPR00765-I
0
0
Normal termination

4
4
Warning termination (recovery processing terminated normally, but a warning level error that is unrelated to recovery processing occurred)

8
8
Abnormal termination (an error occurred during recovery processing, but some RDAREAs were restored)

12
12
Abnormal termination

pdsetup

0
Normal termination

KFPS00011-I
8
1
Privilege error, file creation error, locking error, etc.

pdstart
KFPS01850-I
KFPS05110-I

0
Normal termination

4
Message was displayed due to timeout.

8
Abnormal termination (invalid option)

pdstbegin

0
Normal termination

8
Abnormal termination (such as invalid option or rsh error)

pdstedit
KFPK00300-I
0
0
Normal termination

4
0
Warning termination

8
1
Abnormal termination

pdstend

0
Normal termination

8
Abnormal termination (such as invalid option or rsh error)

pdstjswap

0
Normal termination

8
Abnormal termination (such as invalid option or rsh error)

pdstjsync
KFPS05840-I

0
Normal termination

KFPS01841-E

8
Abnormal termination (invalid option or unavailable statistical information)

pdstop

0
Normal termination

4
Abnormal termination (communication timeout during planned shutdown)

8
Abnormal termination (invalid option)

pdstscls

0
Normal termination

8
Abnormal termination (such as invalid option or rsh error)

pdstsinit

0
Normal termination

8
Abnormal termination (such as invalid option or rsh error)

12
Abnormal termination (when processing was retried at the standby system in a configuration without inheritance of IP addresses)

pdstsopen

0
Normal termination

8
Abnormal termination (such as invalid option or rsh error)

pdstsrm

0
Normal termination

8
Abnormal termination (such as invalid option or rsh error)

12
Abnormal termination (when processing was retried at the standby system in a configuration without inheritance of IP addresses)

pdstsswap

0
Normal termination

8
Abnormal termination (such as invalid option or rsh error)

KFPS05210-I

0
Normal termination

pdsvhostname

0
Normal termination

1
Normal termination (server is inactive)

4
Abnormal termination (HiRDB is inactive)

8
Abnormal termination (command was executed at a server machine where the system manager is not located, or the specified server was not found, etc.)

pdtrndec

0
Normal termination

4
Warning termination (there is at least one unsettled transaction)

8
Abnormal termination (invalid option)

pdtrnqing

0
Normal termination

4
Warning termination (pd_ha_transaction=queing is missing in the system definition)

8
Warning termination (invalid execution environment, operation error, etc.)

12
Abnormal termination (other than the above)

pdusrchk

0
Normal termination

8
Abnormal termination

pdvrup
KFPX24404-I
0
0
Normal termination

4
4
Normal termination (an error occurred during execution of pdvrup, but upgrading was successful)

12
12
Abnormal termination

pdvwopt

0
Normal termination

8
Abnormal termination

Legend:

: No message or code is displayed.

Index

[Symbols]
[Numbers]
[A][B][C][D][E][F][G][H][I][J][K][L][M][N][O][P][Q][R][S][T][U][V][W]

(Symbols)

-d (pdload)

-g (pdrorg)

-j (pdrorg)

-W (pdrorg)

(Numbers)

1 TO 1 (pdvwopt)

(A)

abstract data type name

reld_func statement (pdrbal)

reld_func statement (pdrorg)

unld_func statement (pdrbal)

unld_func statement (pdrorg)

access path display utility

executing

access path information file

notes about collecting

pdvwopt

access path, types of

accumulated condition analysis results, resetting

add-on PP, setting up

addition mode (pdload)

all

pdpgbfon

pdreclaim

pdrorg

ALL (pdgetcst)

alter HiRDB mode to parallel statement (pdmod)

alter rdarea statement (pdmod)

alter system statement (pdmod)

analysis

by cluster key order

by clustering data page order

information by item

AND PLURAL INDEXES SCAN (pdvwopt)

application, updating data for use by (reorganization using UOC)

area allocation size (option statement (pdload))

argument type

reld_func statement (pdrbal)

reld_func statement (pdrorg)

unld_func statement (pdrbal)

unld_func statement (pdrorg)

array statement

pdload

pdrorg

arrayed data

in fixed-size data format

in variable-length data type

arrayed data format

array statement (pdload)

column name statement (pdload)

for tables containing repetition columns

audit trail file

displaying status of

in shutdown status, deleting

swapping

audit trail table, creating

audit trail, starting acquisition of

auditor, registering

authorization identifier

create auditor statement of pdmo

pdconstck

pddbst

pddbst

pddbst

pdexp

pdgetcst

pdgetcst

pdinit

pdload

pdload

pdpgbfon

pdpgbfon

pdrbal

pdrbal

pdreclaim

pdreclaim

pdrorg

pdrorg

reld_func statement (pdrbal)

reld_func statement (pdrorg)

tblname statement (pdrorg)

tblname statement (pdrorg)

unld_func statement (pdrbal)

unld_func statement (pdrorg)

automatic log unloading facility

controlling

(B)

backup

acquisition mode

acquisition mode

acquisition mode

creating, using inner replica facility

in units

in units of systems (pdcopy)

information required for making backup copies

RDAREAs that need to be backed up at the same time

type (pdcopy)

backup file

displaying information about

format of

initial size (pdcopy)

server machine storing

size of

type of (pdcopy)

type of (pdrstr)

backup file name

pdcopy

pdrstr

backup search condition end time (pdrstr)

backup search condition start time (pdrstr)

backup-hold status

barlist filename

pdcopy

pdrstr

base table retrieval processing information

batch index creation mode

pdload

pdrorg

batch index mode (pdrbal)

batch input page, maximum number of

batch input/output local buffer sectors count

pdrbal

pdrorg

batch output local buffer sectors count (pdload)

binary format

binary format

blobtovarchar statement (pdrorg)

BROADCAST (pdvwopt)

broadcast transfer

buffer

used by pdload

used by pdrbal

used by pdrorg

buffer size for sorting

sort statement (pdload)

sort statement (pdrbal)

sort statement (pdrorg)

bytes count (skipdata statement (pdload))

(C)

character codes type

check pending status

based on result of integrity checking, changing

changes in

changes in

changes in when integrity checking is performed by all generations

changes in when integrity checking is performed by constraint

changes in when integrity checking is performed by current RDAREA's generation

changes in when integrity checking is performed by generation

changes in when integrity checking is performed by table

execution unit of facility for changing forcibly

facility for changing forcibly

facility for changing forcibly (forced release)

facility for changing forcibly (forced setting)

facility for changing forcibly by all generations

facility for changing forcibly by constraint

facility for changing forcibly by current RDAREA's generation

facility for changing forcibly by generations

facility for changing forcibly by table

for constraint, change in

for RDAREA, change in

for table, change in

forced releasing of

forced releasing of (facility for changing check pending status forcibly)

forced setting of

forced setting of (facility for changing check pending status forcibly)

information about

whether or not possible to set

client environment definition, specifying (to execute pddef)

column data and parameters, specification format of

binary format

DAT format

column name

blobtovarchar statement (pdrorg)

column name statement (pdload)

column name statement (pdload)

column number (column number statement (pdload))

column number statement (pdload)

column structure information file (pdload)

column structure information file (pdload)

commands

arguments

concurrent connections, number of

descriptive format of

execution mode of

execution, forced termination by interruption of

input method for

list of

reconfiguring system

using by specifying alias

commit interval (pdreclaim)

commit unit (pdrbal)

condition analysis

by index

by index

by RDAREA

by RDAREA

by RDAREA

by table

by table

condition analysis result accumulation facility

executing in prediction level 2

interval analysis (pddbst)

merge analysis (pddbst)

consecutive certification failure account lock state, releasing

constraint name (pdconstck)

constraint statement

pdload

pdrorg

constructor function

pdrbal

pdrorg

constructor parameter reverse creation function

pdrbal

pdrorg

control information file

pdload

pdload

pdrorg

control information file name

pdpgbfon

pdrbal

pdreclaim

control statement

directories specified in (pdrorg)

files specified in (pdrorg)

number of specifiable (pdload)

pdinit

relationship with options (pdrorg)

control statement file name

pdcopy

pdexp

pdinit

pdmod

pdreginit

pdrstr

pdstedit

create audit table statement (pdmod)

create auditor statement (pdmod)

create generation statement (pdmod)

create rdarea statement

pdinit

pdmod

pdreginit

specification order

creation mode (pdload)

CROSS JOIN (pdvwopt)

cutdtmsg (option statement (pdload))

(D)

DAT format

DAT format

DAT format file

output destination directory name (pdstedit)

output of statistical information to

data dictionary table

modifying attribute definition of

reorganizing

specification of reference privilege for (alter system statement (pdmod))

data loading

to table with abstract data type columns (LOB attribute) provided by plug-in

to table with abstract data type columns provided by plug-in

to table with indexes defined

to table with LOB columns

to table with LOB columns

typical examples of

using UOC

with synchronization point specification

with synchronization point specification

data type

column name statement (pdload)

skipdata statement (pdload)

data, deleting unneeded (reorganization using UOC)

database

committing

recovery

recovery unit

database condition analysis facility

database condition analysis utility

database copy utility

process results listing of

database definition utility

database initialization utility

database load utility

creating input data files for

format of input file to

pdload

database recovery utility

process results listing of

database reorganization utility (pdrorg)

database structure modification utility (pdmod)

dataerr (option statement (pdload))

deadlock priority value

DECIMAL signed normalized number, facility for conversion to

DECIMAL signed normalized number, facility for conversion to

decin (extdat statement (pdload))

deferred write processing statistical information

deferred write trigger

number of update buffers for next time output of

updated output pages at time of

define copy rdarea statement (pdmod)

define system statement (pdinit)

definition SQL

generating

generating

output filename (pdexp)

rules for generating (pdexp)

device group name

pdcopy

pdrstr

device symbolic name

pdcopy

pdrstr

dicinf (define system statement (pdinit))

dictionary datatype mchar (define system statement (pdinit))

dictionary import/export utility

examples of (pdexp)

dictionary table

mixed-character data used in (alter system statement (pdmod))

reorganizing

differential backup facility

differential backup group name

pdcopy

pdrstr

differential backup management file size (pdcopy)

differential backups history filename (pdcopy)

direct product

directory name

idxwork statement (pdload)

idxwork statement (pdrbal)

idxwork statement (pdrorg)

sort statement (pdload)

sort statement (pdrbal)

sort statement (pdrorg)

Directory Server for user information, checking

disk space shortage (during backup processing)

distributed nest-loop-join (pdvwopt)

div

pdload

pdrorg

divermsg (option statement (pdload))

divided input data file

output target directory (src_work statement (pdload))

(E)

EasyMT

EasyMT filename

pdcopy

pdrstr

EasyMT I/O buffer sectors count

pdcopy

pdrstr

EasyMT information

lobdata statement (pdload)

lobunld statement (pdrorg)

source statement (pdload)

unload statement (pdrorg)

EasyMT MT attributes definition file name

pdcopy

pdrstr

edit item (pdstedit)

elements

current number of

maximum number of

specified number of

elements count

column name statement (pdload)

skipdata statement (pdload)

emtdef statement

pdload

pdrorg

enclose_del (column name statement (pdload))

enclosing character

extdat statement (pdload)

end time (pdstedit)

error data filename

pdload

source statement (pdload)

error information

acquired by pdgeter

acquiring

error information file (pdload)

error information filename

lobmid statement (pdload)

source statement (pdload)

exclusive mode (pdrbal)

execstop statement (pdrbal)

executability checking interval (option statement (pdrbal))

execution result listing

moving RDAREA (pdmod)

reinitializing RDAREA (pdmod)

expand rdarea statement (pdmod)

explicit grouping

export file (pdexp)

extdat statement

extended DAT format

extended DAT format

extended functions, description of (extdat statement (pdload))

extension segments count

alter rdarea statement (pdmod)

create rdarea statement (pdinit)

create rdarea statement (pdmod)

create rdarea statement (pdreginit)

expand rdarea statement (pdmod)

initialize rdarea statement (pdmod)

(F)

falsification prevented table (note on executing pdrorg)

FF format

filler data (column name statement (pdload))

fixed-size data format

fixed-size data format

fixtext_option statement (pdrorg)

FOREIGN SERVER LIMIT SCAN (pdvwopt)

foreign server name (pdstedit)

foreign server retrieval processing (prediction) information

FOREIGN SERVER SCAN (pdvwopt)

free page release utility

frozen update status

func (column name statement (pdload))

function name

reld_func statement (pdrbal)

reld_func statement (pdrorg)

srcuoc statement (pdload)

unld_func statement (pdrbal)

unld_func statement (pdrorg)

unlduoc statement (pdrorg)

FV format

(G)

generation number

create generation statement (pdmod)

of HiRDB file system area (replicate rdarea statement (pdmod))

pdconstck

pdcopy

pddbst

pdgetcst

pdload

pdpgbfon

pdreclaim

pdrorg

pdrstr

pdrstr

global buffer

changing dynamically

displaying information about

hits rate for

global buffer name

create rdarea statement (pdmod)

create rdarea statement (pdreginit)

define copy rdarea statement (pdmod)

recast rdarea statement (pdmod)

replicate rdarea statement (pdmod)

global buffer pool statistical information

global buffer residence utility

grouping processing method, types of

(H)

HASH (pdvwopt)

hash join (pdvwopt)

hash transfer

HiRDB

checking system definitions

periodically acquiring status of

product information, acquiring

stopping periodic acquisition of status of

upgrading version of

HiRDB Datareplicator linkage

displaying status of

information about

information about

starting

stopping

HiRDB External Data Access Adapter, setting up

HiRDB file

deleting

for database manipulation, statistical information about

placing in user LOB RDAREA in frozen update status

HiRDB file information

lobunld statement (pdrorg)

pddbst

unload statement (pdrorg)

HiRDB file name

create rdarea statement (pdinit)

create rdarea statement (pdmod)

create rdarea statement (pdreginit)

expand rdarea statement (pdmod)

first in master directory RDAREA (pdcopy)

first in master directory RDAREA (pdrstr)

initialize rdarea statement (pdmod)

HiRDB file segments count

create rdarea statement (pdinit)

create rdarea statement (pdmod)

create rdarea statement (pdreginit)

expand rdarea statement (pdmod)

initialize rdarea statement (pdmod)

HiRDB file system

backing up

restoring

HiRDB file system area

checking integrity of

deleting generation information for

displaying information about

displaying status of

initializing

registering generation information for

repairing integrity of

using

HiRDB file system area name

create rdarea statement (pdinit)

create rdarea statement (pdmod)

create rdarea statement (pdreginit)

expand rdarea statement (pdmod)

initialize rdarea statement (pdmod)

pdstedit

storing differential backup management file (pdcopy)

storing differential backup management file (pdrstr)

HiRDB system

displaying messages in file

displaying status of

displaying status of

files defined in

generating

in OS, deleting

in OS, registering

starting

terminating

volumes defined in

HiRDB update version

copying

updating

host name

lobmid statement (pdload)

lobunld statement (pdrorg)

pdstedit

source statement (pdload)

unload statement (pdrorg)

(I)

idxfree

option statement (pdload)

option statement (pdrorg)

idxname statement

pdpgbfon

pdreclaim

pdrorg

idxwork statement

pdload

pdrbal

pdrorg

implicit grouping

increase value (pdcopy)

index

after reinitialization, status of

creating (pdload)

creating (pdrorg)

creating in batch mode

creating in batch mode

definition (tuning with pdvwopt)

re-creating

re-creating

reorganizing

reorganizing

retrieval (tuning with pdvwopt)

statistical information

index creation method

pdload

pdrbal

pdrorg

index identifier

idxname statement (pdpgbfon)

idxname statement (pdreclaim)

idxname statement (pdrorg)

index statement (pdload)

index statement (pdrbal)

index statement (pdrorg)

pddbst

index information file

pdload

pdrbal

pdrorg

index information filename

index statement (pdload)

index statement (pdrbal)

index statement (pdrorg)

to be created (idxwork statement (pdrbal))

index information output mode

pdload

pdrorg

index information output suppression mode (pdload)

INDEX SCAN (pdvwopt)

index statement

pdload

pdrbal

pdrorg

index update mode

pdload

pdrbal

pdrorg

initialize rdarea statement (pdmod)

input begin line (pdload)

input data file

input data file

input data file

creating on EasyMT tape

creating on fixed-length blocked tape

creating on variable-length blocked tape

type of (pdload)

input data length (source statement (pdload))

input log file, summary information on

input statistics unload file name (pdstedit)

input statistics unload file storage directory name (pdstedit)

input wait prompt, displaying (pddef)

installation directory, reducing size of

integrity check facility

integrity check facility

by all generations

by constraint

by constraint

by current RDAREA's generation

by generations

by table

by table

execution unit

integrity check utility (pdconstck)

integrity checking

monitoring interval (pdconstck)

on check constraint

on check constraint

on referential constraint

on referential constraint

order of

order of (when executed by constraint)

order of (when executed by table)

performing on check constraint

performing on referential constraint

processing result of

processing result on check constraint

processing result on referential constraint

whether or not executed

whether or not executed (when executed by constraint)

whether or not executed (when executed by table)

interactive SQL execution utility (pdsql)

interval (pdstedit)

interval analysis (condition analysis result accumulation facility (pddbst))

(J)

JAR file, manipulating

job

option statement (pdload)

option statement (pdrorg)

join

processing information

retrieval (tuning with pdvwopt)

types of methods

JP1/OmniBack II's object name

pdcopy

pdrstr

(K)

key condition

KEY RANGE (pdvwopt)

KEY RANGE PARTIAL BROADCAST (pdvwopt)

key range transfer

KEY SCAN (pdvwopt)

KEY SCAN MERGE JOIN (pdvwopt)

(L)

L-KEY R-LIST MERGE JOIN (pdvwopt)

L-KEY R-SORT MERGE JOIN (pdvwopt)

L-LIST R-KEY MERGE JOIN (pdvwopt)

L-LIST R-SORT MERGE JOIN (pdvwopt)

L-SORT R-KEY MERGE JOIN (pdvwopt)

L-SORT R-LIST MERGE JOIN

lengover (option statement (pdload))

library name (srcuoc statement (pdload))

lines stored, display number of (pddbst)

list definition information, displaying

LIST SCAN (pdvwopt)

LIST SCAN MERGE JOIN (pdvwopt)

LOB column

LOB column input file (pdload)

LOB column input file (pdload)

LOB column input file (pdload)

LOB column input filename (lobcolumn statement (pdload))

LOB column name (lobcolumn statement (pdload))

LOB column structure base table

LOB creation type (pdload)

LOB data

coding with d in -k option

coding with v in -k option

LOB data unload file, type of (pdrorg)

LOB data unload filename (pdrorg)

LOB global buffer name

define copy rdarea statement (pdmod)

recast rdarea statement (pdmod)

replicate rdarea statement (pdmod)

LOB input (pdload)

LOB input file (pdload)

type of

LOB input file directory name (lobdata statement (pdload))

LOB input filename (lobdata statement (pdload))

LOB middle file (pdload)

LOB middle filename (lobmid statement (pdload))

LOB parameter

coding with d in -k option

coding with v in -k option

lobcolumn statement (pdload)

lobdata statement (pdload)

lobmid statement (pdload)

lobunld statement (pdrorg)

local buffer sectors count for random access (pdload)

lock hold status of UNTIL DISCONNECT specification

lock hold status of UNTIL DISCONNECT specification

lock mode

for database condition analysis utility

for database copy utility

for database load utility

for database load utility (shared table)

for database recovery utility

for database reorganization utility

for database reorganization utility (shared table)

for database structure modification utility

for free page release utility (shared table)

for global buffer residence utility

for global buffer residence utility (shared table)

for integrity check utility

for operation command

for optimizing information collection utility

for rebalancing utility

for registry facility initialization utility

for utilities

lock release wait time (pdcopy)

lock retries count

locked resource

maximum number of tables for managing

required per server during execution of database reorganization utility

required per server during execution of pdload

log acquisition method

pdload

pdrbal

pdrorg

log acquisition mode

pdload

pdrbal

pdrorg

log application processing, displaying execution status of

log file

allocating

changing status of

closing

deleting

displaying information about

initializing

opening

swapping

unloading

log point information file

log point information file

re-creating

log point information file name

pdcopy

pdrstr

logical analysis

logical error number

(M)

maintenance method

master directory RDAREA, restoring

matrix partitioning transfer

maximum registered lists count

create rdarea statement (pdinit)

create rdarea statement (pdmod)

initialize rdarea statement (pdmod)

memory space

allocation size (unlduoc statement (pdrorg))

saving

saving status

merge analysis [condition analysis result accumulation facility] (pddbst)

merge join

message log file, displaying messages contained in

mode (column name statement (pdload))

move rdarea statement (pdmod)

MT attribute definition file

pdload

pdrorg

MTguide

mtguide statement

pdload

pdrorg

MULTI COLUMNS INDEX SCAN (pdvwopt)

MULTI COLUMNS KEY SCAN (pdvwopt)

MULTIDIM (pdvwopt)

(N)

nested loops join

NESTED LOOPS JOIN (pdvwopt)

NetBackup

policy name of (pdcopy)

policy name of (pdrstr)

no-log mode

pdload

pdrbal

pdrorg

nowait (option statement (pdload))

null (column name statement (pdload))

null string (option statement (pdload))

null value

as column

as element

in FF format, handling of

null value option

array statement (pdload)

column name statement (pdload)

null value/function information file (pdload)

null value/function information file (pdload)

(O)

one-to-one transfer

online reorganization

changing current RDAREA for

checking application condition for

committing database for

creating environment for reflection processing for

displaying progress of reflection processing for

executing reflection processing for

hold status

operation code

operation commands

executor of

list of

operation mode (pdrbal)

operation without unloading system log

operation without unloading system log

operation without unloading system log

operation without unloading system log

operation without unloading system log

optimization information

collected by optimizing information collection utility

collecting by retrieval

collecting by retrieval

registered using optimization information parameter file

registering from optimization information parameter file

optimization information parameter file

pdgetcst

registering using

optimization, cost-based

optimizing information collection level

pdgetcst

optimizing information collection utility

option

relationship with control statements (pdrorg)

option statement

pdload

pdpgbfon

pdrbal

pdreclaim

pdrorg

optional program product

OR PLURAL INDEXES SCAN (pdvwopt)

ORDER BY processing method, types of

original HiRDB file system area name (create generation statement (pdmod))

original RDAREA name

recast rdarea statement (pdmod)

replicate rdarea statement (pdmod)

output format

pdadmvr

pdbufls

pdcat [-d option omitted]

pdcat [-d sts specified]

pdchprc

pdconfchk

pddbls

pdfls

pdfstatfs

pdgeter

pditvtrc

pdjarsync

pdlistls

pdload

pdlodsv

pdlogatul

pdlogls [-d spd]

pdlogls [-d sys]

pdls [-d act]

pdls [-d aud]

pdls [-d ha]

pdls [-d lck]

pdls [-d mem]

pdls [-d org]

pdls [-d prc]

pdls [-d ris]

pdls [-d rpc]

pdls [-d rpl]

pdls [-d scd]

pdls [-d stj]

pdls [-d sts]

pdls [-d svr]

pdls [-d trn]

pdls [-d ust]

pdmemsv

pdobils

pdobjconv

pdrbal

pdrdrefls

pdrorg

pdsvhostname

pdtrndec

pdusrchk

pdusrchk [-k rdp]

pdusrchk [-k tbp]

pdusrchk [-k usr]

output result file (pdgetcst)

output rows count (source statement (pdload))

(P)

page compaction

page information, detailed (pddbst)

page length

create rdarea statement (pdinit)

create rdarea statement (pdmod)

create rdarea statement (pdreginit)

initialize rdarea statement (pdmod)

param (column name statement (pdload))

PARTIAL BROADCAST (pdvwopt)

partial broadcast transfer

partial key range broadcast transfer

password

pddbst

pdgetcst

pdinit

PATH (specifying environment variables to execute commands)

pdacunlck

pdacunlck

pdadmvr

pdadmvr

pdaudbegin

pdaudbegin

pdaudend

pdaudend

pdaudrm

pdaudrm

pdaudswap

pdaudswap

pdbkupls

pdbkupls

pdbufls

pdbufls

pdbufmod

pdbufmod

examples of

pdcancel

pdcancel

pdcat

pdcat

[-d option omitted]

[-d sts specified]

pdcbl

pdchgconf

pdchgconf

pdchprc

pdchprc

pdclose

pdclose

pdclttrc

pdclttrc

pdcmt

pdcmt

pdconfchk

pdconfchk

examples of

PDCONFPATH (specifying environment variables to execute commands)

pdconstck

examples of

operating conditions

operating environment

processing results of

utilities

pdcopy

examples of

utilities

pdcpp

pdcspool

pdcspool

pddbadset

pddbadset

pddbchg

pddbchg

pddbfrz

pddbfrz

pddbls

pddbls

pddbst

examples of

utilities

pddef

examples of

utilities

pddefrev

pddefrev

PDDIR (specifying environment variables to execute commands)

pdexp

utilities

pdfbkup

pdfbkup

pdffsck

pdffsck

pdfgt

pdfgt

pdfls

pdfls

pdfmkfs

pdfmkfs

examples of

pdfrm

pdfrm

pdfrstr

pdfrstr

pdfstatfs

pdfstatfs

pdgen

pdgen

pdgetcst

examples of

utilities

pdgeter

pdgeter

examples of

pdgrprfl

pdgrprfl

pdhold

pdhold

pdinit

examples of

utilities

pditvstop

pditvstop

pditvtrc

pditvtrc

examples of

pdjarsync

pdjarsync

pdlistls

pdlistls

pdload

-W

examples of

utilities

pdload execution monitoring interval (option statement (pdload))

pdlodsv

pdlodsv

pdlogadpf

pdlogadpf

examples of

pdlogatul

pdlogatul

pdlogchg

pdlogchg

pdlogcls

pdlogcls

pdloginit

pdloginit

examples of

pdlogls

pdlogls

[-d spd]

[-d sys]

pdlogopen

pdlogopen

pdlogrm

pdlogrm

pdlogswap

pdlogswap

pdlogsync

pdlogsync

examples of

pdlogucat

pdlogucat

pdlogunld

pdlogunld

pdls

pdls

[-d act]

[-d aud]

[-d ha]

[-d lck]

[-d mem]

[-d org]

[-d prc]

[-d rpc]

[-d rpl]

[-d scd]

[-d stj]

[-d sts]

[-d svr]

[-d trn]

[-d ust]

pdls [-d ris]

pdmemsv

pdmemsv

pdmod

adding RDAREA

changing RDAREA from HiRDB/Single Server structure to HiRDB/Parallel Server structure

copying configuration information for RDAREA

creating audit trail table

defining replica RDAREAs

deleting generation information for HiRDB file system area

deleting RDAREA

expanding RDAREA

functions of

integrating RDAREAs

modifying data dictionary table attribute definitions

modifying RDAREA attributes

moving RDAREA

registering auditor

registering generation information for HiRDB file system area

reinitializing RDAREA

utilities

pdobils

pdobils

pdobjconv

pdobjconv

pdocb

pdocc

pdopen

pdopen

pdopsetup

pdopsetup

pdorbegin

pdorbegin

pdorcheck

pdorcheck

pdorchg

pdorchg

pdorcreate

pdorcreate

examples of

pdorend

pdorend

pdpfresh

pdpfresh

pdpgbfon

examples of

operating method of

processing results of

utilities

pdpgbfon monitoring time (option statement (pdpgbfon))

pdplgrgst

pdplgrgst

pdplgset

pdplgset

pdprgcopy

pdprgcopy

pdprgrenew

pdprgrenew

pdrbal

examples of (rebalancing utility)

utilities

pdrbal execution time (execstop statement (pdrbal))

pdrbk

pdrbk

pdrdrefls

pdrdrefls

examples of

pdreclaim

-j

examples of

processing results of

utilities

pdreclaim monitoring time (option statement (pdreclaim))

pdreginit

examples of

utilities

pdrels

pdrels

pdrisechk

pdrisechk

pdrisedbto

pdrisedbto

pdriseset

pdriseset

pdrorg

creating index in batch mode

functions of

object of processing

processing to be executed by

re-creating index

relationship between functions and options of

reloading table

reorganizing data dictionary table

reorganizing index

reorganizing table

unloading table

utilities

whether or not execution of pdrorg is permitted on table containing columns of abstract data type

pdrorg execution monitoring time (option statement (pdrorg))

pdrorg-generated binary format

pdrpause

pdrpause

pdrplstart

pdrplstart

pdrplstop

pdrplstop

pdrstr

examples of

utilities

pdsetup

pdsetup

pdsql

utilities

pdstart

pdstart

pdstbegin

pdstbegin

pdstedit

examples of

utilities

pdstend

pdstend

pdstjswap

pdstjswap

pdstjsync

pdstjsync

pdstop

pdstop

pdstscls

pdstscls

pdstsinit

pdstsinit

examples of

pdstsopen

pdstsopen

pdstsrm

pdstsrm

pdstsswap

pdstsswap

pdsvhostname

pdsvhostname

pdtrndec

pdtrndec

pdtrnqing

pdtrnqing

pdusrchk

pdusrchk

pdvrup

pdvrup

pdvwopt

utilities

physical analysis

plug-in

deleting

registering

setting up

plug-in index, notes about the creation of (pdload)

plug-in-provided function

FULL SCAN TYPE

INDEX SCAN TYPE

SCAN TYPE

types of

PLUGIN INDEX SCAN (pdvwopt)

PLUGIN KEY SCAN (pdvwopt)

pre-update log acquisition mode

pdload

pdrorg

predict statement

prediction level 1

prediction level 1

prediction level 1

prediction level 2

prediction level 2

prediction level 2

prefetch operation, maximum number of concurrent

process results file

pdrbal

report statement (pdload)

report statement (pdrorg)

process results file name

pdconstck

report statement (pdrbal)

process results output file name

pdcopy

pdrstr

process service, restarting

processing type (pdreginit)

progress message output interval

pdload

pdrbal

pdrorg

(Q)

query processing information

(R)

R-LIST NESTED LOOPS JOIN (pdvwopt)

random access local buffer sectors count

pdrbal

pdrorg

RDAREA

adding

closing

copying configuration information for

deleting

displaying information about related

displaying status of

expanding

from HiRDB/Single Server structure to HiRDB/Parallel Server structure, changing

integrating

modifying attributes of

moving

opening

reinitializing

releasing from shutdown status of

replica definition of

restoring all (pdrstr)

shutting down

type of (create rdarea statement (pdmod))

type of (create rdarea statement (pdreginit))

RDAREA name

alter HiRDB mode to parallel statement (pdmod)

alter rdarea statement (pdmod)

batch specification of

create audit table statement (pdmod)

create rdarea statement (pdinit)

create rdarea statement (pdmod)

create rdarea statement (pdreginit)

expand rdarea statement (pdmod)

idxname statement (pdpgbfon)

idxname statement (pdreclaim)

index statement (pdload)

index statement (pdrbal)

index statement (pdrorg)

initialize rdarea statement (pdmod)

lobmid statement (pdload)

move rdarea statement (pdmod)

pdcopy

pddbst

pdpgbfon

pdreclaim

pdrorg

pdrstr

remove rdarea statement (pdmod)

source statement (pdload)

type of (create rdarea statement (pdinit))

RDAREA open timing

alter rdarea statement (pdmod)

create rdarea statement (pdinit)

create rdarea statement (pdmod)

initialize rdarea statement (pdmod)

RDAREA status

availability of UAP execution depending on

availability of utility execution depending on

during command execution

transition of

Real Time SAN Replication

checking configuration of

inheriting database

setting site status

rebalancing facility for hash row partitioning

rebalancing table

reorganizing

rebalancing utility

recast rdarea statement (pdmod)

recovery end time (pdrstr)

recovery range

recovery range

recovery start time (pdrstr)

reference/update-impossible mode (pdcopy)

reference-possible backup-hold

update WAIT mode

reference-possible mode (pdcopy)

registry facility initialization utility

regular expression

regular expression

reld_func statement

pdrbal

pdrorg

reload-not-completed data status

remove generation statement (pdmod)

remove rdarea statement (pdmod)

reorganization

in units of schemas

using UOC

using UOC

with synchronization point specification

with synchronization point specification

reorganization time

execution results of facility for predicting

facility for predicting

predicting when database is not restored to the most recent status in the event of a failure

repetition column

repetition column

replica HiRDB file system area name

create generation statement (pdmod)

remove generation statement (pdmod)

replica RDAREA name (replicate rdarea statement (pdmod))

replica RDAREA, changing replica status of

replicate rdarea statement (pdmod)

report statement

pdload

pdrbal

pdrorg

retrieval

method, types of

of result of queries to foreign servers

of work table

using multicolumn index

using one index

using row identifier

without using index

role information, refreshing

routine identifier (pdexp)

row data output format (array statement (pdrorg))

ROWID FETCH (pdvwopt)

(S)

scheduled database maintenance day

schema name (pdexp)

schema name (pdexp)

schema name (pdexp)

search condition

types of

segment size

create rdarea statement (pdinit)

create rdarea statement (pdmod)

create rdarea statement (pdreginit)

initialize rdarea statement (pdmod)

SELECT-APSL (pdvwopt)

SELECT-APSL (pdvwopt)

SELECT-APSL (pdvwopt)

separator character

pdload

pdrorg

server

displaying communication control information about

displaying host name of

displaying schedule status

displaying shared memory status

displaying status by

displaying transaction status

starting

status information of

terminating

server lock control status, displaying

server name

alter HiRDB mode to parallel statement (pdmod)

alter HiRDB mode to parallel statement (pdmod)

create generation statement (pdmod)

create rdarea statement (pdinit)

create rdarea statement (pdmod)

idxname statement (pdpgbfon)

idxname statement (pdreclaim)

idxname statement (pdrorg)

idxwork statement (pdload)

idxwork statement (pdrbal)

idxwork statement (pdrorg)

lobmid statement (pdload)

lobunld statement (pdrorg)

move rdarea statement (pdmod)

pdcopy

pdpgbfon

pdreclaim

pdrstr

pdstedit

remove generation statement (pdmod)

sort statement (pdload)

sort statement (pdrbal)

sort statement (pdrorg)

source statement (pdload)

unload statement (pdrorg)

server process

changing number of startup

displaying status of

refreshing

set operation information

shared library, creating

shared mode (pdrbal)

SHLIB_PATH (specifying environment variables to execute commands)

skipdata statement (pdload)

SORT MERGE JOIN (pdvwopt)

sort statement

pdload

pdrbal

pdrorg

sort work directory (pdload)

sort work file (pdload)

source RDAREA name (define copy rdarea statement (pdmod))

source statement (pdload)

space conversion level

option statement (pdload)

option statement (pdrorg)

pdgetcst

SQL executability during rebalance operation

SQL object buffer, displaying statistical information of

SQL object conversion information

SQL object, converting for 64-bit-mode HiRDB

SQL statement

demarcating end of (pddef)

handling of continuation lines (pddef)

specifying definition (pddef)

SQL statistical information

SQL trace, dynamically acquiring

src_work statement (pdload)

srcuoc statement (pdload)

standard value definition file [pddbst]

start time (pdstedit)

statistical information

about CONNECT/DISCONNECT

about deferred write processing

about deferred write processing

about foreign server operation

about foreign server utilization

about global buffer pool

about global buffer pool

about HiRDB file for database manipulation

about HiRDB file for database manipulation

about index

about SQL

about SQL

about SQL dynamic optimization

about SQL object execution

about SQL object transfer

about SQL statement

about SQL static optimization

about system activity

about system activity

about UAP

about UAP

details about

displaying whether or not output type by server is specified

displaying whether or not output type by unit is specified

output format of

starting output of

stopping output of

time for output of

to DAT-format file, output of

type of

type of

whether or not output type is specified

statistics analysis utility

statistical information output by

statistics log buffer, applying to statistics log file

statistics log file

applying statistics log buffer to

swapping

status file

closing

deleting

displaying content of

displaying status of

initializing

logical file status of

opening

physical file status of

swapping

storage condition analysis

on cluster key

on cluster key

on clustering data page

on clustering data page

storage method for data to be passed to UOC (unlduoc statement (pdrorg))

stored procedure information

import/export

rules for importing and exporting (pdexp)

summary log record information

synchronization point dump file information, displaying

synchronization point dump, collecting

synchronization point specification, reloading with

synchronization point specification, reloading with

synchronization shutdown

system log file

displaying information about

element file status of

file group status of

physical file status of

(T)

table

after reinitialization, status of

re-registration of data to another table

rebalancing

reloading to

reloading to

reorganizing

reorganizing

rules for importing and exporting table with referential constraints defined (pdexp)

unloading

unloading

with abstract data type (note on executing pdrorg)

table definition information

import/export

rules for importing and exporting (pdexp)

table identifier

create audit table statement (pdmod)

pdconstck

pddbst

pdexp

pdgetcst

pdload

pdpgbfon

pdrbal

pdreclaim

pdrorg

tblname statement (pdrorg)

table name (pdexp)

TABLE SCAN (pdvwopt)

tape device

target (pdreclaim)

target RDAREA name (define copy rdarea statement (pdmod))

target resource

pdpgbfon

pdreclaim

tblfree

option statement (pdload)

option statement (pdrorg)

tblname statement (pdrorg)

tblstatus (option statement (pdrorg))

temporary work file, deleting

transaction

committing

rolling back

settlement wait time, concurrently executed (pdreclaim)

terminating forcibly

unsettled, settling forcibly and automatically

transaction queuing facility

releasing

starting

transfer method, types of

trigger definition information

import/export

rules for importing and exporting (pdexp)

trigger identifier (pdexp)

troubleshooting information, deleting

tuning information

pdload

pdrorg

tuning, concept of (pdvwopt)

(U)

UAP

forcibly terminate processing

identification information

identification information

name (pdstedit)

statistical information

UNICAST (pdvwopt)

unicast transfer

unit

displaying activity status of

displaying status by

starting

status information

terminating

unit identifier

pdcopy

pdrstr

unld_func statement

pdrbal

pdrorg

unldenq (option statement (pdrorg))

unlduoc statement (pdrorg)

unload data file name (pdrorg)

unload data file, type of (pdrorg)

unload log file

unload log file information, displaying

unload log filename (pdrstr)

unload sequence (pdrorg)

unload statement (pdrorg)

unload statistics log file

UOC

UOC

UOC

contents of interface area

example of

examples of (pdload)

information (unload statement (pdrorg))

reorganization using

source statement (pdload)

unload statement (pdrorg)

updatable backup-hold

WAIT mode

updatable mode (pdcopy)

user

displaying status of

parameters (srcuoc statement (pdload))

refreshing information

utilities

access path display utility

database condition analysis utility

database copy utility

database definition utility

database initialization utility

database load utility

database recovery utility

database reorganization utility

database structure modification utility

dictionary import/export utility

executor of

forcibly terminate processing

free page release utility

global buffer residence utility

I/O file of

integrity check utility

list of

maximum number of concurrent executions of

maximum number of concurrently executable utilities

optimizing information collection utility

rebalancing utility

registry facility initialization utility

SQL interactive execution utility

statistics analysis utility

tape devices supported by

utility special unit

(V)

violation key values that can be output, maximum number of (pdconstck)

volume name

pdcopy

pdrstr

VV format

(W)

with reconstruction (initialize rdarea statement (pdmod))

work buffer size

for error data file creation (source statement (pdload))

for sorting (pdrstr)

work directory for sorting

name of (pdrstr)

pdrbal

pdrorg

work file directory name (pdstedit)

work file for sorting (pdrorg)

workdir statement

write buffer size (pdrstr)

Trademarks

ActiveX is a trademark of Microsoft Corp. in the U.S. and other countries.
AIX is a registered trademark of the International Business Machines Corp. in the U.S.
CORBA is a registered trademark of Object Management Group, Inc. in the United States.
DataStage, MetaBroker, MetaStage and QualityStage are trademarks of International Business Machines Corporation in the United States, other countries, or both.
DB2 is a registered trademark of the International Business Machines Corp. in the U.S.
HACMP/6000 is a trademark of the International Business Machines Corp. in the U.S.
HP-UX is a product name of Hewlett-Packard Company.
IBM is a registered trademark of the International Business Machines Corp. in the U.S.
Itanium is a registered trademark of Intel Corporation or its subsidiaries in the United States and other countries.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
JBuilder is a trademark of Borland Software Corporation in the United States and other countries.
Linux is a registered trademark of Linus Torvalds.
Lotus, 1-2-3 are registered trademarks of International Business Machines Corporation in the United States, other countries, or both.
Microsoft Access is a registered trademark of Microsoft Corporation in the U.S. and other countries.
Microsoft Excel is a product name of Microsoft Corp.
Microsoft is a registered trademark of Microsoft Corp. in the U.S. and other countries.
Motif is a registered trademark of the Open Software Foundation, Inc.
MS-DOS is a registered trademark of Microsoft Corp. in the U.S. and other countries.
ODBC is Microsoft's strategic interface for accessing databases.
OLE is the name of a software product developed by Microsoft Corporation and the acronym for Object Linking and Embedding.
ORACLE is a registered trademark of Oracle Corporation.
Oracle8i is a trademark of ORACLE Corporation.
Oracle9i is a trademark of ORACLE Corporation.
Oracle 10g is a trademark of ORACLE Corporation.
OS/390 is a trademark of the International Business Machines Corp. in the U.S.
POSIX stands for Portable Operating System Interface for Computer Environment, which is a set of standard specifications published by the Institute of Electrical and Electronics Engineers, Inc.
RISC System/6000 is a registered trademark of the International Business Machines Corp. in the U.S.
Solaris is a trademark or registered trademark of Sun Microsystems, Inc. in the United States and other countries.
Sun is a trademark or registered trademark of Sun Microsystems, Inc. in the United States and other countries.
Sun Microsystems is a trademark or registered trademark of Sun Microsystems, Inc. in the United States and other countries.
The right to use the trademark DCE in Japan is sub-licensed from OSF.
UNIFY2000 is a product name of Unify Corp.
UNIX is a registered trademark of The Open Group in the United States and other countries.
VERITAS is a trademark or registered trademark of Symantec Corporation in the U.S. and other countries.
Visual Basic is a registered trademark of Microsoft Corp. in the U.S. and other countries.
Visual C++ is a registered trademark of Microsoft Corp. in the U.S. and other countries.
Visual Studio is a registered trademark of Microsoft Corp. in the U.S. and other countries.
WebLogic is a registered trademark of BEA Systems, Inc.
Windows is a registered trademark of Microsoft Corp. in the U.S. and other countries.
Windows NT is a registered trademark of Microsoft Corp. in the U.S. and other countries.
Windows Server is a registered trademark of Microsoft Corp. in the U.S. and other countries.
X/Open is a registered trademark of X/Open Company Limited in the U.K. and other countries.
X Window System is a trademark of X Consortium, Inc.
The following program products include material copyrighted by Sun Microsystems, Inc.: P-9D62-1182, P-9D62-1382, P-9D62-1582, P-9D62-1782, P-9D62-1B82, P-9D62-1C82, P-9D62-1D82, P-9D62-1E82, P-F9D62-11823, P-F9D62-11825, P-F9D62-11826, and P-F9D62-11827.
The following program products include material copyrighted by UNIX System Laboratories, Inc.: P-9D62-1182, P-9D62-1382, P-9D62-1582, P-9D62-1782, P-9D62-1B82, P-9D62-1C82, P-9D62-1D82, P-9D62-1E82, P-F9D62-11823, P-F9D62-11825, P-F9D62-11826, and P-F9D62-11827.
Other product and company names mentioned in this document may be the trademarks of their respective owners. Throughout this document Hitachi has attempted to distinguish trademarks from descriptive terms by writing the name with the capitalization used by the manufacturer, or by writing the name with initial capital letters. Hitachi cannot attest to the accuracy of this information. Use of a trademark in this document should not be regarded as affecting the validity of the trademark.