Start of change

-951   OBJECT object-name OBJECT TYPE object-type IS IN USE AND CANNOT BE THE TARGET OF THE SPECIFIED ALTER STATEMENT

Explanation

The options for the SQL routine cannot be altered if the version of the routine is currently active under the same thread that issued the ALTER statement, and one or more of the options that is being altered result in the rebinding or regeneration of the package for the SQL routine.

object-name
The name of the object.
object-type
The type of object.

If the failing statement was either ALTER PROCEDURE ACTIVATE VERSION or ALTER FUNCTION ACTIVATE VERSION, the active version of a currently active SQL routine under nested routine invocation by the same thread cannot be changed.

System action

The statement cannot be processed.

Programmer response

Review the information about altering options and which alterations result in the rebinding or regeneration of associated packages.

Verify that the logic for nested routine invocation involving SQL routines and the ALTER statements are working as intended. Pay additional attention to CALL :HV statements with the setting of special register CURRENT ROUTINE VERSION, as the combination of these statements can produce unwanted logic flows. If it is necessary to use multiple versions of the same SQL routine in the nested recursive chain, consider using CALL :HV and the special register CURRENT ROUTINE VERSION to control which version is used, instead of the ALTER ACTIVATE VERSION clause.

SQLSTATE

55007

End of change