Friday, 22 April 2016

How to import database from a dump file ?


Import to Oracle database from a dump file

1. Login with database user for example: oracle

2. Use imp command to import database.
  Oracle$ imp

3. Enter user name and password for which database we want to import the dump
  Username: db_test
  Password: test123

4. Enter dump file name to be imported. (here expdat.dmp is the default dump file name)
    To change  the dump file name enter the file name with extension .dmp
    Import file: expdat.dmp> mydump.dmp

5. Enter buffer size (Here 8192 is the minimum buffer size; and 30720 is default buffer size).
    If we want to change the buffer size enter the size.
    Enter insert buffer size (minimum is 8192) : 30720 > 9999

6. Provide options in next 5 steps :
    List contents of import file only (yes/no): no >  [ENTER]
  Ignore create error due to object existence (yes/no): no > [ENTER]
  Import grants (yes/no): yes >  [ENTER]
  Import table data (yes/no): yes >  [ENTER]
  Import entire export file (yes/no): no > yes

Now the dump file will be imported.


No comments:

Post a Comment

Note: only a member of this blog may post a comment.