Copying all objects to another user
I want to copy all the objects (tables, stored procedures, functions, etc.) of one user to another user. Can you please tell me how to achieve this in Oracle 9i?
One of the easiest ways to accomplish this task is to use Oracle's export and import utilities. Export just that schema owner's objects similar to the following (I'll export the SCOTT schema objects):
exp userid=system file=scott.dmp owner=scott
Now, you'll want to import these objects into another schema (I'll use the HR user in my example):
imp userid=system file=scott.dmp fromuser=scott touser=hr
The FROMUSER and TOUSER parameters will force the import process to import into the HR schema.
This was first published in March 2006