Nonstop Database, HiRDB Version 9 System Operation Guide

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

14.3 Changing an index name

Executor: Table owner

An index name can be changed using ALTER INDEX. The index name of an unfinished index can also be changed. The names of the following indexes can be changed:

The following is the procedure for changing an index name.

Procedure
  1. Specify the index name after the change in the RENAME operand of ALTER INDEX, and execute it. While the index name is being changed, UAPs that access the table in which the changed index is defined are placed in lock-release wait status.
  2. When an index name is changed, the stored procedure that uses the changed index becomes invalid. Additionally, the index information of the stored procedure that uses the table in which the index whose name has been changed is defined also becomes invalid. In this case, use ALTER PROCEDURE or ALTER ROUTINE to re-create the stored procedure.
    Furthermore, when the name of an index used by a trigger is changed, the trigger becomes invalid. When the index name of a table specified within the trigger SQL statement is changed, the index information of the trigger becomes invalid. In this case, use ALTER TRIGGER or ALTER ROUTINE to re-create the trigger.
  3. If an index-only global buffer is assigned to an index whose name has been changed, also change the index name specified for the global buffer. The following is the procedure for changing the global buffer.

Procedure for changing the global buffer
Use one of the following methods to change the global buffer:
  • Terminate HiRDB normally, and then change the pdbuffer operand specification (change the pdbuffer operand associated with the index whose name was changed).
  • Use the system reconfiguration command (pdchgconf command) to change the pdbuffer operand specification (change the pdbuffer operand associated with the index whose name was changed). This method eliminates the need to terminate HiRDB normally. Note that HiRDB Advanced High Availability must be installed as a prerequisite for using this method to change the global buffer. For details about changing HiRDB system definitions using the system reconfiguration command, see 9.2 Modifying HiRDB system definitions while HiRDB is running (system reconfiguration command).