The DROP INDEX statement deletes an index.
Make certain that the name you use in the DROP INDEX statement matches the SQLNAME attribute of the KEY that you wish to DROP.
Enter the DROP INDEX statement in the numbered area of an EDIT Source Member Panel. See How to Submit SQL Statements for the steps to obtain the panel and an explanation of the fields on the panel.
Specifying Authorization ID
To be certain you are dropping a desired index, qualify the index name with the authorization ID in the DROP statement. If you specify an authorization ID for the index name, it must be the same as the authorization ID of the table name you specify in the FROM table-name clause in the DROP statement. If you do not specify the authorization ID, CA Datacom Datadictionary uses the current default authorization ID for the online session.
Impact
Dropping an index removes the index from the Index Area (IXX) and removes the index definition from the Directory (CXX) and CA Datacom Datadictionary. All plans dependent on the indexed table are marked invalid. You can run a CA Datacom Datadictionary Relationship Report to find out what plans are dependent on a table. See the CA Datacom Datadictionary Batch Reference Guide for information on running a Relationship Report.
Example Source Member
The following example shows the DROP INDEX statement. See How to Submit SQL Statements for the steps to obtain the panel and an explanation of the fields on the panel.
=> => => ------------------------------------------------------------------------------- Interactive SQL Service Facility SQLMAINT Source Panel S01S EDIT Member: DINDEX Output Line Limit: 01000 Person: JONES Current Authid: JONES Description: DROP INDEX EMPLOYEE_INDEX ------------------------------------------------------------------------------- ====== ========================== T O P ======================================= 000001 drop index employee_index from employees; ====== ======================= B O T T O M ==================================== PF1=HELP PF2=END PF3=SPLIT PF4=PROCESS PF5=TOP PF6=BOTTOM PF7=BACKWARD PF8=FORWARD PF9=EXECUTE PF10=LEFT PF11=RIGHT PF12=ALTERNATE
The DROP statement is required, as are the keywords INDEX and FROM. The keyword INDEX must be followed by the name of the index (employee_index in this example) you are dropping. The keyword FROM must be followed by the name of the table (employees in this example) to which the index belongs.
Once this source member is executed, you cannot recall the index definition. If you want to use this index again, you must re-create it.
See DROP for more information on the syntax of the DROP statement.
After placing your SQL statement in the numbered line area on the Source Panel, you can perform the following:
Example Output Member
When you execute the statement, you receive a Output Panel similar to the following example:
=> => => --------------------------------------------------------------------------- >>> Interactive SQL Service Facility SQLMAINT Output Panel S01O EDIT Member= DINDEX Description: DROP INDEX EMPLOYEE_INDEX ------------------------------------------------------------------------------- ====== ========================== T O P ======================================= 000001 (OUTPUT CREATED FROM SOURCE MEMBER DINDEX ) 000002 drop index employee_index from employees; 000003 ---------+---------+---------+---------+---------+---------+---------+-- 000004 STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 0 000005 ---------+---------+---------+---------+---------+---------+---------+-- 000006 SQL STATEMENTS ASSUMED TO BE BETWEEN COLUMNS 1 AND 72 000007 NUMBER OF INPUT RECORDS READ IS 0001 000008 NUMBER OF SQL STATEMENTS PROCESSED IS 0001 ====== ======================= B O T T O M ==================================== PF1=HELP PF2=END PF3=SPLIT PF4=PROCESS PF5=TOP PF6=BOTTOM PF7=BACKWARD PF8=FORWARD PF9=EXECUTE PF10=LEFT PF11=RIGHT PF12=ALTERNATE
To exit from the Output Panel, you can perform one of the following:
|
Copyright © 2014 CA.
All rights reserved.
|
|