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
>>-ALTER--ACCESS_METHOD--access-method name---------------------> .-,--------------------------------------. V | >----+------------------------------------+-+------------------>< | (1) | +-+-ADD----+--| Purpose Option |-----+ | '-MODIFY-' | '-DROP--purpose name-----------------'
- See Purpose options
Element | Purpose | Restrictions | Syntax |
---|---|---|---|
access- method name | The access method to alter | A previous CREATE PRIMARY ACCESS_METHOD statement must register the access method in the database. | Database Object Name segment; see HCL 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. | Table 1 |
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
ALTER ACCESS_METHOD remote
ADD AM_INSERT=ins_remote,
ADD AM_READWRITE,
DROP AM_CHECK,
MODIFY AM_SPTYPE = ' X';
- Adds an am_insert purpose function
- Drops the am_check purpose function
- Sets (adds) the am_readwrite flag
- Modifies the am_sptype purpose value