Use Exp/imp or EXPDP/IMPDP export to import Oracle data table data under Linux

Source: Internet
Author: User
Tags create directory glassfish

First, the Environment configuration

1. Execution Environment:

Exp/imp can be executed either on the client or on the server side,
Clients that need to have Oracle installed on the client,
If it is a Linux system, it is logged in as an Oracle user and executed under the console.
It is recommended to perform exp on the server side, and the backup speed is fast.

2. If you do not configure an environment variable for Oracle's EXP/IMP command, go to the Bin directory of Oracle:

# Cd/opt/oracle_11/app/oracle/product/11.2.0/dbhome_1/bin

3. Configure temporary environment variables:

# Export oracle_home= "/opt/oracle_11/app/oracle/product/11.2.0/dbhome_1"

# Export Oracle_sid=glassfish

4. Switch to Oracle User

# su Oracle

Second, the Exp/imp way

1. Export All tables:

$./exp Userid=demo/[email Protected] File=./tb_test.dmp

2. Export some tables:

$./exp Userid=demo/[email protected] file=./tb_test.dmp Tables=tb_test,tb_user

3. Import all tables (you need to delete the existing table drop tables before importing):

$./imp Userid=demo/[email Protected] File=./tb_test.dmp

4. Import some tables:

$./imp Userid=demo/[email protected] file=./tb_test.dmp Tables=tb_test,tb_user

Three, EXPDP/IMPDP Way

1, first set up the directory :
Sql> Create directory directory name as ' a directory on the database server ', such as:
Sql> Create directory Dmpdir as '/home/dmpdir ';
Place the imported or exported files in this directory

2. Export and Import
To Sid=glassfish, to export the DMP account for demo, import DMP account for demo as an example.

To export data from SFZ:
$ EXPDP demo/[email protected] Directory=dmpdir dumpfile=tb_test.dmp

Import into Test :
$ IMPDP demo/[email protected] Directory=dmpdir dumpfile=tb_test.dmp

Use Exp/imp or EXPDP/IMPDP export to import Oracle data table data under Linux

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.