• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 954
  • Last Modified:

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

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
ob1_
Asked:
ob1_
  • 7
  • 2
  • 2
  • +1
4 Solutions
 
Muhammad Ahmad ImranDatabase DeveloperCommented:
yes,
you may use oracle import utility for that
or may be some external utility like toad.

SQL> host imp
0
 
ob1_Author Commented:
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
 
ob1_Author Commented:
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
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

 
hraja77Commented:
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
 
ob1_Author Commented:
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
 
hraja77Commented:
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
 
slightwv (䄆 Netminder) Commented:
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
 
ob1_Author Commented:
if i run "imp system/password file=filenaem.dmp show=y" i get "unknow command beginning 'imp system...' - rest of line ignored
0
 
ob1_Author Commented:
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
 
ob1_Author Commented:
ok now i have entered "create user SAMPLE identified by password;" with the semicolon and it comes back with "SP2 - 0640" - any help??
0
 
slightwv (䄆 Netminder) Commented:
Are you now able to run the imp command?
Try this:

imp system/password file=filename fromuser=sample touser=sample
0
 
ob1_Author Commented:
used partial answers to resolve question
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

  • 7
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now