Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to Import a complete Database in Oracle 9i

Posted on 2014-10-18
2
Medium Priority
?
532 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 600 total points
ID: 40389610
0
 
LVL 78

Accepted Solution

by:
slightwv (䄆 Netminder) earned 1400 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
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.
Suggested Courses

916 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