Skip to Main Content

Breadcrumb

XMAS_TREE

The AskTOM team is taking a break over the holiday season, so we're not taking questions or responding to comments. Please have a happy and safe festive season and as always, thanks for being a member of the AskTOM community.

Question and Answer

Chris Saxon

Thanks for the question, Sanjay.

Asked: January 16, 2017 - 1:08 pm UTC

Last updated: January 16, 2017 - 2:20 pm UTC

Version: 11.2 , 12c

Viewed 1000+ times

You Asked

Is it possible to change a string to another string in all procedures in a schema?

Use case: We have a function, say F_A. We want to place it within a package, say PG_B. Now we would like to change all calls to F_A in all procedures with PG_B.F_A

Bonus: If possible to use regexes!

ALTERNATIVE: One way is to make the change anyway. This will result in a lot of invalid procedures. Manually correct & re-compile them all. Very tedious.

and Chris said...

You need to get all your source code and update the references in there. Then recompile everything. This is not something you should do directly in the database.

Rating

  (1 rating)

We're not taking comments currently, so please try again later if you want to add a comment.

Comments

Sanjay Banerji, January 16, 2017 - 3:25 pm UTC

Very good.

Wish I thought of it myself.

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library