Nonstop Database, HiRDB Version 9 Command Reference

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

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
[temporary table {use {shared|occupied}|nouse}]
12
file name "HiRDB-file-system-area-name/HiRDB-file-name"
13
initial HiRDB-file-segments-count segments
--
[file name "HiRDB-file-system-area-name/HiRDB-file-name"
--
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) temporary table {use {shared|occupied}|nouse}
(12) file name "HiRDB-file-system-area-name/HiRDB-filename" ~((up to 167 characters))
(13) initial HiRDB-file-segments-count segments~<unsigned integer>

(1) shared

For a HiRDB parallel server configuration (only), specifies that a shared RDAREA is to be added.

Rules
  1. 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.
  2. Specifying shared in the case of a HiRDB single server configuration results in an error.
  3. 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 space, 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 configuration, in the server where the RDAREA is added).

You can use the pdbufls command to check the global buffer.

Rules
  1. You cannot specify a global buffer for indexes or LOBs. An in-memory data buffer cannot be specified either.
  2. If you are adding a data dictionary RDAREA, be sure to specify this operand.
  3. 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.
  4. At HiRDB startup, the size of the global buffer is set to the maximum length of the corresponding RDAREA.
  5. 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.
  6. 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-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. The system treats an authorization identifier enclosed in double quotation marks (") as case sensitive; otherwise, the system treats it as all uppercase letters.
  2. By specifying 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 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:
  1. 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.
  2. By adding a data dictionary LOB RDAREA, you can use abstract data type definitions, stored functions, and stored procedures.
  3. If such a data dictionary LOB RDAREA already exists, specification of this operand results in an error.
  4. 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-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. The system treats an authorization identifier enclosed in double quotation marks (") as case sensitive; otherwise, the system treats it as all uppercase letters.
  2. By specifying 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 the authorization identifier.

list
Specifies that the list RDAREA is to be added.

(5) 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 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
  1. This operand takes effect only when Y is specified in the pd_rdarea_open_attribute_use operand in the system common definitions.
  2. 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).
  3. When this operand is omitted, the system assumes the value of the pd_rdarea_open_attribute operand in the system common definitions.
  4. The value of this operand takes effect at the next startup, regardless of the HiRDB startup mode.
  5. 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
  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 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
  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 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
  1. 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.
  2. 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:

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

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

Prerequisites
You must specify the -e or -a option for the HiRDB file system area containing 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.
Automatic extension occurs when the number of free segments in an RDAREA reaches the automatic extension timing. You specify the timing value in the pd_rdarea_extension_timing operand.
extension-segments-count ~<unsigned integer> ((1-64000))
Specifies the number of extension segments.
  • For a HiRDB file system area for which pdfmkfs -e is specified
    The maximum number of HiRDB file extensions is 24. If this value is exceeded, an error occurs. An error occurs if a shortage of 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 a value specified when the HiRDB file system area was created. Therefore, when you define the maximum number of extensions, you need to take into account the number of files in the HiRDB file system area and the frequency of extension.
  • For a HiRDB file system area for which pdfmkfs -a is specified
    An error occurs if there is not enough space on the disk containing the HiRDB file to allocate the required HiRDB file system area or the required area exceeds the maximum size for a HiRDB file.

nouse
Specifies that automatic extension of an RDAREA is not to be applied.

Notes
  1. New unused segments are added to the last HiRDB file constituting the RDAREA.
  2. 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.
  3. 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.
  4. The last file is locked from the beginning to the end of the automatic extension process.

(11) 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 added 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.

Note
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.

(12) 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
  1. Enclose HiRDB-file-system-area-name/HiRDB-file-name in double quotation marks (").
  2. Do not include a linefeed character inside the double quotation marks.
  3. You can allocate a maximum of 16 HiRDB files per RDAREA.
  4. The database structure modification utility (pdmod) creates the HiRDB file in the specified HiRDB file system area.
  5. HiRDB-file-system-area-name/HiRDB-file-name must be unique in the HiRDB system.
  6. 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).

(13) initial HiRDB-file-segments-count segments~<unsigned integer>

Specifies the number of segments in this file in the RDAREA. 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. The size of a HiRDB file cannot exceed 2 GB, regardless of the number of segments.