Take the 2-minute tour ×
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.

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?

Thanks.

share|improve this question

2 Answers 2

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

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

Your Answer

 
discard

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.