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

3for {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[temporary table {use {shared | occupied} | nouse}]
11file name "HiRDB-file-system-area-name/HiRDB-filename"
12initial 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) temporary table {use {shared|occupied}|nouse}
(11) file name "HiRDB-file-system-area-name/HiRDB-filename"
(12) initial HiRDB-file-segments-count segments

(1) shared

This operand is applicable only to a HiRDB parallel server configuration.

Specify this operand to create a shared RDAREA.

Rules
  1. 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.
  2. Specifying shared for a HiRDB single server configuration results in an error.
  3. Only user RDAREAs can be created as shared RDAREAs.
  4. 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.
  5. 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-30))
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
  1. 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.
  2. If you specify an authorization identifier, you can assign RDAREA usage privileges to the private RDAREA.
  3. You can specify a maximum of 255 authorization identifiers.
  4. 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
  1. If you use stored procedures or stored functions, be sure to define this RDAREA.
  2. 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.
  3. 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-30))
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
  1. 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.
  2. If you specify an authorization identifier, you can assign RDAREA usage privileges to the private RDAREA.
  3. You can specify a maximum of 255 authorization identifiers.
  4. 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 configuration
This operand cannot be specified for a HiRDB single server configuration.
HiRDB parallel server configuration
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
  1. This operand takes effect only when Y is specified in the pd_rdarea_open_attribute_use operand.
  2. 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).
  3. If this operand is omitted, the system assumes the value of the pd_rdarea_open_attribute operand.
  4. 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
  1. 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.
  2. 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
  1. 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.
  2. 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 a 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
  1. 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.
  2. 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 2,048 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.

For details about the page lengths of other types of RDAREAs, see the HiRDB Version 9 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.

For details about the segment sizes of other types of RDAREAs, see the HiRDB Version 9 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.

For details about automatic extension of an RDAREA, see the HiRDB Version 9 System Operation Guide.

Prerequisites
The -e or -a option must be specified for the HiRDB file system area where the RDAREA is located.
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.
Automatic extension occurs when the number of free segments in the RDAREA reaches the value set as the automatic extension timing. You specify this value in the pd_rdarea_extension_timing operand.
number-of-extension-segments ~<unsigned integer> ((1-64000))
Specifies the number of extension segments.
  • For a HiRDB file system area for which pdfmkfs -e is specified
    There can be a maximum of 24 extents for HiRDB files. Exceeding this results in an error. An error also occurs if a shortage of free space occurs in the HiRDB file system area or the required area exceeds the maximum size for a HiRDB file.
    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.
  • For a HiRDB file system area for which pdfmkfs -a is specified
    An error occurs if there is not enough space to allocate the required HiRDB file system area on the disk containing the HiRDB files or the required area exceeds the maximum size for a HiRDB file.
nouse
Specifies that automatic extension of RDAREA is not to be applied.
Notes
  1. The new unused segments are added to the last HiRDB file that constitutes the RDAREA.
  2. 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.
  3. 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.
  4. The last file is locked from the start to the end of automatic RDAREA extension processing.

(10) temporary table {use {shared|occupied}|nouse}

In the case of a user RDAREA, specifies whether the user RDAREA is to be used as a temporary table RDAREA. For details about temporary table RDAREAs, see the HiRDB Version 9 Installation and Design Guide.

Prerequisites
The RDAREA to be created must be a public user RDAREA (for which user used by PUBLIC is specified). An error results if the temporary table operand is specified for any other type of RDAREA. Specifying this option together with the shared operand also results in an error. These prerequisites are not relevant when nouse is specified.
use shared:
Specifies that the user RDAREA is to be used as a temporary table RDAREA with the SQL-session-to-SQL-session shared attribute.
use occupied:
Specifies that the user RDAREA is to be used as a temporary table RDAREA with the specific SQL session lock attribute.
nouse:
Specifies that the user RDAREA is not to be used as a temporary table RDAREA.
Notes
After you have created the RDAREA, it is possible to change whether it is to be used as a temporary table RDAREA or to change the temporary table RDAREA attribute (between the SQL-session-to-SQL-session shared attribute and the specific SQL session lock attribute). It is also possible to delete the RDAREA with the remove rdarea statement of the database structure modification utility and then to use the create rdarea statement to re-create the RDAREA with a different attribute.

(11) 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
  1. Do not specify linefeed characters inside the double quotation marks.
  2. You can allocate a maximum of 16 HiRDB files to one RDAREA.
  3. Make sure that HiRDB-file-system-area-name/HiRDB-filename is not duplicated in the same HiRDB system.
  4. For a list RDAREA, use a HiRDB file system area with the WORK purpose.
  5. 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.

(12) 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 typeMinimum number of segments
Master directory RDAREA4 + [Figure]total number of RDAREAs[Figure] 800[Figure] (+ 1 if HiRDB Staticizer Option is installed)
Data directory LOB RDAREA1
Data dictionary RDAREA#1185#3
Data dictionary LOB RDAREA#21
User RDAREA1
User LOB RDAREA1
List RDAREA1

#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 orderName of data dictionary tableNumber of indexes
1SQL_PHYSICAL_FILES2
2SQL_RDAREAS2
3SQL_TABLES2
4SQL_COLUMNS3
5SQL_INDEXES3
6SQL_USERS1
7SQL_RDAREA_PRIVILEGES2
8SQL_TABLE_PRIVILEGES2
9SQL_DIV_TABLE3
10Table used by the system2
11SQL_INDEX_COLINF2
12SQL_TABLE_STATISTICS1
13SQL_COLUMN_STATISTICS1
14SQL_INDEX_STATISTICS2
15SQL_VIEW_TABLE_USAGE3
16SQL_VIEWS2
17Table used by the system2
18SQL_DIV_INDEX2
19SQL_DIV_COLUMN2
20SQL_REFERENTIAL_CONSTRAINTS3
21SQL_ALIASES1
22SQL_DATATYPES3
23SQL_DATATYPE_RESOURCES2
24SQL_TABLE_RESOURCES3
25SQL_PLUGINS3
26SQL_PLUGIN_ROUTINES4
27SQL_PLUGIN_ROUTINE_PARAMS3
28SQL_INDEX_TYPES2
29SQL_INDEX_RESOURCES2
30SQL_INDEX_DATATYPE2
31SQL_INDEX_FUNCTION2
32SQL_TYPE_RESOURCES3
33SQL_INDEX_TYPE_FUNCTION1
34SQL_EXCEPT3
35Table used by the system0
36SQL_IOS_GENERATIONS0
37SQL_TRIGGERS4
38Table used by the system2
39SQL_TRIGGER_COLUMNS2
40SQL_TRIGGER_DEF_SOURCE2
41SQL_TRIGGER_USAGE4
42SQL_PARTKEY1
43SQL_PARTKEY_DIVISION1
44SQL_AUDITS3
45Table used by the system2
46SQL_KEYCOLUMN_USAGE2
47SQL_TABLE_CONSTRAINTS2
48SQL_CHECKS2
49SQL_CHECK_COLUMNS2
50SQL_DIV_TYPES1
51SQL_SYSPARAMS1
52Table used by the system1
53SQL_INDEX_XMLINF2
54SQL_SEQUENCES2
55Table used by the system1
56SQL_ROUTINES4
57SQL_ROUTINE_RESOURCES4
58SQL_ROUTINE_PARAMS3

#2: 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.

#3: This is the total of the number of data dictionary tables and data dictionary table indexes created by HiRDB.

To determine the number of segments, use the formula total number of pages in the data page section[Figure] segment size. For details about the formula for determining the total number of pages in the data page section, see the HiRDB Version 9 Installation and Design Guide.