Solved

How to Import a complete Database in Oracle 9i

Posted on 2014-10-18
2
389 Views
Last Modified: 2014-10-19
I export a backup of my database using the following. How can I overwrite the existing database from a dump file.

set oracle_sid=scrp
exp scrapware/recycle grants=yes owner=scrapware

file=H:\scrp-dump\expSCRp%date:~4,2%%date:~7,2%%date:~-4%%time:~0,2%%time:~3,2%%

time:~6,2%%time:~-2%.dmp
0
Comment
Question by:Vincent Costanza
2 Comments
 
LVL 23

Assisted Solution

by:David
David earned 150 total points
ID: 40389610
0
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 350 total points
ID: 40391004
>>How can I overwrite the existing database from a dump file.

In Oracle a database refers to the files on disk.
An Instance is the memory and server processes.
A Schema is pretty much a user that owns objects.

Based on the question asked:
I assume you exported a schema from one database and want to overwrite that schema in a different database.

If so:
You shouldn't need fromuser and touser if you want to import it into the same schema in a different database.

Binary copy the file from serverA to serverB.  This isn't necessary because the classic exp/imp utilities can run from the client side but it makes things simpler if the file is on the database server.

In the other database, drop and recreate the user then:
imp scrapware/recycle full=Y
file=H:\scrp-dump\expSCRp%date:~4,2%%date:~7,2%%date:~-4%%time:~0,2%%time:~3,2%%
time:~6,2%%time:~-2%.dmp

If you want to do something different, please let us know what it is.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question