Indexes that are added to your database while it is online are inactive until you specifically initiate activation with PROUTIL IDXACTIVATE. When you run IDXACTIVATE you provide the name of one inactive index on the command line. The general syntax is as follows:
Before activating the index, IDXACTIVATE checks to make sure that there are no users with a schema timestamp that is earlier than the schema timestamp of the index. If any such users are connected to the database, IDXACTIVATE cannot immediately proceed, but does one of the following:
In OpenEdge Release 11.7 and higher, if you have enabled Database Client Notification (-usernotifytime), IDXACTIVATE will wait until all the connected users respond to the notification, and then proceed with the activation.
In releases prior to 11.7, or if Database Client Notification (-usernotifytime) is off (set to zero), you are given the option of waiting or canceling the index activation. If you chose to wait, you must wait until all the users with an earlier schema timestamp disconnect, or SQL clients start a new transaction, or you can use PROSHUT to forcibly remove the connections. You control the update of the status display of blocking users with the refresh option. The number supplied to refresh indicates the number of seconds between displays of blocking users.
When IDXACTIVATE activates and builds the index, it bundles records into transactions. By default, 100 records are bundled into one transaction. You can alter that number with the recs option. The number you specify for the recs option is the number of records to bundle into one transaction.
The following output shows the output of IDXACTIVATE, without Database Client Notification enabled. In this example the index tst_table.inact3 is activated for the database doc_db; no optional parameters are specified so default values are used. The cycle of waiting for users to disconnect executes twice before all the users with old timestamps are disconnected and the index is activated, as shown:
$ proutil doc_db -C idxactivate tst_table.inact3
OpenEdge Release 10.1A1P as of Tue Oct 18 20:11:37 EDT 2005
Index Activate: BEGIN activation of inact3. (13258)
Index Activate: recs value: 100 refresh rate: 60. (13259)
Activating Index inact3 at Database timestamp 1129752317 . (12811)
Usr Name Type Pid Timestamp
5 docusr1 Usr 10336 1129580580
6 docusr2 Usr 11208 1129580580
Connections with timestamps older than 1129752317 exist. (13246)
Do you wish to continue waiting..... Type y to continue (y/n). (13247)
y
Usr Name Type Pid Timestamp
5 docusr1 Usr 10336 1129580580
Connections with timestamps older than 1129752317 exist. (13246)
Do you wish to continue waiting..... Type y to continue (y/n). (13247)
y
Index Activate: Index inact3 No. 33 - 0 keys added. (13244)
Index Activate: Index inact3 No. 33 - 0 keys processed. (13245)
Index Activate: Index inact3 has been activated.
$
Once the IDXACTIVATE command completes, the index is active and all users can access it.