Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to modify an individual procedure inside an Oracle DB Package? instead of recreating (modification is not done using a SQL editor, so cannot modify a place and easily recompile the package) the package again every time we need to do a minor change?


share|improve this question
up vote 2 down vote accepted

No, it is not possible to modify only a part of a package. You have to replace the whole package or package body. If you don't have the current version of your code you can extract it from the database if you have the appropriate permissions.

1) You can read it from the ALL_SOURCE view. Many graphical client tools. sqldeveloper or similar client tools can simplify the extraction of the source.

2) you can use the package DBMS_METADATA to write the source code to a file on the database server .

3) expdp/impdp or exp/imp can be used to extract the source of a whole schema.

But all these methods only work if the code is stored in clear text in the database. If the code was obfuscated using the Oracle wrap utility (or some equivalent method) you can only extract the obfuscated code which is useless for further processing.

So all in all you should use some source control system as already mentioned by @Colin 't Hart

share|improve this answer

Don't. Keep all your package sources in a source control system. That way you can go back to a previous version if you need to.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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