Solved

How to Import a complete Database in Oracle 9i

Posted on 2014-10-18
2
361 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:vpciii
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.

Join & Write a Comment

Suggested Solutions

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now