Solved

How to Import a complete Database in Oracle 9i

Posted on 2014-10-18
2
400 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows how to recover a database from a user managed backup
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

789 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