Solved

How do you restore an Oracle DB from a .dmp file?

Posted on 2011-02-11
12
911 Views
Last Modified: 2012-05-11
I have a DMP file from an Oracle database. It is version 10g1.

I've just installed Oracle 10g2 Express Edition (I couldnt find 10g1 on the Oracle website).

Can I restore this 10g1 DMP file to 10g2 Express Edition?

How do I restore the database?


Thanks,
ob1

0
Comment
Question by:ob1_
  • 7
  • 2
  • 2
  • +1
12 Comments
 
LVL 14

Accepted Solution

by:
leoahmad earned 125 total points
Comment Utility
yes,
you may use oracle import utility for that
or may be some external utility like toad.

SQL> host imp
0
 
LVL 6

Author Comment

by:ob1_
Comment Utility
ok thanks - i am getting prompted for usrname/pw. should i use the system account i specified the pw for during Oracle setup? what is the username for this? if not how do i create a user?
0
 
LVL 6

Author Comment

by:ob1_
Comment Utility
nevermind i was typing the wrong password.

i accepted all the defaults and it says "FromUser 'System' not found in export file. Import terminated successfully with warnings".

is that  normal?
0
 
LVL 1

Assisted Solution

by:hraja77
hraja77 earned 250 total points
Comment Utility
what user exported the dmp file - thats the user you want to import i guess - so you should that user in fromuser='$$$$';
paste your string here so i can have alook
0
 
LVL 6

Author Comment

by:ob1_
Comment Utility
i am not sure - it was exported from another system i don't have access to. as long as i can get to the data i don't care if the usernames are the same.

is there a way for me to see the database in Oracle now that i have imported it?
0
 
LVL 1

Assisted Solution

by:hraja77
hraja77 earned 250 total points
Comment Utility
if you want to import into schema name 'TOM' from schema named 'JACK'
then you woud need to say fromuser='JACK'
                                            to_user='TOM'

if you put in a dodgy user say fromuser='JAK' it will come back sucessfull as that user was not in the dmp file
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 76

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 125 total points
Comment Utility
You will likely need to precreate the tablespaces.

To get a look at what is in the dmp file:
imp system/password file=filenaem.dmp show=y
0
 
LVL 6

Author Comment

by:ob1_
Comment Utility
if i run "imp system/password file=filenaem.dmp show=y" i get "unknow command beginning 'imp system...' - rest of line ignored
0
 
LVL 6

Author Comment

by:ob1_
Comment Utility
it says "Warning: the objects were exported by SAMPLE, not by you"

i am trying to create a user for SAMPLE in Oracle so I can specify touser=SAMPLE but when I try to run this command all I get back is a new line that says "2".

 
create user SAMPLE identified by password
0
 
LVL 6

Author Comment

by:ob1_
Comment Utility
ok now i have entered "create user SAMPLE identified by password;" with the semicolon and it comes back with "SP2 - 0640" - any help??
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
Are you now able to run the imp command?
Try this:

imp system/password file=filename fromuser=sample touser=sample
0
 
LVL 6

Author Closing Comment

by:ob1_
Comment Utility
used partial answers to resolve question
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user 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.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

762 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

9 Experts available now in Live!

Get 1:1 Help Now