Skip to Main Content

Breadcrumb

May 4th

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)

Is this answer out of date? If it is, please let us know via 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