The ALTER ACCESS_METHOD (+) statement
The ALTER ACCESS_METHOD statement changes the attributes of a user-defined access method in the sysams system catalog table.
Syntax
Element | Purpose | Restrictions | Syntax |
---|---|---|---|
access- method name | The access method to alter | A previous CREATE SECONDARY ACCESS_METHOD statement must register the access method in the database. | Database Object Name segment; see Informix® Guide to SQL: Syntax. |
purpose name | A keyword that indicates which purpose function, purpose value, or purpose flag to drop | A previous statement must associate the purpose name with this access method. | Purpose functions, purpose flags, and purpose values |
Usage
Use ALTER ACCESS_METHOD to modify the definition of a user-defined access-method. You must be the owner of the access method or have DBA privileges to alter an access method.
When you alter an access method, you change the purpose-option specifications (purpose functions, purpose flags, or purpose values) that define the access method. For example, you alter an access method to assign a new purpose-function name or provide a multiplier for the scan cost.
If a transaction is in progress, the database server waits to alter the access method until the transaction is committed or rolled back. No other users can execute the access method until the transaction has completed.
Sample statements
- Adds an am_insert purpose function
- Drops the am_check purpose function
- Sets (adds) the am_readwriteam_unique flag
- Modifies the am_sptype purpose value