3.3.2 create rdarea statement
(1) shared
This operand is applicable only to a HiRDB parallel server configuration.
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 configuration 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-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
- 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-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
- 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 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
- 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 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
- 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 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.
- 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 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.
- 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 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
- The new unused segments are added to the last HiRDB file that constitutes the RDAREA.
- 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) 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
- 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.
(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 type | Minimum number of segments |
---|
Master directory RDAREA | 4 + total number of RDAREAs 800 (+ 1 if HiRDB Staticizer Option is installed) |
Data directory LOB RDAREA | 1 |
Data dictionary RDAREA#1 | 185#3 |
Data dictionary LOB RDAREA#2 | 1 |
User RDAREA | 1 |
User LOB RDAREA | 1 |
List RDAREA | 1 |
#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_CONSTRAINTS | 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 | Table used by the system | 0 |
36 | SQL_IOS_GENERATIONS | 0 |
37 | SQL_TRIGGERS | 4 |
38 | Table used by the system | 2 |
39 | SQL_TRIGGER_COLUMNS | 2 |
40 | SQL_TRIGGER_DEF_SOURCE | 2 |
41 | SQL_TRIGGER_USAGE | 4 |
42 | SQL_PARTKEY | 1 |
43 | SQL_PARTKEY_DIVISION | 1 |
44 | SQL_AUDITS | 3 |
45 | Table used by the system | 2 |
46 | SQL_KEYCOLUMN_USAGE | 2 |
47 | SQL_TABLE_CONSTRAINTS | 2 |
48 | SQL_CHECKS | 2 |
49 | SQL_CHECK_COLUMNS | 2 |
50 | SQL_DIV_TYPES | 1 |
51 | SQL_SYSPARAMS | 1 |
52 | Table used by the system | 1 |
53 | SQL_INDEX_XMLINF | 2 |
54 | SQL_SEQUENCES | 2 |
55 | Table used by the system | 1 |
56 | SQL_ROUTINES | 4 |
57 | SQL_ROUTINE_RESOURCES | 4 |
58 | SQL_ROUTINE_PARAMS | 3 |
#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
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.