Copy Schema [message #8496] |
Mon, 25 August 2003 12:51 |
Variant_530
Messages: 4 Registered: August 2003
|
Junior Member |
|
|
How do I copy database objects from one schema to another. I need to copy all the objects and their properties. Is there some simple way to do this?
|
|
|
|
|
|
Re: Copy Schema [message #8504 is a reply to message #8501] |
Tue, 26 August 2003 16:13 |
Variant_530
Messages: 4 Registered: August 2003
|
Junior Member |
|
|
Thank you very much for your response.
Now, how do I do what you have described.
Step by step.
Please forgive my ignorance. This is why I posted the question on the Newbie forum.
|
|
|
Re: Copy Schema [message #8505 is a reply to message #8504] |
Tue, 26 August 2003 18:09 |
Todd Barry
Messages: 4819 Registered: August 2001
|
Senior Member |
|
|
Mahesh actually gave you the step-by-step instructions as to how to export and import objects. I would recommend you consult the documentation (available online at tahiti.oracle.com - free registration) for further details regarding the export and import utilities.
|
|
|
Re: Copy Schema [message #8507 is a reply to message #8504] |
Tue, 26 August 2003 19:36 |
|
Barbara Boehmer
Messages: 9088 Registered: November 2002 Location: California, USA
|
Senior Member |
|
|
Mahesh Rajendran's example was very nice. The following just adds a bit more detailed step by step explanation for newbies. Suppose you want to copy all objects and their properties from a schema named schema1 to a schema named schema2:
1. Get to an operating system prompt in an appropriate directory. For example, on my Windows NT system, I could open a DOS command window in the C:oracle81bin directory.
2. You will need to know the username and password of an account with dba privileges, such as username system and password manager, which are the original defaults that come with Oracle, if you haven't changed them.
3. To export, type the line below at the operating system prompt. You may need to substitute the appropriate username and password for system and manager, as mentioned in number 2 above and you will need to substitute the actual schema name for schema1.
exp system/manager owner=schema1 file=myfile.dmp
4. You will see a bunch of stuff on your screen, as the export of schema1 to the file myfile.dmp is taking place. When it is done, you will see the operating system prompt again.
5. To import, type the line below at the operating system prompt. You may need to substitute the appropriate username and password for system and manager, as mentioned in number 2 above and you will need to substitute the actual schema names for schema1 and schema2.
imp system/manager fromuser=schema1 touser=schema2 file=myfile.dmp
6. You will see a bunch of stuff on your screen, as the import from schema1 to schema2 using myfile.dmp is taking place. When it is done, you will see the operating system prompt again.
|
|
|
Re: Copy Schema [message #8516 is a reply to message #8507] |
Wed, 27 August 2003 11:11 |
Variant_530
Messages: 4 Registered: August 2003
|
Junior Member |
|
|
Thank you both.
Mahesh for actually getting a solution to my question, and to Barbara for putting that solution into an easily understood concise step-by-step statement.
|
|
|
|