Oracle Import/Export Exp/imp

Source: Internet
Author: User

export exported data, DMP file, is actually a select.
Import imports data, is actually insert


Defect: Export requires full table export, slow, not real-time, and logical backup


1:exp
Exp Export is divided into several modes
Table mode: Export the table specified under a user
User mode: Export all objects under a user
Database schema: Export all objects in the database except SYS, exp_full_database permissions
Transportable tablespace: Export all objects of a tablespace

Exp Statement Use Help: $ exp help=y

1.1: Export the specified table under a user
$ exp Doiido/doiido file=doiido.dmp tables= (doiido,boy) Log=doiido.log

1.2: Export all objects under a user
$ exp Doiido/[email protected] file=doiido.dmp owner=doiido log=doiido.log


1.3: Export the entire database (except for the data dictionary under sys user)
sql> Grant Exp_full_database to Doiido;
$ exp Doiido/doiido file=doiido.dmp full=y log=doiido.log

1.4: Export Table space
$ exp System/[email protected] file=doiido.dmp tablespaces= (doiido)

1.5: Remote export under windows
C:\windows\system32>exp doiido/doiido@192.168.100.200:1521/doiido file=d:\doiido. DMP Tables=boy log=d:\ Doiido.log


Two ways to export
Traditional path: Use SQL statement Query method, need to be cached
Direct path: Use data block extraction, direct=y



2:imp Import
1: Import a user-specified table

$ imp doiido/doiido file=doiido.dmp tables= (doiido,boy) Log=doiido.log


2: Import user Test all objects to Doiido
$ imp doiido/doiido file=doiido.dmp fromuser=test touser=doiido log=doiido.log

Order of import execution
CREATE TABLE structure
Import data for a table
Create related indexes
Import Trigger
Enable integrity constraints on imported tables
Create all bitmaps, functions, and other indexes

IMP when the imported table already exists
Ignore=y # #表示导入的时候ignores objects with the same name , the imported operation is append


3: Other
(1) Import and export process can replace users, but must have the same tablespace in, so that the import can be successful
(2) Wainings is normal when exporting, because some indexes or primary foreign keys are not exported

(3) When importing and exporting, it is important to note that the character set must be the same or a subset


Oracle Import/Export Exp/imp

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.