snippetMinor
How to replace and overwrite all existing objects in Oracle with impdp for full database import?
Viewed 0 times
overwritefullobjectsallexistingwithreplacedatabaseimpdpfor
Problem
I want to replace all the existing objects in my database, not just tables, into my current database.
I ran expdp with the parameter
Is there an equivalent of
Both databases are Oracle 12c on Windows 10.
I ran expdp with the parameter
full=yes as the system user, who I granted datapump_imp_full_database while logged in as sysdba, from the instance I am importing from. I ran impdp on the target database with the parameter table_exists_action=replace, but (understandably) only existing tables were replaced, but procedures, functions, views were not. Is there an equivalent of
table_exists_action for all objects? If not, how can I achieve this?Both databases are Oracle 12c on Windows 10.
Solution
I don't think there is a "Replace" option for non-table objects like procedures, packages etc.
The best option would be to drop the schema entirely before the datapump import. This way, datapump will re-create the schema and all of the contained objects.
The best option would be to drop the schema entirely before the datapump import. This way, datapump will re-create the schema and all of the contained objects.
Context
StackExchange Database Administrators Q#204968, answer score: 6
Revisions (0)
No revisions yet.