Oracle Data Import and Export usage

Source: Internet
Author: User

1.1 Basic commands

1. Get help

$ Exp help = y
$ Imp help = y

2. Three ways of working

(1) Interactive Mode
$ Exp // enter the required parameters as prompted
(2) Command Line
$ Exp user/pwd @ dbname file =/Oracle/test. dmp full = y // enter the required parameters in the command line.

(3) parameter file Method
$ Exp parfile = username. Par // enter the required parameters in the parameter file
Parameter file username. Par content userid = username/userpassword buffer = 8192000
Compress = n grants = y
File =/Oracle/test. dmp full = y

3. Three Modes

(1) Export/import data from a specified table.
Export:
Export one or more tables:
$ Exp user/pwd File =/DIR/xxx. dmp log = xxx. Log tables = Table1, Table2
Export some data of a table
$ Exp user/pwd File =/DIR/xxx. dmp log = xxx. Log tables = Table1 query = \ "where col1 = \'... \'
And col2 \ <... \"
Import:
Import one or more tables
$ Imp user/pwd File =/DIR/xxx. dmp log = xxx. Log tables = Table1, Table2 fromuser = dbuser touser = dbuser2 commit = y ignore = y

(2) Export/Import all objects and data of a specified user in user mode.
Export:
$ Exp user/pwd File =/DIR/xxx. dmp log = xxx. Log owner = (XX, YY)
Export only data objects, not data (rows = N)
$ Exp user/pwd File =/DIR/xxx. dmp log = xxx. Log owner = user rows = N
Import:
$ Imp user/pwd File =/DIR/xxx. dmp log = xxx. Log fromuser = dbuser touser = dbuser2
Commit = y ignore = y
(3) Export/Import and Export all objects in the database in full database mode:
$ Exp user/pwd File =/DIR/xxx. dmp log = xxx. Log full = ycommit = y ignore = y
Import:
$ Imp user/pwd File =/DIR/xxx. dmp log = xxx. Log fromuser = dbuser touser = dbuser2

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.