ALTER WRAPPER statement
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
Description
-
wrapper-name
- Specifies the name of the wrapper.
- OPTIONS
- Indicates what wrapper options are to be enabled, reset, or dropped.
- ADD
- Enables a new wrapper option.
- SET
- Changes the setting of a wrapper option. wrapper-option-name
- The wrapper option that is to be added or reset. Which options you can specify depends on the data source of the object for which a wrapper is being created. For a list of data sources and the wrapper options that apply to each, see Data source options. string-constant
- The wrapper option setting as a character string constant enclosed in single quotation marks.
- 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')