Import and replace package & procedure in oracle

6.7k Views Asked by At

I wanted to import packages and procedures to DB x from another DB y. I used expdp command with include=procedure, package in DB y to export the package and procedure.

In DB x some packages and procedure are already there, so those packages which exist, is showing "already exists", but I need to replace it with this dump as it has some modifications too. Is there any possible way where I can import and replace packages and procedures? It will be a hideous task to manually compile each package.

1

There are 1 best solutions below

0
dbusern On

See this thread for a similar question and a suggestion:

https://dba.stackexchange.com/questions/204968/how-to-replace-and-overwrite-all-existing-objects-in-oracle-with-impdp-for-full

One other option I can think of is to: take export of the source schema and then drop only all the procedures and functions and packages (since you want to replace them anyway) and then run the import which will create them with target code.