Showing posts with label impdp. Show all posts
Showing posts with label impdp. Show all posts

Friday, June 28, 2013

How to import an Oracle database schema to another database with a different schema name

During import, whenever your source schema name is different from target schema name, use REMAP_SCHEMA parameter:
impdp system/pwd dumpfile=sourceschema.dmp directory=DATA_PUMP_DIR schemas=sourceschema logfile=sourceschema_imp.log remap_schema=sourceschema:targetschema

Tuesday, June 25, 2013

Fixing warnings and errors after running impdp

First check the registry to see if the list of invalid objects by running the query below and see which objects have status set to INVALID:
SELECT comp_id, version, status FROM dba_registry;
or simply do:
SELECT COUNT(*) FROM dba_registry WHERE status='INVALID';
If there are any invalid objects, run utlrp script located in which is located in $ORACLE_HOME/rdbms/admin/utlrp.sql. This scrip will recompile inalid objects.
@?/rdbms/admin/utlrp.sql
The line above will run the script.

Next step is to check dba_registry again to see if all invalid objects have been fixed.