-20315 THE CURRENTLY ACTIVE VERSION FOR OBJECT object-name (object-type) CANNOT BE DROPPED

Explanation

One of the following has occurred:

  • Start of changeAn ALTER statement for the SQL routine or trigger specified a DROP VERSION clause that identified the currently active version to be dropped. You cannot drop the active version of a routine or advanced trigger.End of change
  • Start of changeA CREATE TRIGGER statement with an OR REPLACE clause was specified without a VERSION clause and the existing trigger is defined with more than a single version. This combination is not supported. End of change
  • Start of changeA CREATE TRIGGER statement with an OR REPLACE clause was specified without a VERSION clause and the existing trigger is defined with a single version but the version id is not V1. This combination is not supported.End of change
object-name
The name of the routine or trigger.
object-type
The type of routine or trigger.

System action

The statement cannot be processed.

User response

To drop all of the versions of the object, drop the object 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 object with the ACTIVATE VERSION clause. This statement changes which version is active.
  2. Issue the ALTER statement for the object with a DROP VERSION clause. This statement identifies and drops the previously active version.

SQLSTATE

55059