SQL/MP Installation and Management Guide
Adding, Altering, Removing, and Renaming
Database Objects
HP NonStop SQL/MP Installation and Management Guide—523353-004
7-37
Renaming Objects
These are examples of requests for rename options:
>> ALTER TABLE SALES.CUSTOMER RENAME NYSALES.CUSTOMER;
--- SQL operation complete.
>> ALTER INDEX SALES.CUSTNAME RENAME NYSALES.CUSTNAME;
--- SQL operation complete.
To rename an object, follow these steps:
1. Start an SQLCI session. Enter a LOG command to initiate a log file for the
statements and commands entered in this session. Keep the log for your records.
2. Determine the name of the object that you want to rename.
3. Make sure that the new name is not already in use by entering the FILEINFO
command.
4. Enter the ALTER TABLE, ALTER INDEX, ALTER VIEW, or ALTER COLLATION
statement with the RENAME specification for the appropriate object.
5. SQL compile the invalidated programs.
6. For an audited table, index, or view, make a new TMF online dump.