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