What is the maximum number of object ids that the Gen Client Server Encyclopedia (CSE) can hold and how do I know if a CSE is nearing it's limit?
Release Gen 6.5 and later.
Gen Client Server Encyclopedia (CSE)
The maximum number of object ids that a CSE can hold is 2147483647.
NOTE: The CSE does not reuse object ids that have been previously allocated to an object but subsequently deleted due to the removal of that object.
Object id partitions:
CSE originally created prior to Gen 7.0: In earlier releases prior to Gen 7.0 the concept of object id partitions was added to improve the performance of the CSE running against RDBMS systems that did not have row level locking at the time (e.g. SQL Server) and in those releases the number of object id partitions was configurable at install time (default value of 8). If the current CSE has been migrated from a pre 7.x release of Gen then it is likely that multiple object id partitions will still exist.
The DMAX table holds the information about the object id partitions in rows where MAX_TYPE = 'MAXDOBJ'. The column MAX_RELEASE contains the partition number and the column MAX_INT_VALUE shows the next available object id for that partition. The row MAX_TYPE = 'NUMPART' also contains the number of object id partitions in it's MAX_INT_VALUE column. This SQL statement will return a row for each object id partition that exists showing the values of partition number and next available object id:
select max_release, max_int_value from dmax where max_type='MAXDOBJ';
The following table illustrates the limits for minimum ((Min. Object id#n) and maximum object id (Max. Object id#n) for each partition #n for a CSE with 8 partitions. The DMAX 'MAXDOBJ' MAX_INT_VALUE column (MAXDOBJ#n) can be used to calculate the number of remaining object ids in each partition using "Max. Object id#n - (MAXDOBJ#n -1)" and hence the total number of object ids that still remain available in the whole CSE.
Partition # (max_release)
|
Min Object ID
|
Max. Object id
|
DMAX "Next available object id" (max_int_value)
|
Number of remaining available object ids
|
1
|
1
|
268435455
|
MAXDOBJ#1
|
Max. Object id#1 - (MAXDOBJ#1 -1)
|
2
|
268435456
|
536870911
|
MAXDOBJ#2
|
Max. Object id#2 - (MAXDOBJ#2 -1)
|
3
|
536870912
|
805306367
|
MAXDOBJ#3
|
Max. Object id#3 - (MAXDOBJ#3 -1)
|
4
|
805306368
|
1073741823
|
MAXDOBJ#4
|
Max. Object id#4 - (MAXDOBJ#4 -1)
|
5
|
1073741824
|
1342177279
|
MAXDOBJ#5
|
Max. Object id#5 - (MAXDOBJ#5 -1)
|
6
|
1342177280
|
1610612735
|
MAXDOBJ#6
|
Max. Object id#6 - (MAXDOBJ#6 -1)
|
7
|
1610612736
|
1879048191
|
MAXDOBJ#7
|
Max. Object id#7 - (MAXDOBJ#7 -1)
|
8
|
1879048192
|
2147483647
|
MAXDOBJ#8
|
Max. Object id#8 - (MAXDOBJ#8 -1)
|
The way that the CSE uses the partitions means that it will switch to another partition before allowing the current partition to reach it's maximum. As the CSE will not go back and reuse any object id that was previously allocated to an object but then subsequently deleted it is normal to see unallocated object ids with values less than the current DMAX "Next available object id". Multiple object id partitions also mean that the maximum value of obj_id in the DOBJ table does not indicate how near the CSE is to reaching it's object id limit.
CSE originally created in Gen 7.0+: In Gen 7.0 and later releases because of enhancements to such RDBMS systems, the option to create multiple object id partitions is no longer part of the CSE configuration and the number of partitions for a new CSE database defaults to 1. These SQL statements operating on the DMAX table can be used to find the object id usage and remaining available ids.
a. There is only 1 row in the DMAX table where MAX_TYPE = 'MAXDOBJ' and so the next available object id is:
select max_int_value from dmax where max_type='MAXDOBJ';
b. Remaining object ids available:
select 2147483647 - (max_int_value - 1) from dmax where max_type='MAXDOBJ';
c. For a single partition CSE the current maximum value of obj_id in the DOBJ table should always be 1 less than the value returned from (a):
select max(obj_id) from dobj;
1. CSE is close to object id limit:
When the CSE is nearing its object id limit it will start to impact further model development e.g. these types of errors are seen during normal operation:
Error: LocalEncy::fetchObjectid: EnGetId error, rc = 2
GETIDREQ: Error: Reached maximum Object Id (in iefmd.log)
The only supported option to is to configure a new CSE database as follows:
2. Example of 32 partitions (reported in another instance of object ids being exhausted)
Partition # (max_release) | Min Object ID | Max. Object id | DMAX "Next available object id" (max_int_value) | Number of remaining available object ids |
1 | 1 | 67108863 | MAXDOBJ#1 | Max. Object id#1 - (MAXDOBJ#1 -1) |
2 | 67108864 | 134217727 | MAXDOBJ#2 | Max. Object id#2 - (MAXDOBJ#2 -1) |
3 | 134217728 | 201326591 | MAXDOBJ#3 | Max. Object id#3 - (MAXDOBJ#3 -1) |
4 | 201326592 | 268435455 | MAXDOBJ#4 | Max. Object id#4 - (MAXDOBJ#4 -1) |
5 | 268435456 | 335544319 | MAXDOBJ#5 | Max. Object id#5 - (MAXDOBJ#5 -1) |
6 | 335544320 | 402653183 | MAXDOBJ#6 | Max. Object id#6 - (MAXDOBJ#6 -1) |
7 | 402653184 | 469762047 | MAXDOBJ#7 | Max. Object id#7 - (MAXDOBJ#7 -1) |
8 | 469762048 | 536870911 | MAXDOBJ#8 | Max. Object id#8 - (MAXDOBJ#8 -1) |
9 | 536870912 | 603979775 | MAXDOBJ#9 | Max. Object id#9 - (MAXDOBJ#9 -1) |
10 | 603979776 | 671088639 | MAXDOBJ#10 | Max. Object id#10 - (MAXDOBJ#10 -1) |
11 | 671088640 | 738197503 | MAXDOBJ#11 | Max. Object id#11 - (MAXDOBJ#11 -1) |
12 | 738197504 | 805306367 | MAXDOBJ#12 | Max. Object id#12 - (MAXDOBJ#12 -1) |
13 | 805306368 | 872415231 | MAXDOBJ#13 | Max. Object id#13 - (MAXDOBJ#13 -1) |
14 | 872415232 | 939524095 | MAXDOBJ#14 | Max. Object id#14 - (MAXDOBJ#14 -1) |
15 | 939524096 | 1006632959 | MAXDOBJ#15 | Max. Object id#15 - (MAXDOBJ#15 -1) |
16 | 1006632960 | 1073741823 | MAXDOBJ#16 | Max. Object id#16 - (MAXDOBJ#16 -1) |
17 | 1073741824 | 1140850687 | MAXDOBJ#17 | Max. Object id#17 - (MAXDOBJ#17 -1) |
18 | 1140850688 | 1207959551 | MAXDOBJ#18 | Max. Object id#18 - (MAXDOBJ#18 -1) |
19 | 1207959552 | 1275068415 | MAXDOBJ#19 | Max. Object id#19 - (MAXDOBJ#19 -1) |
20 | 1275068416 | 1342177279 | MAXDOBJ#20 | Max. Object id#20 - (MAXDOBJ#20 -1) |
21 | 1342177280 | 1409286143 | MAXDOBJ#21 | Max. Object id#21 - (MAXDOBJ#21 -1) |
22 | 1409286144 | 1476395007 | MAXDOBJ#22 | Max. Object id#22 - (MAXDOBJ#22 -1) |
23 | 1476395008 | 1543503871 | MAXDOBJ#23 | Max. Object id#23 - (MAXDOBJ#23 -1) |
24 | 1543503872 | 1610612735 | MAXDOBJ#24 | Max. Object id#24 - (MAXDOBJ#24 -1) |
25 | 1610612736 | 1677721599 | MAXDOBJ#25 | Max. Object id#25 - (MAXDOBJ#25 -1) |
26 | 1677721600 | 1744830463 | MAXDOBJ#26 | Max. Object id#26 - (MAXDOBJ#26 -1) |
27 | 1744830464 | 1811939327 | MAXDOBJ#27 | Max. Object id#27 - (MAXDOBJ#27 -1) |
28 | 1811939328 | 1879048191 | MAXDOBJ#28 | Max. Object id#28 - (MAXDOBJ#28 -1) |
29 | 1879048192 | 1946157055 | MAXDOBJ#29 | Max. Object id#29 - (MAXDOBJ#29 -1) |
30 | 1946157056 | 2013265919 | MAXDOBJ#30 | Max. Object id#30 - (MAXDOBJ#30 -1) |
31 | 2013265920 | 2080374783 | MAXDOBJ#31 | Max. Object id#31 - (MAXDOBJ#31 -1) |
32 | 2080374784 | 2147483647 | MAXDOBJ#32 | Max. Object id#32 - (MAXDOBJ#32 -1) |