I have a few Stored Procedures for my application (DB2 V 9.7.3). I need to rebind the packages corresponding to the Stored Procedures. I wish to get having them recompiled inside a Stored Procedure by retrieving the package names via a Cursor and rebind the packages one by one.

The command to do is

REBIND PACKAGE <schema>.<pkgName>

To execute this command, I tried the following options but both of them failed.



Is there a way to get this accomplished? Any help would be highly appreciated.


There is a way to rebind the packages via the following routine

  • P -> stands for Stored Procedure
  • SCHEMA1.PROC1 -> stored procedure name with the schema
  • ANY -> an optional input argument supported for backward compatability. You can use ANY or CONSERVATIVE.

    Please refer these links for more information.



Note: Explicitly rebinding the associated package does not revalidate the routine. Revalidate an invalid routine by using automatic revalidation or explicitly by using the ADMIN_REVALIDATE_DB_OBJECTS procedure. Routine revalidation automatically rebinds the dependent package.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.