Start of change

-20315   THE CURRENTLY ACTIVE VERSION FOR ROUTINE routine-name (routine-type) CANNOT BE DROPPED

Explanation

The following has occurred:

  • The ALTER statement for the SQL routine specified a DROP VERSION clause that identified the currently active version to be dropped. You cannot drop the active version of a routine.
routine-name
The name of the routine.
routine-type
The type of routine.

System action

The statement cannot be processed.

User response

To drop all of the versions of the routine, drop the SQL routine without identifying a particular version.

To drop the currently active version and make a different version active, complete the following steps:

  1. Issue the ALTER statement for the SQL routine with the ACTIVATE VERSION clause. This statement changes which version is active.
  2. Issue the ALTER statement for the SQL routine with a DROP VERSION clause. This statement identifies and drops the previously active version.

SQLSTATE

55059

End of change