The
ALTER WRAPPER statement is used to update the properties of a wrapper.
Invocation
This statement can be embedded
in an application program or issued through the use of dynamic SQL
statements. It is an executable statement that can be dynamically
prepared only if DYNAMICRULES run behavior is in effect for the package
(SQLSTATE 42509).
Authorization
The privileges
held by the authorization ID of the statement must include DBADM authority.
Syntax
>>-ALTER WRAPPER--wrapper-name--OPTIONS------------------------->
.-,-------------------------------------------------.
V .-ADD-. |
>--(----+-+-----+--wrapper-option-name--string-constant-+-+--)-><
| '-SET-' |
'-DROP--wrapper-option-name---------------------'
Description
- wrapper-name
- Specifies the name of the wrapper.
- OPTIONS
- Indicates what wrapper options are to be enabled, reset, or dropped.
- ADD
- Enables a server option.
- SET
- Changes the setting of a wrapper option.
- wrapper-option-name
- Names a wrapper option that is to be enabled or reset. Currently
the only supported wrapper option name is DB2_FENCED.
- string-constant
- Specifies the setting for wrapper-option-name as
a character string constant. Valid values are 'Y' or 'N'. The default
value for relational wrappers is 'N', and the default value for non-relational
wrappers is 'Y'.
- DROP wrapper-option-name
- Drops a wrapper option.
Notes
- Execution of the ALTER WRAPPER statement does not include checking
the validity of wrapper-specific options.
- An ALTER WRAPPER statement
within a given unit of work (UOW) cannot be processed (SQLSTATE 55007)
if the UOW already includes one of the following items:
- A SELECT statement that references a nickname that belongs to
the wrapper.
- An open cursor on a nickname that belongs to the wrapper.
- An INSERT, DELETE, or UPDATE statement issued against a nickname
that belongs to the wrapper.
Example
Set
the DB2_FENCED option on for wrapper NET8.
ALTER WRAPPER NET8 OPTIONS (SET DB2_FENCED 'Y')